From: Russ Allbery Date: Mon, 9 May 2005 18:40:09 +0000 (+0000) Subject: Import OpenAFS 1.3.82 from /afs/grand.central.org/software/openafs X-Git-Tag: upstream/1.3.82 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=281140c2d39985e7399be607b07cff490cf903db;p=packages%2Fo%2Fopenafs.git Import OpenAFS 1.3.82 from /afs/grand.central.org/software/openafs --- diff --git a/Makefile.in b/Makefile.in index 62af38e99..1b745937e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -53,15 +53,15 @@ install_only_libafs: only_libafs install_dirs dest: all dest_dirs $(MAKE) build COMPILE_PART2B=dest - -${INSTALL} ${srcdir}/doc/LICENSE ${DEST}/LICENSE + -${INSTALL} ${srcdir}/src/LICENSE ${DEST}/LICENSE dest_nolibafs: all_nolibafs dest_dirs $(MAKE) build TARGET=finale_nolibafs COMPILE_PART2B=dest - -${INSTALL} ${srcdir}/doc/LICENSE ${DEST}/LICENSE + -${INSTALL} ${srcdir}/src/LICENSE ${DEST}/LICENSE dest_only_libafs: only_libafs dest_dirs $(MAKE) build TARGET=libafs COMPILE_PART2B=dest - -${INSTALL} ${srcdir}/doc/LICENSE ${DEST}/LICENSE + -${INSTALL} ${srcdir}/src/LICENSE ${DEST}/LICENSE packages: dest @case ${SYS_NAME} in \ @@ -73,7 +73,7 @@ packages: dest ${COMPILE_PART1} packaging/HP-UX && swpackage -s psf-1.2.10-transarc-paths-11.11 ;; \ ia64_hpux1122 ) \ ${COMPILE_PART1} packaging/HP-UX && swpackage -s psf-1.2.10-transarc-paths-11.22 ;; \ - ia64_hpux1123 ) \ + ia64_hpux1123 | hp_ux1123) \ ${COMPILE_PART1} packaging/HP-UX && swpackage -s psf-1.2.10-transarc-paths-11.23 ;; \ *) \ echo Not building packages for ${SYS_NAME} ;; \ @@ -416,7 +416,7 @@ libuafs: libuafs_setup vlserver_depinstall rx_depinstall fsint_depinstall \ rxstat_depinstall lwp_depinstall sys_depinstall des set -x; \ case ${SYS_NAME} in \ - hp_ux102* | *_obsd* | sun*_4* | *_nbsd*| hp_ux11i | ia64_hpux112*) \ + hp_ux102* | *_obsd* | sun*_4* | *_nbsd*| hp_ux11i | hp_ux112* | ia64_hpux112*) \ echo Skipping libuafs for ${SYS_NAME} ;; \ * ) \ ${COMPILE_PART1} libuafs ${COMPILE_PART2} ;; \ @@ -446,7 +446,7 @@ butm: cmd comerr bubasics usd uss butc: cmd comerr bubasics butm budb bucoord cmd rxgen rx ${COMPILE_PART1} butc ${COMPILE_PART2} -tbutc: cmd comerr bubasics butm budb bucoord cmd butc +tbutc: cmd comerr bubasics butm budb bucoord cmd butc libadmin case ${SYS_NAME} in \ alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \ ${COMPILE_PART1} tbutc ${COMPILE_PART2} ;; \ @@ -555,13 +555,13 @@ jafsadm: libjafsadm finale: project cmd comerr afsd butc tbutc @ENABLE_KERNEL_MODULE@ libuafs audit kauth log package \ ptserver scout bu_utils ubik uss bozo vfsck volser tvolser \ venus update xstat afsmonitor dauth rxdebug libafsrpc \ - libafsauthent shlibafsrpc shlibafsauthent libadmin + libafsauthent shlibafsrpc shlibafsauthent libadmin login ${COMPILE_PART1} finale ${COMPILE_PART2} finale_nolibafs: project cmd comerr afsd butc tbutc libuafs audit kauth log package \ ptserver scout bu_utils ubik uss bozo vfsck volser tvolser \ venus update xstat afsmonitor dauth rxdebug libafsrpc \ - libafsauthent shlibafsrpc shlibafsauthent libadmin + libafsauthent shlibafsrpc shlibafsauthent libadmin login ${COMPILE_PART1} finale ${COMPILE_PART2} # Use washtool to ensure MakefileProto is current and obj/libafs exists. diff --git a/README.OBSOLETE b/README.OBSOLETE index 2af6f10f0..b7ccaaddb 100644 --- a/README.OBSOLETE +++ b/README.OBSOLETE @@ -1,4 +1,4 @@ -The mpp and package included with AFS are obsolete. ntp is no longer included. +The ntp, mpp and package included with AFS are obsolete. The ntp package is intended to only maintain time on servers; Clients get time from servers unless afsd is started with -nosettime. That said, diff --git a/acinclude.m4 b/acinclude.m4 index 5aac39851..cf8df8b4c 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -498,6 +498,10 @@ else AFS_SYSNAME="rs_aix52" enable_pam="no" ;; + power*-ibm-aix5.3*) + AFS_SYSNAME="rs_aix53" + enable_pam="no" + ;; x86_64-*-linux-gnu) AFS_SYSNAME="amd64_linuxXX" enable_pam="no" @@ -570,6 +574,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) LINUX_FS_STRUCT_INODE_HAS_I_SB_LIST LINUX_FS_STRUCT_INODE_HAS_I_SECURITY LINUX_FS_STRUCT_INODE_HAS_INOTIFY_LOCK + LINUX_FS_STRUCT_INODE_HAS_INOTIFY_SEM LINUX_INODE_SETATTR_RETURN_TYPE LINUX_WRITE_INODE_RETURN_TYPE LINUX_IOP_NAMEIDATA @@ -692,6 +697,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) if test "x$ac_cv_linux_fs_struct_inode_has_inotify_lock" = "xyes"; then AC_DEFINE(STRUCT_INODE_HAS_INOTIFY_LOCK, 1, [define if your struct inode has inotify_lock]) fi + if test "x$ac_cv_linux_fs_struct_inode_has_inotify_sem" = "xyes"; then + AC_DEFINE(STRUCT_INODE_HAS_INOTIFY_SEM, 1, [define if your struct inode has inotify_sem]) + fi if test "x$ac_cv_linux_func_recalc_sigpending_takes_void" = "xyes"; then AC_DEFINE(RECALC_SIGPENDING_TAKES_VOID, 1, [define if your recalc_sigpending takes void]) fi @@ -1003,6 +1011,7 @@ AC_CHECK_TYPE(ssize_t, int) AC_SIZEOF_TYPE(long) AC_CHECK_FUNCS(timegm) +AC_CHECK_FUNCS(daemon) dnl Directory PATH handling if test "x$enable_transarc_paths" = "xyes" ; then diff --git a/aclocal.m4 b/aclocal.m4 index e967b3002..3096218e2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -510,6 +510,10 @@ else AFS_SYSNAME="rs_aix52" enable_pam="no" ;; + power*-ibm-aix5.3*) + AFS_SYSNAME="rs_aix53" + enable_pam="no" + ;; x86_64-*-linux-gnu) AFS_SYSNAME="amd64_linuxXX" enable_pam="no" @@ -582,6 +586,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) LINUX_FS_STRUCT_INODE_HAS_I_SB_LIST LINUX_FS_STRUCT_INODE_HAS_I_SECURITY LINUX_FS_STRUCT_INODE_HAS_INOTIFY_LOCK + LINUX_FS_STRUCT_INODE_HAS_INOTIFY_SEM LINUX_INODE_SETATTR_RETURN_TYPE LINUX_WRITE_INODE_RETURN_TYPE LINUX_IOP_NAMEIDATA @@ -704,6 +709,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) if test "x$ac_cv_linux_fs_struct_inode_has_inotify_lock" = "xyes"; then AC_DEFINE(STRUCT_INODE_HAS_INOTIFY_LOCK, 1, [define if your struct inode has inotify_lock]) fi + if test "x$ac_cv_linux_fs_struct_inode_has_inotify_sem" = "xyes"; then + AC_DEFINE(STRUCT_INODE_HAS_INOTIFY_SEM, 1, [define if your struct inode has inotify_sem]) + fi if test "x$ac_cv_linux_func_recalc_sigpending_takes_void" = "xyes"; then AC_DEFINE(RECALC_SIGPENDING_TAKES_VOID, 1, [define if your recalc_sigpending takes void]) fi @@ -1015,6 +1023,7 @@ AC_CHECK_TYPE(ssize_t, int) AC_SIZEOF_TYPE(long) AC_CHECK_FUNCS(timegm) +AC_CHECK_FUNCS(daemon) dnl Directory PATH handling if test "x$enable_transarc_paths" = "xyes" ; then @@ -1666,6 +1675,21 @@ ac_cv_linux_fs_struct_inode_has_inotify_lock=no)]) AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_inotify_lock) CPPFLAGS="$save_CPPFLAGS"]) +AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_INOTIFY_SEM], [ +AC_MSG_CHECKING(for inotify_sem in struct inode) +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" +AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_inotify_sem, +[ +AC_TRY_COMPILE( +[#include ], +[struct inode _inode; +printf("%x\n", _inode.inotify_sem);], +ac_cv_linux_fs_struct_inode_has_inotify_sem=yes, +ac_cv_linux_fs_struct_inode_has_inotify_sem=no)]) +AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_inotify_sem) +CPPFLAGS="$save_CPPFLAGS"]) + AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD], [ AC_MSG_CHECKING(for i_mapping_overload in struct inode) @@ -2582,6 +2606,19 @@ case $AFS_SYSNAME in EXTRA_VLIBOBJS="fstab.o" ;; + ppc_darwin_80) + AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration" + LEX="lex -l" + MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}' + KROOT= + KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers' + LWP_OPTMZ="-O2" + REGEX_OBJ="regex.o" + XCFLAGS="-no-cpp-precomp" + TXLIBS="-lncurses" + EXTRA_VLIBOBJS="fstab.o" + ;; + ppc_linux*) KERN_OPTMZ=-O2 LEX="flex -l" @@ -2640,6 +2677,22 @@ case $AFS_SYSNAME in SHLIB_LINKER="${MT_CC} -bM:SRE -berok" AIX64="" ;; + + rs_aix53) + DBG="-g" + LEX="lex" + LIBSYS_AIX_EXP="afsl.exp" + MT_CC="xlc_r" + MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}' + MT_LIBS="-lpthreads" + SHLIB_SUFFIX="o" + TXLIBS="-lcurses" + XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void" + XLIBS="${LIB_AFSDB} -ldl" + SHLIB_LINKER="${MT_CC} -bM:SRE -berok" + AIX64="" + ;; + s390_linux22) CC="gcc" CCOBJ="gcc" @@ -2684,7 +2737,7 @@ case $AFS_SYSNAME in MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}' MT_LIBS="-lpthread" PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC" - SHLIB_LDFLAGS="-shared -Xlinker -x" + SHLIB_LDFLAGS="-shared -Xlinker -x -Xlinker -Bsymbolic" TXLIBS="-lncurses" XCFLAGS="-O -g -D_LARGEFILE64_SOURCE -D__s390x__" YACC="bison -y" diff --git a/configure b/configure index 0e11a6bba..63cfff6ba 100644 --- a/configure +++ b/configure @@ -752,7 +752,7 @@ fi PACKAGE=openafs -VERSION=1.3.81 +VERSION=1.3.82 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -2680,6 +2680,10 @@ echo "configure:2417: checking your AFS sysname" >&5 AFS_SYSNAME="rs_aix52" enable_pam="no" ;; + power*-ibm-aix5.3*) + AFS_SYSNAME="rs_aix53" + enable_pam="no" + ;; x86_64-*-linux-gnu) AFS_SYSNAME="amd64_linuxXX" enable_pam="no" @@ -2699,7 +2703,7 @@ echo "configure:2417: checking your AFS sysname" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include $CPPFLAGS" cat > conftest.$ac_ext < int main() { @@ -2708,7 +2712,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_is_uml=yes else @@ -2743,7 +2747,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) fi echo $ac_n "checking if $CC accepts -march=pentium""... $ac_c" 1>&6 -echo "configure:2747: checking if $CC accepts -march=pentium" >&5 +echo "configure:2751: checking if $CC accepts -march=pentium" >&5 save_CFLAGS="$CFLAGS" CFLAGS="-MARCH=pentium" if eval "test \"`echo '$''{'openafs_gcc_supports_march'+set}'`\" = set"; then @@ -2751,14 +2755,14 @@ if eval "test \"`echo '$''{'openafs_gcc_supports_march'+set}'`\" = set"; then else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* openafs_gcc_supports_march=yes else @@ -2781,7 +2785,7 @@ CFLAGS="$save_CFLAGS" echo $ac_n "checking if $CC needs -fno-strength-reduce""... $ac_c" 1>&6 -echo "configure:2785: checking if $CC needs -fno-strength-reduce" >&5 +echo "configure:2789: checking if $CC needs -fno-strength-reduce" >&5 save_CFLAGS="$CFLAGS" CFLAGS="-fno-strength-reduce" if eval "test \"`echo '$''{'openafs_gcc_needs_no_strength_reduce'+set}'`\" = set"; then @@ -2789,14 +2793,14 @@ if eval "test \"`echo '$''{'openafs_gcc_needs_no_strength_reduce'+set}'`\" = set else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* openafs_gcc_needs_no_strength_reduce=yes else @@ -2816,7 +2820,7 @@ CFLAGS="$save_CFLAGS" echo $ac_n "checking if $CC needs -fno-strict-aliasing""... $ac_c" 1>&6 -echo "configure:2820: checking if $CC needs -fno-strict-aliasing" >&5 +echo "configure:2824: checking if $CC needs -fno-strict-aliasing" >&5 save_CFLAGS="$CFLAGS" CFLAGS="-fno-strict-aliasing" if eval "test \"`echo '$''{'openafs_gcc_needs_no_strict_aliasing'+set}'`\" = set"; then @@ -2824,14 +2828,14 @@ if eval "test \"`echo '$''{'openafs_gcc_needs_no_strict_aliasing'+set}'`\" = set else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* openafs_gcc_needs_no_strict_aliasing=yes else @@ -2851,7 +2855,7 @@ CFLAGS="$save_CFLAGS" echo $ac_n "checking if $CC supports -fno-common""... $ac_c" 1>&6 -echo "configure:2855: checking if $CC supports -fno-common" >&5 +echo "configure:2859: checking if $CC supports -fno-common" >&5 save_CFLAGS="$CFLAGS" CFLAGS="-fno-common" if eval "test \"`echo '$''{'openafs_gcc_supports_no_common'+set}'`\" = set"; then @@ -2859,14 +2863,14 @@ if eval "test \"`echo '$''{'openafs_gcc_supports_no_common'+set}'`\" = set"; the 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* openafs_gcc_supports_no_common=yes else @@ -2886,7 +2890,7 @@ CFLAGS="$save_CFLAGS" echo $ac_n "checking if $CC supports -pipe""... $ac_c" 1>&6 -echo "configure:2890: checking if $CC supports -pipe" >&5 +echo "configure:2894: checking if $CC supports -pipe" >&5 save_CFLAGS="$CFLAGS" CFLAGS="-pipe" if eval "test \"`echo '$''{'openafs_gcc_supports_pipe'+set}'`\" = set"; then @@ -2894,14 +2898,14 @@ if eval "test \"`echo '$''{'openafs_gcc_supports_pipe'+set}'`\" = set"; then else 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* openafs_gcc_supports_pipe=yes else @@ -2922,7 +2926,7 @@ CFLAGS="$save_CFLAGS" echo $ac_n "checking whether to build osi_vfs.h""... $ac_c" 1>&6 -echo "configure:2926: checking whether to build osi_vfs.h" >&5 +echo "configure:2930: checking whether to build osi_vfs.h" >&5 configdir=${srcdir}/src/config outputdir=src/afs/LINUX tmpldir=${srcdir}/src/afs/LINUX @@ -2932,7 +2936,7 @@ $configdir/make_vnode.pl -i $LINUX_KERNEL_PATH -t ${tmpldir} -o $outputdir echo $ac_n "checking for linux/completion.h existance""... $ac_c" 1>&6 -echo "configure:2936: checking for linux/completion.h existance" >&5 +echo "configure:2940: checking for linux/completion.h existance" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_completion_h_exists'+set}'`\" = set"; then @@ -2940,7 +2944,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_completion_h_exists'+set}'`\" = set"; th else cat > conftest.$ac_ext < #include @@ -2952,7 +2956,7 @@ lose ; return 0; } EOF -if { (eval echo configure:2956: \"$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* ac_cv_linux_completion_h_exists=yes else @@ -2968,7 +2972,7 @@ echo "$ac_t""$ac_cv_linux_completion_h_exists" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for defined for_each_process""... $ac_c" 1>&6 -echo "configure:2972: checking for defined for_each_process" >&5 +echo "configure:2976: checking for defined for_each_process" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_defines_for_each_process'+set}'`\" = set"; then @@ -2976,7 +2980,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_defines_for_each_process'+set}'`\" = set else cat > conftest.$ac_ext < int main() { @@ -2985,7 +2989,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2989: \"$ac_compile\") 1>&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_linux_defines_for_each_process=yes else @@ -3001,7 +3005,7 @@ echo "$ac_t""$ac_cv_linux_defines_for_each_process" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for defined prev_task""... $ac_c" 1>&6 -echo "configure:3005: checking for defined prev_task" >&5 +echo "configure:3009: checking for defined prev_task" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_defines_prev_task'+set}'`\" = set"; then @@ -3009,7 +3013,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_defines_prev_task'+set}'`\" = set"; then else cat > conftest.$ac_ext < int main() { @@ -3018,7 +3022,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_defines_prev_task=yes else @@ -3034,7 +3038,7 @@ echo "$ac_t""$ac_cv_linux_defines_prev_task" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for page_lock in struct address_space""... $ac_c" 1>&6 -echo "configure:3038: checking for page_lock in struct address_space" >&5 +echo "configure:3042: checking for page_lock in struct address_space" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_address_space_has_page_lock'+set}'`\" = set"; then @@ -3042,7 +3046,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_address_space_has_page_lock'+s else cat > conftest.$ac_ext < int main() { @@ -3050,7 +3054,7 @@ struct address_space _a_s; printf("%x\n", _a_s.page_lock); ; return 0; } EOF -if { (eval echo configure:3054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_address_space_has_page_lock=yes else @@ -3066,7 +3070,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_address_space_has_page_lock" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for gfp_mask in struct address_space""... $ac_c" 1>&6 -echo "configure:3070: checking for gfp_mask in struct address_space" >&5 +echo "configure:3074: checking for gfp_mask in struct address_space" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_address_space_has_gfp_mask'+set}'`\" = set"; then @@ -3074,7 +3078,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_address_space_has_gfp_mask'+se else cat > conftest.$ac_ext < int main() { @@ -3082,7 +3086,7 @@ struct address_space _a; printf("%d\n", _a.gfp_mask); ; return 0; } EOF -if { (eval echo configure:3086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_address_space_has_gfp_mask=yes else @@ -3098,7 +3102,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_address_space_has_gfp_mask" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for i_alloc_sem in struct inode""... $ac_c" 1>&6 -echo "configure:3102: checking for i_alloc_sem in struct inode" >&5 +echo "configure:3106: checking for i_alloc_sem in struct inode" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_alloc_sem'+set}'`\" = set"; then @@ -3106,7 +3110,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_alloc_sem'+set}'`\ else cat > conftest.$ac_ext < int main() { @@ -3114,7 +3118,7 @@ struct inode _i; printf("%x\n", _i.i_alloc_sem); ; return 0; } EOF -if { (eval echo configure:3118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_inode_has_i_alloc_sem=yes else @@ -3130,7 +3134,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for i_truncate_sem in struct inode""... $ac_c" 1>&6 -echo "configure:3134: checking for i_truncate_sem in struct inode" >&5 +echo "configure:3138: checking for i_truncate_sem in struct inode" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_truncate_sem'+set}'`\" = set"; then @@ -3138,7 +3142,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_truncate_sem'+set} else cat > conftest.$ac_ext < int main() { @@ -3146,7 +3150,7 @@ struct inode _i; printf("%x\n", _i.i_truncate_sem); ; return 0; } EOF -if { (eval echo configure:3150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_inode_has_i_truncate_sem=yes else @@ -3162,7 +3166,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for i_dirty_data_buffers in struct inode""... $ac_c" 1>&6 -echo "configure:3166: checking for i_dirty_data_buffers in struct inode" >&5 +echo "configure:3170: checking for i_dirty_data_buffers in struct inode" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers'+set}'`\" = set"; then @@ -3170,7 +3174,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers else cat > conftest.$ac_ext < int main() { @@ -3178,7 +3182,7 @@ struct inode _inode; printf("%d\n", _inode.i_dirty_data_buffers); ; return 0; } EOF -if { (eval echo configure:3182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=yes else @@ -3194,7 +3198,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for i_devices in struct inode""... $ac_c" 1>&6 -echo "configure:3198: checking for i_devices in struct inode" >&5 +echo "configure:3202: checking for i_devices in struct inode" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_cdev'+set}'`\" = set"; then @@ -3202,7 +3206,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_cdev'+set}'`\" = s else cat > conftest.$ac_ext < int main() { @@ -3210,7 +3214,7 @@ struct inode _inode; printf("%d\n", _inode.i_devices); ; return 0; } EOF -if { (eval echo configure:3214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_inode_has_i_devices=yes else @@ -3226,7 +3230,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_devices" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for i_sb_list in struct inode""... $ac_c" 1>&6 -echo "configure:3230: checking for i_sb_list in struct inode" >&5 +echo "configure:3234: checking for i_sb_list in struct inode" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_sb_list'+set}'`\" = set"; then @@ -3234,7 +3238,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_sb_list'+set}'`\" else cat > conftest.$ac_ext < int main() { @@ -3242,7 +3246,7 @@ struct inode _inode; printf("%d\n", _inode.i_sb_list); ; return 0; } EOF -if { (eval echo configure:3246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_inode_has_i_sb_list=yes else @@ -3258,7 +3262,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_sb_list" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for i_security in struct inode""... $ac_c" 1>&6 -echo "configure:3262: checking for i_security in struct inode" >&5 +echo "configure:3266: checking for i_security in struct inode" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_security'+set}'`\" = set"; then @@ -3266,7 +3270,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_security'+set}'`\" else cat > conftest.$ac_ext < int main() { @@ -3274,7 +3278,7 @@ struct inode _inode; printf("%d\n", _inode.i_security); ; return 0; } EOF -if { (eval echo configure:3278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_inode_has_i_security=yes else @@ -3290,7 +3294,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_security" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for inotify_lock in struct inode""... $ac_c" 1>&6 -echo "configure:3294: checking for inotify_lock in struct inode" >&5 +echo "configure:3298: checking for inotify_lock in struct inode" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_inotify_lock'+set}'`\" = set"; then @@ -3298,7 +3302,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_inotify_lock'+set}'` else cat > conftest.$ac_ext < int main() { @@ -3306,7 +3310,7 @@ struct inode _inode; printf("%d\n", _inode.inotify_lock); ; return 0; } EOF -if { (eval echo configure:3310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_inode_has_inotify_lock=yes else @@ -3320,9 +3324,41 @@ fi echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_inotify_lock" 1>&6 CPPFLAGS="$save_CPPFLAGS" + +echo $ac_n "checking for inotify_sem in struct inode""... $ac_c" 1>&6 +echo "configure:3330: checking for inotify_sem in struct inode" >&5 +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" +if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_inotify_sem'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext < +int main() { +struct inode _inode; +printf("%x\n", _inode.inotify_sem); +; return 0; } +EOF +if { (eval echo configure:3346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_linux_fs_struct_inode_has_inotify_sem=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_linux_fs_struct_inode_has_inotify_sem=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_inotify_sem" 1>&6 +CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for inode_setattr return type""... $ac_c" 1>&6 -echo "configure:3326: checking for inode_setattr return type" >&5 +echo "configure:3362: checking for inode_setattr return type" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_func_inode_setattr_returns_int'+set}'`\" = set"; then @@ -3330,7 +3366,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_func_inode_setattr_returns_int'+set}'`\" else cat > conftest.$ac_ext < int main() { @@ -3340,7 +3376,7 @@ int i; i = inode_setattr(&_inode, &_iattr); ; return 0; } EOF -if { (eval echo configure:3344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_inode_setattr_returns_int=yes else @@ -3356,7 +3392,7 @@ echo "$ac_t""$ac_cv_linux_func_inode_setattr_returns_int" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for write_inode return type""... $ac_c" 1>&6 -echo "configure:3360: checking for write_inode return type" >&5 +echo "configure:3396: checking for write_inode return type" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_func_write_inode_returns_int'+set}'`\" = set"; then @@ -3364,7 +3400,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_func_write_inode_returns_int'+set}'`\" = else cat > conftest.$ac_ext < int main() { @@ -3374,7 +3410,7 @@ int i; i = _sops.write_inode(&_inode, 0); ; return 0; } EOF -if { (eval echo configure:3378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_write_inode_returns_int=yes else @@ -3392,13 +3428,13 @@ CPPFLAGS="$save_CPPFLAGS" save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" echo $ac_n "checking whether inode_operations.create takes a nameidata""... $ac_c" 1>&6 -echo "configure:3396: checking whether inode_operations.create takes a nameidata" >&5 +echo "configure:3432: checking whether inode_operations.create takes a nameidata" >&5 if eval "test \"`echo '$''{'ac_cv_linux_func_i_create_takes_nameidata'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3409,7 +3445,7 @@ struct nameidata _nameidata; (void)_inode.i_op->create(&_inode, &_dentry, 0, &_nameidata); ; return 0; } EOF -if { (eval echo configure:3413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_i_create_takes_nameidata=yes else @@ -3429,13 +3465,13 @@ EOF fi echo $ac_n "checking whether inode_operations.lookup takes a nameidata""... $ac_c" 1>&6 -echo "configure:3433: checking whether inode_operations.lookup takes a nameidata" >&5 +echo "configure:3469: checking whether inode_operations.lookup takes a nameidata" >&5 if eval "test \"`echo '$''{'ac_cv_linux_func_i_lookup_takes_nameidata'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3446,7 +3482,7 @@ struct nameidata _nameidata; (void)_inode.i_op->lookup(&_inode, &_dentry, &_nameidata); ; return 0; } EOF -if { (eval echo configure:3450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_i_lookup_takes_nameidata=yes else @@ -3466,13 +3502,13 @@ EOF fi echo $ac_n "checking whether inode_operations.permission takes a nameidata""... $ac_c" 1>&6 -echo "configure:3470: checking whether inode_operations.permission takes a nameidata" >&5 +echo "configure:3506: checking whether inode_operations.permission takes a nameidata" >&5 if eval "test \"`echo '$''{'ac_cv_linux_func_i_permission_takes_nameidata'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3482,7 +3518,7 @@ struct nameidata _nameidata; (void)_inode.i_op->permission(&_inode, 0, &_nameidata); ; return 0; } EOF -if { (eval echo configure:3486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_i_permission_takes_nameidata=yes else @@ -3502,14 +3538,14 @@ EOF fi echo $ac_n "checking whether dentry_operations.d_revalidate takes a nameidata""... $ac_c" 1>&6 -echo "configure:3506: checking whether dentry_operations.d_revalidate takes a nameidata" >&5 +echo "configure:3542: checking whether dentry_operations.d_revalidate takes a nameidata" >&5 CPPFLAGS="$CPPFLAGS -Werror" if eval "test \"`echo '$''{'ac_cv_linux_func_d_revalidate_takes_nameidata'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3519,7 +3555,7 @@ struct nameidata _nameidata; (void)_dentry.d_op->d_revalidate(&_dentry, &_nameidata); ; return 0; } EOF -if { (eval echo configure:3523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_d_revalidate_takes_nameidata=yes else @@ -3543,13 +3579,13 @@ CPPFLAGS="$save_CPPFLAGS" save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" echo $ac_n "checking whether address_space_operations.writepage takes a writeback_control""... $ac_c" 1>&6 -echo "configure:3547: checking whether address_space_operations.writepage takes a writeback_control" >&5 +echo "configure:3583: checking whether address_space_operations.writepage takes a writeback_control" >&5 if eval "test \"`echo '$''{'ac_cv_linux_func_a_writepage_takes_writeback_control'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3561,7 +3597,7 @@ struct writeback_control _writeback_control; (void)_aops.writepage(&_page, &_writeback_control); ; return 0; } EOF -if { (eval echo configure:3565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_a_writepage_takes_writeback_control=yes else @@ -3583,7 +3619,7 @@ fi CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for linux/syscall.h in kernel""... $ac_c" 1>&6 -echo "configure:3587: checking for linux/syscall.h in kernel" >&5 +echo "configure:3623: checking for linux/syscall.h in kernel" >&5 if test -f "${LINUX_KERNEL_PATH}/include/linux/syscall.h"; then ac_linux_syscall=yes echo "$ac_t""$ac_linux_syscall" 1>&6 @@ -3594,7 +3630,7 @@ echo "configure:3587: checking for linux/syscall.h in kernel" >&5 echo $ac_n "checking for SELinux kernel""... $ac_c" 1>&6 -echo "configure:3598: checking for SELinux kernel" >&5 +echo "configure:3634: checking for SELinux kernel" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_kernel_is_selinux'+set}'`\" = set"; then @@ -3602,7 +3638,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_kernel_is_selinux'+set}'`\" = set"; then else cat > conftest.$ac_ext < int main() { @@ -3611,7 +3647,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_kernel_is_selinux=yes else @@ -3627,7 +3663,7 @@ echo "$ac_t""$ac_cv_linux_kernel_is_selinux" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for 5th argument in sock_create found in some SELinux kernels""... $ac_c" 1>&6 -echo "configure:3631: checking for 5th argument in sock_create found in some SELinux kernels" >&5 +echo "configure:3667: checking for 5th argument in sock_create found in some SELinux kernels" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_kernel_sock_create_v'+set}'`\" = set"; then @@ -3635,7 +3671,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_kernel_sock_create_v'+set}'`\" = set"; t else cat > conftest.$ac_ext < int main() { @@ -3644,7 +3680,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_kernel_sock_create_v=yes else @@ -3660,7 +3696,7 @@ echo "$ac_t""$ac_cv_linux_kernel_sock_create_v" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for page_follow_link_light vs page_follow_link""... $ac_c" 1>&6 -echo "configure:3664: checking for page_follow_link_light vs page_follow_link" >&5 +echo "configure:3700: checking for page_follow_link_light vs page_follow_link" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-default -Werror-implicit-function-declaration -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_kernel_page_follow_link'+set}'`\" = set"; then @@ -3668,7 +3704,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_kernel_page_follow_link'+set}'`\" = set" else cat > conftest.$ac_ext < int main() { @@ -3677,7 +3713,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_kernel_page_follow_link=yes else @@ -3698,7 +3734,7 @@ if test "x$enable_redhat_buildsys" = "xyes"; then echo "configure: warning: Configured to build from a Red Hat SPEC file" 1>&2 else echo $ac_n "checking for redhat kernel configuration""... $ac_c" 1>&6 -echo "configure:3702: checking for redhat kernel configuration" >&5 +echo "configure:3738: checking for redhat kernel configuration" >&5 if test -f "${LINUX_KERNEL_PATH}/include/linux/rhconfig.h"; then ac_linux_rhconfig=yes RHCONFIG_SP="-D__BOOT_KERNEL_UP=1 -D__BOOT_KERNEL_SMP=0" @@ -3717,7 +3753,7 @@ fi echo $ac_n "checking for recalc_sigpending arg type""... $ac_c" 1>&6 -echo "configure:3721: checking for recalc_sigpending arg type" >&5 +echo "configure:3757: checking for recalc_sigpending arg type" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_func_recalc_sigpending_takes_void'+set}'`\" = set"; then @@ -3725,14 +3761,14 @@ if eval "test \"`echo '$''{'ac_cv_linux_func_recalc_sigpending_takes_void'+set}' else cat > conftest.$ac_ext < int main() { recalc_sigpending(); ; return 0; } EOF -if { (eval echo configure:3736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_recalc_sigpending_takes_void=yes else @@ -3748,7 +3784,7 @@ echo "$ac_t""$ac_cv_linux_func_recalc_sigpending_takes_void" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for parent in struct task_struct""... $ac_c" 1>&6 -echo "configure:3752: checking for parent in struct task_struct" >&5 +echo "configure:3788: checking for parent in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_parent'+set}'`\" = set"; then @@ -3756,7 +3792,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_parent'+set else cat > conftest.$ac_ext < int main() { @@ -3764,7 +3800,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.parent); ; return 0; } EOF -if { (eval echo configure:3768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_parent=yes else @@ -3780,7 +3816,7 @@ echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_parent" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for real_parent in struct task_struct""... $ac_c" 1>&6 -echo "configure:3784: checking for real_parent in struct task_struct" >&5 +echo "configure:3820: checking for real_parent in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_real_parent'+set}'`\" = set"; then @@ -3788,7 +3824,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_real_parent else cat > conftest.$ac_ext < int main() { @@ -3796,7 +3832,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.real_parent); ; return 0; } EOF -if { (eval echo configure:3800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_real_parent=yes else @@ -3812,7 +3848,7 @@ echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_real_parent" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for sig in struct task_struct""... $ac_c" 1>&6 -echo "configure:3816: checking for sig in struct task_struct" >&5 +echo "configure:3852: checking for sig in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_sig'+set}'`\" = set"; then @@ -3820,7 +3856,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_sig'+set}'` else cat > conftest.$ac_ext < int main() { @@ -3828,7 +3864,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.sig); ; return 0; } EOF -if { (eval echo configure:3832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_sig=yes else @@ -3844,7 +3880,7 @@ echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sig" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for sighand in struct task_struct""... $ac_c" 1>&6 -echo "configure:3848: checking for sighand in struct task_struct" >&5 +echo "configure:3884: checking for sighand in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_sighand'+set}'`\" = set"; then @@ -3852,7 +3888,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_sighand'+se else cat > conftest.$ac_ext < int main() { @@ -3860,7 +3896,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.sighand); ; return 0; } EOF -if { (eval echo configure:3864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_sighand=yes else @@ -3876,7 +3912,7 @@ echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sighand" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for sigmask_lock in struct task_struct""... $ac_c" 1>&6 -echo "configure:3880: checking for sigmask_lock in struct task_struct" >&5 +echo "configure:3916: checking for sigmask_lock in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_sigmask_lock'+set}'`\" = set"; then @@ -3884,7 +3920,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_sigmask_loc else cat > conftest.$ac_ext < int main() { @@ -3892,7 +3928,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.sigmask_lock); ; return 0; } EOF -if { (eval echo configure:3896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_sigmask_lock=yes else @@ -3908,7 +3944,7 @@ echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for rlim in struct task_struct""... $ac_c" 1>&6 -echo "configure:3912: checking for rlim in struct task_struct" >&5 +echo "configure:3948: checking for rlim in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_rlim'+set}'`\" = set"; then @@ -3916,7 +3952,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_rlim'+set}' else cat > conftest.$ac_ext < int main() { @@ -3924,7 +3960,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.rlim); ; return 0; } EOF -if { (eval echo configure:3928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_rlim=yes else @@ -3940,7 +3976,7 @@ echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_rlim" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for signal->rlim in struct task_struct""... $ac_c" 1>&6 -echo "configure:3944: checking for signal->rlim in struct task_struct" >&5 +echo "configure:3980: checking for signal->rlim in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_signal_rlim'+set}'`\" = set"; then @@ -3948,7 +3984,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_signal_rlim else cat > conftest.$ac_ext < int main() { @@ -3956,7 +3992,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.signal->rlim); ; return 0; } EOF -if { (eval echo configure:3960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_signal_rlim=yes else @@ -3972,7 +4008,7 @@ echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_signal_rlim" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exit_state in struct task_struct""... $ac_c" 1>&6 -echo "configure:3976: checking for exit_state in struct task_struct" >&5 +echo "configure:4012: checking for exit_state in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_exit_state'+set}'`\" = set"; then @@ -3980,7 +4016,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_exit_state' else cat > conftest.$ac_ext < int main() { @@ -3988,7 +4024,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.exit_state); ; return 0; } EOF -if { (eval echo configure:3992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_exit_state=yes else @@ -4009,13 +4045,13 @@ else save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $RHCONFIG_SP $CPPFLAGS" echo $ac_n "checking if kernel uses MODVERSIONS""... $ac_c" 1>&6 -echo "configure:4013: checking if kernel uses MODVERSIONS" >&5 +echo "configure:4049: checking if kernel uses MODVERSIONS" >&5 if eval "test \"`echo '$''{'ac_cv_linux_config_modversions'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4027,7 +4063,7 @@ lose; ; return 0; } EOF -if { (eval echo configure:4031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_config_modversions=yes else @@ -4041,7 +4077,7 @@ fi echo "$ac_t""$ac_cv_linux_config_modversions" 1>&6 echo $ac_n "checking which kernel modules to build""... $ac_c" 1>&6 -echo "configure:4045: checking which kernel modules to build" >&5 +echo "configure:4081: checking which kernel modules to build" >&5 if test "x$ac_linux_rhconfig" = "xyes"; then MPS="MP SP" elif test "x$ac_cv_linux_config_modversions" = "xno" -a "$AFS_SYSKVERS" -lt 26; then @@ -4052,7 +4088,7 @@ echo "configure:4045: checking which kernel modules to build" >&5 else cat > conftest.$ac_ext < @@ -4063,7 +4099,7 @@ lose; ; return 0; } EOF -if { (eval echo configure:4067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_config_smp=yes else @@ -4095,7 +4131,7 @@ fi else echo $ac_n "checking for exported init_mm""... $ac_c" 1>&6 -echo "configure:4099: checking for exported init_mm" >&5 +echo "configure:4135: checking for exported init_mm" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_init_mm'+set}'`\" = set"; then @@ -4103,7 +4139,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_init_mm'+set}'`\" = set"; then else cat > conftest.$ac_ext < int main() { @@ -4112,7 +4148,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_init_mm=yes else @@ -4128,7 +4164,7 @@ echo "$ac_t""$ac_cv_linux_exports_init_mm" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exported kallsyms_address_to_symbol""... $ac_c" 1>&6 -echo "configure:4132: checking for exported kallsyms_address_to_symbol" >&5 +echo "configure:4168: checking for exported kallsyms_address_to_symbol" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_kallsyms_address'+set}'`\" = set"; then @@ -4136,7 +4172,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_kallsyms_address'+set}'`\" = set else cat > conftest.$ac_ext < int main() { @@ -4145,7 +4181,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_kallsyms_address=yes else @@ -4161,7 +4197,7 @@ echo "$ac_t""$ac_cv_linux_exports_kallsyms_address" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exported kallsyms_symbol_to_address""... $ac_c" 1>&6 -echo "configure:4165: checking for exported kallsyms_symbol_to_address" >&5 +echo "configure:4201: checking for exported kallsyms_symbol_to_address" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_kallsyms_symbol'+set}'`\" = set"; then @@ -4169,7 +4205,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_kallsyms_symbol'+set}'`\" = set" else cat > conftest.$ac_ext < int main() { @@ -4178,7 +4214,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_kallsyms_symbol=yes else @@ -4194,7 +4230,7 @@ echo "$ac_t""$ac_cv_linux_exports_kallsyms_symbol" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exported sys_call_table""... $ac_c" 1>&6 -echo "configure:4198: checking for exported sys_call_table" >&5 +echo "configure:4234: checking for exported sys_call_table" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_call_table'+set}'`\" = set"; then @@ -4202,7 +4238,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_call_table'+set}'`\" = set"; else cat > conftest.$ac_ext < int main() { @@ -4211,7 +4247,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_sys_call_table=yes else @@ -4227,7 +4263,7 @@ echo "$ac_t""$ac_cv_linux_exports_sys_call_table" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exported ia32_sys_call_table""... $ac_c" 1>&6 -echo "configure:4231: checking for exported ia32_sys_call_table" >&5 +echo "configure:4267: checking for exported ia32_sys_call_table" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_ia32_sys_call_table'+set}'`\" = set"; then @@ -4235,7 +4271,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_ia32_sys_call_table'+set}'`\" = else cat > conftest.$ac_ext < int main() { @@ -4244,7 +4280,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_ia32_sys_call_table=yes else @@ -4260,7 +4296,7 @@ echo "$ac_t""$ac_cv_linux_exports_ia32_sys_call_table" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exported sys_chdir""... $ac_c" 1>&6 -echo "configure:4264: checking for exported sys_chdir" >&5 +echo "configure:4300: checking for exported sys_chdir" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_chdir'+set}'`\" = set"; then @@ -4268,7 +4304,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_chdir'+set}'`\" = set"; then else cat > conftest.$ac_ext < int main() { @@ -4277,7 +4313,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_sys_chdir=yes else @@ -4293,7 +4329,7 @@ echo "$ac_t""$ac_cv_linux_exports_sys_chdir" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exported sys_close""... $ac_c" 1>&6 -echo "configure:4297: checking for exported sys_close" >&5 +echo "configure:4333: checking for exported sys_close" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_close'+set}'`\" = set"; then @@ -4301,7 +4337,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_close'+set}'`\" = set"; then else cat > conftest.$ac_ext < int main() { @@ -4310,7 +4346,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_sys_close=yes else @@ -4326,7 +4362,7 @@ echo "$ac_t""$ac_cv_linux_exports_sys_close" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exported sys_wait4""... $ac_c" 1>&6 -echo "configure:4330: checking for exported sys_wait4" >&5 +echo "configure:4366: checking for exported sys_wait4" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_wait4'+set}'`\" = set"; then @@ -4334,7 +4370,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_wait4'+set}'`\" = set"; then else cat > conftest.$ac_ext < int main() { @@ -4343,7 +4379,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_sys_wait4=yes else @@ -4514,6 +4550,12 @@ EOF if test "x$ac_cv_linux_fs_struct_inode_has_inotify_lock" = "xyes"; then cat >> confdefs.h <<\EOF #define STRUCT_INODE_HAS_INOTIFY_LOCK 1 +EOF + + fi + if test "x$ac_cv_linux_fs_struct_inode_has_inotify_sem" = "xyes"; then + cat >> confdefs.h <<\EOF +#define STRUCT_INODE_HAS_INOTIFY_SEM 1 EOF fi @@ -4611,14 +4653,14 @@ EOF ;; *) echo $ac_n "checking for definition of struct buf""... $ac_c" 1>&6 -echo "configure:4615: checking for definition of struct buf" >&5 +echo "configure:4657: checking for definition of struct buf" >&5 if eval "test \"`echo '$''{'ac_cv_have_struct_buf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_have_struct_buf=no cat > conftest.$ac_ext < int main() { @@ -4626,7 +4668,7 @@ struct buf x; printf("%d\n", sizeof(x)); ; return 0; } EOF -if { (eval echo configure:4630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_struct_buf=yes else @@ -4654,9 +4696,9 @@ if eval "test \"`echo '$''{'ac_cv_sockaddr_len'+set}'`\" = set"; then else echo $ac_n "checking if struct sockaddr has sa_len field""... $ac_c" 1>&6 -echo "configure:4658: checking if struct sockaddr has sa_len field" >&5 +echo "configure:4700: checking if struct sockaddr has sa_len field" >&5 cat > conftest.$ac_ext < #include @@ -4665,7 +4707,7 @@ struct sockaddr *a; a->sa_len=0; ; return 0; } EOF -if { (eval echo configure:4669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sockaddr_len=yes else @@ -4690,12 +4732,12 @@ else for ac_func in socket do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4694: checking for $ac_func" >&5 +echo "configure:4736: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4764: \"$ac_link\") 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 +4789,7 @@ done for lib in socket inet; do if test "$HAVE_SOCKET" != 1; then echo $ac_n "checking for socket in -l${lib}""... $ac_c" 1>&6 -echo "configure:4751: checking for socket in -l${lib}" >&5 +echo "configure:4793: checking for socket in -l${lib}" >&5 ac_lib_var=`echo ${lib}'_'socket | 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 +4797,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${lib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4812: \"$ac_link\") 1>&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,12 +4838,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4800: checking for $ac_func" >&5 +echo "configure:4842: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else 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_func_$ac_func=yes" else @@ -4853,7 +4895,7 @@ done for lib in nsl; do if test "$HAVE_CONNECT" != 1; then echo $ac_n "checking for connect in -l${lib}""... $ac_c" 1>&6 -echo "configure:4857: checking for connect in -l${lib}" >&5 +echo "configure:4899: checking for connect in -l${lib}" >&5 ac_lib_var=`echo ${lib}'_'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 @@ -4861,7 +4903,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${lib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4902,12 +4944,12 @@ fi for ac_func in gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4906: checking for $ac_func" >&5 +echo "configure:4948: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4958,7 +5000,7 @@ done for lib in dns nsl resolv; do if test "$HAVE_GETHOSTBYNAME" != 1; then echo $ac_n "checking for gethostbyname in -l${lib}""... $ac_c" 1>&6 -echo "configure:4962: checking for gethostbyname in -l${lib}" >&5 +echo "configure:5004: checking for gethostbyname in -l${lib}" >&5 ac_lib_var=`echo ${lib}'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4966,7 +5008,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${lib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5005,9 +5047,9 @@ fi fi echo $ac_n "checking for the useability of arpa/nameser_compat.h""... $ac_c" 1>&6 -echo "configure:5009: checking for the useability of arpa/nameser_compat.h" >&5 +echo "configure:5051: checking for the useability of arpa/nameser_compat.h" >&5 cat > conftest.$ac_ext < @@ -5024,7 +5066,7 @@ int main() { static int i; i = 0; ; return 0; } EOF -if { (eval echo configure:5028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -5042,11 +5084,11 @@ rm -f conftest* openafs_save_libs="$LIBS" echo $ac_n "checking for res_search""... $ac_c" 1>&6 -echo "configure:5046: checking for res_search" >&5 +echo "configure:5088: checking for res_search" >&5 ac_cv_func_res_search=no cat > conftest.$ac_ext < @@ -5070,7 +5112,7 @@ return 0; ; return 0; } EOF -if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_res_search=yes else @@ -5087,7 +5129,7 @@ rm -f conftest* ac_cv_func_res_search=no cat > conftest.$ac_ext < @@ -5111,7 +5153,7 @@ return 0; ; return 0; } EOF -if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_res_search=yes else @@ -5145,7 +5187,7 @@ fi PTHREAD_LIBS=error echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6 -echo "configure:5149: checking for pthread_attr_init in -lpthread" >&5 +echo "configure:5191: checking for pthread_attr_init in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5153,7 +5195,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" 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_lib_$ac_lib_var=yes" else @@ -5186,7 +5228,7 @@ fi if test "x$PTHREAD_LIBS" = xerror; then echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6 -echo "configure:5190: checking for pthread_attr_init in -lpthreads" >&5 +echo "configure:5232: checking for pthread_attr_init in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5194,7 +5236,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5228,7 +5270,7 @@ fi fi if test "x$PTHREAD_LIBS" = xerror; then echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6 -echo "configure:5232: checking for pthread_attr_init in -lc_r" >&5 +echo "configure:5274: checking for pthread_attr_init in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5236,7 +5278,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5270,12 +5312,12 @@ fi fi if test "x$PTHREAD_LIBS" = xerror; then echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6 -echo "configure:5274: checking for pthread_attr_init" >&5 +echo "configure:5316: checking for pthread_attr_init" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pthread_attr_init=yes" else @@ -5413,7 +5455,7 @@ EOF fi echo $ac_n "checking for tivoli tsm butc support""... $ac_c" 1>&6 -echo "configure:5417: checking for tivoli tsm butc support" >&5 +echo "configure:5459: checking for tivoli tsm butc support" >&5 XBSA_CFLAGS="" if test "$enable_tivoli_tsm" = "yes"; then XBSADIR1=/usr/tivoli/tsm/client/api/bin/xopen @@ -5434,12 +5476,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:5438: checking for ANSI C header files" >&5 +echo "configure:5480: 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 @@ -5447,7 +5489,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5493: \"$ac_try\") 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* @@ -5464,7 +5506,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 @@ -5482,7 +5524,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 @@ -5503,7 +5545,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -5514,7 +5556,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:5518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -5538,12 +5580,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:5542: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:5584: 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 @@ -5559,7 +5601,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:5563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -5584,12 +5626,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:5588: checking for $ac_hdr that defines DIR" >&5 +echo "configure:5630: 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> @@ -5597,7 +5639,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:5601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -5622,7 +5664,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:5626: checking for opendir in -ldir" >&5 +echo "configure:5668: 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 @@ -5630,7 +5672,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:5687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5663,7 +5705,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:5667: checking for opendir in -lx" >&5 +echo "configure:5709: 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 @@ -5671,7 +5713,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:5728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5708,17 +5750,17 @@ for ac_hdr in stdlib.h string.h unistd.h fcntl.h sys/time.h sys/file.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5712: checking for $ac_hdr" >&5 +echo "configure:5754: 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:5722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5764: \"$ac_try\") 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* @@ -5748,17 +5790,17 @@ for ac_hdr in netinet/in.h netdb.h sys/fcntl.h sys/mnttab.h sys/mntent.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5752: checking for $ac_hdr" >&5 +echo "configure:5794: 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:5762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5804: \"$ac_try\") 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* @@ -5788,17 +5830,17 @@ for ac_hdr in mntent.h sys/vfs.h sys/param.h sys/fs_types.h sys/fstyp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5792: checking for $ac_hdr" >&5 +echo "configure:5834: 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:5802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5844: \"$ac_try\") 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* @@ -5828,17 +5870,17 @@ for ac_hdr in sys/mount.h strings.h termios.h signal.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5832: checking for $ac_hdr" >&5 +echo "configure:5874: 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:5842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5884: \"$ac_try\") 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* @@ -5868,17 +5910,17 @@ for ac_hdr in windows.h malloc.h winsock2.h direct.h io.h sys/user.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5872: checking for $ac_hdr" >&5 +echo "configure:5914: 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:5882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5924: \"$ac_try\") 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* @@ -5908,17 +5950,17 @@ for ac_hdr in security/pam_modules.h siad.h usersec.h ucontext.h regex.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5912: checking for $ac_hdr" >&5 +echo "configure:5954: 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:5922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5964: \"$ac_try\") 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* @@ -5962,12 +6004,12 @@ fi for ac_func in utimes random srandom getdtablesize snprintf strlcat strlcpy re_comp re_exec do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5966: 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 @@ -6017,12 +6059,12 @@ done for ac_func in setprogname getprogname sigaction mkstemp vsnprintf strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6021: 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 @@ -6073,12 +6115,12 @@ done for ac_func in regcomp regexec regerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6077: checking for $ac_func" >&5 +echo "configure:6119: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6126,7 +6168,7 @@ fi done echo $ac_n "checking for POSIX regex library""... $ac_c" 1>&6 -echo "configure:6130: checking for POSIX regex library" >&5 +echo "configure:6172: checking for POSIX regex library" >&5 if test "$ac_cv_header_regex_h" = "yes" && \ test "$ac_cv_func_regcomp" = "yes" && \ test "$ac_cv_func_regexec" = "yes" && \ @@ -6141,12 +6183,12 @@ else fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:6145: checking for ssize_t" >&5 +echo "configure:6187: 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 @@ -6174,7 +6216,7 @@ EOF fi echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:6178: checking size of long" >&5 +echo "configure:6220: 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 @@ -6182,7 +6224,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -6193,7 +6235,7 @@ main() exit(0); } EOF -if { (eval echo configure:6197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6239: \"$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 @@ -6216,12 +6258,12 @@ EOF for ac_func in timegm do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6220: checking for $ac_func" >&5 +echo "configure:6262: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 daemon +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6317: checking for $ac_func" >&5 +if 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:6345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6347,7 +6444,7 @@ LWP_OPTMZ=-O # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6351: checking for $ac_word" >&5 +echo "configure:6448: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6379,7 +6476,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:6383: checking for $ac_word" >&5 +echo "configure:6480: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6414,7 +6511,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:6418: checking for $ac_word" >&5 +echo "configure:6515: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6449,7 +6546,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:6453: checking for $ac_word" >&5 +echo "configure:6550: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6484,7 +6581,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:6488: checking for $ac_word" >&5 +echo "configure:6585: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6519,7 +6616,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:6523: checking for $ac_word" >&5 +echo "configure:6620: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6554,7 +6651,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:6558: checking for $ac_word" >&5 +echo "configure:6655: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6589,7 +6686,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:6593: checking for $ac_word" >&5 +echo "configure:6690: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6624,7 +6721,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:6628: checking for $ac_word" >&5 +echo "configure:6725: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LORDER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7057,6 +7154,19 @@ case $AFS_SYSNAME in EXTRA_VLIBOBJS="fstab.o" ;; + ppc_darwin_80) + AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration" + LEX="lex -l" + MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}' + KROOT= + KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers' + LWP_OPTMZ="-O2" + REGEX_OBJ="regex.o" + XCFLAGS="-no-cpp-precomp" + TXLIBS="-lncurses" + EXTRA_VLIBOBJS="fstab.o" + ;; + ppc_linux*) KERN_OPTMZ=-O2 LEX="flex -l" @@ -7115,6 +7225,22 @@ case $AFS_SYSNAME in SHLIB_LINKER="${MT_CC} -bM:SRE -berok" AIX64="" ;; + + rs_aix53) + DBG="-g" + LEX="lex" + LIBSYS_AIX_EXP="afsl.exp" + MT_CC="xlc_r" + MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}' + MT_LIBS="-lpthreads" + SHLIB_SUFFIX="o" + TXLIBS="-lcurses" + XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void" + XLIBS="${LIB_AFSDB} -ldl" + SHLIB_LINKER="${MT_CC} -bM:SRE -berok" + AIX64="" + ;; + s390_linux22) CC="gcc" CCOBJ="gcc" @@ -7159,7 +7285,7 @@ case $AFS_SYSNAME in MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}' MT_LIBS="-lpthread" PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC" - SHLIB_LDFLAGS="-shared -Xlinker -x" + SHLIB_LDFLAGS="-shared -Xlinker -x -Xlinker -Bsymbolic" TXLIBS="-lncurses" XCFLAGS="-O -g -D_LARGEFILE64_SOURCE -D__s390x__" YACC="bison -y" @@ -7494,7 +7620,7 @@ case $AFS_SYSNAME in sgi_6*) echo $ac_n "checking for mem* in sys/systm.h""... $ac_c" 1>&6 -echo "configure:7498: checking for mem* in sys/systm.h" >&5 +echo "configure:7624: checking for mem* in sys/systm.h" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_KERNEL -D__STRING_H__" if eval "test \"`echo '$''{'ac_cv_irix_sys_systm_h_has_mem_funcs'+set}'`\" = set"; then @@ -7502,7 +7628,7 @@ if eval "test \"`echo '$''{'ac_cv_irix_sys_systm_h_has_mem_funcs'+set}'`\" = set else cat > conftest.$ac_ext < #include @@ -7512,7 +7638,7 @@ extern void *memcpy(char *, const void *, size_t); ; return 0; } EOF -if { (eval echo configure:7516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_irix_sys_systm_h_has_mem_funcs=no else diff --git a/configure-libafs b/configure-libafs index 430b9f5e8..41e6c1e37 100644 --- a/configure-libafs +++ b/configure-libafs @@ -752,7 +752,7 @@ fi PACKAGE=openafs-libafs -VERSION=1.3.81 +VERSION=1.3.82 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -2681,6 +2681,10 @@ echo "configure:2418: checking your AFS sysname" >&5 AFS_SYSNAME="rs_aix52" enable_pam="no" ;; + power*-ibm-aix5.3*) + AFS_SYSNAME="rs_aix53" + enable_pam="no" + ;; x86_64-*-linux-gnu) AFS_SYSNAME="amd64_linuxXX" enable_pam="no" @@ -2700,7 +2704,7 @@ echo "configure:2418: checking your AFS sysname" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include $CPPFLAGS" cat > conftest.$ac_ext < int main() { @@ -2709,7 +2713,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_is_uml=yes else @@ -2744,7 +2748,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) fi echo $ac_n "checking if $CC accepts -march=pentium""... $ac_c" 1>&6 -echo "configure:2748: checking if $CC accepts -march=pentium" >&5 +echo "configure:2752: checking if $CC accepts -march=pentium" >&5 save_CFLAGS="$CFLAGS" CFLAGS="-MARCH=pentium" if eval "test \"`echo '$''{'openafs_gcc_supports_march'+set}'`\" = set"; then @@ -2752,14 +2756,14 @@ if eval "test \"`echo '$''{'openafs_gcc_supports_march'+set}'`\" = set"; then else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* openafs_gcc_supports_march=yes else @@ -2782,7 +2786,7 @@ CFLAGS="$save_CFLAGS" echo $ac_n "checking if $CC needs -fno-strength-reduce""... $ac_c" 1>&6 -echo "configure:2786: checking if $CC needs -fno-strength-reduce" >&5 +echo "configure:2790: checking if $CC needs -fno-strength-reduce" >&5 save_CFLAGS="$CFLAGS" CFLAGS="-fno-strength-reduce" if eval "test \"`echo '$''{'openafs_gcc_needs_no_strength_reduce'+set}'`\" = set"; then @@ -2790,14 +2794,14 @@ if eval "test \"`echo '$''{'openafs_gcc_needs_no_strength_reduce'+set}'`\" = set else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* openafs_gcc_needs_no_strength_reduce=yes else @@ -2817,7 +2821,7 @@ CFLAGS="$save_CFLAGS" echo $ac_n "checking if $CC needs -fno-strict-aliasing""... $ac_c" 1>&6 -echo "configure:2821: checking if $CC needs -fno-strict-aliasing" >&5 +echo "configure:2825: checking if $CC needs -fno-strict-aliasing" >&5 save_CFLAGS="$CFLAGS" CFLAGS="-fno-strict-aliasing" if eval "test \"`echo '$''{'openafs_gcc_needs_no_strict_aliasing'+set}'`\" = set"; then @@ -2825,14 +2829,14 @@ if eval "test \"`echo '$''{'openafs_gcc_needs_no_strict_aliasing'+set}'`\" = set else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* openafs_gcc_needs_no_strict_aliasing=yes else @@ -2852,7 +2856,7 @@ CFLAGS="$save_CFLAGS" echo $ac_n "checking if $CC supports -fno-common""... $ac_c" 1>&6 -echo "configure:2856: checking if $CC supports -fno-common" >&5 +echo "configure:2860: checking if $CC supports -fno-common" >&5 save_CFLAGS="$CFLAGS" CFLAGS="-fno-common" if eval "test \"`echo '$''{'openafs_gcc_supports_no_common'+set}'`\" = set"; then @@ -2860,14 +2864,14 @@ if eval "test \"`echo '$''{'openafs_gcc_supports_no_common'+set}'`\" = set"; the else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* openafs_gcc_supports_no_common=yes else @@ -2887,7 +2891,7 @@ CFLAGS="$save_CFLAGS" echo $ac_n "checking if $CC supports -pipe""... $ac_c" 1>&6 -echo "configure:2891: checking if $CC supports -pipe" >&5 +echo "configure:2895: checking if $CC supports -pipe" >&5 save_CFLAGS="$CFLAGS" CFLAGS="-pipe" if eval "test \"`echo '$''{'openafs_gcc_supports_pipe'+set}'`\" = set"; then @@ -2895,14 +2899,14 @@ if eval "test \"`echo '$''{'openafs_gcc_supports_pipe'+set}'`\" = set"; then else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* openafs_gcc_supports_pipe=yes else @@ -2923,7 +2927,7 @@ CFLAGS="$save_CFLAGS" echo $ac_n "checking whether to build osi_vfs.h""... $ac_c" 1>&6 -echo "configure:2927: checking whether to build osi_vfs.h" >&5 +echo "configure:2931: checking whether to build osi_vfs.h" >&5 configdir=src/config outputdir=src/afs tmpldir=src/afs/LINUX @@ -2932,7 +2936,7 @@ $configdir/make_vnode.pl -i $LINUX_KERNEL_PATH -t ${tmpldir} -o $outputdir echo $ac_n "checking for linux/completion.h existance""... $ac_c" 1>&6 -echo "configure:2936: checking for linux/completion.h existance" >&5 +echo "configure:2940: checking for linux/completion.h existance" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_completion_h_exists'+set}'`\" = set"; then @@ -2940,7 +2944,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_completion_h_exists'+set}'`\" = set"; th else cat > conftest.$ac_ext < #include @@ -2952,7 +2956,7 @@ lose ; return 0; } EOF -if { (eval echo configure:2956: \"$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* ac_cv_linux_completion_h_exists=yes else @@ -2968,7 +2972,7 @@ echo "$ac_t""$ac_cv_linux_completion_h_exists" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for defined for_each_process""... $ac_c" 1>&6 -echo "configure:2972: checking for defined for_each_process" >&5 +echo "configure:2976: checking for defined for_each_process" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_defines_for_each_process'+set}'`\" = set"; then @@ -2976,7 +2980,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_defines_for_each_process'+set}'`\" = set else cat > conftest.$ac_ext < int main() { @@ -2985,7 +2989,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2989: \"$ac_compile\") 1>&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_linux_defines_for_each_process=yes else @@ -3001,7 +3005,7 @@ echo "$ac_t""$ac_cv_linux_defines_for_each_process" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for defined prev_task""... $ac_c" 1>&6 -echo "configure:3005: checking for defined prev_task" >&5 +echo "configure:3009: checking for defined prev_task" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_defines_prev_task'+set}'`\" = set"; then @@ -3009,7 +3013,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_defines_prev_task'+set}'`\" = set"; then else cat > conftest.$ac_ext < int main() { @@ -3018,7 +3022,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_defines_prev_task=yes else @@ -3034,7 +3038,7 @@ echo "$ac_t""$ac_cv_linux_defines_prev_task" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for page_lock in struct address_space""... $ac_c" 1>&6 -echo "configure:3038: checking for page_lock in struct address_space" >&5 +echo "configure:3042: checking for page_lock in struct address_space" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_address_space_has_page_lock'+set}'`\" = set"; then @@ -3042,7 +3046,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_address_space_has_page_lock'+s else cat > conftest.$ac_ext < int main() { @@ -3050,7 +3054,7 @@ struct address_space _a_s; printf("%x\n", _a_s.page_lock); ; return 0; } EOF -if { (eval echo configure:3054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_address_space_has_page_lock=yes else @@ -3066,7 +3070,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_address_space_has_page_lock" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for gfp_mask in struct address_space""... $ac_c" 1>&6 -echo "configure:3070: checking for gfp_mask in struct address_space" >&5 +echo "configure:3074: checking for gfp_mask in struct address_space" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_address_space_has_gfp_mask'+set}'`\" = set"; then @@ -3074,7 +3078,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_address_space_has_gfp_mask'+se else cat > conftest.$ac_ext < int main() { @@ -3082,7 +3086,7 @@ struct address_space _a; printf("%d\n", _a.gfp_mask); ; return 0; } EOF -if { (eval echo configure:3086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_address_space_has_gfp_mask=yes else @@ -3098,7 +3102,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_address_space_has_gfp_mask" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for i_alloc_sem in struct inode""... $ac_c" 1>&6 -echo "configure:3102: checking for i_alloc_sem in struct inode" >&5 +echo "configure:3106: checking for i_alloc_sem in struct inode" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_alloc_sem'+set}'`\" = set"; then @@ -3106,7 +3110,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_alloc_sem'+set}'`\ else cat > conftest.$ac_ext < int main() { @@ -3114,7 +3118,7 @@ struct inode _i; printf("%x\n", _i.i_alloc_sem); ; return 0; } EOF -if { (eval echo configure:3118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_inode_has_i_alloc_sem=yes else @@ -3130,7 +3134,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for i_truncate_sem in struct inode""... $ac_c" 1>&6 -echo "configure:3134: checking for i_truncate_sem in struct inode" >&5 +echo "configure:3138: checking for i_truncate_sem in struct inode" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_truncate_sem'+set}'`\" = set"; then @@ -3138,7 +3142,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_truncate_sem'+set} else cat > conftest.$ac_ext < int main() { @@ -3146,7 +3150,7 @@ struct inode _i; printf("%x\n", _i.i_truncate_sem); ; return 0; } EOF -if { (eval echo configure:3150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_inode_has_i_truncate_sem=yes else @@ -3162,7 +3166,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for i_dirty_data_buffers in struct inode""... $ac_c" 1>&6 -echo "configure:3166: checking for i_dirty_data_buffers in struct inode" >&5 +echo "configure:3170: checking for i_dirty_data_buffers in struct inode" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers'+set}'`\" = set"; then @@ -3170,7 +3174,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers else cat > conftest.$ac_ext < int main() { @@ -3178,7 +3182,7 @@ struct inode _inode; printf("%d\n", _inode.i_dirty_data_buffers); ; return 0; } EOF -if { (eval echo configure:3182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=yes else @@ -3194,7 +3198,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for i_devices in struct inode""... $ac_c" 1>&6 -echo "configure:3198: checking for i_devices in struct inode" >&5 +echo "configure:3202: checking for i_devices in struct inode" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_cdev'+set}'`\" = set"; then @@ -3202,7 +3206,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_cdev'+set}'`\" = s else cat > conftest.$ac_ext < int main() { @@ -3210,7 +3214,7 @@ struct inode _inode; printf("%d\n", _inode.i_devices); ; return 0; } EOF -if { (eval echo configure:3214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_inode_has_i_devices=yes else @@ -3226,7 +3230,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_devices" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for i_sb_list in struct inode""... $ac_c" 1>&6 -echo "configure:3230: checking for i_sb_list in struct inode" >&5 +echo "configure:3234: checking for i_sb_list in struct inode" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_sb_list'+set}'`\" = set"; then @@ -3234,7 +3238,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_sb_list'+set}'`\" else cat > conftest.$ac_ext < int main() { @@ -3242,7 +3246,7 @@ struct inode _inode; printf("%d\n", _inode.i_sb_list); ; return 0; } EOF -if { (eval echo configure:3246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_inode_has_i_sb_list=yes else @@ -3258,7 +3262,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_sb_list" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for i_security in struct inode""... $ac_c" 1>&6 -echo "configure:3262: checking for i_security in struct inode" >&5 +echo "configure:3266: checking for i_security in struct inode" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_security'+set}'`\" = set"; then @@ -3266,7 +3270,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_i_security'+set}'`\" else cat > conftest.$ac_ext < int main() { @@ -3274,7 +3278,7 @@ struct inode _inode; printf("%d\n", _inode.i_security); ; return 0; } EOF -if { (eval echo configure:3278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_inode_has_i_security=yes else @@ -3290,7 +3294,7 @@ echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_security" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for inotify_lock in struct inode""... $ac_c" 1>&6 -echo "configure:3294: checking for inotify_lock in struct inode" >&5 +echo "configure:3298: checking for inotify_lock in struct inode" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_inotify_lock'+set}'`\" = set"; then @@ -3298,7 +3302,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_inotify_lock'+set}'` else cat > conftest.$ac_ext < int main() { @@ -3306,7 +3310,7 @@ struct inode _inode; printf("%d\n", _inode.inotify_lock); ; return 0; } EOF -if { (eval echo configure:3310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_fs_struct_inode_has_inotify_lock=yes else @@ -3320,9 +3324,41 @@ fi echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_inotify_lock" 1>&6 CPPFLAGS="$save_CPPFLAGS" + +echo $ac_n "checking for inotify_sem in struct inode""... $ac_c" 1>&6 +echo "configure:3330: checking for inotify_sem in struct inode" >&5 +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" +if eval "test \"`echo '$''{'ac_cv_linux_fs_struct_inode_has_inotify_sem'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext < +int main() { +struct inode _inode; +printf("%x\n", _inode.inotify_sem); +; return 0; } +EOF +if { (eval echo configure:3346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_linux_fs_struct_inode_has_inotify_sem=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_linux_fs_struct_inode_has_inotify_sem=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_inotify_sem" 1>&6 +CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for inode_setattr return type""... $ac_c" 1>&6 -echo "configure:3326: checking for inode_setattr return type" >&5 +echo "configure:3362: checking for inode_setattr return type" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_func_inode_setattr_returns_int'+set}'`\" = set"; then @@ -3330,7 +3366,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_func_inode_setattr_returns_int'+set}'`\" else cat > conftest.$ac_ext < int main() { @@ -3340,7 +3376,7 @@ int i; i = inode_setattr(&_inode, &_iattr); ; return 0; } EOF -if { (eval echo configure:3344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_inode_setattr_returns_int=yes else @@ -3356,7 +3392,7 @@ echo "$ac_t""$ac_cv_linux_func_inode_setattr_returns_int" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for write_inode return type""... $ac_c" 1>&6 -echo "configure:3360: checking for write_inode return type" >&5 +echo "configure:3396: checking for write_inode return type" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_func_write_inode_returns_int'+set}'`\" = set"; then @@ -3364,7 +3400,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_func_write_inode_returns_int'+set}'`\" = else cat > conftest.$ac_ext < int main() { @@ -3374,7 +3410,7 @@ int i; i = _sops.write_inode(&_inode, 0); ; return 0; } EOF -if { (eval echo configure:3378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_write_inode_returns_int=yes else @@ -3392,13 +3428,13 @@ CPPFLAGS="$save_CPPFLAGS" save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" echo $ac_n "checking whether inode_operations.create takes a nameidata""... $ac_c" 1>&6 -echo "configure:3396: checking whether inode_operations.create takes a nameidata" >&5 +echo "configure:3432: checking whether inode_operations.create takes a nameidata" >&5 if eval "test \"`echo '$''{'ac_cv_linux_func_i_create_takes_nameidata'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3409,7 +3445,7 @@ struct nameidata _nameidata; (void)_inode.i_op->create(&_inode, &_dentry, 0, &_nameidata); ; return 0; } EOF -if { (eval echo configure:3413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_i_create_takes_nameidata=yes else @@ -3429,13 +3465,13 @@ EOF fi echo $ac_n "checking whether inode_operations.lookup takes a nameidata""... $ac_c" 1>&6 -echo "configure:3433: checking whether inode_operations.lookup takes a nameidata" >&5 +echo "configure:3469: checking whether inode_operations.lookup takes a nameidata" >&5 if eval "test \"`echo '$''{'ac_cv_linux_func_i_lookup_takes_nameidata'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3446,7 +3482,7 @@ struct nameidata _nameidata; (void)_inode.i_op->lookup(&_inode, &_dentry, &_nameidata); ; return 0; } EOF -if { (eval echo configure:3450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_i_lookup_takes_nameidata=yes else @@ -3466,13 +3502,13 @@ EOF fi echo $ac_n "checking whether inode_operations.permission takes a nameidata""... $ac_c" 1>&6 -echo "configure:3470: checking whether inode_operations.permission takes a nameidata" >&5 +echo "configure:3506: checking whether inode_operations.permission takes a nameidata" >&5 if eval "test \"`echo '$''{'ac_cv_linux_func_i_permission_takes_nameidata'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3482,7 +3518,7 @@ struct nameidata _nameidata; (void)_inode.i_op->permission(&_inode, 0, &_nameidata); ; return 0; } EOF -if { (eval echo configure:3486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_i_permission_takes_nameidata=yes else @@ -3502,14 +3538,14 @@ EOF fi echo $ac_n "checking whether dentry_operations.d_revalidate takes a nameidata""... $ac_c" 1>&6 -echo "configure:3506: checking whether dentry_operations.d_revalidate takes a nameidata" >&5 +echo "configure:3542: checking whether dentry_operations.d_revalidate takes a nameidata" >&5 CPPFLAGS="$CPPFLAGS -Werror" if eval "test \"`echo '$''{'ac_cv_linux_func_d_revalidate_takes_nameidata'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3519,7 +3555,7 @@ struct nameidata _nameidata; (void)_dentry.d_op->d_revalidate(&_dentry, &_nameidata); ; return 0; } EOF -if { (eval echo configure:3523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_d_revalidate_takes_nameidata=yes else @@ -3543,13 +3579,13 @@ CPPFLAGS="$save_CPPFLAGS" save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" echo $ac_n "checking whether address_space_operations.writepage takes a writeback_control""... $ac_c" 1>&6 -echo "configure:3547: checking whether address_space_operations.writepage takes a writeback_control" >&5 +echo "configure:3583: checking whether address_space_operations.writepage takes a writeback_control" >&5 if eval "test \"`echo '$''{'ac_cv_linux_func_a_writepage_takes_writeback_control'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3561,7 +3597,7 @@ struct writeback_control _writeback_control; (void)_aops.writepage(&_page, &_writeback_control); ; return 0; } EOF -if { (eval echo configure:3565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_a_writepage_takes_writeback_control=yes else @@ -3583,7 +3619,7 @@ fi CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for linux/syscall.h in kernel""... $ac_c" 1>&6 -echo "configure:3587: checking for linux/syscall.h in kernel" >&5 +echo "configure:3623: checking for linux/syscall.h in kernel" >&5 if test -f "${LINUX_KERNEL_PATH}/include/linux/syscall.h"; then ac_linux_syscall=yes echo "$ac_t""$ac_linux_syscall" 1>&6 @@ -3594,7 +3630,7 @@ echo "configure:3587: checking for linux/syscall.h in kernel" >&5 echo $ac_n "checking for SELinux kernel""... $ac_c" 1>&6 -echo "configure:3598: checking for SELinux kernel" >&5 +echo "configure:3634: checking for SELinux kernel" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_kernel_is_selinux'+set}'`\" = set"; then @@ -3602,7 +3638,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_kernel_is_selinux'+set}'`\" = set"; then else cat > conftest.$ac_ext < int main() { @@ -3611,7 +3647,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_kernel_is_selinux=yes else @@ -3627,7 +3663,7 @@ echo "$ac_t""$ac_cv_linux_kernel_is_selinux" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for 5th argument in sock_create found in some SELinux kernels""... $ac_c" 1>&6 -echo "configure:3631: checking for 5th argument in sock_create found in some SELinux kernels" >&5 +echo "configure:3667: checking for 5th argument in sock_create found in some SELinux kernels" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_kernel_sock_create_v'+set}'`\" = set"; then @@ -3635,7 +3671,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_kernel_sock_create_v'+set}'`\" = set"; t else cat > conftest.$ac_ext < int main() { @@ -3644,7 +3680,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_kernel_sock_create_v=yes else @@ -3660,7 +3696,7 @@ echo "$ac_t""$ac_cv_linux_kernel_sock_create_v" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for page_follow_link_light vs page_follow_link""... $ac_c" 1>&6 -echo "configure:3664: checking for page_follow_link_light vs page_follow_link" >&5 +echo "configure:3700: checking for page_follow_link_light vs page_follow_link" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-default -Werror-implicit-function-declaration -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_kernel_page_follow_link'+set}'`\" = set"; then @@ -3668,7 +3704,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_kernel_page_follow_link'+set}'`\" = set" else cat > conftest.$ac_ext < int main() { @@ -3677,7 +3713,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_kernel_page_follow_link=yes else @@ -3698,7 +3734,7 @@ if test "x$enable_redhat_buildsys" = "xyes"; then echo "configure: warning: Configured to build from a Red Hat SPEC file" 1>&2 else echo $ac_n "checking for redhat kernel configuration""... $ac_c" 1>&6 -echo "configure:3702: checking for redhat kernel configuration" >&5 +echo "configure:3738: checking for redhat kernel configuration" >&5 if test -f "${LINUX_KERNEL_PATH}/include/linux/rhconfig.h"; then ac_linux_rhconfig=yes RHCONFIG_SP="-D__BOOT_KERNEL_UP=1 -D__BOOT_KERNEL_SMP=0" @@ -3717,7 +3753,7 @@ fi echo $ac_n "checking for recalc_sigpending arg type""... $ac_c" 1>&6 -echo "configure:3721: checking for recalc_sigpending arg type" >&5 +echo "configure:3757: checking for recalc_sigpending arg type" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_func_recalc_sigpending_takes_void'+set}'`\" = set"; then @@ -3725,14 +3761,14 @@ if eval "test \"`echo '$''{'ac_cv_linux_func_recalc_sigpending_takes_void'+set}' else cat > conftest.$ac_ext < int main() { recalc_sigpending(); ; return 0; } EOF -if { (eval echo configure:3736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_func_recalc_sigpending_takes_void=yes else @@ -3748,7 +3784,7 @@ echo "$ac_t""$ac_cv_linux_func_recalc_sigpending_takes_void" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for parent in struct task_struct""... $ac_c" 1>&6 -echo "configure:3752: checking for parent in struct task_struct" >&5 +echo "configure:3788: checking for parent in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_parent'+set}'`\" = set"; then @@ -3756,7 +3792,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_parent'+set else cat > conftest.$ac_ext < int main() { @@ -3764,7 +3800,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.parent); ; return 0; } EOF -if { (eval echo configure:3768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_parent=yes else @@ -3780,7 +3816,7 @@ echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_parent" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for real_parent in struct task_struct""... $ac_c" 1>&6 -echo "configure:3784: checking for real_parent in struct task_struct" >&5 +echo "configure:3820: checking for real_parent in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_real_parent'+set}'`\" = set"; then @@ -3788,7 +3824,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_real_parent else cat > conftest.$ac_ext < int main() { @@ -3796,7 +3832,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.real_parent); ; return 0; } EOF -if { (eval echo configure:3800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_real_parent=yes else @@ -3812,7 +3848,7 @@ echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_real_parent" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for sig in struct task_struct""... $ac_c" 1>&6 -echo "configure:3816: checking for sig in struct task_struct" >&5 +echo "configure:3852: checking for sig in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_sig'+set}'`\" = set"; then @@ -3820,7 +3856,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_sig'+set}'` else cat > conftest.$ac_ext < int main() { @@ -3828,7 +3864,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.sig); ; return 0; } EOF -if { (eval echo configure:3832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_sig=yes else @@ -3844,7 +3880,7 @@ echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sig" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for sighand in struct task_struct""... $ac_c" 1>&6 -echo "configure:3848: checking for sighand in struct task_struct" >&5 +echo "configure:3884: checking for sighand in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_sighand'+set}'`\" = set"; then @@ -3852,7 +3888,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_sighand'+se else cat > conftest.$ac_ext < int main() { @@ -3860,7 +3896,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.sighand); ; return 0; } EOF -if { (eval echo configure:3864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_sighand=yes else @@ -3876,7 +3912,7 @@ echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sighand" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for sigmask_lock in struct task_struct""... $ac_c" 1>&6 -echo "configure:3880: checking for sigmask_lock in struct task_struct" >&5 +echo "configure:3916: checking for sigmask_lock in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_sigmask_lock'+set}'`\" = set"; then @@ -3884,7 +3920,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_sigmask_loc else cat > conftest.$ac_ext < int main() { @@ -3892,7 +3928,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.sigmask_lock); ; return 0; } EOF -if { (eval echo configure:3896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_sigmask_lock=yes else @@ -3908,7 +3944,7 @@ echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for rlim in struct task_struct""... $ac_c" 1>&6 -echo "configure:3912: checking for rlim in struct task_struct" >&5 +echo "configure:3948: checking for rlim in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_rlim'+set}'`\" = set"; then @@ -3916,7 +3952,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_rlim'+set}' else cat > conftest.$ac_ext < int main() { @@ -3924,7 +3960,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.rlim); ; return 0; } EOF -if { (eval echo configure:3928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_rlim=yes else @@ -3940,7 +3976,7 @@ echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_rlim" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for signal->rlim in struct task_struct""... $ac_c" 1>&6 -echo "configure:3944: checking for signal->rlim in struct task_struct" >&5 +echo "configure:3980: checking for signal->rlim in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_signal_rlim'+set}'`\" = set"; then @@ -3948,7 +3984,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_signal_rlim else cat > conftest.$ac_ext < int main() { @@ -3956,7 +3992,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.signal->rlim); ; return 0; } EOF -if { (eval echo configure:3960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_signal_rlim=yes else @@ -3972,7 +4008,7 @@ echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_signal_rlim" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exit_state in struct task_struct""... $ac_c" 1>&6 -echo "configure:3976: checking for exit_state in struct task_struct" >&5 +echo "configure:4012: checking for exit_state in struct task_struct" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_exit_state'+set}'`\" = set"; then @@ -3980,7 +4016,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_sched_struct_task_struct_has_exit_state' else cat > conftest.$ac_ext < int main() { @@ -3988,7 +4024,7 @@ struct task_struct _tsk; printf("%d\n", _tsk.exit_state); ; return 0; } EOF -if { (eval echo configure:3992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_sched_struct_task_struct_has_exit_state=yes else @@ -4009,13 +4045,13 @@ else save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $RHCONFIG_SP $CPPFLAGS" echo $ac_n "checking if kernel uses MODVERSIONS""... $ac_c" 1>&6 -echo "configure:4013: checking if kernel uses MODVERSIONS" >&5 +echo "configure:4049: checking if kernel uses MODVERSIONS" >&5 if eval "test \"`echo '$''{'ac_cv_linux_config_modversions'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4027,7 +4063,7 @@ lose; ; return 0; } EOF -if { (eval echo configure:4031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_config_modversions=yes else @@ -4041,7 +4077,7 @@ fi echo "$ac_t""$ac_cv_linux_config_modversions" 1>&6 echo $ac_n "checking which kernel modules to build""... $ac_c" 1>&6 -echo "configure:4045: checking which kernel modules to build" >&5 +echo "configure:4081: checking which kernel modules to build" >&5 if test "x$ac_linux_rhconfig" = "xyes"; then MPS="MP SP" elif test "x$ac_cv_linux_config_modversions" = "xno" -a "$AFS_SYSKVERS" -lt 26; then @@ -4052,7 +4088,7 @@ echo "configure:4045: checking which kernel modules to build" >&5 else cat > conftest.$ac_ext < @@ -4063,7 +4099,7 @@ lose; ; return 0; } EOF -if { (eval echo configure:4067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_config_smp=yes else @@ -4095,7 +4131,7 @@ fi else echo $ac_n "checking for exported init_mm""... $ac_c" 1>&6 -echo "configure:4099: checking for exported init_mm" >&5 +echo "configure:4135: checking for exported init_mm" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_init_mm'+set}'`\" = set"; then @@ -4103,7 +4139,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_init_mm'+set}'`\" = set"; then else cat > conftest.$ac_ext < int main() { @@ -4112,7 +4148,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_init_mm=yes else @@ -4128,7 +4164,7 @@ echo "$ac_t""$ac_cv_linux_exports_init_mm" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exported kallsyms_address_to_symbol""... $ac_c" 1>&6 -echo "configure:4132: checking for exported kallsyms_address_to_symbol" >&5 +echo "configure:4168: checking for exported kallsyms_address_to_symbol" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_kallsyms_address'+set}'`\" = set"; then @@ -4136,7 +4172,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_kallsyms_address'+set}'`\" = set else cat > conftest.$ac_ext < int main() { @@ -4145,7 +4181,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_kallsyms_address=yes else @@ -4161,7 +4197,7 @@ echo "$ac_t""$ac_cv_linux_exports_kallsyms_address" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exported kallsyms_symbol_to_address""... $ac_c" 1>&6 -echo "configure:4165: checking for exported kallsyms_symbol_to_address" >&5 +echo "configure:4201: checking for exported kallsyms_symbol_to_address" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_kallsyms_symbol'+set}'`\" = set"; then @@ -4169,7 +4205,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_kallsyms_symbol'+set}'`\" = set" else cat > conftest.$ac_ext < int main() { @@ -4178,7 +4214,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_kallsyms_symbol=yes else @@ -4194,7 +4230,7 @@ echo "$ac_t""$ac_cv_linux_exports_kallsyms_symbol" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exported sys_call_table""... $ac_c" 1>&6 -echo "configure:4198: checking for exported sys_call_table" >&5 +echo "configure:4234: checking for exported sys_call_table" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_call_table'+set}'`\" = set"; then @@ -4202,7 +4238,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_call_table'+set}'`\" = set"; else cat > conftest.$ac_ext < int main() { @@ -4211,7 +4247,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_sys_call_table=yes else @@ -4227,7 +4263,7 @@ echo "$ac_t""$ac_cv_linux_exports_sys_call_table" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exported ia32_sys_call_table""... $ac_c" 1>&6 -echo "configure:4231: checking for exported ia32_sys_call_table" >&5 +echo "configure:4267: checking for exported ia32_sys_call_table" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_ia32_sys_call_table'+set}'`\" = set"; then @@ -4235,7 +4271,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_ia32_sys_call_table'+set}'`\" = else cat > conftest.$ac_ext < int main() { @@ -4244,7 +4280,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_ia32_sys_call_table=yes else @@ -4260,7 +4296,7 @@ echo "$ac_t""$ac_cv_linux_exports_ia32_sys_call_table" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exported sys_chdir""... $ac_c" 1>&6 -echo "configure:4264: checking for exported sys_chdir" >&5 +echo "configure:4300: checking for exported sys_chdir" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_chdir'+set}'`\" = set"; then @@ -4268,7 +4304,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_chdir'+set}'`\" = set"; then else cat > conftest.$ac_ext < int main() { @@ -4277,7 +4313,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_sys_chdir=yes else @@ -4293,7 +4329,7 @@ echo "$ac_t""$ac_cv_linux_exports_sys_chdir" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exported sys_close""... $ac_c" 1>&6 -echo "configure:4297: checking for exported sys_close" >&5 +echo "configure:4333: checking for exported sys_close" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_close'+set}'`\" = set"; then @@ -4301,7 +4337,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_close'+set}'`\" = set"; then else cat > conftest.$ac_ext < int main() { @@ -4310,7 +4346,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_sys_close=yes else @@ -4326,7 +4362,7 @@ echo "$ac_t""$ac_cv_linux_exports_sys_close" 1>&6 CPPFLAGS="$save_CPPFLAGS" echo $ac_n "checking for exported sys_wait4""... $ac_c" 1>&6 -echo "configure:4330: checking for exported sys_wait4" >&5 +echo "configure:4366: checking for exported sys_wait4" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_wait4'+set}'`\" = set"; then @@ -4334,7 +4370,7 @@ if eval "test \"`echo '$''{'ac_cv_linux_exports_sys_wait4'+set}'`\" = set"; then else cat > conftest.$ac_ext < int main() { @@ -4343,7 +4379,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_linux_exports_sys_wait4=yes else @@ -4514,6 +4550,12 @@ EOF if test "x$ac_cv_linux_fs_struct_inode_has_inotify_lock" = "xyes"; then cat >> confdefs.h <<\EOF #define STRUCT_INODE_HAS_INOTIFY_LOCK 1 +EOF + + fi + if test "x$ac_cv_linux_fs_struct_inode_has_inotify_sem" = "xyes"; then + cat >> confdefs.h <<\EOF +#define STRUCT_INODE_HAS_INOTIFY_SEM 1 EOF fi @@ -4611,14 +4653,14 @@ EOF ;; *) echo $ac_n "checking for definition of struct buf""... $ac_c" 1>&6 -echo "configure:4615: checking for definition of struct buf" >&5 +echo "configure:4657: checking for definition of struct buf" >&5 if eval "test \"`echo '$''{'ac_cv_have_struct_buf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_have_struct_buf=no cat > conftest.$ac_ext < int main() { @@ -4626,7 +4668,7 @@ struct buf x; printf("%d\n", sizeof(x)); ; return 0; } EOF -if { (eval echo configure:4630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_struct_buf=yes else @@ -4654,9 +4696,9 @@ if eval "test \"`echo '$''{'ac_cv_sockaddr_len'+set}'`\" = set"; then else echo $ac_n "checking if struct sockaddr has sa_len field""... $ac_c" 1>&6 -echo "configure:4658: checking if struct sockaddr has sa_len field" >&5 +echo "configure:4700: checking if struct sockaddr has sa_len field" >&5 cat > conftest.$ac_ext < #include @@ -4665,7 +4707,7 @@ struct sockaddr *a; a->sa_len=0; ; return 0; } EOF -if { (eval echo configure:4669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sockaddr_len=yes else @@ -4690,12 +4732,12 @@ else for ac_func in socket do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4694: checking for $ac_func" >&5 +echo "configure:4736: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4764: \"$ac_link\") 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 +4789,7 @@ done for lib in socket inet; do if test "$HAVE_SOCKET" != 1; then echo $ac_n "checking for socket in -l${lib}""... $ac_c" 1>&6 -echo "configure:4751: checking for socket in -l${lib}" >&5 +echo "configure:4793: checking for socket in -l${lib}" >&5 ac_lib_var=`echo ${lib}'_'socket | 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 +4797,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${lib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4812: \"$ac_link\") 1>&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,12 +4838,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4800: checking for $ac_func" >&5 +echo "configure:4842: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else 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_func_$ac_func=yes" else @@ -4853,7 +4895,7 @@ done for lib in nsl; do if test "$HAVE_CONNECT" != 1; then echo $ac_n "checking for connect in -l${lib}""... $ac_c" 1>&6 -echo "configure:4857: checking for connect in -l${lib}" >&5 +echo "configure:4899: checking for connect in -l${lib}" >&5 ac_lib_var=`echo ${lib}'_'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 @@ -4861,7 +4903,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${lib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4902,12 +4944,12 @@ fi for ac_func in gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4906: checking for $ac_func" >&5 +echo "configure:4948: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4958,7 +5000,7 @@ done for lib in dns nsl resolv; do if test "$HAVE_GETHOSTBYNAME" != 1; then echo $ac_n "checking for gethostbyname in -l${lib}""... $ac_c" 1>&6 -echo "configure:4962: checking for gethostbyname in -l${lib}" >&5 +echo "configure:5004: checking for gethostbyname in -l${lib}" >&5 ac_lib_var=`echo ${lib}'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4966,7 +5008,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${lib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5005,9 +5047,9 @@ fi fi echo $ac_n "checking for the useability of arpa/nameser_compat.h""... $ac_c" 1>&6 -echo "configure:5009: checking for the useability of arpa/nameser_compat.h" >&5 +echo "configure:5051: checking for the useability of arpa/nameser_compat.h" >&5 cat > conftest.$ac_ext < @@ -5024,7 +5066,7 @@ int main() { static int i; i = 0; ; return 0; } EOF -if { (eval echo configure:5028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -5042,11 +5084,11 @@ rm -f conftest* openafs_save_libs="$LIBS" echo $ac_n "checking for res_search""... $ac_c" 1>&6 -echo "configure:5046: checking for res_search" >&5 +echo "configure:5088: checking for res_search" >&5 ac_cv_func_res_search=no cat > conftest.$ac_ext < @@ -5070,7 +5112,7 @@ return 0; ; return 0; } EOF -if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_res_search=yes else @@ -5087,7 +5129,7 @@ rm -f conftest* ac_cv_func_res_search=no cat > conftest.$ac_ext < @@ -5111,7 +5153,7 @@ return 0; ; return 0; } EOF -if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_res_search=yes else @@ -5145,7 +5187,7 @@ fi PTHREAD_LIBS=error echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6 -echo "configure:5149: checking for pthread_attr_init in -lpthread" >&5 +echo "configure:5191: checking for pthread_attr_init in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5153,7 +5195,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" 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_lib_$ac_lib_var=yes" else @@ -5186,7 +5228,7 @@ fi if test "x$PTHREAD_LIBS" = xerror; then echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6 -echo "configure:5190: checking for pthread_attr_init in -lpthreads" >&5 +echo "configure:5232: checking for pthread_attr_init in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5194,7 +5236,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5228,7 +5270,7 @@ fi fi if test "x$PTHREAD_LIBS" = xerror; then echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6 -echo "configure:5232: checking for pthread_attr_init in -lc_r" >&5 +echo "configure:5274: checking for pthread_attr_init in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5236,7 +5278,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5270,12 +5312,12 @@ fi fi if test "x$PTHREAD_LIBS" = xerror; then echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6 -echo "configure:5274: checking for pthread_attr_init" >&5 +echo "configure:5316: checking for pthread_attr_init" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pthread_attr_init=yes" else @@ -5413,7 +5455,7 @@ EOF fi echo $ac_n "checking for tivoli tsm butc support""... $ac_c" 1>&6 -echo "configure:5417: checking for tivoli tsm butc support" >&5 +echo "configure:5459: checking for tivoli tsm butc support" >&5 XBSA_CFLAGS="" if test "$enable_tivoli_tsm" = "yes"; then XBSADIR1=/usr/tivoli/tsm/client/api/bin/xopen @@ -5434,12 +5476,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:5438: checking for ANSI C header files" >&5 +echo "configure:5480: 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 @@ -5447,7 +5489,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5493: \"$ac_try\") 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* @@ -5464,7 +5506,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 @@ -5482,7 +5524,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 @@ -5503,7 +5545,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -5514,7 +5556,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:5518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -5538,12 +5580,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:5542: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:5584: 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 @@ -5559,7 +5601,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:5563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -5584,12 +5626,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:5588: checking for $ac_hdr that defines DIR" >&5 +echo "configure:5630: 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> @@ -5597,7 +5639,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:5601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -5622,7 +5664,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:5626: checking for opendir in -ldir" >&5 +echo "configure:5668: 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 @@ -5630,7 +5672,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:5687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5663,7 +5705,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:5667: checking for opendir in -lx" >&5 +echo "configure:5709: 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 @@ -5671,7 +5713,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:5728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5708,17 +5750,17 @@ for ac_hdr in stdlib.h string.h unistd.h fcntl.h sys/time.h sys/file.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5712: checking for $ac_hdr" >&5 +echo "configure:5754: 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:5722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5764: \"$ac_try\") 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* @@ -5748,17 +5790,17 @@ for ac_hdr in netinet/in.h netdb.h sys/fcntl.h sys/mnttab.h sys/mntent.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5752: checking for $ac_hdr" >&5 +echo "configure:5794: 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:5762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5804: \"$ac_try\") 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* @@ -5788,17 +5830,17 @@ for ac_hdr in mntent.h sys/vfs.h sys/param.h sys/fs_types.h sys/fstyp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5792: checking for $ac_hdr" >&5 +echo "configure:5834: 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:5802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5844: \"$ac_try\") 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* @@ -5828,17 +5870,17 @@ for ac_hdr in sys/mount.h strings.h termios.h signal.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5832: checking for $ac_hdr" >&5 +echo "configure:5874: 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:5842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5884: \"$ac_try\") 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* @@ -5868,17 +5910,17 @@ for ac_hdr in windows.h malloc.h winsock2.h direct.h io.h sys/user.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5872: checking for $ac_hdr" >&5 +echo "configure:5914: 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:5882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5924: \"$ac_try\") 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* @@ -5908,17 +5950,17 @@ for ac_hdr in security/pam_modules.h siad.h usersec.h ucontext.h regex.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5912: checking for $ac_hdr" >&5 +echo "configure:5954: 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:5922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5964: \"$ac_try\") 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* @@ -5962,12 +6004,12 @@ fi for ac_func in utimes random srandom getdtablesize snprintf strlcat strlcpy re_comp re_exec do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5966: 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 @@ -6017,12 +6059,12 @@ done for ac_func in setprogname getprogname sigaction mkstemp vsnprintf strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6021: 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 @@ -6073,12 +6115,12 @@ done for ac_func in regcomp regexec regerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6077: checking for $ac_func" >&5 +echo "configure:6119: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6126,7 +6168,7 @@ fi done echo $ac_n "checking for POSIX regex library""... $ac_c" 1>&6 -echo "configure:6130: checking for POSIX regex library" >&5 +echo "configure:6172: checking for POSIX regex library" >&5 if test "$ac_cv_header_regex_h" = "yes" && \ test "$ac_cv_func_regcomp" = "yes" && \ test "$ac_cv_func_regexec" = "yes" && \ @@ -6141,12 +6183,12 @@ else fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:6145: checking for ssize_t" >&5 +echo "configure:6187: 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 @@ -6174,7 +6216,7 @@ EOF fi echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:6178: checking size of long" >&5 +echo "configure:6220: 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 @@ -6182,7 +6224,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -6193,7 +6235,7 @@ main() exit(0); } EOF -if { (eval echo configure:6197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6239: \"$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 @@ -6216,12 +6258,12 @@ EOF for ac_func in timegm do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6220: checking for $ac_func" >&5 +echo "configure:6262: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 daemon +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6317: checking for $ac_func" >&5 +if 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:6345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6347,7 +6444,7 @@ LWP_OPTMZ=-O # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6351: checking for $ac_word" >&5 +echo "configure:6448: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6379,7 +6476,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:6383: checking for $ac_word" >&5 +echo "configure:6480: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6414,7 +6511,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:6418: checking for $ac_word" >&5 +echo "configure:6515: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6449,7 +6546,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:6453: checking for $ac_word" >&5 +echo "configure:6550: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6484,7 +6581,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:6488: checking for $ac_word" >&5 +echo "configure:6585: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6519,7 +6616,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:6523: checking for $ac_word" >&5 +echo "configure:6620: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6554,7 +6651,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:6558: checking for $ac_word" >&5 +echo "configure:6655: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6589,7 +6686,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:6593: checking for $ac_word" >&5 +echo "configure:6690: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6624,7 +6721,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:6628: checking for $ac_word" >&5 +echo "configure:6725: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LORDER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7057,6 +7154,19 @@ case $AFS_SYSNAME in EXTRA_VLIBOBJS="fstab.o" ;; + ppc_darwin_80) + AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration" + LEX="lex -l" + MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}' + KROOT= + KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers' + LWP_OPTMZ="-O2" + REGEX_OBJ="regex.o" + XCFLAGS="-no-cpp-precomp" + TXLIBS="-lncurses" + EXTRA_VLIBOBJS="fstab.o" + ;; + ppc_linux*) KERN_OPTMZ=-O2 LEX="flex -l" @@ -7115,6 +7225,22 @@ case $AFS_SYSNAME in SHLIB_LINKER="${MT_CC} -bM:SRE -berok" AIX64="" ;; + + rs_aix53) + DBG="-g" + LEX="lex" + LIBSYS_AIX_EXP="afsl.exp" + MT_CC="xlc_r" + MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}' + MT_LIBS="-lpthreads" + SHLIB_SUFFIX="o" + TXLIBS="-lcurses" + XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void" + XLIBS="${LIB_AFSDB} -ldl" + SHLIB_LINKER="${MT_CC} -bM:SRE -berok" + AIX64="" + ;; + s390_linux22) CC="gcc" CCOBJ="gcc" @@ -7159,7 +7285,7 @@ case $AFS_SYSNAME in MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}' MT_LIBS="-lpthread" PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC" - SHLIB_LDFLAGS="-shared -Xlinker -x" + SHLIB_LDFLAGS="-shared -Xlinker -x -Xlinker -Bsymbolic" TXLIBS="-lncurses" XCFLAGS="-O -g -D_LARGEFILE64_SOURCE -D__s390x__" YACC="bison -y" @@ -7494,7 +7620,7 @@ case $AFS_SYSNAME in sgi_6*) echo $ac_n "checking for mem* in sys/systm.h""... $ac_c" 1>&6 -echo "configure:7498: checking for mem* in sys/systm.h" >&5 +echo "configure:7624: checking for mem* in sys/systm.h" >&5 save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_KERNEL -D__STRING_H__" if eval "test \"`echo '$''{'ac_cv_irix_sys_systm_h_has_mem_funcs'+set}'`\" = set"; then @@ -7502,7 +7628,7 @@ if eval "test \"`echo '$''{'ac_cv_irix_sys_systm_h_has_mem_funcs'+set}'`\" = set else cat > conftest.$ac_ext < #include @@ -7512,7 +7638,7 @@ extern void *memcpy(char *, const void *, size_t); ; return 0; } EOF -if { (eval echo configure:7516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_irix_sys_systm_h_has_mem_funcs=no else diff --git a/configure-libafs.in b/configure-libafs.in index 2c172a76b..0c2bd0a89 100644 --- a/configure-libafs.in +++ b/configure-libafs.in @@ -1,5 +1,5 @@ AC_INIT(src/libafs/Makefile.common.in) -AM_INIT_AUTOMAKE(openafs-libafs,1.3.81) +AM_INIT_AUTOMAKE(openafs-libafs,1.3.82) AC_CONFIG_HEADER(src/config/afsconfig.h) define(OPENAFS_CONFIGURE_LIBAFS) diff --git a/configure.in b/configure.in index 16a80cabf..f52f0cb48 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT(src/config/stds.h) -AM_INIT_AUTOMAKE(openafs,1.3.81) +AM_INIT_AUTOMAKE(openafs,1.3.82) AC_CONFIG_HEADER(src/config/afsconfig.h) AC_PROG_CC diff --git a/src/LICENSE b/src/LICENSE index 1c3c91598..87858924a 100644 --- a/src/LICENSE +++ b/src/LICENSE @@ -231,3 +231,462 @@ party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. + +Kerberos 5 ticket support in rxkad is subject to the following copyright: +/* + * Copyright (c) 1995, 1996, 1997, 2002 Kungliga Tekniska Högskolan + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +Some code in rxkad/ticket5.c is subject to the following copyright: +/* + * Copyright 1992, 2002 by the Massachusetts Institute of Technology. + * All Rights Reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. Furthermore if you modify this software you must label + * your software as modified software and not distribute it in such a + * fashion that it might be confused with the original M.I.T. software. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + */ + +afssettings is subject to the following license: +APPLE PUBLIC SOURCE LICENSE +Version 2.0 - August 6, 2003 + +Please read this License carefully before downloading this software. +By downloading or using this software, you are agreeing to be bound by +the terms of this License. If you do not or cannot agree to the terms +of this License, please do not download or use the software. + +1. General; Definitions. This License applies to any program or other +work which Apple Computer, Inc. ("Apple") makes publicly available and +which contains a notice placed by Apple identifying such program or +work as "Original Code" and stating that it is subject to the terms of +this Apple Public Source License version 2.0 ("License"). As used in +this License: + +1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is +the grantor of rights, (i) claims of patents that are now or hereafter +acquired, owned by or assigned to Apple and (ii) that cover subject +matter contained in the Original Code, but only to the extent +necessary to use, reproduce and/or distribute the Original Code +without infringement; and (b) in the case where You are the grantor of +rights, (i) claims of patents that are now or hereafter acquired, +owned by or assigned to You and (ii) that cover subject matter in Your +Modifications, taken alone or in combination with Original Code. + +1.2 "Contributor" means any person or entity that creates or +contributes to the creation of Modifications. + +1.3 "Covered Code" means the Original Code, Modifications, the +combination of Original Code and any Modifications, and/or any +respective portions thereof. + +1.4 "Externally Deploy" means: (a) to sublicense, distribute or +otherwise make Covered Code available, directly or indirectly, to +anyone other than You; and/or (b) to use Covered Code, alone or as +part of a Larger Work, in any way to provide a service, including but +not limited to delivery of content, through electronic communication +with a client other than You. + +1.5 "Larger Work" means a work which combines Covered Code or portions +thereof with code not governed by the terms of this License. + +1.6 "Modifications" mean any addition to, deletion from, and/or change +to, the substance and/or structure of the Original Code, any previous +Modifications, the combination of Original Code and any previous +Modifications, and/or any respective portions thereof. When code is +released as a series of files, a Modification is: (a) any addition to +or deletion from the contents of a file containing Covered Code; +and/or (b) any new file or other representation of computer program +statements that contains any part of Covered Code. + +1.7 "Original Code" means (a) the Source Code of a program or other +work as originally made available by Apple under this License, +including the Source Code of any updates or upgrades to such programs +or works made available by Apple under this License, and that has been +expressly identified by Apple as such in the header file(s) of such +work; and (b) the object code compiled from such Source Code and +originally made available by Apple under this License. + +1.8 "Source Code" means the human readable form of a program or other +work that is suitable for making modifications to it, including all +modules it contains, plus any associated interface definition files, +scripts used to control compilation and installation of an executable +(object code). + +1.9 "You" or "Your" means an individual or a legal entity exercising +rights under this License. For legal entities, "You" or "Your" +includes any entity which controls, is controlled by, or is under +common control with, You, where "control" means (a) the power, direct +or indirect, to cause the direction or management of such entity, +whether by contract or otherwise, or (b) ownership of fifty percent +(50%) or more of the outstanding shares or beneficial ownership of +such entity. + +2. Permitted Uses; Conditions & Restrictions. Subject to the terms +and conditions of this License, Apple hereby grants You, effective on +the date You accept this License and download the Original Code, a +world-wide, royalty-free, non-exclusive license, to the extent of +Apple's Applicable Patent Rights and copyrights covering the Original +Code, to do the following: + +2.1 Unmodified Code. You may use, reproduce, display, perform, +internally distribute within Your organization, and Externally Deploy +verbatim, unmodified copies of the Original Code, for commercial or +non-commercial purposes, provided that in each instance: + +(a) You must retain and reproduce in all copies of Original Code the +copyright and other proprietary notices and disclaimers of Apple as +they appear in the Original Code, and keep intact all notices in the +Original Code that refer to this License; and + +(b) You must include a copy of this License with every copy of Source +Code of Covered Code and documentation You distribute or Externally +Deploy, and You may not offer or impose any terms on such Source Code +that alter or restrict this License or the recipients' rights +hereunder, except as permitted under Section 6. + +2.2 Modified Code. You may modify Covered Code and use, reproduce, +display, perform, internally distribute within Your organization, and +Externally Deploy Your Modifications and Covered Code, for commercial +or non-commercial purposes, provided that in each instance You also +meet all of these conditions: + +(a) You must satisfy all the conditions of Section 2.1 with respect to +the Source Code of the Covered Code; + +(b) You must duplicate, to the extent it does not already exist, the +notice in Exhibit A in each file of the Source Code of all Your +Modifications, and cause the modified files to carry prominent notices +stating that You changed the files and the date of any change; and + +(c) If You Externally Deploy Your Modifications, You must make +Source Code of all Your Externally Deployed Modifications either +available to those to whom You have Externally Deployed Your +Modifications, or publicly available. Source Code of Your Externally +Deployed Modifications must be released under the terms set forth in +this License, including the license grants set forth in Section 3 +below, for as long as you Externally Deploy the Covered Code or twelve +(12) months from the date of initial External Deployment, whichever is +longer. You should preferably distribute the Source Code of Your +Externally Deployed Modifications electronically (e.g. download from a +web site). + +2.3 Distribution of Executable Versions. In addition, if You +Externally Deploy Covered Code (Original Code and/or Modifications) in +object code, executable form only, You must include a prominent +notice, in the code itself as well as in related documentation, +stating that Source Code of the Covered Code is available under the +terms of this License with information on how and where to obtain such +Source Code. + +2.4 Third Party Rights. You expressly acknowledge and agree that +although Apple and each Contributor grants the licenses to their +respective portions of the Covered Code set forth herein, no +assurances are provided by Apple or any Contributor that the Covered +Code does not infringe the patent or other intellectual property +rights of any other entity. Apple and each Contributor disclaim any +liability to You for claims brought by any other entity based on +infringement of intellectual property rights or otherwise. As a +condition to exercising the rights and licenses granted hereunder, You +hereby assume sole responsibility to secure any other intellectual +property rights needed, if any. For example, if a third party patent +license is required to allow You to distribute the Covered Code, it is +Your responsibility to acquire that license before distributing the +Covered Code. + +3. Your Grants. In consideration of, and as a condition to, the +licenses granted to You under this License, You hereby grant to any +person or entity receiving or distributing Covered Code under this +License a non-exclusive, royalty-free, perpetual, irrevocable license, +under Your Applicable Patent Rights and other intellectual property +rights (other than patent) owned or controlled by You, to use, +reproduce, display, perform, modify, sublicense, distribute and +Externally Deploy Your Modifications of the same scope and extent as +Apple's licenses under Sections 2.1 and 2.2 above. + +4. Larger Works. You may create a Larger Work by combining Covered +Code with other code not governed by the terms of this License and +distribute the Larger Work as a single product. In each such instance, +You must make sure the requirements of this License are fulfilled for +the Covered Code or any portion thereof. + +5. Limitations on Patent License. Except as expressly stated in +Section 2, no other patent rights, express or implied, are granted by +Apple herein. Modifications and/or Larger Works may require additional +patent licenses from Apple which Apple may grant in its sole +discretion. + +6. Additional Terms. You may choose to offer, and to charge a fee for, +warranty, support, indemnity or liability obligations and/or other +rights consistent with the scope of the license granted herein +("Additional Terms") to one or more recipients of Covered Code. +However, You may do so only on Your own behalf and as Your sole +responsibility, and not on behalf of Apple or any Contributor. You +must obtain the recipient's agreement that any such Additional Terms +are offered by You alone, and You hereby agree to indemnify, defend +and hold Apple and every Contributor harmless for any liability +incurred by or claims asserted against Apple or such Contributor by +reason of any such Additional Terms. + +7. Versions of the License. Apple may publish revised and/or new +versions of this License from time to time. Each version will be given +a distinguishing version number. Once Original Code has been published +under a particular version of this License, You may continue to use it +under the terms of that version. You may also choose to use such +Original Code under the terms of any subsequent version of this +License published by Apple. No one other than Apple has the right to +modify the terms applicable to Covered Code created under this +License. + +8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in +part pre-release, untested, or not fully tested works. The Covered +Code may contain errors that could cause failures or loss of data, and +may be incomplete or contain inaccuracies. You expressly acknowledge +and agree that use of the Covered Code, or any portion thereof, is at +Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND +WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND +APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE +PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM +ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT +NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF +MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR +PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD +PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST +INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE +FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS, +THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR +ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO +ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE +AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY. +You acknowledge that the Covered Code is not intended for use in the +operation of nuclear facilities, aircraft navigation, communication +systems, or air traffic control machines in which case the failure of +the Covered Code could lead to death, personal injury, or severe +physical or environmental damage. + +9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO +EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING +TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR +ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY, +TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF +APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY +REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF +INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY +TO YOU. In no event shall Apple's total liability to You for all +damages (other than as may be required by applicable law) under this +License exceed the amount of fifty dollars ($50.00). + +10. Trademarks. This License does not grant any rights to use the +trademarks or trade names "Apple", "Apple Computer", "Mac", "Mac OS", +"QuickTime", "QuickTime Streaming Server" or any other trademarks, +service marks, logos or trade names belonging to Apple (collectively +"Apple Marks") or to any trademark, service mark, logo or trade name +belonging to any Contributor. You agree not to use any Apple Marks in +or as part of the name of products derived from the Original Code or +to endorse or promote products derived from the Original Code other +than as expressly permitted by and in strict compliance at all times +with Apple's third party trademark usage guidelines which are posted +at http://www.apple.com/legal/guidelinesfor3rdparties.html. + +11. Ownership. Subject to the licenses granted under this License, +each Contributor retains all rights, title and interest in and to any +Modifications made by such Contributor. Apple retains all rights, +title and interest in and to the Original Code and any Modifications +made by or on behalf of Apple ("Apple Modifications"), and such Apple +Modifications will not be automatically subject to this License. Apple +may, at its sole discretion, choose to license such Apple +Modifications under this License, or on different terms from those +contained in this License or may choose not to license them at all. + +12. Termination. + +12.1 Termination. This License and the rights granted hereunder will +terminate: + +(a) automatically without notice from Apple if You fail to comply with +any term(s) of this License and fail to cure such breach within 30 +days of becoming aware of such breach; + +(b) immediately in the event of the circumstances described in Section +13.5(b); or + +(c) automatically without notice from Apple if You, at any time during +the term of this License, commence an action for patent infringement +against Apple; provided that Apple did not first commence +an action for patent infringement against You in that instance. + +12.2 Effect of Termination. Upon termination, You agree to immediately +stop any further use, reproduction, modification, sublicensing and +distribution of the Covered Code. All sublicenses to the Covered Code +which have been properly granted prior to termination shall survive +any termination of this License. Provisions which, by their nature, +should remain in effect beyond the termination of this License shall +survive, including but not limited to Sections 3, 5, 8, 9, 10, 11, +12.2 and 13. No party will be liable to any other for compensation, +indemnity or damages of any sort solely as a result of terminating +this License in accordance with its terms, and termination of this +License will be without prejudice to any other right or remedy of +any party. + +13. Miscellaneous. + +13.1 Government End Users. The Covered Code is a "commercial item" as +defined in FAR 2.101. Government software and technical data rights in +the Covered Code include only those rights customarily provided to the +public as defined in this License. This customary commercial license +in technical data and software is provided in accordance with FAR +12.211 (Technical Data) and 12.212 (Computer Software) and, for +Department of Defense purchases, DFAR 252.227-7015 (Technical Data -- +Commercial Items) and 227.7202-3 (Rights in Commercial Computer +Software or Computer Software Documentation). Accordingly, all U.S. +Government End Users acquire Covered Code with only those rights set +forth herein. + +13.2 Relationship of Parties. This License will not be construed as +creating an agency, partnership, joint venture or any other form of +legal association between or among You, Apple or any Contributor, and +You will not represent to the contrary, whether expressly, by +implication, appearance or otherwise. + +13.3 Independent Development. Nothing in this License will impair +Apple's right to acquire, license, develop, have others develop for +it, market and/or distribute technology or products that perform the +same or similar functions as, or otherwise compete with, +Modifications, Larger Works, technology or products that You may +develop, produce, market or distribute. + +13.4 Waiver; Construction. Failure by Apple or any Contributor to +enforce any provision of this License will not be deemed a waiver of +future enforcement of that or any other provision. Any law or +regulation which provides that the language of a contract shall be +construed against the drafter will not apply to this License. + +13.5 Severability. (a) If for any reason a court of competent +jurisdiction finds any provision of this License, or portion thereof, +to be unenforceable, that provision of the License will be enforced to +the maximum extent permissible so as to effect the economic benefits +and intent of the parties, and the remainder of this License will +continue in full force and effect. (b) Notwithstanding the foregoing, +if applicable law prohibits or restricts You from fully and/or +specifically complying with Sections 2 and/or 3 or prevents the +enforceability of either of those Sections, this License will +immediately terminate and You must immediately discontinue any use of +the Covered Code and destroy all copies of it that are in your +possession or control. + +13.6 Dispute Resolution. Any litigation or other dispute resolution +between You and Apple relating to this License shall take place in the +Northern District of California, and You and Apple hereby consent to +the personal jurisdiction of, and venue in, the state and federal +courts within that District with respect to this License. The +application of the United Nations Convention on Contracts for the +International Sale of Goods is expressly excluded. + +13.7 Entire Agreement; Governing Law. This License constitutes the +entire agreement between the parties with respect to the subject +matter hereof. This License shall be governed by the laws of the +United States and the State of California, except that body of +California law concerning conflicts of law. + +Where You are located in the province of Quebec, Canada, the following +clause applies: The parties hereby confirm that they have requested +that this License and all related documents be drafted in English. Les +parties ont exige que le present contrat et tous les documents +connexes soient rediges en anglais. + +EXHIBIT A. + +"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights +Reserved. + +This file contains Original Code and/or Modifications of Original Code +as defined in and that are subject to the Apple Public Source License +Version 2.0 (the 'License'). You may not use this file except in +compliance with the License. Please obtain a copy of the License at +http://www.opensource.apple.com/apsl/ and read it before using this +file. + +The Original Code and all software distributed under the License are +distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, +INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. +Please see the License for the specific language governing rights and +limitations under the License." + +Some portions of Rx are subject to the following license: +/* + * Sun RPC is a product of Sun Microsystems, Inc. and is provided for + * unrestricted use provided that this legend is included on all tape + * media and as a part of the software program in whole or part. Users + * may copy or modify Sun RPC without charge, but are not authorized + * to license or distribute it to anyone else except as part of a product or + * program developed by the user or with the express written consent of + * Sun Microsystems, Inc. + * + * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + * + * Sun RPC is provided with no support and without any obligation on the + * part of Sun Microsystems, Inc. to assist in its use, correction, + * modification or enhancement. + * + * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + * OR ANY PART THEREOF. + * + * In no event will Sun Microsystems, Inc. be liable for any lost revenue + * or profits or other special, indirect and consequential damages, even if + * Sun has been advised of the possibility of such damages. + * + * Sun Microsystems, Inc. + * 2550 Garcia Avenue + * Mountain View, California 94043 + */ diff --git a/src/WINNT/afsapplib/.cvsignore b/src/WINNT/afsapplib/.cvsignore new file mode 100644 index 000000000..45415bdcd --- /dev/null +++ b/src/WINNT/afsapplib/.cvsignore @@ -0,0 +1,2 @@ +AFS_component_version_number.h +lang/AFS_component_version_number.h diff --git a/src/WINNT/afsd/NTMakefile b/src/WINNT/afsd/NTMakefile index cbdb89aef..7194e87c7 100644 --- a/src/WINNT/afsd/NTMakefile +++ b/src/WINNT/afsd/NTMakefile @@ -213,15 +213,16 @@ $(AFSKFWLIB): $(AFSKFWLIB_OBJS) LOGON_DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\afslogon.dll LOGON_DLLOBJS =\ - $(OUT)\afslogon.obj \ + $(OUT)\afslogon.obj \ $(OUT)\logon_ad.obj \ - $(OUT)\afslogon.res + $(OUT)\afslogon.res LOGON_DLLLIBS =\ - $(DESTDIR)\lib\afsauthent.lib \ - $(DESTDIR)\lib\libafsconf.lib \ + $(DESTDIR)\lib\afsauthent.lib \ + $(DESTDIR)\lib\libafsconf.lib \ $(DESTDIR)\lib\afsrxkad.lib \ $(DESTDIR)\lib\afsdes.lib \ + $(LANAHELPERLIB) \ $(AFSKFWLIB) LOGON_DLLSDKLIBS =\ diff --git a/src/WINNT/afsd/afsd.c b/src/WINNT/afsd/afsd.c index d8661ebbb..2f10e2e84 100644 --- a/src/WINNT/afsd/afsd.c +++ b/src/WINNT/afsd/afsd.c @@ -36,6 +36,8 @@ extern int traceOnPanic; extern void afsd_DbgBreakAllocInit(); extern void afsd_DbgBreakAdd(DWORD requestNumber); +HANDLE WaitToTerminate = NULL; + /* * Notifier function for use by osi_panic */ diff --git a/src/WINNT/afsd/afsd.h b/src/WINNT/afsd/afsd.h index 5c7c8ff97..7f9291ced 100644 --- a/src/WINNT/afsd/afsd.h +++ b/src/WINNT/afsd/afsd.h @@ -123,6 +123,8 @@ extern int cm_freelanceEnabled; extern long rx_mtu; +extern HANDLE WaitToTerminate; + #define CAPABILITY_ERRORTRANS (1<<0) #define CAPABILITY_BITS 1 @@ -130,4 +132,19 @@ extern long rx_mtu; #define LOG_PACKET 1 #undef NOTSERVICE +#define AFSD_HOOK_DLL "afsdhook.dll" +#define AFSD_INIT_HOOK "AfsdInitHook" +typedef BOOL ( APIENTRY * AfsdInitHook )(void); +#define AFSD_RX_STARTED_HOOK "AfsdRxStartedHook" +typedef BOOL ( APIENTRY * AfsdRxStartedHook )(void); +#define AFSD_SMB_STARTED_HOOK "AfsdSmbStartedHook" +typedef BOOL ( APIENTRY * AfsdSmbStartedHook )(void); +#define AFSD_STARTED_HOOK "AfsdStartedHook" +typedef BOOL ( APIENTRY * AfsdStartedHook )(void); +#define AFSD_DAEMON_HOOK "AfsdDaemonHook" +typedef BOOL ( APIENTRY * AfsdDaemonHook )(void); +#define AFSD_STOPPING_HOOK "AfsdStoppingHook" +typedef BOOL ( APIENTRY * AfsdStoppingHook )(void); +#define AFSD_STOPPED_HOOK "AfsdStoppedHook" +typedef BOOL ( APIENTRY * AfsdStoppedHook )(void); #endif /* AFSD_H_ENV */ diff --git a/src/WINNT/afsd/afsd_service.c b/src/WINNT/afsd/afsd_service.c index 53d750d6a..a539363b6 100644 --- a/src/WINNT/afsd/afsd_service.c +++ b/src/WINNT/afsd/afsd_service.c @@ -987,10 +987,6 @@ BOOL AFSModulesVerify(void) return success; } -typedef BOOL ( APIENTRY * AfsdInitHook )(void); -#define AFSD_INIT_HOOK "AfsdInitHook" -#define AFSD_HOOK_DLL "afsdhook.dll" - /* control serviceex exists only on 2000/xp. These functions will be loaded dynamically. */ @@ -1009,9 +1005,8 @@ afsd_Main(DWORD argc, LPTSTR *argv) #ifdef JUMP int jmpret; #endif /* JUMP */ - HANDLE hInitHookDll; - HANDLE hAdvApi32; - AfsdInitHook initHook; + HMODULE hHookDll; + HMODULE hAdvApi32; #ifdef _DEBUG _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF /*| _CRTDBG_CHECK_ALWAYS_DF*/ | @@ -1109,17 +1104,17 @@ afsd_Main(DWORD argc, LPTSTR *argv) } /* allow an exit to be called prior to any initialization */ - hInitHookDll = LoadLibrary(AFSD_HOOK_DLL); - if (hInitHookDll) + hHookDll = LoadLibrary(AFSD_HOOK_DLL); + if (hHookDll) { - BOOL hookRc = FALSE; - initHook = ( AfsdInitHook ) GetProcAddress(hInitHookDll, AFSD_INIT_HOOK); + BOOL hookRc = TRUE; + AfsdInitHook initHook = ( AfsdInitHook ) GetProcAddress(hHookDll, AFSD_INIT_HOOK); if (initHook) { hookRc = initHook(); } - FreeLibrary(hInitHookDll); - hInitHookDll = NULL; + FreeLibrary(hHookDll); + hHookDll = NULL; if (hookRc == FALSE) { @@ -1172,6 +1167,33 @@ afsd_Main(DWORD argc, LPTSTR *argv) osi_panic(reason, __FILE__, __LINE__); } + /* allow an exit to be called post rx initialization */ + hHookDll = LoadLibrary(AFSD_HOOK_DLL); + if (hHookDll) + { + BOOL hookRc = TRUE; + AfsdRxStartedHook rxStartedHook = ( AfsdRxStartedHook ) GetProcAddress(hHookDll, AFSD_RX_STARTED_HOOK); + if (rxStartedHook) + { + hookRc = rxStartedHook(); + } + FreeLibrary(hHookDll); + hHookDll = NULL; + + if (hookRc == FALSE) + { + ServiceStatus.dwCurrentState = SERVICE_STOPPED; + ServiceStatus.dwWin32ExitCode = NO_ERROR; + ServiceStatus.dwCheckPoint = 0; + ServiceStatus.dwWaitHint = 0; + ServiceStatus.dwControlsAccepted = 0; + SetServiceStatus(StatusHandle, &ServiceStatus); + + /* exit if initialization failed */ + return; + } + } + #ifndef NOTSERVICE ServiceStatus.dwCheckPoint++; ServiceStatus.dwWaitHint -= 5000; @@ -1183,6 +1205,33 @@ afsd_Main(DWORD argc, LPTSTR *argv) osi_panic(reason, __FILE__, __LINE__); } + /* allow an exit to be called post smb initialization */ + hHookDll = LoadLibrary(AFSD_HOOK_DLL); + if (hHookDll) + { + BOOL hookRc = TRUE; + AfsdSmbStartedHook smbStartedHook = ( AfsdSmbStartedHook ) GetProcAddress(hHookDll, AFSD_SMB_STARTED_HOOK); + if (smbStartedHook) + { + hookRc = smbStartedHook(); + } + FreeLibrary(hHookDll); + hHookDll = NULL; + + if (hookRc == FALSE) + { + ServiceStatus.dwCurrentState = SERVICE_STOPPED; + ServiceStatus.dwWin32ExitCode = NO_ERROR; + ServiceStatus.dwCheckPoint = 0; + ServiceStatus.dwWaitHint = 0; + ServiceStatus.dwControlsAccepted = 0; + SetServiceStatus(StatusHandle, &ServiceStatus); + + /* exit if initialization failed */ + return; + } + } + MountGlobalDrives(); #ifndef NOTSERVICE @@ -1204,6 +1253,33 @@ afsd_Main(DWORD argc, LPTSTR *argv) } } + /* allow an exit to be called when started */ + hHookDll = LoadLibrary(AFSD_HOOK_DLL); + if (hHookDll) + { + BOOL hookRc = TRUE; + AfsdStartedHook startedHook = ( AfsdStartedHook ) GetProcAddress(hHookDll, AFSD_STARTED_HOOK); + if (startedHook) + { + hookRc = startedHook(); + } + FreeLibrary(hHookDll); + hHookDll = NULL; + + if (hookRc == FALSE) + { + ServiceStatus.dwCurrentState = SERVICE_STOPPED; + ServiceStatus.dwWin32ExitCode = NO_ERROR; + ServiceStatus.dwCheckPoint = 0; + ServiceStatus.dwWaitHint = 0; + ServiceStatus.dwControlsAccepted = 0; + SetServiceStatus(StatusHandle, &ServiceStatus); + + /* exit if initialization failed */ + return; + } + } + WaitForSingleObject(WaitToTerminate, INFINITE); afsi_log("Received Termination Signal, Stopping Service"); @@ -1217,6 +1293,34 @@ afsd_Main(DWORD argc, LPTSTR *argv) DeregisterEventSource(h); } + /* allow an exit to be called prior to stopping the service */ + hHookDll = LoadLibrary(AFSD_HOOK_DLL); + if (hHookDll) + { + BOOL hookRc = TRUE; + AfsdStoppingHook stoppingHook = ( AfsdStoppingHook ) GetProcAddress(hHookDll, AFSD_STOPPING_HOOK); + if (stoppingHook) + { + hookRc = stoppingHook(); + } + FreeLibrary(hHookDll); + hHookDll = NULL; + + if (hookRc == FALSE) + { + ServiceStatus.dwCurrentState = SERVICE_STOPPED; + ServiceStatus.dwWin32ExitCode = NO_ERROR; + ServiceStatus.dwCheckPoint = 0; + ServiceStatus.dwWaitHint = 0; + ServiceStatus.dwControlsAccepted = 0; + SetServiceStatus(StatusHandle, &ServiceStatus); + + /* exit if initialization failed */ + return; + } + } + + #ifdef AFS_FREELANCE_CLIENT cm_FreelanceShutdown(); afsi_log("Freelance Shutdown complete"); @@ -1247,6 +1351,20 @@ afsd_Main(DWORD argc, LPTSTR *argv) PowerNotificationThreadExit(); #endif + /* allow an exit to be called after stopping the service */ + hHookDll = LoadLibrary(AFSD_HOOK_DLL); + if (hHookDll) + { + BOOL hookRc = TRUE; + AfsdStoppedHook stoppedHook = ( AfsdStoppedHook ) GetProcAddress(hHookDll, AFSD_STOPPED_HOOK); + if (stoppedHook) + { + hookRc = stoppedHook(); + } + FreeLibrary(hHookDll); + hHookDll = NULL; + } + /* Remove the ExceptionFilter */ SetUnhandledExceptionFilter(NULL); diff --git a/src/WINNT/afsd/afskfw.c b/src/WINNT/afsd/afskfw.c index a1fc846c3..adc858705 100644 --- a/src/WINNT/afsd/afskfw.c +++ b/src/WINNT/afsd/afskfw.c @@ -3409,3 +3409,49 @@ BOOL KFW_probe_kdc(struct afsconf_cell * cellconfig) return serverReachable; } +BOOL +KFW_AFS_get_lsa_principal(char * szUser, DWORD *dwSize) +{ + krb5_context ctx = 0; + krb5_error_code code; + krb5_ccache mslsa_ccache=0; + krb5_principal princ = 0; + char * pname = 0; + BOOL success = 0; + + if (!KFW_is_available()) + return FALSE; + + if (code = pkrb5_init_context(&ctx)) + goto cleanup; + + if (code = pkrb5_cc_resolve(ctx, "MSLSA:", &mslsa_ccache)) + goto cleanup; + + if (code = pkrb5_cc_get_principal(ctx, mslsa_ccache, &princ)) + goto cleanup; + + if (code = pkrb5_unparse_name(ctx, princ, &pname)) + goto cleanup; + + if ( strlen(pname) < *dwSize ) { + strncpy(szUser, pname, *dwSize); + szUser[*dwSize-1] = '\0'; + success = 1; + } + *dwSize = strlen(pname); + + cleanup: + if (pname) + pkrb5_free_unparsed_name(ctx, pname); + + if (princ) + pkrb5_free_principal(ctx, princ); + + if (mslsa_ccache) + pkrb5_cc_close(ctx, mslsa_ccache); + + if (ctx) + pkrb5_free_context(ctx); + return success; +} \ No newline at end of file diff --git a/src/WINNT/afsd/afskfw.h b/src/WINNT/afsd/afskfw.h index 995d038fb..352e0595a 100644 --- a/src/WINNT/afsd/afskfw.h +++ b/src/WINNT/afsd/afskfw.h @@ -60,6 +60,7 @@ BOOL KFW_AFS_wait_for_service_start(void); BOOL KFW_probe_kdc(struct afsconf_cell *); int KFW_AFS_get_cellconfig(char *, struct afsconf_cell *, char *); void KFW_import_windows_lsa(void); +BOOL KFW_AFS_get_lsa_principal(char *, DWORD *); /* From afs/krb_prot.h */ /* values for kerb error codes */ diff --git a/src/WINNT/afsd/afslogon.c b/src/WINNT/afsd/afslogon.c index 0e9788ee2..34833aa80 100644 --- a/src/WINNT/afsd/afslogon.c +++ b/src/WINNT/afsd/afslogon.c @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -26,6 +27,7 @@ #include "cm_config.h" #include "krb.h" #include "afskfw.h" +#include "lanahelper.h" #include @@ -561,8 +563,6 @@ GetDomainLogonOptions( PLUID lpLogonId, char * username, char * domain, LogonOpt } if (hkTemp) { - HRESULT hr; - size_t len; CHAR * thesecells; /* dwSize still has the size of the required buffer in bytes. */ @@ -988,12 +988,11 @@ VOID AFS_Logoff_Event( PWLX_NOTIFICATION_INFO pInfo ) DWORD len = 1024; PTOKEN_USER tokenUser = NULL; DWORD retLen; - HANDLE hToken; /* Make sure the AFS Libraries are initialized */ AfsLogonInit(); - DebugEvent0("AFS_Logoff_Event - Starting"); + DebugEvent0("AFS_Logoff_Event - Start"); if (!GetTokenInformation(pInfo->hToken, TokenUser, NULL, 0, &retLen)) { @@ -1002,7 +1001,7 @@ VOID AFS_Logoff_Event( PWLX_NOTIFICATION_INFO pInfo ) if (!GetTokenInformation(pInfo->hToken, TokenUser, tokenUser, retLen, &retLen)) { - DebugEvent("GetTokenInformation failed: GLE = %lX", GetLastError()); + DebugEvent("AFS_Logoff_Event - GetTokenInformation failed: GLE = %lX", GetLastError()); } } } @@ -1020,7 +1019,7 @@ VOID AFS_Logoff_Event( PWLX_NOTIFICATION_INFO pInfo ) } if (strlen(profileDir)) { - DebugEvent("Profile Directory: %s", profileDir); + DebugEvent("AFS_Logoff_Event - Profile Directory: %s", profileDir); if (!IsPathInAfs(profileDir)) { if (code = ktc_ForgetAllTokens()) DebugEvent("AFS_Logoff_Event - ForgetAllTokens failed [%lX]",code); @@ -1035,5 +1034,92 @@ VOID AFS_Logoff_Event( PWLX_NOTIFICATION_INFO pInfo ) if ( tokenUser ) LocalFree(tokenUser); + + DebugEvent0("AFS_Logoff_Event - End"); } +VOID AFS_Logon_Event( PWLX_NOTIFICATION_INFO pInfo ) +{ + DWORD code; + TCHAR profileDir[1024] = TEXT(""); + DWORD len = 1024; + PTOKEN_USER tokenUser = NULL; + DWORD retLen; + HANDLE hToken; + + WCHAR szUserW[128] = L""; + char szUserA[128] = ""; + char szClient[MAX_PATH]; + char szPath[MAX_PATH] = ""; + NETRESOURCE nr; + DWORD res; + DWORD gle; + DWORD dwSize; + + /* Make sure the AFS Libraries are initialized */ + AfsLogonInit(); + + DebugEvent0("AFS_Logon_Event - Start"); + + if (!GetTokenInformation(pInfo->hToken, TokenUser, NULL, 0, &retLen)) + { + if ( GetLastError() == ERROR_INSUFFICIENT_BUFFER ) { + tokenUser = (PTOKEN_USER) LocalAlloc(LPTR, retLen); + + if (!GetTokenInformation(pInfo->hToken, TokenUser, tokenUser, retLen, &retLen)) + { + DebugEvent("AFS_Logon_Event - GetTokenInformation failed: GLE = %lX", GetLastError()); + } + } + } + + /* We can't use pInfo->Domain for the domain since in the cross realm case + * this is source domain and not the destination domain. + */ + if (QueryAdHomePathFromSid( profileDir, sizeof(profileDir), tokenUser->User.Sid, pInfo->Domain)) { + WCHAR Domain[64]=L""; + GetLocalShortDomain(Domain, sizeof(Domain)); + if (QueryAdHomePathFromSid( profileDir, sizeof(profileDir), tokenUser->User.Sid, Domain)) { + if (NetUserGetProfilePath(pInfo->Domain, pInfo->UserName, profileDir, len)) + GetUserProfileDirectory(pInfo->hToken, profileDir, &len); + } + } + + if (strlen(profileDir)) { + DebugEvent("AFS_Logon_Event - Profile Directory: %s", profileDir); + } else { + DebugEvent0("AFS_Logon_Event - Unable to load profile"); + } + + dwSize = sizeof(szUserA); + if (!KFW_AFS_get_lsa_principal(szUserA, &dwSize)) { + StringCbPrintfW(szUserW, sizeof(szUserW), L"%s\\%s", pInfo->Domain, pInfo->UserName); + WideCharToMultiByte(CP_ACP, 0, szUserW, -1, szUserA, MAX_PATH, NULL, NULL); + } + + if (szUserA[0]) + { + lana_GetNetbiosName(szClient, LANA_NETBIOS_NAME_FULL); + StringCbPrintf(szPath, sizeof(szPath), "\\\\%s", szClient); + + DebugEvent("AFS_Logon_Event - Logon Name: %s", szUserA); + + memset (&nr, 0x00, sizeof(NETRESOURCE)); + nr.dwType=RESOURCETYPE_DISK; + nr.lpLocalName=0; + nr.lpRemoteName=szPath; + res = WNetAddConnection2(&nr,NULL,szUserA,0); + if (res) + DebugEvent("AFS_Logon_Event - WNetAddConnection2(%s,%s) failed: 0x%X", + szPath, szUserA,res); + else + DebugEvent0("AFS_Logon_Event - WNetAddConnection2() succeeded"); + } else + DebugEvent("AFS_Logon_Event - User name conversion failed: GLE = 0x%X",GetLastError()); + + if ( tokenUser ) + LocalFree(tokenUser); + + DebugEvent0("AFS_Logon_Event - End"); +} + diff --git a/src/WINNT/afsd/afslogon.def b/src/WINNT/afsd/afslogon.def index 28cafc527..fa8daccc1 100644 --- a/src/WINNT/afsd/afslogon.def +++ b/src/WINNT/afsd/afslogon.def @@ -10,5 +10,6 @@ EXPORTS NPPasswordChangeNotify AFS_Startup_Event AFS_Logoff_Event + AFS_Logon_Event diff --git a/src/WINNT/afsd/cm_aclent.c b/src/WINNT/afsd/cm_aclent.c index b0f9a6dc6..52e635e64 100644 --- a/src/WINNT/afsd/cm_aclent.c +++ b/src/WINNT/afsd/cm_aclent.c @@ -37,17 +37,20 @@ static void CleanupACLEnt(cm_aclent_t * aclp) cm_aclent_t **laclpp; if (aclp->backp) { - /* - * Remove the entry from the vnode's list - */ - laclpp = &aclp->backp->randomACLp; - for (taclp = *laclpp; taclp; laclpp = &taclp->nextp, taclp = *laclpp) { - if (taclp == aclp) - break; + if (aclp->backp->randomACLp) { + /* + * Remove the entry from the vnode's list + */ + lock_AssertMutex(&aclp->backp->mx); + laclpp = &aclp->backp->randomACLp; + for (taclp = *laclpp; taclp; laclpp = &taclp->nextp, taclp = *laclpp) { + if (taclp == aclp) + break; + } + if (!taclp) + osi_panic("CleanupACLEnt race", __FILE__, __LINE__); + *laclpp = aclp->nextp; /* remove from vnode list */ } - if (!taclp) - osi_panic("CleanupACLEnt race", __FILE__, __LINE__); - *laclpp = aclp->nextp; /* remove from vnode list */ aclp->backp = NULL; } @@ -110,10 +113,11 @@ long cm_FindACLCache(cm_scache_t *scp, cm_user_t *userp, long *rightsp) * This function returns a free (not in the LRU queue) acl cache entry. * It must be called with the cm_aclLock lock held */ -static cm_aclent_t *GetFreeACLEnt(void) +static cm_aclent_t *GetFreeACLEnt(cm_scache_t * scp) { cm_aclent_t *aclp; - + cm_scache_t *ascp = 0; + if (cm_data.aclLRUp == NULL) osi_panic("empty aclent LRU", __FILE__, __LINE__); @@ -121,8 +125,14 @@ static cm_aclent_t *GetFreeACLEnt(void) cm_data.aclLRUEndp = (cm_aclent_t *) osi_QPrev(&aclp->q); osi_QRemove((osi_queue_t **) &cm_data.aclLRUp, &aclp->q); + if (aclp->backp && scp != aclp->backp) { + ascp = aclp->backp; + lock_ObtainMutex(&ascp->mx); + } CleanupACLEnt(aclp); + if (ascp) + lock_ReleaseMutex(&ascp->mx); return aclp; } @@ -153,7 +163,7 @@ long cm_AddACLCache(cm_scache_t *scp, cm_user_t *userp, long rights) * and reuse. But first try the free list and see if there's already * someone there. */ - aclp = GetFreeACLEnt(); /* can't fail, panics instead */ + aclp = GetFreeACLEnt(scp); /* can't fail, panics instead */ osi_QAddH((osi_queue_t **) &cm_data.aclLRUp, (osi_queue_t **) &cm_data.aclLRUEndp, &aclp->q); aclp->backp = scp; aclp->nextp = scp->randomACLp; diff --git a/src/WINNT/afsd/cm_callback.c b/src/WINNT/afsd/cm_callback.c index 37771db85..e57269724 100644 --- a/src/WINNT/afsd/cm_callback.c +++ b/src/WINNT/afsd/cm_callback.c @@ -1499,6 +1499,7 @@ void cm_EndCallbackGrantingCall(cm_scache_t *scp, cm_callbackRequest_t *cbrp, cm_racingRevokes_t *nrevp; /* where we'll be next */ int freeFlag; cm_server_t * serverp = 0; + int discardScp = 0; lock_ObtainWrite(&cm_callbackLock); if (flags & CM_CALLBACK_MAINTAINCOUNT) { @@ -1561,16 +1562,7 @@ void cm_EndCallbackGrantingCall(cm_scache_t *scp, cm_callbackRequest_t *cbrp, scp, cbrp->callbackCount, revp->callbackCount, cm_callbackCount); - cm_DiscardSCache(scp); - /* - * Since we don't have a callback to preserve, it's - * OK to drop the lock and re-obtain it. - */ - lock_ReleaseMutex(&scp->mx); - lock_ReleaseWrite(&cm_callbackLock); - cm_CallbackNotifyChange(scp); - lock_ObtainMutex(&scp->mx); - lock_ObtainWrite(&cm_callbackLock); + discardScp = 1; } if (freeFlag) free(revp); @@ -1582,6 +1574,13 @@ void cm_EndCallbackGrantingCall(cm_scache_t *scp, cm_callbackRequest_t *cbrp, lock_ReleaseWrite(&cm_callbackLock); + if ( discardScp ) { + cm_DiscardSCache(scp); + lock_ReleaseMutex(&scp->mx); + cm_CallbackNotifyChange(scp); + lock_ObtainMutex(&scp->mx); + } + if ( serverp ) { lock_ObtainWrite(&cm_serverLock); cm_FreeServer(serverp); diff --git a/src/WINNT/afsd/cm_daemon.c b/src/WINNT/afsd/cm_daemon.c index 5a0106dcd..ab796a6e2 100644 --- a/src/WINNT/afsd/cm_daemon.c +++ b/src/WINNT/afsd/cm_daemon.c @@ -21,6 +21,7 @@ #include #include +#include #include "afsd.h" @@ -42,6 +43,8 @@ void cm_BkgDaemon(long parm) { cm_bkgRequest_t *rp; + rx_StartClientThread(); + lock_ObtainWrite(&cm_daemonLock); while (daemon_ShutdownFlag == 0) { if (!cm_bkgListEndp) { @@ -109,6 +112,7 @@ void cm_Daemon(long parm) char thostName[200]; unsigned long code; struct hostent *thp; + HMODULE hHookDll; /* ping all file servers, up or down, with unauthenticated connection, * to find out whether we have all our callbacks from the server still. @@ -176,6 +180,25 @@ void cm_Daemon(long parm) lastTokenCacheCheck = now; cm_CheckTokenCache(now); } + + /* allow an exit to be called prior to stopping the service */ + hHookDll = LoadLibrary(AFSD_HOOK_DLL); + if (hHookDll) + { + BOOL hookRc = TRUE; + AfsdDaemonHook daemonHook = ( AfsdDaemonHook ) GetProcAddress(hHookDll, AFSD_DAEMON_HOOK); + if (daemonHook) + { + hookRc = daemonHook(); + } + FreeLibrary(hHookDll); + hHookDll = NULL; + + if (hookRc == FALSE) + { + SetEvent(WaitToTerminate); + } + } } } diff --git a/src/WINNT/afsd/cm_memmap.c b/src/WINNT/afsd/cm_memmap.c index 89b387b9f..8f63d7e0f 100644 --- a/src/WINNT/afsd/cm_memmap.c +++ b/src/WINNT/afsd/cm_memmap.c @@ -102,13 +102,13 @@ ComputeSizeOfDataHeaders(DWORD cacheBlocks) } DWORD -ComputeSizeOfMappingFile(DWORD stats, DWORD chunkSize, DWORD cacheBlocks, DWORD blockSize) +ComputeSizeOfMappingFile(DWORD stats, DWORD maxVols, DWORD maxCells, DWORD chunkSize, DWORD cacheBlocks, DWORD blockSize) { DWORD size; size = ComputeSizeOfConfigData() - + ComputeSizeOfVolumes(stats/2) - + ComputeSizeOfCells(stats/4) + + ComputeSizeOfVolumes(maxVols) + + ComputeSizeOfCells(maxCells) + ComputeSizeOfACLCache(stats) + ComputeSizeOfSCache(stats) + ComputeSizeOfSCacheHT(stats) @@ -417,11 +417,13 @@ cm_InitMappedMemory(DWORD virtualCache, char * cachePath, DWORD stats, DWORD chu PSECURITY_ATTRIBUTES psa; int newFile = 1; DWORD mappingSize; + DWORD maxVols = stats/2; + DWORD maxCells = stats/4; char * baseAddress = NULL; cm_config_data_t * config_data_p; char * p; - mappingSize = ComputeSizeOfMappingFile(stats, chunkSize, cacheBlocks, CM_CONFIGDEFAULT_BLOCKSIZE); + mappingSize = ComputeSizeOfMappingFile(stats, maxVols, maxCells, chunkSize, cacheBlocks, CM_CONFIGDEFAULT_BLOCKSIZE); if ( !virtualCache ) { psa = CreateCacheFileSA(); @@ -529,6 +531,8 @@ cm_InitMappedMemory(DWORD virtualCache, char * cachePath, DWORD stats, DWORD chu if ( config_data_p->size == sizeof(cm_config_data_t) && config_data_p->magic == CM_CONFIG_DATA_MAGIC && config_data_p->stats == stats && + config_data_p->maxVolumes == maxVols && + config_data_p->maxCells == maxCells && config_data_p->chunkSize == chunkSize && config_data_p->buf_nbuffers == cacheBlocks && config_data_p->blockSize == CM_CONFIGDEFAULT_BLOCKSIZE && @@ -622,9 +626,9 @@ cm_InitMappedMemory(DWORD virtualCache, char * cachePath, DWORD stats, DWORD chu baseAddress += ComputeSizeOfConfigData(); cm_data.volumeBaseAddress = (cm_volume_t *) baseAddress; - baseAddress += ComputeSizeOfVolumes(stats/2); + baseAddress += ComputeSizeOfVolumes(maxVols); cm_data.cellBaseAddress = (cm_cell_t *) baseAddress; - baseAddress += ComputeSizeOfCells(stats/4); + baseAddress += ComputeSizeOfCells(maxCells); cm_data.aclBaseAddress = (cm_aclent_t *) baseAddress; baseAddress += ComputeSizeOfACLCache(stats); cm_data.scacheBaseAddress = (cm_scache_t *) baseAddress; @@ -653,10 +657,10 @@ cm_InitMappedMemory(DWORD virtualCache, char * cachePath, DWORD stats, DWORD chu RpcStringFree(&p); afsi_log("Initializing Volume Data"); - cm_InitVolume(newFile, stats/2); + cm_InitVolume(newFile, maxVols); afsi_log("Initializing Cell Data"); - cm_InitCell(newFile, stats/4); + cm_InitCell(newFile, maxCells); afsi_log("Initializing ACL Data"); cm_InitACLCache(newFile, 2*stats); diff --git a/src/WINNT/afsd/cm_vnodeops.c b/src/WINNT/afsd/cm_vnodeops.c index 7cdecdc7b..20872df2b 100644 --- a/src/WINNT/afsd/cm_vnodeops.c +++ b/src/WINNT/afsd/cm_vnodeops.c @@ -2692,7 +2692,7 @@ long cm_Lock(cm_scache_t *scp, unsigned char LockType, void **lockpp) { long code; - int Which = ((LockType & 0x1) ? LockRead : LockWrite); + int Which = ((LockType & LOCKING_ANDX_SHARED_LOCK) ? LockRead : LockWrite); AFSFid tfid; AFSVolSync volSync; cm_conn_t *connp; @@ -2706,13 +2706,10 @@ long cm_Lock(cm_scache_t *scp, unsigned char LockType, */ q = scp->fileLocks; while (q) { - fileLock = (cm_file_lock_t *) - ((char *) q - offsetof(cm_file_lock_t, fileq)); - if ((fileLock->flags & - (CM_FILELOCK_FLAG_INVALID | CM_FILELOCK_FLAG_WAITING)) - == 0) { - if ((LockType & 0x1) == 0 - || (fileLock->LockType & 0x1) == 0) + fileLock = (cm_file_lock_t *)((char *) q - offsetof(cm_file_lock_t, fileq)); + if ((fileLock->flags & (CM_FILELOCK_FLAG_INVALID | CM_FILELOCK_FLAG_WAITING)) == 0) { + if ((LockType & LOCKING_ANDX_SHARED_LOCK) == 0 || + (fileLock->LockType & LOCKING_ANDX_SHARED_LOCK) == 0) return CM_ERROR_WOULDBLOCK; found = 1; } @@ -2766,7 +2763,7 @@ long cm_Unlock(cm_scache_t *scp, unsigned char LockType, cm_user_t *userp, cm_req_t *reqp) { long code = 0; - int Which = ((LockType & 0x1) ? LockRead : LockWrite); + int Which = ((LockType & LOCKING_ANDX_SHARED_LOCK) ? LockRead : LockWrite); AFSFid tfid; AFSVolSync volSync; cm_conn_t *connp; @@ -2795,7 +2792,7 @@ long cm_Unlock(cm_scache_t *scp, unsigned char LockType, ourLock = fileLock; qq = q; } - else if (fileLock->LockType & 0x1) + else if (fileLock->LockType & LOCKING_ANDX_SHARED_LOCK) anotherReader = 1; q = osi_QNext(q); } @@ -2907,7 +2904,7 @@ void cm_CheckLocks() long cm_RetryLock(cm_file_lock_t *oldFileLock, int vcp_is_dead) { long code; - int Which = ((oldFileLock->LockType & 0x1) ? LockRead : LockWrite); + int Which = ((oldFileLock->LockType & LOCKING_ANDX_SHARED_LOCK) ? LockRead : LockWrite); cm_scache_t *scp; AFSFid tfid; AFSVolSync volSync; @@ -2939,8 +2936,8 @@ long cm_RetryLock(cm_file_lock_t *oldFileLock, int vcp_is_dead) if ((fileLock->flags & (CM_FILELOCK_FLAG_INVALID | CM_FILELOCK_FLAG_WAITING)) == 0) { - if ((oldFileLock->LockType & 0x1) == 0 - || (fileLock->LockType & 0x1) == 0) { + if ((oldFileLock->LockType & LOCKING_ANDX_SHARED_LOCK) == 0 + || (fileLock->LockType & LOCKING_ANDX_SHARED_LOCK) == 0) { cm_ReleaseSCache(scp); return CM_ERROR_WOULDBLOCK; } diff --git a/src/WINNT/afsd/smb.c b/src/WINNT/afsd/smb.c index df404130f..3382b52a4 100644 --- a/src/WINNT/afsd/smb.c +++ b/src/WINNT/afsd/smb.c @@ -25,6 +25,8 @@ #include #include +#include +#include #include "afsd.h" #include @@ -152,7 +154,6 @@ int smb_useV3; /* try to negotiate V3 */ static showErrors = 1; /* MessageBox or something like it */ int (_stdcall *smb_MBfunc)(HWND, LPCTSTR, LPCTSTR, UINT) = NULL; -extern HANDLE WaitToTerminate; #endif /* DJGPP */ /* GMT time info: @@ -6956,6 +6957,8 @@ void smb_Server(VOID *parmp) dos_ptr dos_ncb; #endif /* DJGPP */ + rx_StartClientThread(); + outncbp = GetNCB(); outbufp = GetPacket(); outbufp->ncbp = outncbp; diff --git a/src/WINNT/afsd/smb.h b/src/WINNT/afsd/smb.h index 78a145d4f..4a8e3cca0 100644 --- a/src/WINNT/afsd/smb.h +++ b/src/WINNT/afsd/smb.h @@ -365,6 +365,12 @@ typedef struct smb_fid { #define SMB_ATTR_NOT_CONTENT_INDEXED 0x2000 #define SMB_ATTR_ENCRYPTED 0x4000 +#define LOCKING_ANDX_SHARED_LOCK 0x01 /* Read-only lock */ +#define LOCKING_ANDX_OPLOCK_RELEASE 0x02 /* Oplock break notification */ +#define LOCKING_ANDX_CHANGE_LOCKTYPE 0x04 /* Change lock type */ +#define LOCKING_ANDX_CANCEL_LOCK 0x08 /* Cancel outstanding request */ +#define LOCKING_ANDX_LARGE_FILES 0x10 /* Large file locking format */ + /* for tracking in-progress directory searches */ typedef struct smb_dirSearch { osi_queue_t q; /* queue of all outstanding cookies */ diff --git a/src/WINNT/afsd/smb3.c b/src/WINNT/afsd/smb3.c index 13989b490..cbdf54fe4 100644 --- a/src/WINNT/afsd/smb3.c +++ b/src/WINNT/afsd/smb3.c @@ -4832,7 +4832,7 @@ long smb_ReceiveV3LockingX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp) op = smb_GetSMBData(inp, NULL); for (i=0; i sizeof(wdir)) - return FALSE; + code = GetWindowsDirectory(wdir, sizeof(wdir)); + if (code == 0 || code > sizeof(wdir)) + return FALSE; - /* add trailing backslash, if required */ - tlen = strlen(wdir); - if (wdir[tlen - 1] != '\\') - strcat(wdir, "\\"); + /* add trailing backslash, if required */ + tlen = strlen(wdir); + if (wdir[tlen - 1] != '\\') + strcat(wdir, "\\"); - strcat(wdir, file); + strcat(wdir, file); - fp = fopen(wdir, rwp); + fp = fopen(wdir, rwp); - return fp; -} + return fp; +} CString StripPath(CString& strPath) { - int nIndex = strPath.ReverseFind('\\'); + int nIndex = strPath.ReverseFind('\\'); - CString strFile = strPath.Mid(nIndex + 1); - if (strFile.IsEmpty()) - return strPath; + CString strFile = strPath.Mid(nIndex + 1); + if (strFile.IsEmpty()) + return strPath; - return strFile; + return strFile; } CStringArray& StripPath(CStringArray& files) { - for (int i = 0; i < files.GetSize(); i++) - files[i] = StripPath(files[i]); + for (int i = 0; i < files.GetSize(); i++) + files[i] = StripPath(files[i]); - return files; + return files; } void Flush(const CStringArray& files) @@ -115,46 +115,46 @@ void Flush(const CStringArray& files) struct ViceIoctl blob; int error = 0; - HOURGLASS hourglass; - - for (int i = 0; i < files.GetSize(); i++) { - blob.in_size = blob.out_size = 0; + HOURGLASS hourglass; - code = pioctl(PCCHAR(files[i]), VIOCFLUSH, &blob, 0); - if (code) { - error = 1; - if (errno == EMFILE) - ShowMessageBox(IDS_FLUSH_FAILED, MB_ICONEXCLAMATION, IDS_FLUSH_FAILED, files[i]); - else - ShowMessageBox(IDS_FLUSH_ERROR, MB_ICONEXCLAMATION, IDS_FLUSH_ERROR, files[i], strerror(errno)); - } - } + for (int i = 0; i < files.GetSize(); i++) { + blob.in_size = blob.out_size = 0; + + code = pioctl(PCCHAR(files[i]), VIOCFLUSH, &blob, 0); + if (code) { + error = 1; + if (errno == EMFILE) + ShowMessageBox(IDS_FLUSH_FAILED, MB_ICONEXCLAMATION, IDS_FLUSH_FAILED, files[i]); + else + ShowMessageBox(IDS_FLUSH_ERROR, MB_ICONEXCLAMATION, IDS_FLUSH_ERROR, files[i], strerror(errno)); + } + } - if (!error) - ShowMessageBox(IDS_FLUSH_OK, MB_ICONEXCLAMATION, IDS_FLUSH_OK); -} + if (!error) + ShowMessageBox(IDS_FLUSH_OK, MB_ICONEXCLAMATION, IDS_FLUSH_OK); +} void FlushVolume(const CStringArray& files) { register LONG code; struct ViceIoctl blob; - int error = 0; + int error = 0; - HOURGLASS hourglass; + HOURGLASS hourglass; - for (int i = 0; i < files.GetSize(); i++) { - blob.in_size = blob.out_size = 0; + for (int i = 0; i < files.GetSize(); i++) { + blob.in_size = blob.out_size = 0; - code = pioctl(PCCHAR(files[i]), VIOC_FLUSHVOLUME, &blob, 0); - if (code) { - error = 1; - ShowMessageBox(IDS_FLUSH_VOLUME_ERROR, MB_ICONEXCLAMATION, IDS_FLUSH_VOLUME_ERROR, files[i], strerror(errno)); - } - } + code = pioctl(PCCHAR(files[i]), VIOC_FLUSHVOLUME, &blob, 0); + if (code) { + error = 1; + ShowMessageBox(IDS_FLUSH_VOLUME_ERROR, MB_ICONEXCLAMATION, IDS_FLUSH_VOLUME_ERROR, files[i], strerror(errno)); + } + } - if (!code) - ShowMessageBox(IDS_FLUSH_VOLUME_OK, MB_ICONEXCLAMATION, IDS_FLUSH_VOLUME_OK); -} + if (!code) + ShowMessageBox(IDS_FLUSH_VOLUME_OK, MB_ICONEXCLAMATION, IDS_FLUSH_VOLUME_OK); +} void WhichCell(CStringArray& files) { @@ -164,33 +164,33 @@ void WhichCell(CStringArray& files) CString str; CString str2; - CStringArray results; + CStringArray results; error = 0; - HOURGLASS hourglass; - - for (int i = 0; i < files.GetSize(); i++) { - blob.in_size = 0; - blob.out_size = MAXSIZE; - blob.out = space; - - code = pioctl(PCCHAR(files[i]), VIOC_FILE_CELL_NAME, &blob, 1); - if (code) { - if (code == ENOENT) { - LoadString (str, IDS_CANT_GET_CELL); - results.Add(str); - } else - results.Add(GetAfsError(errno)); - } else - results.Add(space); - } - - LoadString (str, IDS_SHOW_CELL); - LoadString (str2, IDS_SHOW_CELL_COLUMN); - CResultsDlg dlg(SHOW_CELL_HELP_ID); - dlg.SetContents(str, str2, StripPath(files), results); - dlg.DoModal(); + HOURGLASS hourglass; + + for (int i = 0; i < files.GetSize(); i++) { + blob.in_size = 0; + blob.out_size = MAXSIZE; + blob.out = space; + + code = pioctl(PCCHAR(files[i]), VIOC_FILE_CELL_NAME, &blob, 1); + if (code) { + if (code == ENOENT) { + LoadString (str, IDS_CANT_GET_CELL); + results.Add(str); + } else + results.Add(GetAfsError(errno)); + } else + results.Add(space); + } + + LoadString (str, IDS_SHOW_CELL); + LoadString (str2, IDS_SHOW_CELL_COLUMN); + CResultsDlg dlg(SHOW_CELL_HELP_ID); + dlg.SetContents(str, str2, StripPath(files), results); + dlg.DoModal(); } void WSCellCmd() @@ -198,7 +198,7 @@ void WSCellCmd() register LONG code; struct ViceIoctl blob; - HOURGLASS hourglass; + HOURGLASS hourglass; blob.in_size = 0; blob.in = (char *) 0; @@ -208,10 +208,10 @@ void WSCellCmd() code = pioctl((char *) 0, VIOC_GET_WS_CELL, &blob, 1); if (code) { - //Die(errno, (char *) 0); + //Die(errno, (char *) 0); } //else - //printf("This workstation belongs to cell '%s'\n", space); + //printf("This workstation belongs to cell '%s'\n", space); } BOOL CheckVolumes() @@ -223,13 +223,13 @@ BOOL CheckVolumes() blob.out_size = 0; code = pioctl(0, VIOCCKBACK, &blob, 1); if (code) { - ShowMessageBox(IDS_CHECK_VOLUMES_ERROR, MB_ICONEXCLAMATION, IDS_CHECK_VOLUMES_ERROR, GetAfsError(errno, CString())); - return FALSE; + ShowMessageBox(IDS_CHECK_VOLUMES_ERROR, MB_ICONEXCLAMATION, IDS_CHECK_VOLUMES_ERROR, GetAfsError(errno, CString())); + return FALSE; } ShowMessageBox(IDS_CHECK_VOLUMES_OK, MB_OK, IDS_CHECK_VOLUMES_OK); - return TRUE; + return TRUE; } void SetCacheSizeCmd(LONG nNewCacheSize) @@ -237,98 +237,98 @@ void SetCacheSizeCmd(LONG nNewCacheSize) register LONG code; struct ViceIoctl blob; - HOURGLASS hourglass; + HOURGLASS hourglass; - blob.in = (char *) &nNewCacheSize; + blob.in = (char *) &nNewCacheSize; blob.in_size = sizeof(LONG); blob.out_size = 0; code = pioctl(0, VIOCSETCACHESIZE, &blob, 1); //if (code) - // Die(errno, (char *) 0); + // Die(errno, (char *) 0); //else - // printf("New cache size set.\n"); + // printf("New cache size set.\n"); } void WhereIs(CStringArray& files) { register LONG code; struct ViceIoctl blob; - CStringArray servers; - CStringArray resultFiles; - CString str; - CString str2; - - HOURGLASS hourglass; - - for (int i = 0; i < files.GetSize(); i++) { - blob.out_size = MAXSIZE; - blob.in_size = 0; - blob.out = space; - memset(space, 0, sizeof(space)); - - code = pioctl(PCCHAR(files[i]), VIOCWHEREIS, &blob, 1); - if (code) { - resultFiles.Add(StripPath(files[i])); - servers.Add(GetAfsError(errno)); - continue; - } - - LONG *hosts = (LONG *)space; - BOOL bFirst = TRUE; - str = ""; - - for (int j = 0; j < MAXHOSTS; j++) { - if (hosts[j] == 0) - break; - char *hostName = hostutil_GetNameByINet(hosts[j]); - if (bFirst) { - resultFiles.Add(StripPath(files[i])); - bFirst = FALSE; - } else - resultFiles.Add(" "); - servers.Add(hostName); - } - } - - LoadString (str, IDS_SHOW_FS); - LoadString (str2, IDS_SHOW_FS_COLUMN); - CResultsDlg dlg(SHOW_FILE_SERVERS_HELP_ID); - dlg.SetContents(str, str2, resultFiles, servers); - dlg.DoModal(); -} + CStringArray servers; + CStringArray resultFiles; + CString str; + CString str2; + + HOURGLASS hourglass; + + for (int i = 0; i < files.GetSize(); i++) { + blob.out_size = MAXSIZE; + blob.in_size = 0; + blob.out = space; + memset(space, 0, sizeof(space)); + + code = pioctl(PCCHAR(files[i]), VIOCWHEREIS, &blob, 1); + if (code) { + resultFiles.Add(StripPath(files[i])); + servers.Add(GetAfsError(errno)); + continue; + } + + LONG *hosts = (LONG *)space; + BOOL bFirst = TRUE; + str = ""; + + for (int j = 0; j < MAXHOSTS; j++) { + if (hosts[j] == 0) + break; + char *hostName = hostutil_GetNameByINet(hosts[j]); + if (bFirst) { + resultFiles.Add(StripPath(files[i])); + bFirst = FALSE; + } else + resultFiles.Add(" "); + servers.Add(hostName); + } + } + + LoadString (str, IDS_SHOW_FS); + LoadString (str2, IDS_SHOW_FS_COLUMN); + CResultsDlg dlg(SHOW_FILE_SERVERS_HELP_ID); + dlg.SetContents(str, str2, resultFiles, servers); + dlg.DoModal(); +} CString GetAfsError(int code, const char *filename) { CString strMsg; - if (code == EINVAL) { - if (filename) - strMsg.Format("Invalid argument; it is possible that the file is not in AFS"); - else - strMsg.Format("Invalid argument"); + if (code == EINVAL) { + if (filename) + strMsg.Format("Invalid argument; it is possible that the file is not in AFS"); + else + strMsg.Format("Invalid argument"); } else if (code == ENOENT) { - if (filename) - strMsg.Format("The file does not exist"); - else - strMsg.Format("No such file returned"); + if (filename) + strMsg.Format("The file does not exist"); + else + strMsg.Format("No such file returned"); } else if (code == EROFS) { - strMsg.Format("You can not change a backup or readonly volume"); + strMsg.Format("You can not change a backup or readonly volume"); } else if (code == EACCES || code == EPERM) { - strMsg.Format("You do not have the required rights to do this operation"); + strMsg.Format("You do not have the required rights to do this operation"); } else if (code == ENODEV) { - strMsg.Format("AFS service may not have started"); + strMsg.Format("AFS service may not have started"); } else if (code == ESRCH) { - strMsg.Format("Cell name not recognized"); + strMsg.Format("Cell name not recognized"); } else if (code == ETIMEDOUT) { - strMsg.Format("Connection timed out"); + strMsg.Format("Connection timed out"); } else if (code == EPIPE) { - strMsg.Format("Volume name or ID not recognized"); + strMsg.Format("Volume name or ID not recognized"); } else { - strMsg.Format("Error 0x%x occurred", code); + strMsg.Format("Error 0x%x occurred", code); } - return strMsg; + return strMsg; } @@ -345,9 +345,9 @@ struct AclEntry { }; struct Acl { - int dfs; // Originally true if a dfs acl; now also the type - // of the acl (1, 2, or 3, corresponding to object, - // initial dir, or initial object). + int dfs; // Originally true if a dfs acl; now also the type + // of the acl (1, 2, or 3, corresponding to object, + // initial dir, or initial object). sec_rgy_name_t cell; // DFS cell name int nplus; int nminus; @@ -391,30 +391,30 @@ extern "C" int PruneList (struct AclEntry **ae, int dfs) struct AclEntry *te, *ne; LONG ctr = 0; - for (te = *ae; te; te = ne) { + for (te = *ae; te; te = ne) { if ((!dfs && te->rights == 0) || te->rights == -1) { *lp = te->next; ne = te->next; free(te); ctr++; - } + } else { ne = te->next; lp = &te->next; - } + } } - return ctr; + return ctr; } char *SkipLine (register char *astr) { while (*astr != '\n') - astr++; + astr++; - astr++; + astr++; - return astr; + return astr; } /* tell if a name is 23 or -45 (digits or minus digits), which are bad names we must prune */ @@ -422,10 +422,10 @@ static BadName(register char *aname) { register int tc; - /* all must be '-' or digit to be bad */ + /* all must be '-' or digit to be bad */ while (tc = *aname++) { - if ((tc != '-') && (tc < '0' || tc > '9')) - return 0; + if ((tc != '-') && (tc < '0' || tc > '9')) + return 0; } return 1; @@ -433,18 +433,18 @@ static BadName(register char *aname) CString GetRightsString(register LONG arights, int dfs) { - CString str; + CString str; if (!dfs) { - if (arights & PRSFS_READ) str += "r"; - if (arights & PRSFS_LOOKUP) str += "l"; - if (arights & PRSFS_INSERT) str += "i"; - if (arights & PRSFS_DELETE) str += "d"; - if (arights & PRSFS_WRITE) str += "w"; - if (arights & PRSFS_LOCK) str += "k"; - if (arights & PRSFS_ADMINISTER) str += "a"; + if (arights & PRSFS_READ) str += "r"; + if (arights & PRSFS_LOOKUP) str += "l"; + if (arights & PRSFS_INSERT) str += "i"; + if (arights & PRSFS_DELETE) str += "d"; + if (arights & PRSFS_WRITE) str += "w"; + if (arights & PRSFS_LOCK) str += "k"; + if (arights & PRSFS_ADMINISTER) str += "a"; } else { - ASSERT(FALSE); + ASSERT(FALSE); /* if (arights & DFS_READ) str += "r"; else str += "-"; if (arights & DFS_WRITE) str += "w"; else printf("-"); @@ -454,9 +454,9 @@ CString GetRightsString(register LONG arights, int dfs) if (arights & DFS_DELETE) str += "d"; else printf("-"); if (arights & (DFS_USRALL)) str += "+"; */ - } + } - return str; + return str; } char *AclToString(struct Acl *acl) @@ -467,22 +467,22 @@ char *AclToString(struct Acl *acl) struct AclEntry *tp; if (acl->dfs) - sprintf(dfsstring, " dfs:%d %s", acl->dfs, acl->cell); + sprintf(dfsstring, " dfs:%d %s", acl->dfs, acl->cell); else - dfsstring[0] = '\0'; + dfsstring[0] = '\0'; sprintf(mydata, "%d%s\n%d\n", acl->nplus, dfsstring, acl->nminus); - for(tp = acl->pluslist; tp; tp = tp->next) { + for(tp = acl->pluslist; tp; tp = tp->next) { sprintf(tstring, "%s %d\n", tp->name, tp->rights); strcat(mydata, tstring); } - for(tp = acl->minuslist; tp; tp = tp->next) { + for(tp = acl->minuslist; tp; tp = tp->next) { sprintf(tstring, "%s %d\n", tp->name, tp->rights); strcat(mydata, tstring); } - return mydata; + return mydata; } struct Acl *EmptyAcl(const CString& strCellName) @@ -559,42 +559,42 @@ extern "C" int CleanAcl(struct Acl *aa) register struct AclEntry *te, **le, *ne; int changes; - HOURGLASS hourglass; + HOURGLASS hourglass; /* Don't correct DFS ACL's for now */ if (aa->dfs) - return 0; + return 0; /* prune out bad entries */ changes = 0; /* count deleted entries */ le = &aa->pluslist; for(te = aa->pluslist; te; te = ne) { - ne = te->next; - if (BadName(te->name)) { - /* zap this dude */ - *le = te->next; - aa->nplus--; - free(te); - changes++; - } - else - le = &te->next; + ne = te->next; + if (BadName(te->name)) { + /* zap this dude */ + *le = te->next; + aa->nplus--; + free(te); + changes++; + } + else + le = &te->next; } le = &aa->minuslist; - for(te = aa->minuslist; te; te = ne) { - ne = te->next; - if (BadName(te->name)) { - /* zap this dude */ - *le = te->next; - aa->nminus--; - free(te); - changes++; - } - else - le = &te->next; - } + for(te = aa->minuslist; te; te = ne) { + ne = te->next; + if (BadName(te->name)) { + /* zap this dude */ + *le = te->next; + aa->nminus--; + free(te); + changes++; + } + else + le = &te->next; + } return changes; } @@ -606,49 +606,49 @@ void CleanACL(CStringArray& names) struct ViceIoctl blob; int changes; - ShowMessageBox(IDS_CLEANACL_MSG, MB_OK, IDS_CLEANACL_MSG); + ShowMessageBox(IDS_CLEANACL_MSG, MB_OK, IDS_CLEANACL_MSG); - HOURGLASS hourglass; + HOURGLASS hourglass; - for (int i = 0; i < names.GetSize(); i++) { - blob.out_size = MAXSIZE; - blob.in_size = 0; - blob.out = space; + for (int i = 0; i < names.GetSize(); i++) { + blob.out_size = MAXSIZE; + blob.in_size = 0; + blob.out = space; - code = pioctl(PCCHAR(names[i]), VIOCGETAL, &blob, 1); - if (code) { - ShowMessageBox(IDS_CLEANACL_ERROR, MB_ICONEXCLAMATION, 0, names[i], GetAfsError(errno)); - continue; - } - - ta = ParseAcl(space); - if (ta->dfs) { - ShowMessageBox(IDS_CLEANACL_NOT_SUPPORTED, MB_ICONEXCLAMATION, IDS_CLEANACL_NOT_SUPPORTED, names[i]); - continue; - } - - changes = CleanAcl(ta); - if (!changes) - continue; - - /* now set the acl */ - blob.in = AclToString(ta); - blob.in_size = strlen((char *)blob.in) + 1; - blob.out_size = 0; + code = pioctl(PCCHAR(names[i]), VIOCGETAL, &blob, 1); + if (code) { + ShowMessageBox(IDS_CLEANACL_ERROR, MB_ICONEXCLAMATION, 0, names[i], GetAfsError(errno)); + continue; + } + + ta = ParseAcl(space); + if (ta->dfs) { + ShowMessageBox(IDS_CLEANACL_NOT_SUPPORTED, MB_ICONEXCLAMATION, IDS_CLEANACL_NOT_SUPPORTED, names[i]); + continue; + } + + changes = CleanAcl(ta); + if (!changes) + continue; + + /* now set the acl */ + blob.in = AclToString(ta); + blob.in_size = strlen((char *)blob.in) + 1; + blob.out_size = 0; - code = pioctl(PCCHAR(names[i]), VIOCSETAL, &blob, 1); - if (code) { - if (errno == EINVAL) { - ShowMessageBox(IDS_CLEANACL_INVALID_ARG, MB_ICONEXCLAMATION, IDS_CLEANACL_INVALID_ARG, names[i]); - continue; - } - else { - ShowMessageBox(IDS_CLEANACL_ERROR, MB_ICONEXCLAMATION, 0, names[i], GetAfsError(errno)); - continue; - } - } - } -} + code = pioctl(PCCHAR(names[i]), VIOCSETAL, &blob, 1); + if (code) { + if (errno == EINVAL) { + ShowMessageBox(IDS_CLEANACL_INVALID_ARG, MB_ICONEXCLAMATION, IDS_CLEANACL_INVALID_ARG, names[i]); + continue; + } + else { + ShowMessageBox(IDS_CLEANACL_ERROR, MB_ICONEXCLAMATION, 0, names[i], GetAfsError(errno)); + continue; + } + } + } +} // Derived from fs.c's ListAclCmd BOOL GetRights(const CString& strDir, CStringArray& strNormal, CStringArray& strNegative) @@ -659,70 +659,70 @@ BOOL GetRights(const CString& strDir, CStringArray& strNormal, CStringArray& str struct AclEntry *te; int idf = 0; //getidf(as, parm_listacl_id); - HOURGLASS hourglass; + HOURGLASS hourglass; - blob.out_size = MAXSIZE; - blob.in_size = idf; - blob.in = blob.out = space; + blob.out_size = MAXSIZE; + blob.in_size = idf; + blob.in = blob.out = space; - code = pioctl(PCCHAR(strDir), VIOCGETAL, &blob, 1); - if (code) { - ShowMessageBox(IDS_GETRIGHTS_ERROR, MB_ICONEXCLAMATION, IDS_GETRIGHTS_ERROR, strDir, GetAfsError(errno)); - return FALSE; - } - - ta = ParseAcl(space); - if (ta->dfs) { - ShowMessageBox(IDS_DFSACL_ERROR, MB_ICONEXCLAMATION, IDS_DFSACL_ERROR); - return FALSE; - } + code = pioctl(PCCHAR(strDir), VIOCGETAL, &blob, 1); + if (code) { + ShowMessageBox(IDS_GETRIGHTS_ERROR, MB_ICONEXCLAMATION, IDS_GETRIGHTS_ERROR, strDir, GetAfsError(errno)); + return FALSE; + } + + ta = ParseAcl(space); + if (ta->dfs) { + ShowMessageBox(IDS_DFSACL_ERROR, MB_ICONEXCLAMATION, IDS_DFSACL_ERROR); + return FALSE; + } // if (ta->dfs) // printf(" Default cell = %s\n", ta->cell); - CString strRight; + CString strRight; - if (ta->nplus > 0) { - for (te = ta->pluslist; te; te = te->next) { - strNormal.Add(te->name); - strNormal.Add(GetRightsString(te->rights, ta->dfs)); - } - } + if (ta->nplus > 0) { + for (te = ta->pluslist; te; te = te->next) { + strNormal.Add(te->name); + strNormal.Add(GetRightsString(te->rights, ta->dfs)); + } + } - if (ta->nminus > 0) { - for (te = ta->minuslist; te; te = te->next) { - strNegative.Add(te->name); - strNegative.Add(GetRightsString(te->rights, ta->dfs)); - } - } + if (ta->nminus > 0) { + for (te = ta->minuslist; te; te = te->next) { + strNegative.Add(te->name); + strNegative.Add(GetRightsString(te->rights, ta->dfs)); + } + } - return TRUE; + return TRUE; } struct AclEntry *FindList(register struct AclEntry *pCurEntry, const char *entryName) { while (pCurEntry) { if (!foldcmp(pCurEntry->name, PCCHAR(entryName))) - return pCurEntry; - pCurEntry = pCurEntry->next; + return pCurEntry; + pCurEntry = pCurEntry->next; } - return 0; + return 0; } void ChangeList (struct Acl *pAcl, BYTE bNormalRights, const char *entryName, LONG nEntryRights) { - ASSERT(pAcl); - ASSERT(entryName); + ASSERT(pAcl); + ASSERT(entryName); - struct AclEntry *pEntry; + struct AclEntry *pEntry; - HOURGLASS hourglass; + HOURGLASS hourglass; pEntry = (bNormalRights ? pAcl->pluslist : pAcl->minuslist); pEntry = FindList(pEntry, entryName); - /* Found the item already in the list. */ + /* Found the item already in the list. */ if (pEntry) { pEntry->rights = nEntryRights; if (bNormalRights) @@ -736,22 +736,22 @@ void ChangeList (struct Acl *pAcl, BYTE bNormalRights, const char *entryName, LO pEntry = (struct AclEntry *) malloc(sizeof (struct AclEntry)); ASSERT(pEntry); - strcpy(pEntry->name, entryName); + strcpy(pEntry->name, entryName); pEntry->rights = nEntryRights; - if (bNormalRights) { + if (bNormalRights) { pEntry->next = pAcl->pluslist; pAcl->pluslist = pEntry; pAcl->nplus++; if (nEntryRights == 0 || nEntryRights == -1) - pAcl->nplus -= PruneList(&pAcl->pluslist, pAcl->dfs); + pAcl->nplus -= PruneList(&pAcl->pluslist, pAcl->dfs); } else { pEntry->next = pAcl->minuslist; pAcl->minuslist = pEntry; pAcl->nminus++; if (nEntryRights == 0) - pAcl->nminus -= PruneList(&pAcl->minuslist, pAcl->dfs); + pAcl->nminus -= PruneList(&pAcl->minuslist, pAcl->dfs); } } @@ -765,18 +765,18 @@ LONG Convert(const register char *arights, int dfs, enum rtype *rtypep) *rtypep = add; /* add rights, by default */ - if (!strcmp(arights,"read")) - return PRSFS_READ | PRSFS_LOOKUP; - if (!strcmp(arights, "write")) - return PRSFS_READ | PRSFS_LOOKUP | PRSFS_INSERT | PRSFS_DELETE | PRSFS_WRITE | PRSFS_LOCK; - if (!strcmp(arights, "mail")) - return PRSFS_INSERT | PRSFS_LOCK | PRSFS_LOOKUP; - if (!strcmp(arights, "all")) - return PRSFS_READ | PRSFS_LOOKUP | PRSFS_INSERT | PRSFS_DELETE | PRSFS_WRITE | PRSFS_LOCK | PRSFS_ADMINISTER; + if (!strcmp(arights,"read")) + return PRSFS_READ | PRSFS_LOOKUP; + if (!strcmp(arights, "write")) + return PRSFS_READ | PRSFS_LOOKUP | PRSFS_INSERT | PRSFS_DELETE | PRSFS_WRITE | PRSFS_LOCK; + if (!strcmp(arights, "mail")) + return PRSFS_INSERT | PRSFS_LOCK | PRSFS_LOOKUP; + if (!strcmp(arights, "all")) + return PRSFS_READ | PRSFS_LOOKUP | PRSFS_INSERT | PRSFS_DELETE | PRSFS_WRITE | PRSFS_LOCK | PRSFS_ADMINISTER; - if (!strcmp(arights, "none")) { - *rtypep = destroy; /* Remove entire entry */ - return 0; + if (!strcmp(arights, "none")) { + *rtypep = destroy; /* Remove entire entry */ + return 0; } len = strlen(arights); @@ -784,18 +784,18 @@ LONG Convert(const register char *arights, int dfs, enum rtype *rtypep) for (i = 0; i < len; i++) { tc = *arights++; - if (tc == 'r') mode |= PRSFS_READ; - else if (tc == 'l') mode |= PRSFS_LOOKUP; - else if (tc == 'i') mode |= PRSFS_INSERT; - else if (tc == 'd') mode |= PRSFS_DELETE; - else if (tc == 'w') mode |= PRSFS_WRITE; - else if (tc == 'k') mode |= PRSFS_LOCK; - else if (tc == 'a') mode |= PRSFS_ADMINISTER; - else { - fprintf(stderr, "illegal rights character '%c'.\n", tc); - exit(1); - } - } + if (tc == 'r') mode |= PRSFS_READ; + else if (tc == 'l') mode |= PRSFS_LOOKUP; + else if (tc == 'i') mode |= PRSFS_INSERT; + else if (tc == 'd') mode |= PRSFS_DELETE; + else if (tc == 'w') mode |= PRSFS_WRITE; + else if (tc == 'k') mode |= PRSFS_LOCK; + else if (tc == 'a') mode |= PRSFS_ADMINISTER; + else { + fprintf(stderr, "illegal rights character '%c'.\n", tc); + exit(1); + } + } return mode; } @@ -805,39 +805,39 @@ BOOL SaveACL(const CString& strCellName, const CString& strDir, const CStringArr struct ViceIoctl blob; struct Acl *pAcl; LONG rights; - enum rtype rtype; + enum rtype rtype; + + HOURGLASS hourglass; - HOURGLASS hourglass; + // Create a new ACL + pAcl = EmptyAcl(strCellName); - // Create a new ACL - pAcl = EmptyAcl(strCellName); + // Set its normal rights + for (int i = 0; i < normal.GetSize(); i += 2) { + rights = Convert(normal[i + 1], 0, &rtype); + ChangeList(pAcl, TRUE, normal[i], rights); + } - // Set its normal rights - for (int i = 0; i < normal.GetSize(); i += 2) { - rights = Convert(normal[i + 1], 0, &rtype); - ChangeList(pAcl, TRUE, normal[i], rights); - } + // Set its negative rights + for (i = 0; i < negative.GetSize(); i += 2) { + rights = Convert(negative[i + 1], 0, &rtype); + ChangeList(pAcl, FALSE, negative[i], rights); + } - // Set its negative rights - for (i = 0; i < negative.GetSize(); i += 2) { - rights = Convert(negative[i + 1], 0, &rtype); - ChangeList(pAcl, FALSE, negative[i], rights); - } + // Write the ACL + blob.in = AclToString(pAcl); + blob.out_size = 0; + blob.in_size = 1 + strlen((const char *)blob.in); - // Write the ACL - blob.in = AclToString(pAcl); - blob.out_size = 0; - blob.in_size = 1 + strlen((const char *)blob.in); - - code = pioctl(PCCHAR(strDir), VIOCSETAL, &blob, 1); - if (code) { - if (errno == EINVAL) - ShowMessageBox(IDS_SAVE_ACL_EINVAL_ERROR, MB_ICONEXCLAMATION, IDS_SAVE_ACL_EINVAL_ERROR, strDir); - else - ShowMessageBox(IDS_SAVE_ACL_ERROR, MB_ICONEXCLAMATION, IDS_SAVE_ACL_ERROR, strDir, GetAfsError(errno, strDir)); - } + code = pioctl(PCCHAR(strDir), VIOCSETAL, &blob, 1); + if (code) { + if (errno == EINVAL) + ShowMessageBox(IDS_SAVE_ACL_EINVAL_ERROR, MB_ICONEXCLAMATION, IDS_SAVE_ACL_EINVAL_ERROR, strDir); + else + ShowMessageBox(IDS_SAVE_ACL_ERROR, MB_ICONEXCLAMATION, IDS_SAVE_ACL_ERROR, strDir, GetAfsError(errno, strDir)); + } - ZapAcl(pAcl); + ZapAcl(pAcl); return (code == 0); } @@ -849,91 +849,91 @@ BOOL CopyACL(const CString& strToDir, const CStringArray& normal, const CStringA struct Acl *pToAcl; int idf = 0; // getidf(as, parm_copyacl_id); - HOURGLASS hourglass; + HOURGLASS hourglass; - // Get ACL to copy to - blob.out_size = MAXSIZE; - blob.in_size = idf; - blob.in = blob.out = space; - - code = pioctl(PCCHAR(strToDir), VIOCGETAL, &blob, 1); - if (code) { - ShowMessageBox(IDS_ACL_READ_ERROR, MB_ICONEXCLAMATION, IDS_ACL_READ_ERROR, strToDir, GetAfsError(errno, strToDir)); - return FALSE; - } - - if (bClear) - pToAcl = EmptyAcl(space); - else - pToAcl = ParseAcl(space); - - CleanAcl(pToAcl); + // Get ACL to copy to + blob.out_size = MAXSIZE; + blob.in_size = idf; + blob.in = blob.out = space; - if (pToAcl->dfs) { - ShowMessageBox(IDS_NO_DFS_COPY_ACL, MB_ICONEXCLAMATION, IDS_NO_DFS_COPY_ACL, strToDir); - ZapAcl(pToAcl); - return FALSE; - } - - enum rtype rtype; - - // Set normal rights - for (int i = 0; i < normal.GetSize(); i += 2) { - LONG rights = Convert(normal[i + 1], 0, &rtype); - ChangeList(pToAcl, TRUE, normal[i], rights); - } - - // Set negative rights - for (i = 0; i < negative.GetSize(); i += 2) { - LONG rights = Convert(negative[i + 1], 0, &rtype); - ChangeList(pToAcl, FALSE, normal[i], rights); - } - - // Save modified ACL - blob.in = AclToString(pToAcl); - blob.out_size = 0; - blob.in_size = 1 + strlen((char *)blob.in); + code = pioctl(PCCHAR(strToDir), VIOCGETAL, &blob, 1); + if (code) { + ShowMessageBox(IDS_ACL_READ_ERROR, MB_ICONEXCLAMATION, IDS_ACL_READ_ERROR, strToDir, GetAfsError(errno, strToDir)); + return FALSE; + } - code = pioctl(PCCHAR(strToDir), VIOCSETAL, &blob, 1); - if (code) { - ZapAcl(pToAcl); - if (errno == EINVAL) - ShowMessageBox(IDS_COPY_ACL_EINVAL_ERROR, MB_ICONEXCLAMATION, IDS_COPY_ACL_EINVAL_ERROR, strToDir); - else - ShowMessageBox(IDS_COPY_ACL_ERROR, MB_ICONEXCLAMATION, IDS_COPY_ACL_ERROR, strToDir, GetAfsError(errno, strToDir)); - return FALSE; - } + if (bClear) + pToAcl = EmptyAcl(space); + else + pToAcl = ParseAcl(space); + + CleanAcl(pToAcl); + + if (pToAcl->dfs) { + ShowMessageBox(IDS_NO_DFS_COPY_ACL, MB_ICONEXCLAMATION, IDS_NO_DFS_COPY_ACL, strToDir); + ZapAcl(pToAcl); + return FALSE; + } + + enum rtype rtype; + + // Set normal rights + for (int i = 0; i < normal.GetSize(); i += 2) { + LONG rights = Convert(normal[i + 1], 0, &rtype); + ChangeList(pToAcl, TRUE, normal[i], rights); + } + + // Set negative rights + for (i = 0; i < negative.GetSize(); i += 2) { + LONG rights = Convert(negative[i + 1], 0, &rtype); + ChangeList(pToAcl, FALSE, normal[i], rights); + } + + // Save modified ACL + blob.in = AclToString(pToAcl); + blob.out_size = 0; + blob.in_size = 1 + strlen((char *)blob.in); + + code = pioctl(PCCHAR(strToDir), VIOCSETAL, &blob, 1); + if (code) { + ZapAcl(pToAcl); + if (errno == EINVAL) + ShowMessageBox(IDS_COPY_ACL_EINVAL_ERROR, MB_ICONEXCLAMATION, IDS_COPY_ACL_EINVAL_ERROR, strToDir); + else + ShowMessageBox(IDS_COPY_ACL_ERROR, MB_ICONEXCLAMATION, IDS_COPY_ACL_ERROR, strToDir, GetAfsError(errno, strToDir)); + return FALSE; + } - ZapAcl(pToAcl); + ZapAcl(pToAcl); - ShowMessageBox(IDS_COPY_ACL_OK, MB_OK, IDS_COPY_ACL_OK); + ShowMessageBox(IDS_COPY_ACL_OK, MB_OK, IDS_COPY_ACL_OK); return TRUE; } CString ParseMountPoint(const CString strFile, CString strMountPoint) { - CString strType; - CString strVolume; - CString strCell; - CString strMountPointInfo; - - if (strMountPoint[0] == '#') - strType = "Regular"; - else if (strMountPoint[0] == '%') - strType = "Read/Write"; - - int nColon = strMountPoint.Find(':'); - if (nColon >= 0) { - strCell = strMountPoint.Mid(1, nColon - 1); - strVolume = strMountPoint.Mid(nColon + 1); - } else - strVolume = strMountPoint.Mid(1); - - strMountPointInfo = strFile + "\t" + strVolume + "\t" + strCell + "\t" + strType; - - return strMountPointInfo; -} + CString strType; + CString strVolume; + CString strCell; + CString strMountPointInfo; + + if (strMountPoint[0] == '#') + strType = "Regular"; + else if (strMountPoint[0] == '%') + strType = "Read/Write"; + + int nColon = strMountPoint.Find(':'); + if (nColon >= 0) { + strCell = strMountPoint.Mid(1, nColon - 1); + strVolume = strMountPoint.Mid(nColon + 1); + } else + strVolume = strMountPoint.Mid(1); + + strMountPointInfo = strFile + "\t" + strVolume + "\t" + strCell + "\t" + strType; + + return strMountPointInfo; +} BOOL ListMount(CStringArray& files) { @@ -944,66 +944,66 @@ BOOL ListMount(CStringArray& files) char true_name[1024]; /* ``True'' dirname (e.g., symlink target) */ char parent_dir[1024]; /* Parent directory of true name */ register char *last_component; /* Last component of true name */ - CStringArray mountPoints; + CStringArray mountPoints; - HOURGLASS hourglass; + HOURGLASS hourglass; error = 0; for (int i = 0; i < files.GetSize(); i++) { - strcpy(orig_name, files[i]); - strcpy(true_name, orig_name); - - /* - * Find rightmost slash, if any. - */ - last_component = (char *)strrchr(true_name, '\\'); - if (last_component) { - /* - * Found it. Designate everything before it as the parent directory, - * everything after it as the final component. - */ - strncpy(parent_dir, true_name, last_component - true_name + 1); - parent_dir[last_component - true_name + 1] = 0; - last_component++; /* Skip the slash */ - } - else { - /* - * No slash appears in the given file name. Set parent_dir to the current - * directory, and the last component as the given name. - */ - fs_ExtractDriveLetter(true_name, parent_dir); - strcat(parent_dir, "."); - last_component = true_name; - fs_StripDriveLetter(true_name, true_name, sizeof(true_name)); - } - - blob.in = last_component; - blob.in_size = strlen(last_component) + 1; - blob.out_size = MAXSIZE; - blob.out = space; - memset(space, 0, MAXSIZE); - - code = pioctl(parent_dir, VIOC_AFS_STAT_MT_PT, &blob, 1); - if (code == 0) { - int nPos = strlen(space) - 1; - if (space[nPos] == '.') - space[nPos] = 0; - mountPoints.Add(ParseMountPoint(StripPath(files[i]), space)); - } else { - error = 1; - if (errno == EINVAL) - mountPoints.Add(GetMessageString(IDS_NOT_MOUNT_POINT_ERROR, StripPath(files[i]))); - else - mountPoints.Add(GetMessageString(IDS_LIST_MOUNT_POINT_ERROR, GetAfsError(errno, StripPath(files[i])))); - } - } - - CMountPointsDlg dlg; - dlg.SetMountPoints(mountPoints); - dlg.DoModal(); - - return !error; + strcpy(orig_name, files[i]); + strcpy(true_name, orig_name); + + /* + * Find rightmost slash, if any. + */ + last_component = (char *)strrchr(true_name, '\\'); + if (last_component) { + /* + * Found it. Designate everything before it as the parent directory, + * everything after it as the final component. + */ + strncpy(parent_dir, true_name, last_component - true_name + 1); + parent_dir[last_component - true_name + 1] = 0; + last_component++; /* Skip the slash */ + } + else { + /* + * No slash appears in the given file name. Set parent_dir to the current + * directory, and the last component as the given name. + */ + fs_ExtractDriveLetter(true_name, parent_dir); + strcat(parent_dir, "."); + last_component = true_name; + fs_StripDriveLetter(true_name, true_name, sizeof(true_name)); + } + + blob.in = last_component; + blob.in_size = strlen(last_component) + 1; + blob.out_size = MAXSIZE; + blob.out = space; + memset(space, 0, MAXSIZE); + + code = pioctl(parent_dir, VIOC_AFS_STAT_MT_PT, &blob, 1); + if (code == 0) { + int nPos = strlen(space) - 1; + if (space[nPos] == '.') + space[nPos] = 0; + mountPoints.Add(ParseMountPoint(StripPath(files[i]), space)); + } else { + error = 1; + if (errno == EINVAL) + mountPoints.Add(GetMessageString(IDS_NOT_MOUNT_POINT_ERROR, StripPath(files[i]))); + else + mountPoints.Add(GetMessageString(IDS_LIST_MOUNT_POINT_ERROR, GetAfsError(errno, StripPath(files[i])))); + } + } + + CMountPointsDlg dlg; + dlg.SetMountPoints(mountPoints); + dlg.DoModal(); + + return !error; } BOOL IsPathInAfs(const CHAR *strPath) @@ -1031,14 +1031,14 @@ static char *Parent(char *apath) strcpy(tspace, apath); tp = strrchr(tspace, '\\'); if (tp) { - *(tp+1) = 0; /* lv trailing slash so Parent("k:\foo") is "k:\" not "k:" */ + *(tp+1) = 0; /* lv trailing slash so Parent("k:\foo") is "k:\" not "k:" */ } else { - fs_ExtractDriveLetter(apath, tspace); + fs_ExtractDriveLetter(apath, tspace); strcat(tspace, "."); } - return tspace; + return tspace; } BOOL MakeMount(const CString& strDir, const CString& strVolName, const CString& strCellName, BOOL bRW) @@ -1048,49 +1048,49 @@ BOOL MakeMount(const CString& strDir, const CString& strVolName, const CString& char localCellName[1000]; struct ViceIoctl blob; - HOURGLASS hourglass; + HOURGLASS hourglass; - ASSERT(strVolName.GetLength() < 64); + ASSERT(strVolName.GetLength() < 64); -/* + /* -defect #3069 + defect #3069 if (as->parms[5].items && !as->parms[2].items) { fprintf(stderr,"fs: must provide cell when creating cellular mount point.\n"); return FALSE; } -*/ + */ if (strCellName.GetLength() > 0) /* cell name specified */ - cellName = PCCHAR(strCellName); + cellName = PCCHAR(strCellName); else - cellName = (char *) 0; + cellName = (char *) 0; if (!IsPathInAfs(Parent(PCCHAR(strDir)))) { - ShowMessageBox(IDS_MAKE_MP_NOT_AFS_ERROR, MB_ICONEXCLAMATION, IDS_MAKE_MP_NOT_AFS_ERROR); - return FALSE; + ShowMessageBox(IDS_MAKE_MP_NOT_AFS_ERROR, MB_ICONEXCLAMATION, IDS_MAKE_MP_NOT_AFS_ERROR); + return FALSE; } if (cellName) { - blob.in_size = 0; - blob.out_size = MAXSIZE; - blob.out = space; - code = pioctl(Parent(PCCHAR(strDir)), VIOC_FILE_CELL_NAME, &blob, 1); - } + blob.in_size = 0; + blob.out_size = MAXSIZE; + blob.out = space; + code = pioctl(Parent(PCCHAR(strDir)), VIOC_FILE_CELL_NAME, &blob, 1); + } strcpy(localCellName, (cellName? cellName : space)); if (bRW) /* if -rw specified */ - strcpy(space, "%"); + strcpy(space, "%"); else - strcpy(space, "#"); + strcpy(space, "#"); /* If cellular mount point, prepend cell prefix */ - if (cellName) { - strcat(space, localCellName); - strcat(space, ":"); - } + if (cellName) { + strcat(space, localCellName); + strcat(space, ":"); + } strcat(space, strVolName); /* append volume name */ strcat(space, "."); /* stupid convention; these end with a period */ @@ -1105,125 +1105,158 @@ defect #3069 code = pioctl(PCCHAR(strDir), VIOC_AFS_CREATE_MT_PT, &blob, 0); if (code) { - ShowMessageBox(IDS_MOUNT_POINT_ERROR, MB_ICONEXCLAMATION, IDS_MOUNT_POINT_ERROR, GetAfsError(errno, strDir)); - return FALSE; + ShowMessageBox(IDS_MOUNT_POINT_ERROR, MB_ICONEXCLAMATION, IDS_MOUNT_POINT_ERROR, GetAfsError(errno, strDir)); + return FALSE; } - return TRUE; + return TRUE; } /* */ long fs_ExtractDriveLetter(const char *inPathp, char *outPathp) { - if (inPathp[0] != 0 && inPathp[1] == ':') { - /* there is a drive letter */ - *outPathp++ = *inPathp++; - *outPathp++ = *inPathp++; - *outPathp++ = 0; - } - else *outPathp = 0; + if (inPathp[0] != 0 && inPathp[1] == ':') { + /* there is a drive letter */ + *outPathp++ = *inPathp++; + *outPathp++ = *inPathp++; + *outPathp++ = 0; + } + else *outPathp = 0; - return 0; -} + return 0; +} /* strip the drive letter from a component */ long fs_StripDriveLetter(const char *inPathp, char *outPathp, long outSize) { - char tempBuffer[1000]; - strcpy(tempBuffer, inPathp); - if (tempBuffer[0] != 0 && tempBuffer[1] == ':') { - /* drive letter present */ - strcpy(outPathp, tempBuffer+2); - } - else { - /* no drive letter present */ - strcpy(outPathp, tempBuffer); - } - return 0; -} + char tempBuffer[1000]; + strcpy(tempBuffer, inPathp); + if (tempBuffer[0] != 0 && tempBuffer[1] == ':') { + /* drive letter present */ + strcpy(outPathp, tempBuffer+2); + } + else { + /* no drive letter present */ + strcpy(outPathp, tempBuffer); + } + return 0; +} BOOL RemoveSymlink(const char * linkName) { - BOOL error = FALSE; + BOOL error = FALSE; INT code=0; struct ViceIoctl blob; char tbuffer[1024]; char lsbuffer[1024]; - char tpbuffer[1024]; + char tpbuffer[1024]; char *tp; - HOURGLASS hourglass; - - tp = (char *) strrchr(linkName, '\\'); - if (!tp) - tp = (char *) strrchr(linkName, '/'); - if (tp) { - strncpy(tbuffer, linkName, code=tp-linkName+1); /* the dir name */ - tbuffer[code] = 0; - tp++; /* skip the slash */ - } - else { - fs_ExtractDriveLetter(linkName, tbuffer); - strcat(tbuffer, "."); - fs_StripDriveLetter(tp, tpbuffer, 0); - tp=tpbuffer; - } - blob.in = tp; - blob.in_size = strlen(tp)+1; - blob.out = lsbuffer; - blob.out_size = sizeof(lsbuffer); - code = pioctl(tbuffer, VIOC_LISTSYMLINK, &blob, 0); - if (code) - return FALSE; - blob.out_size = 0; - blob.in = tp; - blob.in_size = strlen(tp)+1; - return (pioctl(tbuffer, VIOC_DELSYMLINK, &blob, 0)==0); -} + HOURGLASS hourglass; + + tp = (char *) strrchr(linkName, '\\'); + if (!tp) + tp = (char *) strrchr(linkName, '/'); + if (tp) { + strncpy(tbuffer, linkName, code=tp-linkName+1); /* the dir name */ + tbuffer[code] = 0; + tp++; /* skip the slash */ + } + else { + fs_ExtractDriveLetter(linkName, tbuffer); + strcat(tbuffer, "."); + fs_StripDriveLetter(tp, tpbuffer, 0); + tp=tpbuffer; + } + blob.in = tp; + blob.in_size = strlen(tp)+1; + blob.out = lsbuffer; + blob.out_size = sizeof(lsbuffer); + code = pioctl(tbuffer, VIOC_LISTSYMLINK, &blob, 0); + if (code) + return FALSE; + blob.out_size = 0; + blob.in = tp; + blob.in_size = strlen(tp)+1; + return (pioctl(tbuffer, VIOC_DELSYMLINK, &blob, 0)==0); +} BOOL IsSymlink(const char * true_name) { char parent_dir[MAXSIZE]; /*Parent directory of true name*/ - char strip_name[MAXSIZE]; + char strip_name[MAXSIZE]; struct ViceIoctl blob; - char *last_component; + char *last_component; int code; HOURGLASS hourglass; - last_component = (char *) strrchr(true_name, '\\'); - if (!last_component) - last_component = (char *) strrchr(true_name, '/'); - if (last_component) { - /* - * Found it. Designate everything before it as the parent directory, - * everything after it as the final component. - */ - strncpy(parent_dir, true_name, last_component - true_name + 1); - parent_dir[last_component - true_name + 1] = 0; - last_component++; /*Skip the slash*/ - } - else { - /* - * No slash appears in the given file name. Set parent_dir to the current - * directory, and the last component as the given name. - */ - fs_ExtractDriveLetter(true_name, parent_dir); - strcat(parent_dir, "."); - last_component = strip_name; + last_component = (char *) strrchr(true_name, '\\'); + if (!last_component) + last_component = (char *) strrchr(true_name, '/'); + if (last_component) { + /* + * Found it. Designate everything before it as the parent directory, + * everything after it as the final component. + */ + strncpy(parent_dir, true_name, last_component - true_name + 1); + parent_dir[last_component - true_name + 1] = 0; + last_component++; /*Skip the slash*/ + } + else { + /* + * No slash appears in the given file name. Set parent_dir to the current + * directory, and the last component as the given name. + */ + fs_ExtractDriveLetter(true_name, parent_dir); + strcat(parent_dir, "."); + last_component = strip_name; fs_StripDriveLetter(true_name, strip_name, sizeof(strip_name)); - } - - blob.in = last_component; - blob.in_size = strlen(last_component)+1; - blob.out_size = MAXSIZE; - blob.out = space; - memset(space, 0, MAXSIZE); - code = pioctl(parent_dir, VIOC_LISTSYMLINK, &blob, 1); - return (code==0); -} + } + + blob.in = last_component; + blob.in_size = strlen(last_component)+1; + blob.out_size = MAXSIZE; + blob.out = space; + memset(space, 0, MAXSIZE); + code = pioctl(parent_dir, VIOC_LISTSYMLINK, &blob, 1); + return (code==0); +} + + +BOOL IsMountPoint(const char * name) +{ + register LONG code = 0; + struct ViceIoctl blob; + char tbuffer[1024]; + char lsbuffer[1024]; + register char *tp; + char szCurItem[1024]; + strcpy(szCurItem, name); + + tp = (char *)strrchr(szCurItem, '\\'); + if (tp) { + strncpy(tbuffer, szCurItem, code = tp - szCurItem + 1); /* the dir name */ + tbuffer[code] = 0; + tp++; /* skip the slash */ + } else { + fs_ExtractDriveLetter(szCurItem, tbuffer); + strcat(tbuffer, "."); + tp = szCurItem; + fs_StripDriveLetter(tp, tp, 0); + } + + blob.in = tp; + blob.in_size = strlen(tp)+1; + blob.out = lsbuffer; + blob.out_size = sizeof(lsbuffer); + + code = pioctl(tbuffer, VIOC_AFS_STAT_MT_PT, &blob, 0); + + return (code==0); +} /* @@ -1239,61 +1272,40 @@ BOOL RemoveMount(CStringArray& files) char tbuffer[1024]; char lsbuffer[1024]; register char *tp; - BOOL error = FALSE; - CStringArray results; - CString str; - CString str2; + BOOL error = FALSE; + CStringArray results; + CString str; + CString str2; - HOURGLASS hourglass; + HOURGLASS hourglass; for (int i = 0; i < files.GetSize(); i++) { - char szCurItem[1024]; - strcpy(szCurItem, files[i]); - - tp = (char *)strrchr(szCurItem, '\\'); - if (tp) { - strncpy(tbuffer, szCurItem, code = tp - szCurItem + 1); /* the dir name */ - tbuffer[code] = 0; - tp++; /* skip the slash */ - } else { - fs_ExtractDriveLetter(szCurItem, tbuffer); - strcat(tbuffer, "."); - tp = szCurItem; - fs_StripDriveLetter(tp, tp, 0); - } - - blob.in = tp; - blob.in_size = strlen(tp)+1; - blob.out = lsbuffer; - blob.out_size = sizeof(lsbuffer); - - code = pioctl(tbuffer, VIOC_AFS_STAT_MT_PT, &blob, 0); - if (code) { - error = TRUE; - if (errno == EINVAL) - results.Add(GetMessageString(IDS_NOT_MOUNT_POINT_ERROR, StripPath(files[i]))); - else - results.Add(GetMessageString(IDS_ERROR, GetAfsError(errno, StripPath(files[i])))); - continue; // don't bother trying - } - - blob.out_size = 0; - blob.in = tp; - blob.in_size = strlen(tp)+1; - - code = pioctl(tbuffer, VIOC_AFS_DELETE_MT_PT, &blob, 0); - if (code) { - error = TRUE; - results.Add(GetMessageString(IDS_ERROR, GetAfsError(errno, StripPath(files[i])))); - } else - results.Add(GetMessageString(IDS_DELETED)); - } + if (!IsMountPoint(files[i])) { + error = TRUE; + if (errno == EINVAL) + results.Add(GetMessageString(IDS_NOT_MOUNT_POINT_ERROR, StripPath(files[i]))); + else + results.Add(GetMessageString(IDS_ERROR, GetAfsError(errno, StripPath(files[i])))); + continue; // don't bother trying + } + + blob.out_size = 0; + blob.in = tp; + blob.in_size = strlen(tp)+1; + + code = pioctl(tbuffer, VIOC_AFS_DELETE_MT_PT, &blob, 0); + if (code) { + error = TRUE; + results.Add(GetMessageString(IDS_ERROR, GetAfsError(errno, StripPath(files[i])))); + } else + results.Add(GetMessageString(IDS_DELETED)); + } - LoadString (str, IDS_REMOVE_MP); - LoadString (str2, IDS_REMOVE_MP_COLUMN); - CResultsDlg dlg(REMOVE_MOUNT_POINTS_HELP_ID); - dlg.SetContents(str, str2, StripPath(files), results); - dlg.DoModal(); + LoadString (str, IDS_REMOVE_MP); + LoadString (str2, IDS_REMOVE_MP_COLUMN); + CResultsDlg dlg(REMOVE_MOUNT_POINTS_HELP_ID); + dlg.SetContents(str, str2, StripPath(files), results); + dlg.DoModal(); return !error; } @@ -1305,12 +1317,12 @@ BOOL GetVolumeInfo(CString strFile, CVolInfo& volInfo) struct VolumeStatus *status; char *name; - HOURGLASS hourglass; + HOURGLASS hourglass; - volInfo.m_strFilePath = strFile; + volInfo.m_strFilePath = strFile; volInfo.m_strFileName = StripPath(strFile); -/* + /* volInfo.m_strName = "VolumeName"; volInfo.m_nID = 10; volInfo.m_nQuota = 20 * 1024 * 1024; @@ -1320,29 +1332,29 @@ BOOL GetVolumeInfo(CString strFile, CVolInfo& volInfo) volInfo.m_nPartFree = 30 * 1024 * 1024; volInfo.m_nDup = -1; return TRUE; -*/ + */ - blob.out_size = MAXSIZE; - blob.in_size = 0; - blob.out = space; - - code = pioctl(PCCHAR(strFile), VIOCGETVOLSTAT, &blob, 1); - if (code) { - volInfo.m_strErrorMsg = GetAfsError(errno, strFile); - return FALSE; - } - - status = (VolumeStatus *)space; - name = (char *)status + sizeof(*status); - - volInfo.m_strName = name; - volInfo.m_nID = status->Vid; - volInfo.m_nQuota = status->MaxQuota; - volInfo.m_nNewQuota = status->MaxQuota; - volInfo.m_nUsed = status->BlocksInUse; - volInfo.m_nPartSize = status->PartMaxBlocks; - volInfo.m_nPartFree = status->PartBlocksAvail; - volInfo.m_nDup = -1; + blob.out_size = MAXSIZE; + blob.in_size = 0; + blob.out = space; + + code = pioctl(PCCHAR(strFile), VIOCGETVOLSTAT, &blob, 1); + if (code) { + volInfo.m_strErrorMsg = GetAfsError(errno, strFile); + return FALSE; + } + + status = (VolumeStatus *)space; + name = (char *)status + sizeof(*status); + + volInfo.m_strName = name; + volInfo.m_nID = status->Vid; + volInfo.m_nQuota = status->MaxQuota; + volInfo.m_nNewQuota = status->MaxQuota; + volInfo.m_nUsed = status->BlocksInUse; + volInfo.m_nPartSize = status->PartMaxBlocks; + volInfo.m_nPartFree = status->PartBlocksAvail; + volInfo.m_nDup = -1; return TRUE; } @@ -1354,49 +1366,49 @@ BOOL SetVolInfo(CVolInfo& volInfo) struct VolumeStatus *status; char *input; - HOURGLASS hourglass; + HOURGLASS hourglass; - blob.out_size = MAXSIZE; - blob.in_size = sizeof(*status) + 3; /* for the three terminating nulls */ - blob.out = space; - blob.in = space; - - status = (VolumeStatus *)space; - status->MinQuota = -1; - status->MaxQuota = volInfo.m_nNewQuota; + blob.out_size = MAXSIZE; + blob.in_size = sizeof(*status) + 3; /* for the three terminating nulls */ + blob.out = space; + blob.in = space; + + status = (VolumeStatus *)space; + status->MinQuota = -1; + status->MaxQuota = volInfo.m_nNewQuota; - input = (char *)status + sizeof(*status); - *(input++) = '\0'; /* never set name: this call doesn't change vldb */ - *(input++) = '\0'; // No offmsg - *(input++) = '\0'; // No motd + input = (char *)status + sizeof(*status); + *(input++) = '\0'; /* never set name: this call doesn't change vldb */ + *(input++) = '\0'; // No offmsg + *(input++) = '\0'; // No motd #ifdef LOGGING_ON - FILE *fp = OpenFile(szLogFileName, "a"); - if (fp) { - fprintf(fp, "\nSetVolInfo() pioctl parms:\n"); - fprintf(fp, "\tpathp = %s\n\topcode = VIOCSETVOLSTAT (%d)\n\tblobp = %ld\n", PCCHAR(volInfo.m_strFilePath), VIOCSETVOLSTAT, &blob); - fprintf(fp, "\t\tblobp.in = %ld (VolumeStatus *status)\n\t\tblobp.in_size = %ld\n\t\tblobp.out = %ld ((VolumeStatus *status))\n\t\tblobp.out_size = %ld\n", blob.in, blob.in_size, blob.out, blob.out_size); - fprintf(fp, "\t\t\tstatus->MinQuota = %ld\n", status->MinQuota); - fprintf(fp, "\t\t\tstatus->MaxQuota = %ld\n", status->MaxQuota); - fprintf(fp, "\t\t\tOther status fields aren't set\n"); - fprintf(fp, "\t\t\t3 nulls follow the VolumeStatus structure.\n"); - fprintf(fp, "\tfollow = 1\n"); - fclose(fp); - } + FILE *fp = OpenFile(szLogFileName, "a"); + if (fp) { + fprintf(fp, "\nSetVolInfo() pioctl parms:\n"); + fprintf(fp, "\tpathp = %s\n\topcode = VIOCSETVOLSTAT (%d)\n\tblobp = %ld\n", PCCHAR(volInfo.m_strFilePath), VIOCSETVOLSTAT, &blob); + fprintf(fp, "\t\tblobp.in = %ld (VolumeStatus *status)\n\t\tblobp.in_size = %ld\n\t\tblobp.out = %ld ((VolumeStatus *status))\n\t\tblobp.out_size = %ld\n", blob.in, blob.in_size, blob.out, blob.out_size); + fprintf(fp, "\t\t\tstatus->MinQuota = %ld\n", status->MinQuota); + fprintf(fp, "\t\t\tstatus->MaxQuota = %ld\n", status->MaxQuota); + fprintf(fp, "\t\t\tOther status fields aren't set\n"); + fprintf(fp, "\t\t\t3 nulls follow the VolumeStatus structure.\n"); + fprintf(fp, "\tfollow = 1\n"); + fclose(fp); + } #endif - code = pioctl(PCCHAR(volInfo.m_strFilePath), VIOCSETVOLSTAT, &blob, 1); - if (code) { - ShowMessageBox(IDS_SET_QUOTA_ERROR, MB_ICONEXCLAMATION, IDS_SET_QUOTA_ERROR, GetAfsError(errno, volInfo.m_strName)); - return FALSE; - } + code = pioctl(PCCHAR(volInfo.m_strFilePath), VIOCSETVOLSTAT, &blob, 1); + if (code) { + ShowMessageBox(IDS_SET_QUOTA_ERROR, MB_ICONEXCLAMATION, IDS_SET_QUOTA_ERROR, GetAfsError(errno, volInfo.m_strName)); + return FALSE; + } return TRUE; } int GetCellName(char *cellNamep, struct afsconf_cell *infop) { - strcpy(infop->name, cellNamep); + strcpy(infop->name, cellNamep); return 0; } @@ -1409,7 +1421,7 @@ BOOL CheckServers(const CString& strCellName, WHICH_CELLS nCellsToCheck, BOOL bF struct afsconf_cell info; struct chservinfo checkserv; - HOURGLASS hourglass; + HOURGLASS hourglass; memset(&checkserv, 0, sizeof(struct chservinfo)); blob.in_size = sizeof(struct chservinfo); @@ -1420,227 +1432,227 @@ BOOL CheckServers(const CString& strCellName, WHICH_CELLS nCellsToCheck, BOOL bF memset(space, 0, sizeof(LONG)); /* so we assure zero when nothing is copied back */ /* prepare flags for checkservers command */ - if (nCellsToCheck == LOCAL_CELL) - temp = 2; /* default to checking local cell only */ + if (nCellsToCheck == LOCAL_CELL) + temp = 2; /* default to checking local cell only */ else if (nCellsToCheck == ALL_CELLS) - temp &= ~2; /* turn off local cell check */ + temp &= ~2; /* turn off local cell check */ - if (bFast) - temp |= 1; /* set fast flag */ + if (bFast) + temp |= 1; /* set fast flag */ checkserv.magic = 0x12345678; /* XXX */ checkserv.tflags = temp; /* now copy in optional cell name, if specified */ if (nCellsToCheck == SPECIFIC_CELL) { - GetCellName(PCCHAR(strCellName), &info); - strcpy(checkserv.tbuffer,info.name); - checkserv.tsize = strlen(info.name) + 1; + GetCellName(PCCHAR(strCellName), &info); + strcpy(checkserv.tbuffer,info.name); + checkserv.tsize = strlen(info.name) + 1; } else { - strcpy(checkserv.tbuffer, "\0"); - checkserv.tsize = 0; - } + strcpy(checkserv.tbuffer, "\0"); + checkserv.tsize = 0; + } - checkserv.tinterval = -1; /* don't change current interval */ + checkserv.tinterval = -1; /* don't change current interval */ code = pioctl(0, VIOCCKSERV, &blob, 1); if (code) { - ShowMessageBox(IDS_CHECK_SERVERS_ERROR, MB_ICONEXCLAMATION, IDS_CHECK_SERVERS_ERROR, GetAfsError(errno, CString())); - return FALSE; + ShowMessageBox(IDS_CHECK_SERVERS_ERROR, MB_ICONEXCLAMATION, IDS_CHECK_SERVERS_ERROR, GetAfsError(errno, CString())); + return FALSE; } memcpy(&temp, space, sizeof(LONG)); - if (temp == 0) { - ShowMessageBox(IDS_ALL_SERVERS_RUNNING, MB_OK, IDS_ALL_SERVERS_RUNNING); - return TRUE; - } + if (temp == 0) { + ShowMessageBox(IDS_ALL_SERVERS_RUNNING, MB_OK, IDS_ALL_SERVERS_RUNNING); + return TRUE; + } + + CStringArray servers; + for (j = 0; j < MAXHOSTS; j++) { + memcpy(&temp, space + j * sizeof(LONG), sizeof(LONG)); + if (temp == 0) + break; - CStringArray servers; - for (j = 0; j < MAXHOSTS; j++) { - memcpy(&temp, space + j * sizeof(LONG), sizeof(LONG)); - if (temp == 0) - break; - - char *name = hostutil_GetNameByINet(temp); - servers.Add(name); - } + char *name = hostutil_GetNameByINet(temp); + servers.Add(name); + } - CDownServersDlg dlg; - dlg.SetServerNames(servers); - dlg.DoModal(); + CDownServersDlg dlg; + dlg.SetServerNames(servers); + dlg.DoModal(); return TRUE; -} +} BOOL GetTokenInfo(CStringArray& tokenInfo) { - int cellNum; - int rc; - time_t current_time; - time_t tokenExpireTime; - char *expireString; - char userName[100]; + int cellNum; + int rc; + time_t current_time; + time_t tokenExpireTime; + char *expireString; + char userName[100]; // char s[100]; - struct ktc_principal serviceName, clientName; - struct ktc_token token; - - CString strTokenInfo; - CString strUserName; - CString strCellName; - CString strExpir; + struct ktc_principal serviceName, clientName; + struct ktc_token token; + + CString strTokenInfo; + CString strUserName; + CString strCellName; + CString strExpir; -// tokenInfo.Add(""); +// tokenInfo.Add(""); // return TRUE; - HOURGLASS hourglass; + HOURGLASS hourglass; // printf("\nTokens held by the Cache Manager:\n\n"); - cellNum = 0; - current_time = time(0); - - while (1) { - rc = ktc_ListTokens(cellNum, &cellNum, &serviceName); - if (rc == KTC_NOENT) { - /* end of list */ -// printf(" --End of list --\n"); - break; - } - else if (rc == KTC_NOCM) { - ShowMessageBox(IDS_GET_TOKENS_NO_AFS_SERVICE); -// printf("AFS service may not have started\n"); - break; - } - else if (rc) { - ShowMessageBox(IDS_GET_TOKENS_UNEXPECTED_ERROR, MB_ICONEXCLAMATION, IDS_GET_TOKENS_UNEXPECTED_ERROR, rc); - return FALSE; -// printf("Unexpected error, code %d\n", rc); -// exit(1); - } - else { - rc = ktc_GetToken(&serviceName, &token, sizeof(token), &clientName); - if (rc) { - ShowMessageBox(IDS_GET_TOKENS_UNEXPECTED_ERROR2, MB_ICONEXCLAMATION, IDS_GET_TOKENS_UNEXPECTED_ERROR2, - serviceName.name, serviceName.instance, serviceName.cell, rc); - continue; - } - - tokenExpireTime = token.endTime; - - strcpy(userName, clientName.name); - if (clientName.instance[0] != 0) { - strcat(userName, "."); - strcat(userName, clientName.instance); - } + cellNum = 0; + current_time = time(0); + + while (1) { + rc = ktc_ListTokens(cellNum, &cellNum, &serviceName); + if (rc == KTC_NOENT) { + /* end of list */ +// printf(" --End of list --\n"); + break; + } + else if (rc == KTC_NOCM) { + ShowMessageBox(IDS_GET_TOKENS_NO_AFS_SERVICE); +// printf("AFS service may not have started\n"); + break; + } + else if (rc) { + ShowMessageBox(IDS_GET_TOKENS_UNEXPECTED_ERROR, MB_ICONEXCLAMATION, IDS_GET_TOKENS_UNEXPECTED_ERROR, rc); + return FALSE; +// printf("Unexpected error, code %d\n", rc); +// exit(1); + } + else { + rc = ktc_GetToken(&serviceName, &token, sizeof(token), &clientName); + if (rc) { + ShowMessageBox(IDS_GET_TOKENS_UNEXPECTED_ERROR2, MB_ICONEXCLAMATION, IDS_GET_TOKENS_UNEXPECTED_ERROR2, + serviceName.name, serviceName.instance, serviceName.cell, rc); + continue; + } + + tokenExpireTime = token.endTime; + + strcpy(userName, clientName.name); + if (clientName.instance[0] != 0) { + strcat(userName, "."); + strcat(userName, clientName.instance); + } - BOOL bShowName = FALSE; + BOOL bShowName = FALSE; - if (userName[0] == '\0') - ; //printf("Tokens"); + if (userName[0] == '\0') + ; //printf("Tokens"); // AFS ID is not returned at this time. -// else if (strncmp(userName, "AFS ID", 6) == 0) -// printf("User's (%s) tokens", userName); -// sscanf(userName, "(AFS ID %s)", szAfsID); - else if (strncmp(userName, "Unix UID", 8) == 0) - ; //printf("Tokens"); - else - strUserName = userName; -// printf("User %s's tokens", userName); +// else if (strncmp(userName, "AFS ID", 6) == 0) +// printf("User's (%s) tokens", userName); +// sscanf(userName, "(AFS ID %s)", szAfsID); + else if (strncmp(userName, "Unix UID", 8) == 0) + ; //printf("Tokens"); + else + strUserName = userName; +// printf("User %s's tokens", userName); -// printf(" for %s%s%s@%s ", serviceName.name, serviceName.instance[0] ? "." : "", serviceName.instance, serviceName.cell); - strCellName = serviceName.cell; +// printf(" for %s%s%s@%s ", serviceName.name, serviceName.instance[0] ? "." : "", serviceName.instance, serviceName.cell); + strCellName = serviceName.cell; - if (tokenExpireTime <= current_time) - strExpir = "[>> Expired <<]"; -// printf("[>> Expired <<]\n"); - else { - expireString = ctime(&tokenExpireTime); - expireString += 4; /* Skip day of week */ - expireString[12] = '\0'; /* Omit secs & year */ -// printf("[Expires %s]\n", expireString); - strExpir.Format("%s", expireString); - } - - strTokenInfo = strUserName + "\t" + strCellName + "\t" + strExpir + "\t" + strCellName; - tokenInfo.Add(strTokenInfo); - } - } + if (tokenExpireTime <= current_time) + strExpir = "[>> Expired <<]"; +// printf("[>> Expired <<]\n"); + else { + expireString = ctime(&tokenExpireTime); + expireString += 4; /* Skip day of week */ + expireString[12] = '\0'; /* Omit secs & year */ +// printf("[Expires %s]\n", expireString); + strExpir.Format("%s", expireString); + } + + strTokenInfo = strUserName + "\t" + strCellName + "\t" + strExpir + "\t" + strCellName; + tokenInfo.Add(strTokenInfo); + } + } // printf("Press or when finished: "); // gets(s); - return TRUE; + return TRUE; } UINT MakeSymbolicLink(const char *strName ,const char *strDir) { struct ViceIoctl blob; - char space[MAXSIZE]; - UINT code; + char space[MAXSIZE]; + UINT code; HOURGLASS hourglass; /*lets confirm its a good symlink*/ - if (!IsPathInAfs(strDir)) - return 1; - LPTSTR lpsz = new TCHAR[strlen(strDir)+1]; - _tcscpy(lpsz, strName); + if (!IsPathInAfs(strDir)) + return 1; + LPTSTR lpsz = new TCHAR[strlen(strDir)+1]; + _tcscpy(lpsz, strName); strcpy(space, strDir); blob.out_size = 0; blob.in_size = 1 + strlen(space); blob.in = space; blob.out = NULL; if ((code=pioctl(lpsz, VIOC_SYMLINK, &blob, 0))!=0) - return code; - return 0; + return code; + return 0; } void ListSymbolicLinkPath(const char *strName,char *strPath,UINT nlenPath) { - ASSERT(nlenPathm_astrFileNames.GetSize() - 1 ; n >= 0; n--) { + if ( IsMountPoint(pThis->m_astrFileNames[n]) ) { + nMountPointSelected = MF_ENABLED; + break; + } + } + ::InsertMenu(hMountPointMenu, indexMountPointMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_MOUNTPOINT_SHOW, GetMessageString(IDS_MP_SHOW_ITEM)); + ::InsertMenu(hMountPointMenu, indexMountPointMenu++, MF_STRING | MF_BYPOSITION | nMountPointSelected, idCmdFirst + IDM_MOUNTPOINT_REMOVE, GetMessageString(IDS_MP_REMOVE_ITEM)); + ::InsertMenu(hMountPointMenu, indexMountPointMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_MOUNTPOINT_MAKE, GetMessageString(IDS_MP_MAKE_ITEM)); ::InsertMenu(hAfsMenu, indexAfsMenu++, MF_STRING | MF_BYPOSITION | MF_POPUP, (UINT)hMountPointMenu, GetMessageString(IDS_MOUNT_POINT_ITEM)); ::InsertMenu(hAfsMenu, indexAfsMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_FLUSH, GetMessageString(IDS_FLUSH_FILE_DIR_ITEM)); diff --git a/src/WINNT/install/NSIS/OpenAFS.nsi b/src/WINNT/install/NSIS/OpenAFS.nsi index 4d18f5f4c..f97924167 100644 --- a/src/WINNT/install/NSIS/OpenAFS.nsi +++ b/src/WINNT/install/NSIS/OpenAFS.nsi @@ -722,6 +722,7 @@ skipremove: WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Asynchronous" 0 WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Impersonate" 1 WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "DLLName" "afslogon.dll" + WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Logon" "AFS_Logon_Event" WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Logoff" "AFS_Logoff_Event" WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Startup" "AFS_Startup_Event" diff --git a/src/WINNT/install/wix/feature.wxi b/src/WINNT/install/wix/feature.wxi index 5095440e6..7d647ceb2 100644 --- a/src/WINNT/install/wix/feature.wxi +++ b/src/WINNT/install/wix/feature.wxi @@ -4,6 +4,7 @@ Description="$(loc.StrAFSProdDesc)" Display="expand" InstallDefault="local" Level="30" Title="OpenAFS"> + diff --git a/src/WINNT/install/wix/files.wxi b/src/WINNT/install/wix/files.wxi index 5f4a86e54..cf18477f2 100644 --- a/src/WINNT/install/wix/files.wxi +++ b/src/WINNT/install/wix/files.wxi @@ -9,7 +9,8 @@ - + + @@ -22,6 +23,9 @@ + + + diff --git a/src/WINNT/install/wix/replace_afs.cmd b/src/WINNT/install/wix/replace_afs.cmd new file mode 100644 index 000000000..1a4f6743e --- /dev/null +++ b/src/WINNT/install/wix/replace_afs.cmd @@ -0,0 +1,59 @@ +@echo off + +if "%1"=="" goto show_usage + +rem Instead of running the script from the current location +rem we copy ourselves over to the TMP directory and run +rem from there. + +if not "%2"=="intemp" goto copy_and_run + +rem Do the actual work + +setlocal +echo This will replace the current installation of OpenAFS with +echo the upgraded version at : +echo "%~f1" +set /p response=Continue? (y/n): +if "%response%"=="y" goto do_this +if "%response%"=="Y" goto do_this +endlocal + +echo Cancelling. No changes were made to your computer. + +goto end_script + +:do_this +endlocal + +echo Running MSIEXEC: +echo on + +msiexec /fvomus "%~f1" + +@echo off +echo Done. + +goto end_script + +:copy_and_run + +copy "%~f0" "%TMP%\tmp_replace_afs.cmd" +"%TMP%\tmp_replace_afs.cmd" "%~f1" intemp + +goto end_script + +:show_usage +echo %0: Upgrade an existing installation of OpenAFS +echo. +echo This command replaces the existing installation with a new +echo installation. You need to obtain the new .MSI from openafs.org +echo and run this command as follows : +echo. +echo %0 [path to new .msi] +echo. +echo The latest release can be found at the following URL: +echo http://www.openafs.org/release/latest.html +echo. + +:end_script diff --git a/src/WINNT/pthread/pthread.c b/src/WINNT/pthread/pthread.c index e44c660e4..8531e61e0 100644 --- a/src/WINNT/pthread/pthread.c +++ b/src/WINNT/pthread/pthread.c @@ -1043,8 +1043,8 @@ void *pthread_getspecific(pthread_key_t key) { void *rc = NULL; char **tsd = TlsGetValue(tsd_index); - if (tsd == NULL) - return NULL; + if (tsd == NULL) + return NULL; if ((key > -1) && (key < PTHREAD_KEYS_MAX )) { rc = (void *) *(tsd + key); @@ -1114,6 +1114,9 @@ int pthread_setspecific(pthread_key_t key, const void *value) { int rc = 0; char **tsd; + /* make sure all thread-local storage has been allocated */ + pthread_self(); + if (p_tsd_done || (!pthread_once(&pthread_tsd_once, pthread_tsd_init))) { if ((key > -1) && (key < PTHREAD_KEYS_MAX )) { if (!pthread_mutex_lock(&pthread_tsd_mutex)) { diff --git a/src/afs/AIX/osi_machdep.h b/src/afs/AIX/osi_machdep.h index e41bf7c60..acce91fee 100644 --- a/src/afs/AIX/osi_machdep.h +++ b/src/afs/AIX/osi_machdep.h @@ -69,10 +69,6 @@ extern simple_lock_data afs_global_lock; simple_unlock((void *)&afs_global_lock); \ } while(0) #define ISAFS_GLOCK() lock_mine((void *)&afs_global_lock) - -#define AFS_RXGLOCK() -#define AFS_RXGUNLOCK() -#define ISAFS_RXGLOCK() 1 #endif #endif /* _OSI_MACHDEP_H_ */ diff --git a/src/afs/DARWIN/osi_machdep.h b/src/afs/DARWIN/osi_machdep.h index 8850718d5..409d64d85 100644 --- a/src/afs/DARWIN/osi_machdep.h +++ b/src/afs/DARWIN/osi_machdep.h @@ -85,9 +85,6 @@ extern struct lock__bsd__ afs_global_lock; lockmgr(&afs_global_lock, LK_RELEASE, 0, current_proc()); \ } while(0) #define ISAFS_GLOCK() (afs_global_owner == current_thread()) -#define AFS_RXGLOCK() -#define AFS_RXGUNLOCK() -#define ISAFS_RXGLOCK() 1 #define SPLVAR #define NETPRI diff --git a/src/afs/DARWIN/osi_vnodeops.c b/src/afs/DARWIN/osi_vnodeops.c index 52b11beb9..0ac32065e 100644 --- a/src/afs/DARWIN/osi_vnodeops.c +++ b/src/afs/DARWIN/osi_vnodeops.c @@ -5,7 +5,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.18.2.3 2005/04/04 04:01:19 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.18.2.4 2005/04/29 01:51:07 shadow Exp $"); #include /* Standard vendor system headers */ #include /* Afs-based standard headers */ @@ -345,9 +345,7 @@ afs_vop_open(ap) if (AFSTOV(vc) != vp) panic("AFS open changed vnode!"); #endif -#if 0 osi_FlushPages(vc, ap->a_cred); -#endif AFS_GUNLOCK(); #ifdef AFS_DARWIN14_ENV if (error && didhold) @@ -373,9 +371,7 @@ afs_vop_close(ap) code = afs_close(avc, ap->a_fflag, ap->a_cred, ap->a_p); else code = afs_close(avc, ap->a_fflag, &afs_osi_cred, ap->a_p); -#if 0 osi_FlushPages(avc, ap->a_cred); /* hold bozon lock, but not basic vnode lock */ -#endif AFS_GUNLOCK(); return code; @@ -443,9 +439,7 @@ afs_vop_read(ap) struct vnode *vp = ap->a_vp; struct vcache *avc = VTOAFS(vp); AFS_GLOCK(); -#if 0 osi_FlushPages(avc, ap->a_cred); /* hold bozon lock, but not basic vnode lock */ -#endif code = afs_read(avc, ap->a_uio, ap->a_cred, 0, 0, 0); AFS_GUNLOCK(); return code; @@ -521,9 +515,7 @@ afs_vop_pagein(ap) auio.uio_resid = aiov.iov_len = size; aiov.iov_base = (caddr_t) ioaddr; AFS_GLOCK(); -#if 0 osi_FlushPages(tvc, ap->a_cred); /* hold bozon lock, but not basic vnode lock */ -#endif code = afs_read(tvc, uio, cred, 0, 0, 0); if (code == 0) { ObtainWriteLock(&tvc->lock, 2); @@ -564,9 +556,7 @@ afs_vop_write(ap) struct vcache *avc = VTOAFS(ap->a_vp); void *object; AFS_GLOCK(); -#if 0 osi_FlushPages(avc, ap->a_cred); /* hold bozon lock, but not basic vnode lock */ -#endif if (UBCINFOEXISTS(ap->a_vp)) { ubc_clean(ap->a_vp, 1); } @@ -709,9 +699,7 @@ afs_vop_pageout(ap) #endif /* ] USV */ AFS_GLOCK(); -#if 0 osi_FlushPages(tvc, ap->a_cred); /* hold bozon lock, but not basic vnode lock */ -#endif ObtainWriteLock(&tvc->lock, 1); afs_FakeOpen(tvc); ReleaseWriteLock(&tvc->lock); diff --git a/src/afs/DUX/osi_machdep.h b/src/afs/DUX/osi_machdep.h index 78b2630d0..b83f01f3d 100644 --- a/src/afs/DUX/osi_machdep.h +++ b/src/afs/DUX/osi_machdep.h @@ -63,9 +63,6 @@ extern thread_t afs_global_owner; usimple_unlock(&afs_global_lock); \ } while(0) #define ISAFS_GLOCK() (afs_global_owner == current_thread()) -#define AFS_RXGLOCK() -#define AFS_RXGUNLOCK() -#define ISAFS_RXGLOCK() 1 #undef SPLVAR #define SPLVAR diff --git a/src/afs/FBSD/osi_machdep.h b/src/afs/FBSD/osi_machdep.h index 83e7c83f4..c6495633b 100644 --- a/src/afs/FBSD/osi_machdep.h +++ b/src/afs/FBSD/osi_machdep.h @@ -66,12 +66,19 @@ extern struct simplelock afs_rxglobal_lock; #define VN_RELE(vp) vrele(vp) #define VN_HOLD(vp) VREF(vp) +#ifdef AFS_FBSD60_ENV +#undef IsAfsVnode +#define IsAfsVnode(v) ((v)->v_op == &afs_vnodeops) +extern struct vop_vector afs_vnodeops; +#endif + #if defined(AFS_FBSD50_ENV) #define VT_AFS "afs" #define VROOT VV_ROOT #define v_flag v_vflag #define osi_curcred() (curthread->td_ucred) #define afs_suser(x) (!suser(curthread)) +#define getpid() (curthread->td_proc->p_pid) #define simple_lock(x) mtx_lock(x) #define simple_unlock(x) mtx_unlock(x) #define gop_rdwr(rw,gp,base,len,offset,segflg,unit,cred,aresid) \ @@ -86,7 +93,7 @@ extern struct lock afs_global_lock; #define osi_curcred() (curproc->p_cred->pc_ucred) #define afs_suser(x) (!suser(curproc)) -#define getpid() curproc +#define getpid() (curproc->p_pid) #define gop_rdwr(rw,gp,base,len,offset,segflg,unit,cred,aresid) \ vn_rdwr((rw),(gp),(base),(len),(offset),(segflg),(unit),(cred),(aresid), curproc) extern struct proc *afs_global_owner; @@ -107,10 +114,6 @@ extern struct proc *afs_global_owner; #define ISAFS_GLOCK() (afs_global_owner == curproc && curproc) #endif /* FBSD50 */ -#define AFS_RXGLOCK() -#define AFS_RXGUNLOCK() -#define ISAFS_RXGLOCK() 1 - #undef SPLVAR #define SPLVAR int splvar #undef NETPRI diff --git a/src/afs/FBSD/osi_vfsops.c b/src/afs/FBSD/osi_vfsops.c index 08a850e21..99ca98632 100644 --- a/src/afs/FBSD/osi_vfsops.c +++ b/src/afs/FBSD/osi_vfsops.c @@ -2,7 +2,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/afs/FBSD/osi_vfsops.c,v 1.16.2.1 2004/11/09 17:11:34 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/FBSD/osi_vfsops.c,v 1.16.2.2 2005/04/24 00:58:05 shadow Exp $"); #include /* Standard vendor system headers */ #include /* Afs-based standard headers */ @@ -79,6 +79,14 @@ afs_omount(struct mount *mp, char *path, caddr_t data, struct nameidata *ndp, return 0; } +#ifdef AFS_FBSD60_ENV +static int +afs_cmount(struct mntarg *ma, void *data, int flags, struct thread *td) +{ + return kernel_mount(ma, flags); +} +#endif + int afs_unmount(struct mount *mp, int flags, THREAD_OR_PROC) { @@ -211,7 +219,11 @@ afs_statfs(struct mount *mp, struct statfs *abp, THREAD_OR_PROC) } int +#ifdef AFS_FBSD60_ENV +afs_sync(struct mount *mp, int waitfor, struct thread *td) +#else afs_sync(struct mount *mp, int waitfor, struct ucred *cred, THREAD_OR_PROC) +#endif { return 0; } @@ -222,6 +234,19 @@ afs_init(struct vfsconf *vfc) return 0; } +#ifdef AFS_FBSD60_ENV +struct vfsops afs_vfsops = { + .vfs_init = afs_init, + .vfs_mount = afs_mount, + .vfs_cmount = afs_cmount, + .vfs_root = afs_root, + .vfs_statfs = afs_statfs, + .vfs_sync = afs_sync, + .vfs_uninit = vfs_stduninit, + .vfs_unmount = afs_unmount, + .vfs_sysctl = vfs_stdsysctl, +}; +#else struct vfsops afs_vfsops = { #ifdef AFS_FBSD53_ENV afs_mount, @@ -244,3 +269,4 @@ struct vfsops afs_vfsops = { vfs_stdsysctl, #endif }; +#endif diff --git a/src/afs/FBSD/osi_vnodeops.c b/src/afs/FBSD/osi_vnodeops.c index 2588defb3..c296a0365 100644 --- a/src/afs/FBSD/osi_vnodeops.c +++ b/src/afs/FBSD/osi_vnodeops.c @@ -48,7 +48,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/afs/FBSD/osi_vnodeops.c,v 1.18.2.1 2005/04/03 18:15:37 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/FBSD/osi_vnodeops.c,v 1.18.2.2 2005/04/24 00:58:05 shadow Exp $"); #include /* Standard vendor system headers */ #include /* Afs-based standard headers */ @@ -65,6 +65,73 @@ RCSID #include extern int afs_pbuf_freecnt; +#ifdef AFS_FBSD60_ENV +static vop_access_t afs_vop_access; +static vop_advlock_t afs_vop_advlock; +static vop_close_t afs_vop_close; +static vop_create_t afs_vop_create; +static vop_fsync_t afs_vop_fsync; +static vop_getattr_t afs_vop_getattr; +static vop_getpages_t afs_vop_getpages; +static vop_inactive_t afs_vop_inactive; +static vop_ioctl_t afs_vop_ioctl; +static vop_link_t afs_vop_link; +static vop_lookup_t afs_vop_lookup; +static vop_mkdir_t afs_vop_mkdir; +static vop_mknod_t afs_vop_mknod; +static vop_open_t afs_vop_open; +static vop_pathconf_t afs_vop_pathconf; +static vop_poll_t afs_vop_poll; +static vop_print_t afs_vop_print; +static vop_putpages_t afs_vop_putpages; +static vop_read_t afs_vop_read; +static vop_readdir_t afs_vop_readdir; +static vop_readlink_t afs_vop_readlink; +static vop_reclaim_t afs_vop_reclaim; +static vop_remove_t afs_vop_remove; +static vop_rename_t afs_vop_rename; +static vop_rmdir_t afs_vop_rmdir; +static vop_setattr_t afs_vop_setattr; +static vop_strategy_t afs_vop_strategy; +static vop_symlink_t afs_vop_symlink; +static vop_write_t afs_vop_write; + +struct vop_vector afs_vnodeops = { + .vop_default = &default_vnodeops, + .vop_access = afs_vop_access, + .vop_advlock = afs_vop_advlock, + .vop_close = afs_vop_close, + .vop_create = afs_vop_create, + .vop_fsync = afs_vop_fsync, + .vop_getattr = afs_vop_getattr, + .vop_getpages = afs_vop_getpages, + .vop_inactive = afs_vop_inactive, + .vop_ioctl = afs_vop_ioctl, + .vop_lease = VOP_NULL, + .vop_link = afs_vop_link, + .vop_lookup = afs_vop_lookup, + .vop_mkdir = afs_vop_mkdir, + .vop_mknod = afs_vop_mknod, + .vop_open = afs_vop_open, + .vop_pathconf = afs_vop_pathconf, + .vop_poll = afs_vop_poll, + .vop_print = afs_vop_print, + .vop_putpages = afs_vop_putpages, + .vop_read = afs_vop_read, + .vop_readdir = afs_vop_readdir, + .vop_readlink = afs_vop_readlink, + .vop_reclaim = afs_vop_reclaim, + .vop_remove = afs_vop_remove, + .vop_rename = afs_vop_rename, + .vop_rmdir = afs_vop_rmdir, + .vop_setattr = afs_vop_setattr, + .vop_strategy = afs_vop_strategy, + .vop_symlink = afs_vop_symlink, + .vop_write = afs_vop_write, +}; + +#else /* AFS_FBSD60_ENV */ + int afs_vop_lookup(struct vop_lookup_args *); int afs_vop_create(struct vop_create_args *); int afs_vop_mknod(struct vop_mknod_args *); @@ -94,12 +161,9 @@ int afs_vop_readdir(struct vop_readdir_args *); int afs_vop_readlink(struct vop_readlink_args *); int afs_vop_inactive(struct vop_inactive_args *); int afs_vop_reclaim(struct vop_reclaim_args *); -int afs_vop_lock(struct vop_lock_args *); -int afs_vop_unlock(struct vop_unlock_args *); int afs_vop_bmap(struct vop_bmap_args *); int afs_vop_strategy(struct vop_strategy_args *); int afs_vop_print(struct vop_print_args *); -int afs_vop_islocked(struct vop_islocked_args *); int afs_vop_advlock(struct vop_advlock_args *); @@ -153,6 +217,7 @@ struct vnodeopv_entry_desc afs_vnodeop_entries[] = { }; struct vnodeopv_desc afs_vnodeop_opv_desc = { &afs_vnodeop_p, afs_vnodeop_entries }; +#endif /* AFS_FBSD60_ENV */ #define GETNAME() \ struct componentname *cnp = ap->a_cnp; \ @@ -882,10 +947,14 @@ afs_vop_fsync(ap) AFS_GLOCK(); /*vflushbuf(vp, wait); */ +#ifdef AFS_FBSD60_ENV + error = afs_fsync(VTOAFS(vp), ap->a_td->td_ucred); +#else if (ap->a_cred) error = afs_fsync(VTOAFS(vp), ap->a_cred); else error = afs_fsync(VTOAFS(vp), afs_osi_credp); +#endif AFS_GUNLOCK(); return error; } @@ -1286,9 +1355,14 @@ afs_vop_reclaim(struct vop_reclaim_args *ap) */ if (code) printf("afs_vop_reclaim: afs_FlushVCache failed code %d\n", code); + +#ifdef AFS_FBSD60_ENV + vnode_destroy_vobject(vp); +#endif return 0; } +#ifndef AFS_FBSD60_ENV int afs_vop_bmap(ap) struct vop_bmap_args /* { @@ -1313,6 +1387,7 @@ afs_vop_bmap(ap) return 0; } +#endif int afs_vop_strategy(ap) diff --git a/src/afs/HPUX/osi_machdep.h b/src/afs/HPUX/osi_machdep.h index b13f6e461..d66f068ef 100644 --- a/src/afs/HPUX/osi_machdep.h +++ b/src/afs/HPUX/osi_machdep.h @@ -80,10 +80,6 @@ extern void afsHashRelease(tid_t key); #endif -#define AFS_RXGLOCK() -#define AFS_RXGUNLOCK() -#define ISAFS_RXGLOCK() 1 - /* Uses splnet only in the SP case */ #define SPLVAR register ulong_t splvar #define NETPRI NET_SPLNET(splvar) diff --git a/src/afs/IRIX/osi_machdep.h b/src/afs/IRIX/osi_machdep.h index c069b3617..1397946d3 100644 --- a/src/afs/IRIX/osi_machdep.h +++ b/src/afs/IRIX/osi_machdep.h @@ -172,11 +172,6 @@ extern long afs_global_owner; (AFS_ASSERT_GLOCK(), afs_global_owner = 0, mutex_exit(&afs_global_lock)) #define ISAFS_GLOCK() (osi_ThreadUnique() == afs_global_owner) #endif /* AFS_SGI64_ENV */ - -#define AFS_RXGLOCK() -#define AFS_RXGUNLOCK() -#define ISAFS_RXGLOCK() 1 - #else /* MP */ #define AFS_GLOCK() #define AFS_GUNLOCK() diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c index 8f0c5b9ed..c84624e48 100644 --- a/src/afs/LINUX/osi_file.c +++ b/src/afs/LINUX/osi_file.c @@ -11,7 +11,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/afs/LINUX/osi_file.c,v 1.19.2.4 2005/03/11 04:37:17 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/LINUX/osi_file.c,v 1.19.2.7 2005/04/24 20:12:22 shadow Exp $"); #ifdef AFS_LINUX24_ENV #include "h/module.h" /* early to avoid printf->printk mapping */ @@ -26,8 +26,99 @@ int afs_osicred_initialized = 0; struct AFS_UCRED afs_osi_cred; afs_lock_t afs_xosi; /* lock is for tvattr */ extern struct osi_dev cacheDev; +#if defined(AFS_LINUX24_ENV) +extern struct vfsmount *afs_cacheMnt; +#endif extern struct super_block *afs_cacheSBp; +/*#if defined(AFS_LINUX26_ENV) && (defined(CONFIG_EXPORTFS) || defined(CONFIG_EXPORTFS_MODULE)) +#define HAS_UFSOPEN +extern struct export_operations export_op_default; + +#define CALL(ops,fun) ((ops->fun)?(ops->fun):export_op_default.fun) + +XXX something based on encode_fh / find_exported_dentry +This would require us to store an inode -> fh mapping (acquired by +afs_InitCacheFile or lookupname), but probably solves the resiserfs issue. +#elif... */ + +#if defined(AFS_LINUX24_ENV) && !defined(HAS_UFSOPEN) +#define HAS_UFSOPEN +void * +osi_UFSOpen(afs_int32 ainode) +{ + register struct osi_file *afile = NULL; + extern int cacheDiskType; + struct inode *tip = NULL; +#ifndef AFS_LINUX26_ENV + afs_int32 code = 0; + struct list_head *lp = NULL; + struct dentry *tdp = NULL; +#endif + struct dentry *dp = NULL; + struct file *filp = NULL; + AFS_STATCNT(osi_UFSOpen); + if (cacheDiskType != AFS_FCACHE_TYPE_UFS) { + osi_Panic("UFSOpen called for non-UFS cache\n"); + } + if (!afs_osicred_initialized) { + /* valid for alpha_osf, SunOS, Ultrix */ + memset((char *)&afs_osi_cred, 0, sizeof(struct AFS_UCRED)); + crhold(&afs_osi_cred); /* don't let it evaporate, since it is static */ + afs_osicred_initialized = 1; + } + afile = (struct osi_file *)osi_AllocLargeSpace(sizeof(struct osi_file)); + AFS_GUNLOCK(); + if (!afile) { + osi_Panic("osi_UFSOpen: Failed to allocate %d bytes for osi_file.\n", + sizeof(struct osi_file)); + } + memset(afile, 0, sizeof(struct osi_file)); + tip = iget(afs_cacheSBp, (u_long) ainode); + if (!tip) + osi_Panic("Can't get inode %d\n", ainode); + tip->i_flags |= MS_NOATIME; /* Disable updating access times. */ + +#ifdef AFS_LINUX26_ENV + dp = d_alloc_anon(tip); +#else + spin_lock(&dcache_lock); + for (lp = tip->i_dentry.next; lp != &tip->i_dentry; lp = lp->next) { + tdp = list_entry(lp, struct dentry, d_alias); + if ( !(tdp->d_flags & DCACHE_NFSD_DISCONNECTED)) { + dget_locked(tdp); + dp=tdp; + break; + } + } + if (tdp && !dp) { + dget_locked(tdp); + dp=tdp; + } + tdp = NULL; + spin_unlock(&dcache_lock); + if (!dp) + dp = d_alloc_root(tip); + iput(tip); +#endif + if (!dp) + osi_Panic("Can't get dentry for inode %d\n", ainode); + + filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR); + + if (IS_ERR(filp)) + osi_Panic("Can't open inode %d\n", ainode); + afile->filp = filp; + afile->size = FILE_INODE(filp)->i_size; + AFS_GLOCK(); + afile->offset = 0; + afile->proc = (int (*)())0; + afile->inum = ainode; /* for hint validity checking */ + return (void *)afile; +} +#endif + +#if !defined(HAS_UFSOPEN) void * osi_UFSOpen(afs_int32 ainode) { @@ -65,6 +156,7 @@ osi_UFSOpen(afs_int32 ainode) filp->f_mapping = tip->i_mapping; #endif #if defined(AFS_LINUX24_ENV) + filp->f_mode = FMODE_READ|FMODE_WRITE; filp->f_op = fops_get(tip->i_fop); #else filp->f_op = tip->i_op->default_file_ops; @@ -80,6 +172,7 @@ osi_UFSOpen(afs_int32 ainode) afile->inum = ainode; /* for hint validity checking */ return (void *)afile; } +#endif int afs_osi_Stat(register struct osi_file *afile, register struct osi_stat *astat) @@ -87,20 +180,35 @@ afs_osi_Stat(register struct osi_file *afile, register struct osi_stat *astat) register afs_int32 code; AFS_STATCNT(osi_Stat); MObtainWriteLock(&afs_xosi, 320); - astat->size = FILE_INODE(&afile->file)->i_size; - astat->blksize = FILE_INODE(&afile->file)->i_blksize; + astat->size = OSIFILE_INODE(afile)->i_size; + astat->blksize = OSIFILE_INODE(afile)->i_blksize; #if defined(AFS_LINUX26_ENV) - astat->mtime = FILE_INODE(&afile->file)->i_mtime.tv_sec; - astat->atime = FILE_INODE(&afile->file)->i_atime.tv_sec; + astat->mtime = OSIFILE_INODE(afile)->i_mtime.tv_sec; + astat->atime = OSIFILE_INODE(afile)->i_atime.tv_sec; #else - astat->mtime = FILE_INODE(&afile->file)->i_mtime; - astat->atime = FILE_INODE(&afile->file)->i_atime; + astat->mtime = OSIFILE_INODE(afile)->i_mtime; + astat->atime = OSIFILE_INODE(afile)->i_atime; #endif code = 0; MReleaseWriteLock(&afs_xosi); return code; } +#ifdef AFS_LINUX24_ENV +int +osi_UFSClose(register struct osi_file *afile) +{ + AFS_STATCNT(osi_Close); + if (afile) { + if (OSIFILE_INODE(afile)) { + filp_close(afile->filp, NULL); + } + } + + osi_FreeLargeSpace(afile); + return 0; +} +#else int osi_UFSClose(register struct osi_file *afile) { @@ -117,6 +225,7 @@ osi_UFSClose(register struct osi_file *afile) osi_FreeLargeSpace(afile); return 0; } +#endif int osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize) @@ -124,7 +233,7 @@ osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize) register afs_int32 code; struct osi_stat tstat; struct iattr newattrs; - struct inode *inode = FILE_INODE(&afile->file); + struct inode *inode = OSIFILE_INODE(afile); AFS_STATCNT(osi_Truncate); /* This routine only shrinks files, and most systems @@ -184,14 +293,16 @@ int afs_osi_Read(register struct osi_file *afile, int offset, void *aptr, afs_int32 asize) { - size_t resid; - register afs_int32 code; + struct uio auio; + struct iovec iov; + afs_int32 code; + AFS_STATCNT(osi_Read); - /** - * If the osi_file passed in is NULL, panic only if AFS is not shutting - * down. No point in crashing when we are already shutting down - */ + /* + * If the osi_file passed in is NULL, panic only if AFS is not shutting + * down. No point in crashing when we are already shutting down + */ if (!afile) { if (!afs_shuttingdown) osi_Panic("osi_Read called with null param"); @@ -201,14 +312,15 @@ afs_osi_Read(register struct osi_file *afile, int offset, void *aptr, if (offset != -1) afile->offset = offset; + setup_uio(&auio, &iov, aptr, afile->offset, asize, UIO_READ, AFS_UIOSYS); AFS_GUNLOCK(); - code = osi_rdwr(UIO_READ, afile, (caddr_t) aptr, asize, &resid); + code = osi_rdwr(afile, &auio, UIO_READ); AFS_GLOCK(); if (code == 0) { - code = asize - resid; + code = asize - auio.uio_resid; afile->offset += code; } else { - afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, resid, + afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, auio.uio_resid, ICL_TYPE_INT32, code); code = -1; } @@ -220,22 +332,27 @@ int afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr, afs_int32 asize) { - size_t resid; - register afs_int32 code; + struct uio auio; + struct iovec iov; + afs_int32 code; + AFS_STATCNT(osi_Write); + if (!afile) { if (!afs_shuttingdown) osi_Panic("afs_osi_Write called with null param"); else return EIO; } + if (offset != -1) afile->offset = offset; + setup_uio(&auio, &iov, aptr, afile->offset, asize, UIO_WRITE, AFS_UIOSYS); AFS_GUNLOCK(); - code = osi_rdwr(UIO_WRITE, afile, (caddr_t) aptr, asize, &resid); + code = osi_rdwr(afile, &auio, UIO_WRITE); AFS_GLOCK(); if (code == 0) { - code = asize - resid; + code = asize - auio.uio_resid; afile->offset += code; } else { if (code == ENOSPC) @@ -243,9 +360,10 @@ afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr, ("\n\n\n*** Cache partition is FULL - Decrease cachesize!!! ***\n\n"); code = -1; } - if (afile->proc) { - (*afile->proc) (afile, code); - } + + if (afile->proc) + (*afile->proc)(afile, code); + return code; } diff --git a/src/afs/LINUX/osi_machdep.h b/src/afs/LINUX/osi_machdep.h index e3c8c1a16..707a467ad 100644 --- a/src/afs/LINUX/osi_machdep.h +++ b/src/afs/LINUX/osi_machdep.h @@ -179,6 +179,15 @@ typedef struct uio { /* Get/set the inode in the osifile struct. */ #define FILE_INODE(F) (F)->f_dentry->d_inode +#ifdef AFS_LINUX24_ENV +#define OSIFILE_INODE(a) FILE_INODE((a)->filp) +#else +#define OSIFILE_INODE(a) FILE_INODE(&(a)->file) +#endif + +#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV) +#define NEED_IOCTL32 +#endif /* page offset is obtained and stored here during module initialization * We need a variable to do this because, the PAGE_OFFSET macro defined in @@ -190,7 +199,7 @@ extern unsigned long afs_linux_page_offset; /* function to help with the page offset stuff */ #define afs_linux_page_address(page) (afs_linux_page_offset + PAGE_SIZE * (page - mem_map)) -#if defined(__KERNEL__) && defined(CONFIG_SMP) +#if defined(__KERNEL__) #include "../h/sched.h" #include "linux/wait.h" @@ -222,10 +231,6 @@ do { \ #define AFS_GUNLOCK() #define ISAFS_GLOCK() 1 #define AFS_ASSERT_GLOCK() -#define AFS_ASSERT_RXGLOCK() #endif -#define AFS_RXGLOCK() -#define AFS_RXGUNLOCK() -#define ISAFS_RXGLOCK() 1 #endif /* OSI_MACHDEP_H_ */ diff --git a/src/afs/LINUX/osi_misc.c b/src/afs/LINUX/osi_misc.c index 15ec3d0e3..d608380e5 100644 --- a/src/afs/LINUX/osi_misc.c +++ b/src/afs/LINUX/osi_misc.c @@ -15,7 +15,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/afs/LINUX/osi_misc.c,v 1.34.2.5 2005/03/11 06:50:41 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/LINUX/osi_misc.c,v 1.34.2.8 2005/04/28 03:11:51 shadow Exp $"); #include "afs/sysincludes.h" #include "afsincludes.h" @@ -110,12 +110,12 @@ int osi_InitCacheInfo(char *aname) { int code; - struct dentry *dp,*dpp; + struct dentry *dp; extern ino_t cacheInode; extern struct osi_dev cacheDev; extern afs_int32 afs_fsfragsize; extern struct super_block *afs_cacheSBp; - extern struct vfsmnt *afs_cacheMnt; + extern struct vfsmount *afs_cacheMnt; code = osi_lookupname_internal(aname, 1, &afs_cacheMnt, &dp); if (code) return ENOENT; @@ -135,59 +135,21 @@ osi_InitCacheInfo(char *aname) #define FOP_WRITE(F, B, C) (F)->f_op->write(F, B, (size_t)(C), &(F)->f_pos) /* osi_rdwr - * Seek, then read or write to an open inode. addrp points to data in + * seek, then read or write to an open inode. addrp points to data in * kernel space. */ int -osi_rdwr(int rw, struct osi_file *file, caddr_t addrp, size_t asize, - size_t * resid) -{ - int code = 0; - KERNEL_SPACE_DECL; - struct file *filp = &file->file; - off_t offset = file->offset; - unsigned long savelim; - - /* Seek to the desired position. Return -1 on error. */ - if (filp->f_op->llseek) { - if (filp->f_op->llseek(filp, (loff_t) offset, 0) != offset) - return -1; - } else - filp->f_pos = offset; - - savelim = current->TASK_STRUCT_RLIM[RLIMIT_FSIZE].rlim_cur; - current->TASK_STRUCT_RLIM[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY; - - /* Read/Write the data. */ - TO_USER_SPACE(); - if (rw == UIO_READ) - code = FOP_READ(filp, addrp, asize); - else if (rw == UIO_WRITE) - code = FOP_WRITE(filp, addrp, asize); - else /* all is well? */ - code = asize; - TO_KERNEL_SPACE(); - - current->TASK_STRUCT_RLIM[RLIMIT_FSIZE].rlim_cur = savelim; - - if (code >= 0) { - *resid = asize - code; - return 0; - } else - return -1; -} - -/* This variant is called from AFS read/write routines and takes a uio - * struct and, if successful, returns 0. - */ -int -osi_file_uio_rdwr(struct osi_file *osifile, uio_t * uiop, int rw) +osi_rdwr(struct osi_file *osifile, uio_t * uiop, int rw) { +#ifdef AFS_LINUX24_ENV + struct file *filp = osifile->filp; +#else struct file *filp = &osifile->file; +#endif KERNEL_SPACE_DECL; int code = 0; struct iovec *iov; - int count; + afs_size_t count; unsigned long savelim; savelim = current->TASK_STRUCT_RLIM[RLIMIT_FSIZE].rlim_cur; @@ -196,7 +158,13 @@ osi_file_uio_rdwr(struct osi_file *osifile, uio_t * uiop, int rw) if (uiop->uio_seg == AFS_UIOSYS) TO_USER_SPACE(); - filp->f_pos = uiop->uio_offset; + /* seek to the desired position. Return -1 on error. */ + if (filp->f_op->llseek) { + if (filp->f_op->llseek(filp, (loff_t) uiop->uio_offset, 0) != uiop->uio_offset) + return -1; + } else + filp->f_pos = uiop->uio_offset; + while (code == 0 && uiop->uio_resid > 0 && uiop->uio_iovcnt > 0) { iov = uiop->uio_iov; count = iov->iov_len; diff --git a/src/afs/LINUX/osi_module.c b/src/afs/LINUX/osi_module.c index 6e9c50ba9..59a139bd7 100644 --- a/src/afs/LINUX/osi_module.c +++ b/src/afs/LINUX/osi_module.c @@ -15,7 +15,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.10 2005/04/03 18:21:06 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.14 2005/04/24 23:53:44 shadow Exp $"); #include /* early to avoid printf->printk mapping */ #include "afs/sysincludes.h" @@ -50,14 +50,91 @@ int afs_global_owner = 0; unsigned long afs_linux_page_offset = 0; /* contains the PAGE_OFFSET value */ #endif - -static int afs_ioctl(struct inode *, struct file *, unsigned int, +static inline int afs_ioctl(struct inode *, struct file *, unsigned int, unsigned long); +#if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL) +static long afs_unlocked_ioctl(struct file *, unsigned int, unsigned long); +#endif static struct file_operations afs_syscall_fops = { +#ifdef HAVE_UNLOCKED_IOCTL + .unlocked_ioctl = afs_unlocked_ioctl, +#else .ioctl = afs_ioctl, +#endif +#ifdef HAVE_COMPAT_IOCTL + .compat_ioctl = afs_unlocked_ioctl, +#endif }; +int +csdbproc_info(char *buffer, char **start, off_t offset, int +length) +{ + int len = 0; + off_t pos = 0; + int cnt; + struct afs_q *cq, *tq; + struct cell *tc; + char tbuffer[16]; + /* 90 - 64 cellname, 10 for 32 bit num and index, plus + decor */ + char temp[91]; + afs_uint32 addr; + + ObtainReadLock(&afs_xcell); + + for (cq = CellLRU.next; cq != &CellLRU; cq = tq) { + tc = QTOC(cq); tq = QNext(cq); + + pos += 90; + + if (pos <= offset) { + len = 0; + } else { + sprintf(temp, ">%s #(%d/%d)\n", tc->cellName, + tc->cellNum, tc->cellIndex); + sprintf(buffer + len, "%-89s\n", temp); + len += 90; + if (pos >= offset+length) { + ReleaseReadLock(&afs_xcell); + goto done; + } + } + + for (cnt = 0; cnt < MAXCELLHOSTS; cnt++) { + if (!tc->cellHosts[cnt]) break; + pos += 90; + if (pos <= offset) { + len = 0; + } else { + addr = ntohl(tc->cellHosts[cnt]->addr->sa_ip); + sprintf(tbuffer, "%d.%d.%d.%d", + (int)((addr>>24) & 0xff), +(int)((addr>>16) & 0xff), + (int)((addr>>8) & 0xff), (int)( addr & 0xff)); + sprintf(temp, "%s #%s\n", tbuffer, tbuffer); + sprintf(buffer + len, "%-89s\n", temp); + len += 90; + if (pos >= offset+length) { + ReleaseReadLock(&afs_xcell); + goto done; + } + } + } + } + + ReleaseReadLock(&afs_xcell); + +done: + *start = buffer + len - (pos - offset); + len = pos - offset; + if (len > length) + len = length; + return len; +} + + int csdbproc_read(char *buffer, char **start, off_t offset, int count, int *eof, void *data) @@ -98,7 +175,7 @@ csdbproc_read(char *buffer, char **start, off_t offset, int count, } static struct proc_dir_entry *openafs_procfs; -#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV) +#if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL) static int ioctl32_done; #endif @@ -116,9 +193,9 @@ afsproc_init(void) entry1->owner = THIS_MODULE; - entry2 = create_proc_read_entry(PROC_CELLSERVDB_NAME, (S_IFREG|S_IRUGO), openafs_procfs, csdbproc_read, NULL); + entry2 = create_proc_info_entry(PROC_CELLSERVDB_NAME, (S_IFREG|S_IRUGO), openafs_procfs, csdbproc_info); -#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV) +#if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL) if (register_ioctl32_conversion(VIOC_SYSCALL32, NULL) == 0) ioctl32_done = 1; #endif @@ -131,7 +208,7 @@ afsproc_exit(void) remove_proc_entry(PROC_CELLSERVDB_NAME, openafs_procfs); remove_proc_entry(PROC_SYSCALL_NAME, openafs_procfs); remove_proc_entry(PROC_FSDIRNAME, proc_root_fs); -#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV) +#if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL) if (ioctl32_done) unregister_ioctl32_conversion(VIOC_SYSCALL32); #endif @@ -147,11 +224,13 @@ afs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, { struct afsprocdata sysargs; +#ifdef NEED_IOCTL32 struct afsprocdata32 sysargs32; +#endif if (cmd != VIOC_SYSCALL && cmd != VIOC_SYSCALL32) return -EINVAL; -#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV) +#ifdef NEED_IOCTL32 #ifdef AFS_SPARC64_LINUX24_ENV if (current->thread.flags & SPARC_FLAG_32BIT) #elif defined(AFS_SPARC64_LINUX20_ENV) @@ -196,6 +275,12 @@ afs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, } } +#if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL) +static long afs_unlocked_ioctl(struct file *file, unsigned int cmd, + unsigned long arg) { + return afs_ioctl(FILE_INODE(file), file, cmd, arg); +} +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) int __init diff --git a/src/afs/LINUX/osi_prototypes.h b/src/afs/LINUX/osi_prototypes.h index 117fa9c69..4265e0037 100644 --- a/src/afs/LINUX/osi_prototypes.h +++ b/src/afs/LINUX/osi_prototypes.h @@ -34,9 +34,7 @@ extern afs_rwlock_t afs_xosi; extern int osi_lookupname(char *aname, uio_seg_t seg, int followlink, struct dentry **dpp); extern int osi_InitCacheInfo(char *aname); -extern int osi_rdwr(int rw, struct osi_file *file, caddr_t addrp, - size_t asize, size_t * resid); -extern int osi_file_uio_rdwr(struct osi_file *osifile, uio_t * uiop, int rw); +extern int osi_rdwr(struct osi_file *osifile, uio_t * uiop, int rw); extern void afs_osi_SetTime(osi_timeval_t * tvp); extern void osi_linux_free_inode_pages(void); extern void check_bad_parent(struct dentry *dp); diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index c983a62a9..0ea0955c3 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -22,12 +22,11 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.81.2.13 2005/03/11 06:51:11 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.81.2.19 2005/04/25 14:55:47 shadow Exp $"); #include "afs/sysincludes.h" #include "afsincludes.h" #include "afs/afs_stats.h" -#include "afs/afs_osidnlc.h" #include "h/mm.h" #ifdef HAVE_MM_INLINE_H #include "h/mm_inline.h" @@ -426,6 +425,13 @@ out1: extern int afs_xioctl(struct inode *ip, struct file *fp, unsigned int com, unsigned long arg); +#if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL) +static long afs_unlocked_xioctl(struct file *fp, unsigned int com, + unsigned long arg) { + return afs_xioctl(FILE_INODE(fp), fp, com, arg); + +} +#endif /* We need to detect unmap's after close. To do that, we need our own * vm_operations_struct's. And we need to set them up for both the @@ -733,7 +739,14 @@ struct file_operations afs_dir_fops = { .read = generic_read_dir, #endif .readdir = afs_linux_readdir, +#ifdef HAVE_UNLOCKED_IOCTL + .unlocked_ioctl = afs_unlocked_xioctl, +#else .ioctl = afs_xioctl, +#endif +#ifdef HAVE_COMPAT_IOCTL + .compat_ioctl = afs_unlocked_xioctl, +#endif .open = afs_linux_open, .release = afs_linux_release, }; @@ -741,7 +754,14 @@ struct file_operations afs_dir_fops = { struct file_operations afs_file_fops = { .read = afs_linux_read, .write = afs_linux_write, +#ifdef HAVE_UNLOCKED_IOCTL + .unlocked_ioctl = afs_unlocked_xioctl, +#else .ioctl = afs_xioctl, +#endif +#ifdef HAVE_COMPAT_IOCTL + .compat_ioctl = afs_unlocked_xioctl, +#endif .mmap = afs_linux_mmap, .open = afs_linux_open, .flush = afs_linux_flush, @@ -844,84 +864,73 @@ static int afs_linux_dentry_revalidate(struct dentry *dp) #endif { - char *name = NULL; - cred_t *credp = crref(); + cred_t *credp = NULL; struct vrequest treq; - struct vcache *lookupvcp = NULL; - int code, bad_dentry = 1; - struct sysname_info sysState; + int code, bad_dentry; struct vcache *vcp, *parentvcp; - sysState.allocked = 0; - #ifdef AFS_LINUX24_ENV lock_kernel(); #endif AFS_GLOCK(); vcp = ITOAFS(dp->d_inode); - parentvcp = ITOAFS(dp->d_parent->d_inode); - - /* If it's a negative dentry, then there's nothing to do. */ - if (!vcp || !parentvcp) - goto done; + parentvcp = ITOAFS(dp->d_parent->d_inode); /* dget_parent()? */ - /* If it is the AFS root, then there's no chance it needs - * revalidating */ - if (vcp == afs_globalVp) { - bad_dentry = 0; + /* If it's a negative dentry, it's never valid */ + if (!vcp || !parentvcp) { + bad_dentry = 1; goto done; } - if ((code = afs_InitReq(&treq, credp))) + /* If it's @sys, perhaps it has been changed */ + if (!afs_ENameOK(dp->d_name.name)) { + bad_dentry = 10; goto done; + } - Check_AtSys(parentvcp, dp->d_name.name, &sysState, &treq); - name = sysState.name; + /* If it's the AFS root no chance it needs revalidating */ + if (vcp == afs_globalVp) + goto good_dentry; - /* First try looking up the DNLC */ - if ((lookupvcp = osi_dnlc_lookup(parentvcp, name, WRITE_LOCK))) { - /* Verify that the dentry does not point to an old inode */ - if (vcp != lookupvcp) - goto done; - /* Check and correct mvid */ - if (*name != '/' && vcp->mvstat == 2) - check_bad_parent(dp); - vcache2inode(vcp); - bad_dentry = 0; + /* Get a validated vcache entry */ + credp = crref(); + code = afs_InitReq(&treq, credp); + if (code) { + bad_dentry = 2; + goto done; + } + code = afs_VerifyVCache(vcp, &treq); + if (code) { + bad_dentry = 3; goto done; } - /* A DNLC lookup failure cannot be trusted. Try a real lookup. - Make sure to try the real name and not the @sys expansion; - afs_lookup will expand @sys itself. */ - - code = afs_lookup(parentvcp, dp->d_name.name, &lookupvcp, credp); + /* If we aren't the last looker, verify access */ + if (vcp->last_looker != treq.uid) { + if (!afs_AccessOK(vcp, (vType(vcp) == VREG) ? PRSFS_READ : PRSFS_LOOKUP, &treq, CHECK_MODE_BITS)) { + bad_dentry = 5; + goto done; + } - /* Verify that the dentry does not point to an old inode */ - if (vcp != lookupvcp) - goto done; + vcp->last_looker = treq.uid; + } + good_dentry: bad_dentry = 0; done: /* Clean up */ - if (lookupvcp) - afs_PutVCache(lookupvcp); - if (sysState.allocked) - osi_FreeLargeSpace(name); - AFS_GUNLOCK(); - if (bad_dentry) { shrink_dcache_parent(dp); d_drop(dp); } - #ifdef AFS_LINUX24_ENV unlock_kernel(); #endif - crfree(credp); + if (credp) + crfree(credp); return !bad_dentry; } @@ -931,17 +940,6 @@ afs_linux_dentry_revalidate(struct dentry *dp) static void afs_dentry_iput(struct dentry *dp, struct inode *ip) { - int isglock; - - if (ICL_SETACTIVE(afs_iclSetp)) { - isglock = ISAFS_GLOCK(); - if (!isglock) AFS_GLOCK(); - afs_Trace3(afs_iclSetp, CM_TRACE_DENTRYIPUT, ICL_TYPE_POINTER, ip, - ICL_TYPE_STRING, dp->d_parent->d_name.name, - ICL_TYPE_STRING, dp->d_name.name); - if (!isglock) AFS_GUNLOCK(); - } - osi_iput(ip); } #endif @@ -949,16 +947,6 @@ afs_dentry_iput(struct dentry *dp, struct inode *ip) static int afs_dentry_delete(struct dentry *dp) { - int isglock; - if (ICL_SETACTIVE(afs_iclSetp)) { - isglock = ISAFS_GLOCK(); - if (!isglock) AFS_GLOCK(); - afs_Trace3(afs_iclSetp, CM_TRACE_DENTRYDELETE, ICL_TYPE_POINTER, - dp->d_inode, ICL_TYPE_STRING, dp->d_parent->d_name.name, - ICL_TYPE_STRING, dp->d_name.name); - if (!isglock) AFS_GUNLOCK(); - } - if (dp->d_inode && (ITOAFS(dp->d_inode)->states & CUnlinked)) return 1; /* bad inode? */ @@ -1835,6 +1823,7 @@ struct inode_operations afs_symlink_iops = { .follow_link = page_follow_link, #else .follow_link = page_follow_link_light, + .put_link = page_put_link, #endif .setattr = afs_notify_change, #else diff --git a/src/afs/NBSD/osi_machdep.h b/src/afs/NBSD/osi_machdep.h index b0c044266..a1a3e3771 100644 --- a/src/afs/NBSD/osi_machdep.h +++ b/src/afs/NBSD/osi_machdep.h @@ -76,9 +76,6 @@ extern thread_t afs_global_owner; simple_unlock(&afs_global_lock); \ } while(0) #endif /* 0 */ -#define AFS_RXGLOCK() -#define AFS_RXGUNLOCK() -#define ISAFS_RXGLOCK() 1 #undef SPLVAR #define SPLVAR diff --git a/src/afs/OBSD/osi_machdep.h b/src/afs/OBSD/osi_machdep.h index 083799afa..7c8994c5d 100644 --- a/src/afs/OBSD/osi_machdep.h +++ b/src/afs/OBSD/osi_machdep.h @@ -16,7 +16,7 @@ * afs_osi.h. */ -/* $Id: osi_machdep.h,v 1.16.2.1 2005/03/11 06:50:43 shadow Exp $ */ +/* $Id: osi_machdep.h,v 1.16.2.4 2005/04/24 23:40:44 shadow Exp $ */ #ifndef _OSI_MACHDEP_H_ #define _OSI_MACHDEP_H_ @@ -40,16 +40,11 @@ extern struct simplelock afs_rxglobal_lock; #define v_vfsp v_mount /* vnode */ -#define SetAfsVnode(vn) /* nothing; done in getnewvnode() */ -#define IsAfsVnode(vn) ((vn)->v_op == afs_vnodeop_p) #define VN_HOLD(vp) afs_vget((vp), 0) #define VN_RELE(vp) vrele(vp) #define osi_vnhold(avc, r) afs_vget(AFSTOV(avc), 0) #define va_nodeid va_fileid #define vnode_t struct vnode -#define vSetType(vc, type) AFSTOV(vc)->v_type = (type) -#define vSetVfsp(vc, vfsp) AFSTOV(vc)->v_mount = (vfsp) -#define vType(vc) (vc)->v->v_type /* uio */ #define afsio_iov uio_iov @@ -108,11 +103,11 @@ extern void *afs_nbsd_Alloc(size_t asize); extern void afs_nbsd_Free(void *p, size_t asize); extern int afs_vget(); +#undef gop_lookupname #define gop_lookupname(fnamep, segflg, followlink, compvpp) \ afs_nbsd_lookupname((fnamep), (segflg), (followlink), (compvpp)) #ifdef KERNEL -extern int (**afs_vnodeop_p) (); #ifdef AFS_GLOBAL_SUNLOCK extern struct proc *afs_global_owner; @@ -139,9 +134,6 @@ extern struct simplelock afs_global_lock; #define AFS_ASSERT_GLOCK() #define ISAFS_GLOCK() 1 #endif -#define AFS_RXGLOCK() -#define AFS_RXGUNLOCK() -#define ISAFS_RXGLOCK() 1 #undef SPLVAR #define SPLVAR int splvar diff --git a/src/afs/SOLARIS/osi_machdep.h b/src/afs/SOLARIS/osi_machdep.h index 304d40022..e59657802 100644 --- a/src/afs/SOLARIS/osi_machdep.h +++ b/src/afs/SOLARIS/osi_machdep.h @@ -74,10 +74,6 @@ extern kmutex_t afs_rxglobal_lock; #define AFS_GLOCK() mutex_enter(&afs_global_lock); #define AFS_GUNLOCK() mutex_exit(&afs_global_lock); #define ISAFS_GLOCK() mutex_owned(&afs_global_lock) - -#define AFS_RXGLOCK() -#define AFS_RXGUNLOCK() -#define ISAFS_RXGLOCK() 1 #endif diff --git a/src/afs/UKERNEL/afs_usrops.c b/src/afs/UKERNEL/afs_usrops.c index d968eac35..38008eda6 100644 --- a/src/afs/UKERNEL/afs_usrops.c +++ b/src/afs/UKERNEL/afs_usrops.c @@ -15,7 +15,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/afs/UKERNEL/afs_usrops.c,v 1.27.2.2 2005/03/11 06:50:46 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/UKERNEL/afs_usrops.c,v 1.27.2.3 2005/04/14 02:31:42 shadow Exp $"); #ifdef UKERNEL @@ -459,16 +459,12 @@ afs_osi_Sleep(void *x) { int index; osi_wait_t *waitp; - int rxGlockOwner = ISAFS_RXGLOCK(); int glockOwner = ISAFS_GLOCK(); usr_mutex_lock(&osi_waitq_lock); if (glockOwner) { AFS_GUNLOCK(); } - if (rxGlockOwner) { - AFS_RXGUNLOCK(); - } index = WAITHASH(x); if (osi_waithash_avail == NULL) { waitp = (osi_wait_t *) afs_osi_Alloc(sizeof(osi_wait_t)); @@ -495,9 +491,6 @@ afs_osi_Sleep(void *x) if (glockOwner) { AFS_GLOCK(); } - if (rxGlockOwner) { - AFS_RXGLOCK(); - } } int @@ -533,7 +526,6 @@ afs_osi_Wait(afs_int32 msec, struct afs_osi_WaitHandle *handle, int intok) osi_wait_t *waitp; struct timespec tv; int ret; - int rxGlockOwner = ISAFS_RXGLOCK(); int glockOwner = ISAFS_GLOCK(); tv.tv_sec = msec / 1000; @@ -542,25 +534,16 @@ afs_osi_Wait(afs_int32 msec, struct afs_osi_WaitHandle *handle, int intok) if (glockOwner) { AFS_GUNLOCK(); } - if (rxGlockOwner) { - AFS_RXGUNLOCK(); - } usr_thread_sleep(&tv); ret = 0; if (glockOwner) { AFS_GLOCK(); } - if (rxGlockOwner) { - AFS_RXGLOCK(); - } } else { usr_mutex_lock(&osi_waitq_lock); if (glockOwner) { AFS_GUNLOCK(); } - if (rxGlockOwner) { - AFS_RXGUNLOCK(); - } index = WAITHASH((caddr_t) handle); if (osi_waithash_avail == NULL) { waitp = (osi_wait_t *) afs_osi_Alloc(sizeof(osi_wait_t)); @@ -593,9 +576,6 @@ afs_osi_Wait(afs_int32 msec, struct afs_osi_WaitHandle *handle, int intok) if (glockOwner) { AFS_GLOCK(); } - if (rxGlockOwner) { - AFS_RXGLOCK(); - } } return ret; } diff --git a/src/afs/VNOPS/afs_vnop_lookup.c b/src/afs/VNOPS/afs_vnop_lookup.c index 6b97c8f3f..a1a104fd2 100644 --- a/src/afs/VNOPS/afs_vnop_lookup.c +++ b/src/afs/VNOPS/afs_vnop_lookup.c @@ -18,7 +18,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_lookup.c,v 1.50.2.7 2005/03/26 07:11:37 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_lookup.c,v 1.50.2.8 2005/04/24 14:03:24 shadow Exp $"); #include "afs/sysincludes.h" /* Standard vendor system headers */ #include "afsincludes.h" /* Afs-based standard headers */ @@ -1198,7 +1198,7 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, struct AFS_UCRED /* Check for read access as well. We need read access in order to * stat files, but not to stat subdirectories. */ - if (!afs_AccessOK(adp, PRSFS_LOOKUP, &treq, CHECK_MODE_BITS)) + if (!afs_AccessOK(adp, PRSFS_READ, &treq, CHECK_MODE_BITS)) no_read_access = 1; /* special case lookup of ".". Can we check for it sooner in this code, diff --git a/src/afs/VNOPS/afs_vnop_read.c b/src/afs/VNOPS/afs_vnop_read.c index 94019bcd9..c7f867b6b 100644 --- a/src/afs/VNOPS/afs_vnop_read.c +++ b/src/afs/VNOPS/afs_vnop_read.c @@ -19,7 +19,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_read.c,v 1.26.2.1 2005/04/03 18:15:39 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_read.c,v 1.26.2.2 2005/04/24 20:11:15 shadow Exp $"); #include "afs/sysincludes.h" /* Standard vendor system headers */ #include "afsincludes.h" /* Afs-based standard headers */ @@ -788,7 +788,7 @@ afs_UFSRead(register struct vcache *avc, struct uio *auio, AFS_GLOCK(); #elif defined(AFS_LINUX20_ENV) AFS_GUNLOCK(); - code = osi_file_uio_rdwr(tfile, &tuio, UIO_READ); + code = osi_rdwr(tfile, &tuio, UIO_READ); AFS_GLOCK(); #elif defined(AFS_DARWIN_ENV) AFS_GUNLOCK(); diff --git a/src/afs/VNOPS/afs_vnop_strategy.c b/src/afs/VNOPS/afs_vnop_strategy.c index 69af60084..0b9109a0e 100644 --- a/src/afs/VNOPS/afs_vnop_strategy.c +++ b/src/afs/VNOPS/afs_vnop_strategy.c @@ -16,7 +16,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_strategy.c,v 1.18.2.1 2005/04/03 18:15:40 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_strategy.c,v 1.18.2.2 2005/04/24 00:58:06 shadow Exp $"); #if !defined(AFS_HPUX_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_LINUX20_ENV) @@ -186,14 +186,20 @@ afs_ustrategy(abp) code = afs_rdwr(VTOAFS(abp->b_vp), &tuio, UIO_WRITE, 0, credp); #endif } -#if !defined(AFS_AIX32_ENV) && !defined(AFS_SUN5_ENV) -#if defined(AFS_DUX40_ENV) || (defined (AFS_XBSD_ENV) && !defined (AFS_FBSD50_ENV)) + +#if defined(AFS_DUX40_ENV) || defined (AFS_XBSD_ENV) if (code) { abp->b_error = code; +#if !defined(AFS_FBSD50_ENV) abp->b_flags |= B_ERROR; +#endif } +#endif + +#if defined(AFS_AIX32_ENV) + crfree(credp); +#elif defined(AFS_DUX40_ENV) biodone(abp); -#if defined(AFS_DUX40_ENV) if (code && !(abp->b_flags & B_READ)) { /* prevent ubc from retrying writes */ AFS_GUNLOCK(); @@ -201,16 +207,16 @@ afs_ustrategy(abp) (vm_offset_t) dbtob(abp->b_blkno), PAGE_SIZE, B_INVAL); AFS_GLOCK(); } -#endif +#elif defined(AFS_FBSD60_ENV) + (*abp->b_iodone)(abp); #elif defined(AFS_FBSD50_ENV) biodone(&abp->b_io); -#else /* AFS_DUX40_ENV */ +#elif defined(AFS_XBSD_ENV) + biodone(abp); +#elif !defined(AFS_SUN5_ENV) iodone(abp); -#endif /* AFS_DUX40_ENV */ -#endif -#ifdef AFS_AIX32_ENV - crfree(credp); #endif + afs_Trace3(afs_iclSetp, CM_TRACE_STRATEGYDONE, ICL_TYPE_POINTER, tvc, ICL_TYPE_INT32, code, ICL_TYPE_LONG, tuio.afsio_resid); return code; diff --git a/src/afs/VNOPS/afs_vnop_write.c b/src/afs/VNOPS/afs_vnop_write.c index 424402b75..a8dd88c13 100644 --- a/src/afs/VNOPS/afs_vnop_write.c +++ b/src/afs/VNOPS/afs_vnop_write.c @@ -21,7 +21,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_write.c,v 1.36.2.4 2005/04/03 18:15:40 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_write.c,v 1.36.2.5 2005/04/24 20:11:15 shadow Exp $"); #include "afs/sysincludes.h" /* Standard vendor system headers */ #include "afsincludes.h" /* Afs-based standard headers */ @@ -560,7 +560,7 @@ afs_UFSWrite(register struct vcache *avc, struct uio *auio, int aio, } #elif defined(AFS_LINUX20_ENV) AFS_GUNLOCK(); - code = osi_file_uio_rdwr(tfile, &tuio, UIO_WRITE); + code = osi_rdwr(tfile, &tuio, UIO_WRITE); AFS_GLOCK(); #elif defined(AFS_DARWIN_ENV) AFS_GUNLOCK(); diff --git a/src/afs/afs_cell.c b/src/afs/afs_cell.c index 3a783bfeb..b1c857c56 100644 --- a/src/afs/afs_cell.c +++ b/src/afs/afs_cell.c @@ -14,7 +14,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/afs/afs_cell.c,v 1.30 2004/05/08 04:22:19 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/afs_cell.c,v 1.30.2.1 2005/04/06 05:09:09 shadow Exp $"); #include "afs/stds.h" #include "afs/sysincludes.h" /* Standard vendor system headers */ @@ -819,6 +819,7 @@ afs_CellInit() { RWLOCK_INIT(&afs_xcell, "afs_xcell"); #ifdef AFS_AFSDB_ENV + RWLOCK_INIT(&afsdb_client_lock, "afsdb_client_lock"); RWLOCK_INIT(&afsdb_req.lock, "afsdb_req.lock"); #endif QInit(&CellLRU); diff --git a/src/afs/afs_osi.h b/src/afs/afs_osi.h index 62c14baaf..8299fec7e 100644 --- a/src/afs/afs_osi.h +++ b/src/afs/afs_osi.h @@ -48,12 +48,16 @@ struct osi_stat { struct osi_file { afs_int32 size; /* file size in bytes XXX Must be first field XXX */ +#ifdef AFS_LINUX24_ENV + struct file *filp; /* May need this if we really open the file. */ +#else #ifdef AFS_LINUX22_ENV struct dentry dentry; /* merely to hold the pointer to the inode. */ struct file file; /* May need this if we really open the file. */ #else struct vnode *vnode; #endif +#endif #if defined(AFS_HPUX102_ENV) k_off_t offset; #else @@ -119,7 +123,7 @@ struct afs_osi_WaitHandle { /* * Vnode related macros */ -#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) +#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) #define vSetVfsp(vc, vfsp) AFSTOV(vc)->v_mount = (vfsp) #define vSetType(vc, type) AFSTOV(vc)->v_type = (type) #define vType(vc) AFSTOV(vc)->v_type @@ -129,16 +133,14 @@ struct afs_osi_WaitHandle { #define vSetVfsp(vc,vfsp) (vc)->v.v_vfsp = (vfsp) #endif -#ifndef AFS_OBSD_ENV -#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) +#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) extern int (**afs_vnodeop_p) (); -#define IsAfsVnode(vc) ((vc)->v_op == afs_vnodeop_p) -#define SetAfsVnode(vc) (vc)->v_op = afs_vnodeop_p +#define IsAfsVnode(v) ((v)->v_op == afs_vnodeop_p) +#define SetAfsVnode(v) /* nothing; done in getnewvnode() */ #else extern struct vnodeops *afs_ops; -#define IsAfsVnode(vc) ((vc)->v_op == afs_ops) -#define SetAfsVnode(vc) (vc)->v_op = afs_ops -#endif +#define IsAfsVnode(v) ((v)->v_op == afs_ops) +#define SetAfsVnode(v) (v)->v_op = afs_ops #endif #ifdef AFS_SGI65_ENV @@ -146,11 +148,9 @@ extern struct vnodeops *afs_ops; lookupname((fnamep),(segflg),(followlink),NULL,(compvpp),\ NULL) #else -#ifndef AFS_OBSD_ENV #define gop_lookupname(fnamep,segflg,followlink,compvpp) \ lookupname((fnamep),(segflg),(followlink),NULL,(compvpp)) #endif -#endif /* * In IRIX 6.5 we cannot have DEBUG turned on since certain @@ -208,8 +208,6 @@ typedef struct timeval osi_timeval_t; #ifdef AFS_GLOBAL_SUNLOCK #define AFS_ASSERT_GLOCK() \ (ISAFS_GLOCK() || (osi_Panic("afs global lock not held at %s:%d\n", __FILE__, __LINE__), 0)) -#define AFS_ASSERT_RXGLOCK() \ - (ISAFS_RXGLOCK() || (osi_Panic("rx global lock not held at %s:%d\n", __FILE__, __LINE__), 0)) #endif /* AFS_GLOBAL_SUNLOCK */ #ifdef RX_ENABLE_LOCKS @@ -227,10 +225,6 @@ typedef struct timeval osi_timeval_t; #define AFS_GUNLOCK() #define ISAFS_GLOCK() 1 #define AFS_ASSERT_GLOCK() -#define AFS_RXGLOCK() -#define AFS_RXGUNLOCK() -#define ISAFS_RXGLOCK() 1 -#define AFS_ASSERT_RXGLOCK() #endif /* On an MP that uses multithreading, splnet is not sufficient to provide diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 2aa55c7a4..26ab90b76 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -11,7 +11,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.81.2.12 2005/04/04 04:01:14 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.81.2.13 2005/04/24 20:12:39 shadow Exp $"); #include "afs/sysincludes.h" /* Standard vendor system headers */ #ifdef AFS_OBSD_ENV @@ -195,7 +195,7 @@ static int (*(CpioctlSw[])) () = { #define PSetClientContext 99 /* Special pioctl to setup caller's creds */ int afs_nobody = NFS_NOBODY; -#if (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) || defined(AFS_HPUX_64BIT_ENV) || defined(AFS_SUN57_64BIT_ENV) || (defined(AFS_SGI_ENV) && (_MIPS_SZLONG==64)) || (defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV)) +#if (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) || defined(AFS_HPUX_64BIT_ENV) || defined(AFS_SUN57_64BIT_ENV) || (defined(AFS_SGI_ENV) && (_MIPS_SZLONG==64)) || defined(NEED_IOCTL32) static void afs_ioctl32_to_afs_ioctl(const struct afs_ioctl32 *src, struct afs_ioctl *dst) { @@ -603,8 +603,7 @@ afs_xioctl(void) AFS_GLOCK(); datap = (struct afs_ioctl *)osi_AllocSmallSpace(AFS_SMALLOCSIZ); - AFS_COPYIN((char *)uap->arg, (caddr_t) datap, - sizeof(struct afs_ioctl), code); + code=copyin_afs_ioctl((char *)uap->arg, datap); if (code) { osi_FreeSmallSpace(datap); AFS_GUNLOCK(); diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h index 0fcbabe8b..96f17b914 100644 --- a/src/afs/afs_prototypes.h +++ b/src/afs/afs_prototypes.h @@ -540,9 +540,7 @@ extern void afs_osi_SetTime(osi_timeval_t * atv); extern int osi_lookupname(char *aname, uio_seg_t seg, int followlink, struct dentry **dpp); extern int osi_InitCacheInfo(char *aname); -extern int osi_rdwr(int rw, struct osi_file *file, caddr_t addrp, - size_t asize, size_t * resid); -extern int osi_file_uio_rdwr(struct osi_file *osifile, uio_t * uiop, int rw); +extern int osi_rdwr(struct osi_file *osifile, uio_t * uiop, int rw); extern void setup_uio(uio_t * uiop, struct iovec *iovecp, const char *buf, afs_offs_t pos, int count, uio_flag_t flag, uio_seg_t seg); diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index 63f7eca27..5f666accd 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -39,7 +39,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/afs/afs_vcache.c,v 1.65.2.15 2005/04/04 04:01:14 shadow Exp $"); + ("$Header: /cvs/openafs/src/afs/afs_vcache.c,v 1.65.2.18 2005/04/24 00:58:04 shadow Exp $"); #include "afs/sysincludes.h" /*Standard vendor system headers */ #include "afsincludes.h" /*AFS-based standard headers */ @@ -814,7 +814,9 @@ restart: struct vnode *vp; AFS_GUNLOCK(); -#ifdef AFS_FBSD50_ENV +#if defined(AFS_FBSD60_ENV) + if (getnewvnode(MOUNT_AFS, afs_globalVFS, &afs_vnodeops, &vp)) +#elif defined(AFS_FBSD50_ENV) if (getnewvnode(MOUNT_AFS, afs_globalVFS, afs_vnodeop_p, &vp)) #else if (getnewvnode(VT_AFS, afs_globalVFS, afs_vnodeop_p, &vp)) @@ -933,9 +935,13 @@ restart: #ifdef STRUCT_INODE_HAS_I_SB_LIST list_add(&ip->i_sb_list, &ip->i_sb->s_inodes); #endif -#ifdef STRUCT_INODE_HAS_INOTIFY_LOCK +#if defined(STRUCT_INODE_HAS_INOTIFY_LOCK) || defined(STRUCT_INODE_HAS_INOTIFY_SEM) INIT_LIST_HEAD(&ip->inotify_watches); +#if defined(STRUCT_INODE_HAS_INOTIFY_SEM) + sema_init(&ip->inotify_sem, 1); +#else spin_lock_init(&ip->inotify_lock); +#endif #endif } #endif @@ -1703,11 +1709,6 @@ afs_GetVCache(register struct VenusFid *afid, struct vrequest *areq, return tvc; } #endif /* AFS_OSF_ENV */ -#ifdef AFS_OBSD_ENV - VOP_LOCK(AFSTOV(tvc), LK_EXCLUSIVE | LK_RETRY, curproc); - uvm_vnp_uncache(AFSTOV(tvc)); - VOP_UNLOCK(AFSTOV(tvc), 0, curproc); -#endif #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) /* * XXX - I really don't like this. Should try to understand better. @@ -1721,19 +1722,10 @@ afs_GetVCache(register struct VenusFid *afid, struct vrequest *areq, * to vinvalbuf; otherwise, we leave it alone. */ { - struct vnode *vp; + struct vnode *vp = AFSTOV(tvc); int iheldthelock; - vp = AFSTOV(tvc); -#ifdef AFS_FBSD50_ENV - iheldthelock = VOP_ISLOCKED(vp, curthread); - if (!iheldthelock) - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curthread); - vinvalbuf(vp, V_SAVE, osi_curcred(), curthread, PINOD, 0); - if (!iheldthelock) - VOP_UNLOCK(vp, LK_EXCLUSIVE, curthread); -#else -#ifdef AFS_DARWIN_ENV +#if defined(AFS_DARWIN_ENV) iheldthelock = VOP_ISLOCKED(vp); if (!iheldthelock) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, current_proc()); @@ -1747,14 +1739,34 @@ afs_GetVCache(register struct VenusFid *afid, struct vrequest *areq, ObtainWriteLock(&tvc->lock, 954); if (!iheldthelock) VOP_UNLOCK(vp, LK_EXCLUSIVE, current_proc()); -#else +#elif defined(AFS_FBSD60_ENV) + iheldthelock = VOP_ISLOCKED(vp, curthread); + if (!iheldthelock) + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curthread); + vinvalbuf(vp, V_SAVE, curthread, PINOD, 0); + if (!iheldthelock) + VOP_UNLOCK(vp, LK_EXCLUSIVE, curthread); +#elif defined(AFS_FBSD50_ENV) + iheldthelock = VOP_ISLOCKED(vp, curthread); + if (!iheldthelock) + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curthread); + vinvalbuf(vp, V_SAVE, osi_curcred(), curthread, PINOD, 0); + if (!iheldthelock) + VOP_UNLOCK(vp, LK_EXCLUSIVE, curthread); +#elif defined(AFS_FBSD40_ENV) iheldthelock = VOP_ISLOCKED(vp, curproc); if (!iheldthelock) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curproc); vinvalbuf(vp, V_SAVE, osi_curcred(), curproc, PINOD, 0); if (!iheldthelock) VOP_UNLOCK(vp, LK_EXCLUSIVE, curproc); -#endif +#elif defined(AFS_OBSD_ENV) + iheldthelock = VOP_ISLOCKED(vp, curproc); + if (!iheldthelock) + VOP_LOCK(vp, LK_EXCLUSIVE | LK_RETRY, curproc); + uvm_vnp_uncache(vp); + if (!iheldthelock) + VOP_UNLOCK(vp, 0, curproc); #endif } #endif diff --git a/src/afs/lock.h b/src/afs/lock.h index 4b449d7e1..a5d8253d7 100644 --- a/src/afs/lock.h +++ b/src/afs/lock.h @@ -59,10 +59,6 @@ typedef struct afs_bozoLock afs_bozoLock_t; #undef MObtainWriteLock /* Defined also in ../rx/rx_machdep.h" */ #undef MReleaseWriteLock -#ifndef RXObtainWriteLock -#define RXObtainWriteLock(lock) ObtainWriteLock(lock) -#define RXReleaseWriteLock(lock) ReleaseWriteLock(lock) -#endif #define MObtainReadLock(lock) ObtainReadLock(lock) #define MObtainWriteLock(lock,src) ObtainWriteLock(lock,src) #define MObtainSharedLock(lock,src) ObtainSharedLock(lock,src) diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c index 4a707d70c..92f5605dc 100644 --- a/src/afsd/afsd.c +++ b/src/afsd/afsd.c @@ -57,7 +57,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.43.2.5 2005/04/03 18:15:41 shadow Exp $"); + ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.43.2.7 2005/04/24 14:28:40 shadow Exp $"); #define VFS 1 @@ -333,8 +333,7 @@ static int HandleMTab(); * Sets globals. *---------------------------------------------------------------------------*/ -int -ParseCacheInfoFile() +int ParseCacheInfoFile(void) { static char rn[] = "ParseCacheInfoFile"; /*This routine's name */ FILE *cachefd; /*Descriptor for cache info file */ @@ -396,8 +395,9 @@ ParseCacheInfoFile() ("\tcacheMountDir: '%s'\n\tcacheBaseDir: '%s'\n\tcacheBlocks: %d\n", tmd, tbd, tCacheBlocks); } - if (!(cacheFlags & AFSCALL_INIT_MEMCACHE)) - PartSizeOverflow(tbd, cacheBlocks); + if (!(cacheFlags & AFSCALL_INIT_MEMCACHE)) { + return(PartSizeOverflow(tbd, cacheBlocks)); + } return (0); } @@ -407,10 +407,12 @@ ParseCacheInfoFile() * isn't a mounted partition it's also ignored since we can't guarantee * what will be stored afterwards. Too many if's. This is now purely * advisory. ODS with over 2G partition also gives warning message. + * + * Returns: + * 0 if everything went well, + * 1 otherwise. */ -PartSizeOverflow(path, cs) - char *path; - int cs; +int PartSizeOverflow(char *path, int cs) { int bsize = -1, totalblks, mint; #if AFS_HAVE_STATVFS @@ -425,7 +427,15 @@ PartSizeOverflow(path, cs) } totalblks = statbuf.f_blocks; bsize = statbuf.f_frsize; -#else +#if AFS_AIX51_ENV + if(strcmp(statbuf.f_basetype, "jfs")) { + fprintf(stderr, "Cache filesystem '%s' must be jfs (now %s)\n", + path, statbuf.f_basetype); + return 1; + } +#endif /* AFS_AIX51_ENV */ + +#else /* AFS_HAVE_STATVFS */ struct statfs statbuf; if (statfs(path, &statbuf) < 0) { @@ -453,7 +463,10 @@ PartSizeOverflow(path, cs) printf ("Cache size (%d) must be less than 95%% of partition size (which is %d). Lower cache size\n", cs, mint); + return 1; } + + return 0; } /*----------------------------------------------------------------------------- @@ -1761,6 +1774,14 @@ mainproc(as, arock) printf("%s: Forking AFSDB lookup handler.\n", rn); code = fork(); if (code == 0) { + /* Since the AFSDB lookup handler runs as a user process, + * need to drop the controlling TTY, etc. + */ + if (daemon(0, 0) == -1) { + printf("Error starting AFSDB lookup handler: %s\n", + strerror(errno)); + exit(1); + } AfsdbLookupHandler(); exit(1); } diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c index 6eedec377..530f8e3e2 100644 --- a/src/bozo/bosserver.c +++ b/src/bozo/bosserver.c @@ -11,7 +11,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/bozo/bosserver.c,v 1.23 2003/12/07 22:49:18 jaltman Exp $"); + ("$Header: /cvs/openafs/src/bozo/bosserver.c,v 1.23.2.3 2005/04/27 01:37:04 shadow Exp $"); #include #include @@ -580,6 +580,7 @@ tweak_config() } #endif +#if 0 /* * This routine causes the calling process to go into the background and * to lose its controlling tty. @@ -701,6 +702,7 @@ background(void) } } #endif /* ! AFS_NT40_ENV */ +#endif /* start a process and monitor it */ @@ -718,6 +720,7 @@ main(int argc, char **argv, char **envp) char namebuf[AFSDIR_PATH_MAX]; #ifndef AFS_NT40_ENV int nofork = 0; + struct stat sb; #endif #ifdef AFS_AIX32_ENV struct sigaction nsa; @@ -856,14 +859,21 @@ main(int argc, char **argv, char **envp) fflush(stdout); #endif - /* go into the background and remove our controlling tty */ + /* go into the background and remove our controlling tty, close open + file desriptors + */ #ifndef AFS_NT40_ENV if (!nofork) - background(); + daemon(1, 0); #endif /* ! AFS_NT40_ENV */ - if (!DoSyslog) { + if ((!DoSyslog) +#ifndef AFS_NT40_ENV + && (!(fstat(AFSDIR_BOZLOG_FILE, &sb) == 0) && + (S_ISFIFO(sb.st_mode))) +#endif + ) { strcpy(namebuf, AFSDIR_BOZLOG_FILE); strcat(namebuf, ".old"); renamefile(AFSDIR_BOZLOG_FILE, namebuf); /* try rename first */ diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 index fa80d54c5..ffb96e42b 100644 --- a/src/cf/linux-test4.m4 +++ b/src/cf/linux-test4.m4 @@ -251,6 +251,21 @@ ac_cv_linux_fs_struct_inode_has_inotify_lock=no)]) AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_inotify_lock) CPPFLAGS="$save_CPPFLAGS"]) +AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_INOTIFY_SEM], [ +AC_MSG_CHECKING(for inotify_sem in struct inode) +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS" +AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_inotify_sem, +[ +AC_TRY_COMPILE( +[#include ], +[struct inode _inode; +printf("%x\n", _inode.inotify_sem);], +ac_cv_linux_fs_struct_inode_has_inotify_sem=yes, +ac_cv_linux_fs_struct_inode_has_inotify_sem=no)]) +AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_inotify_sem) +CPPFLAGS="$save_CPPFLAGS"]) + AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD], [ AC_MSG_CHECKING(for i_mapping_overload in struct inode) diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index 6c3524f3e..37fe13395 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -433,6 +433,19 @@ case $AFS_SYSNAME in EXTRA_VLIBOBJS="fstab.o" ;; + ppc_darwin_80) + AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration" + LEX="lex -l" + MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}' + KROOT= + KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers' + LWP_OPTMZ="-O2" + REGEX_OBJ="regex.o" + XCFLAGS="-no-cpp-precomp" + TXLIBS="-lncurses" + EXTRA_VLIBOBJS="fstab.o" + ;; + ppc_linux*) KERN_OPTMZ=-O2 LEX="flex -l" @@ -491,6 +504,22 @@ case $AFS_SYSNAME in SHLIB_LINKER="${MT_CC} -bM:SRE -berok" AIX64="" ;; + + rs_aix53) + DBG="-g" + LEX="lex" + LIBSYS_AIX_EXP="afsl.exp" + MT_CC="xlc_r" + MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}' + MT_LIBS="-lpthreads" + SHLIB_SUFFIX="o" + TXLIBS="-lcurses" + XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void" + XLIBS="${LIB_AFSDB} -ldl" + SHLIB_LINKER="${MT_CC} -bM:SRE -berok" + AIX64="" + ;; + s390_linux22) CC="gcc" CCOBJ="gcc" @@ -535,7 +564,7 @@ case $AFS_SYSNAME in MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}' MT_LIBS="-lpthread" PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC" - SHLIB_LDFLAGS="-shared -Xlinker -x" + SHLIB_LDFLAGS="-shared -Xlinker -x -Xlinker -Bsymbolic" TXLIBS="-lncurses" XCFLAGS="-O -g -D_LARGEFILE64_SOURCE -D__s390x__" YACC="bison -y" diff --git a/src/comerr/.cvsignore b/src/comerr/.cvsignore index 4f1416859..8f618b14d 100644 --- a/src/comerr/.cvsignore +++ b/src/comerr/.cvsignore @@ -2,3 +2,4 @@ AFS_component_version_number.c Makefile compile_et et_lex.lex.c +y.tab.h diff --git a/src/config/NTMakefile.amd64_w2k b/src/config/NTMakefile.amd64_w2k index e4516385d..6158b2b8c 100644 --- a/src/config/NTMakefile.amd64_w2k +++ b/src/config/NTMakefile.amd64_w2k @@ -80,7 +80,7 @@ LIB = $(AFSDEV_LIB) #define used in WinNT/2000 installation and program version display AFSPRODUCT_VER_MAJOR=1 AFSPRODUCT_VER_MINOR=3 -AFSPRODUCT_VER_PATCH=8100 +AFSPRODUCT_VER_PATCH=8200 AFSPRODUCT_VER_BUILD=0 # For MSI installer, each major release should have a different GUID diff --git a/src/config/NTMakefile.i386_nt40 b/src/config/NTMakefile.i386_nt40 index c13fe971a..ef428d292 100644 --- a/src/config/NTMakefile.i386_nt40 +++ b/src/config/NTMakefile.i386_nt40 @@ -80,7 +80,7 @@ LIB = $(AFSDEV_LIB) #define used in WinNT/2000 installation and program version display AFSPRODUCT_VER_MAJOR=1 AFSPRODUCT_VER_MINOR=3 -AFSPRODUCT_VER_PATCH=8100 +AFSPRODUCT_VER_PATCH=8200 AFSPRODUCT_VER_BUILD=0 # For MSI installer, each major release should have a different GUID diff --git a/src/config/NTMakefile.i386_w2k b/src/config/NTMakefile.i386_w2k index c13fe971a..ef428d292 100644 --- a/src/config/NTMakefile.i386_w2k +++ b/src/config/NTMakefile.i386_w2k @@ -80,7 +80,7 @@ LIB = $(AFSDEV_LIB) #define used in WinNT/2000 installation and program version display AFSPRODUCT_VER_MAJOR=1 AFSPRODUCT_VER_MINOR=3 -AFSPRODUCT_VER_PATCH=8100 +AFSPRODUCT_VER_PATCH=8200 AFSPRODUCT_VER_BUILD=0 # For MSI installer, each major release should have a different GUID diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h index 54ec3f529..1854b2316 100644 --- a/src/config/afs_sysnames.h +++ b/src/config/afs_sysnames.h @@ -48,6 +48,7 @@ #define SYS_NAME_ID_hp_ux11i 416 #define SYS_NAME_ID_ia64_hpux1122 417 #define SYS_NAME_ID_ia64_hpux1123 418 +#define SYS_NAME_ID_hp_ux1123 419 #define SYS_NAME_ID_mac2_51 500 #define SYS_NAME_ID_mac_aux10 501 @@ -67,6 +68,7 @@ #define SYS_NAME_ID_rs_aix51 704 #define SYS_NAME_ID_rs_aix43 705 #define SYS_NAME_ID_rs_aix52 706 +#define SYS_NAME_ID_rs_aix53 707 #define SYS_NAME_ID_sun3_411 906 #define SYS_NAME_ID_sun3x_411 912 @@ -172,6 +174,7 @@ #define SYS_NAME_ID_i386_fbsd_51 2106 #define SYS_NAME_ID_i386_fbsd_52 2107 #define SYS_NAME_ID_i386_fbsd_53 2108 +#define SYS_NAME_ID_i386_fbsd_60 2112 #define SYS_NAME_ID_ia64_linux2 2200 #define SYS_NAME_ID_ia64_linux22 2201 diff --git a/src/config/afsconfig.h.in b/src/config/afsconfig.h.in index b8aea0ccc..6d07f36e0 100644 --- a/src/config/afsconfig.h.in +++ b/src/config/afsconfig.h.in @@ -41,6 +41,9 @@ /* Define if you have the connect function. */ #undef HAVE_CONNECT +/* Define if you have the daemon function. */ +#undef HAVE_DAEMON + /* Define if you have the getdtablesize function. */ #undef HAVE_GETDTABLESIZE @@ -311,6 +314,9 @@ /* define if your struct inode has inotify_lock */ #undef STRUCT_INODE_HAS_INOTIFY_LOCK +/* define if your struct inode has inotify_sem */ +#undef STRUCT_INODE_HAS_INOTIFY_SEM + /* define if your recalc_sigpending takes void */ #undef RECALC_SIGPENDING_TAKES_VOID diff --git a/src/config/param.alpha_linux_22.h b/src/config/param.alpha_linux_22.h index 3e7f7c442..481632526 100644 --- a/src/config/param.alpha_linux_22.h +++ b/src/config/param.alpha_linux_22.h @@ -42,8 +42,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS #include @@ -63,6 +63,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.alpha_linux_24.h b/src/config/param.alpha_linux_24.h index 0a6429b84..b91fec87e 100644 --- a/src/config/param.alpha_linux_24.h +++ b/src/config/param.alpha_linux_24.h @@ -44,8 +44,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS #include @@ -65,6 +65,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.alpha_linux_26.h b/src/config/param.alpha_linux_26.h index 8bbcff38b..df179cbe6 100644 --- a/src/config/param.alpha_linux_26.h +++ b/src/config/param.alpha_linux_26.h @@ -54,8 +54,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #endif /* __KERNEL__ && !DUMP_KERNEL */ #include @@ -67,6 +67,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.amd64_linux24.h b/src/config/param.amd64_linux24.h index 16e5a9c96..0778af09e 100644 --- a/src/config/param.amd64_linux24.h +++ b/src/config/param.amd64_linux24.h @@ -55,8 +55,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -78,6 +78,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.amd64_linux26.h b/src/config/param.amd64_linux26.h index ca6b125e8..79e846a29 100644 --- a/src/config/param.amd64_linux26.h +++ b/src/config/param.amd64_linux26.h @@ -49,8 +49,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #endif /* __KERNEL__ && !DUMP_KERNEL */ @@ -63,6 +63,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.hp_ux1123.h b/src/config/param.hp_ux1123.h new file mode 100644 index 000000000..73c0d68d2 --- /dev/null +++ b/src/config/param.hp_ux1123.h @@ -0,0 +1,102 @@ +/* + * Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ + +/* THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define AFS_HPUX_ENV 1 +#define AFS_HPUX90_ENV 1 +#define AFS_HPUX100_ENV 1 +#define AFS_HPUX101_ENV 1 +#define AFS_HPUX102_ENV 1 +#define AFS_HPUX110_ENV 1 +#define AFS_HPUX1111_ENV 1 +#define AFS_HPUX1122_ENV 1 +#define AFS_HPUX1123_ENV 1 + +#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ +#define AFS_64BIT_CLIENT 1 +#if defined(__LP64__) +#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */ +#endif + +#include + +#define AFS_SYSCALL 48 /* slot reserved for AFS */ + +/* Machine / Operating system information */ +#define SYS_NAME "hp_ux1123" +#define SYS_NAME_ID SYS_NAME_ID_hp_ux1123 +#define AFSBIG_ENDIAN 1 +#define AFS_HAVE_FFS 1 +#define AFS_HAVE_STATVFS 1 /* System supports statvfs */ +#define AFS_GLOBAL_SUNLOCK 1 +#define RXK_LISTENER_ENV 1 +#define AFS_USERSPACE_IP_ADDR 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ +#define AFS_USE_VOID_PTR 1 +/* + * #define AFS_VM_RDWR_ENV 1 + */ +#define AFS_TEXT_ENV 1 /* Older kernels use TEXT */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ +#define NEARINODE_HINT 1 /* hint to ufs module to scatter inodes on disk*/ +#define nearInodeHash(volid, hval) { \ + unsigned char* ts = (unsigned char*)&(volid)+sizeof(volid)-1;\ + for ( (hval)=0; ts >= (unsigned char*)&(volid); ts--){\ + (hval) *= 173; \ + (hval) += *ts; \ + } \ + } + +/* Extra kernel definitions (from kdefs file) */ +#ifdef KERNEL +#define _KERNEL 1 +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_seg +#define afsio_resid uio_resid +#define AFS_UIOSYS UIOSEG_KERNEL +#define AFS_UIOUSER UIOSEG_USER +#define AFS_CLBYTES CLBYTES +#define AFS_MINCHANGE 2 +#define osi_GetTime(x) do { struct timeval osi_GetTimeVar; uniqtime(&osi_GetTimeVar); (x)->tv_sec = osi_GetTimeVar.tv_sec; (x)->tv_usec = osi_GetTimeVar.tv_usec; } while(0) +#define AFS_KALLOC kmem_alloc +#define AFS_KFREE kmem_free +#define VATTR_NULL vattr_null + +#if defined(__LP64__) +#define AFS_HPUX_64BIT_ENV 1 +#endif + +#ifndef UKERNEL +/* + * On HP-UX, sys/socket.h includes sys/uio.h, and sys/file.h and + * sys/uio.h #include each other, and there's no simple way to avoid a + * warning about the struct uio declaration not being visible outside + * of some prototype or other. So, we put in a tenative declaration to + * supress the warnings. + */ +struct uio; + +#define memset(A, B, S) bzero(A, S) +#define memcpy(B, A, S) bcopy(A, B, S) +#define memcmp(A, B, S) bcmp(A, B, S) +#endif +#endif /* KERNEL */ +#define AFS_DIRENT +/* Non-standard definitions */ +#ifndef EDQUOT +#define EDQUOT 69 /* Disc quota exceeded */ +#endif + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.i386_fbsd_60.h b/src/config/param.i386_fbsd_60.h new file mode 100644 index 000000000..051c0eab9 --- /dev/null +++ b/src/config/param.i386_fbsd_60.h @@ -0,0 +1,203 @@ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#ifndef UKERNEL +/* This section for kernel libafs compiles only */ + +#ifndef IGNORE_STDS_H +#include +#endif + +#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */ +#define AFS_X86_XBSD_ENV 1 + +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_ENV 1 +#define AFS_64BIT_CLIENT 1 +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#define AFS_FBSD_ENV 1 +#define AFS_FBSD40_ENV 1 +#define AFS_FBSD42_ENV 1 +#define AFS_FBSD43_ENV 1 +#define AFS_FBSD44_ENV 1 +#define AFS_FBSD45_ENV 1 +#define AFS_FBSD46_ENV 1 +#define AFS_FBSD47_ENV 1 +#define AFS_FBSD50_ENV 1 +#define AFS_FBSD51_ENV 1 +#define AFS_FBSD52_ENV 1 +#define AFS_FBSD53_ENV 1 +#define AFS_FBSD60_ENV 1 +#define AFS_X86_FBSD_ENV 1 +#define AFS_X86_FBSD40_ENV 1 +#define AFS_X86_FBSD42_ENV 1 +#define AFS_X86_FBSD43_ENV 1 +#define AFS_X86_FBSD46_ENV 1 +#define AFS_X86_FBSD47_ENV 1 +#define AFS_X86_FBSD50_ENV 1 +#define AFS_X86_ENV 1 +#define AFS_NONFSTRANS 1 +#define FTRUNC O_TRUNC + +#define IUPD 0x0010 +#define IACC 0x0020 +#define ICHG 0x0040 +#define IMOD 0x0080 + +#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \ + NULL, curproc) +#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \ + NULL, curproc) + +#include + +#define AFS_VM_RDWR_ENV 1 +#define AFS_VFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_GREEDY43_ENV 1 +#define AFS_ENV 1 + +#define AFS_SYSCALL 339 +#define AFS_MOUNT_AFS "afs" + +#ifndef MOUNT_UFS +#define MOUNT_UFS "ufs" +#endif + +#ifndef MOUNT_AFS +#define MOUNT_AFS AFS_MOUNT_AFS +#endif +#define SYS_NAME "i386_fbsd_60" +#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_60 + +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't supports statvfs */ + +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ + +#define AFSLITTLE_ENDIAN 1 + +/* Extra kernel definitions (from kdefs file) */ +#ifdef _KERNEL +#define AFS_GLOBAL_SUNLOCK 1 +#define AFS_VFS34 1 /* What is VFS34??? */ +#define AFS_SHORTGID 0 /* are group id's short? */ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_resid uio_resid +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES CLBYTES +#define osi_GetTime(x) microtime(x) +#define AFS_KALLOC(x) osi_fbsd_alloc((x), 1) +#undef AFS_KALLOC_NOSLEEP +#define AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0) +#define AFS_KFREE(x,y) osi_fbsd_free((x)) +#define v_count v_usecount +#define v_vfsp v_mount +#define vfs_bsize mnt_stat.f_bsize +#define vfs_fsid mnt_stat.f_fsid +#define va_nodeid va_fileid +#define vfs_vnodecovered mnt_vnodecovered +#define direct dirent +#define vnode_t struct vnode + +#ifndef MUTEX_DEFAULT +#define MUTEX_DEFAULT 0 +#endif /* MUTEX_DEFAULT */ + +#ifndef SSYS +#define SSYS 0x00002 +#endif /* SSYS */ + +#define p_rcred p_ucred + +#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) +enum vcexcl { NONEXCL, EXCL }; + +#ifdef KERNEL +#ifndef MIN +#define MIN(A,B) ((A) < (B) ? (A) : (B)) +#endif +#ifndef MAX +#define MAX(A,B) ((A) > (B) ? (A) : (B)) +#endif +#endif /* KERNEL */ + +#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */ +#endif /* _KERNEL */ + +#else /* !defined(UKERNEL) */ + +/* This section for user space compiles only */ + +#define UKERNEL 1 /* user space kernel */ +#define AFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_USR_FBSD40_ENV 1 +#define AFS_USR_FBSD42_ENV 1 +#define AFS_USR_FBSD43_ENV 1 +#define AFS_USR_FBSD44_ENV 1 +#define AFS_USR_FBSD45_ENV 1 +#define AFS_USR_FBSD46_ENV 1 +#define AFS_USR_FBSD47_ENV 1 +#define AFS_USR_FBSD50_ENV 1 +#define AFS_USR_FBSD51_ENV 1 +#define AFS_USR_FBSD52_ENV 1 +#define AFS_USR_FBSD53_ENV 1 +#define AFS_USR_FBSD60_ENV 1 +#define AFS_USR_FBSD_ENV 1 +#define AFS_NONFSTRANS 1 + +#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */ +#define AFS_SYSCALL 339 +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_ENV 1 +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#define AFS_USERSPACE_IP_ADDR 1 +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ + +/* Machine / Operating system information */ +#include +#define SYS_NAME "i386_fbsd_60" +#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_60 + +#define AFSLITTLE_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */ +#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ + +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_fmode uio_fmode +#define afsio_resid uio_resid +#define AFS_UIOSYS 1 +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES MCLBYTES +#define AFS_MINCHANGE 2 +#define VATTR_NULL usr_vattr_null + +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* !defined(UKERNEL) */ + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.i386_linux22.h b/src/config/param.i386_linux22.h index 31d93f341..24f3183d4 100644 --- a/src/config/param.i386_linux22.h +++ b/src/config/param.i386_linux22.h @@ -47,8 +47,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -71,6 +71,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.i386_linux24.h b/src/config/param.i386_linux24.h index c738a1b9c..c97630022 100644 --- a/src/config/param.i386_linux24.h +++ b/src/config/param.i386_linux24.h @@ -44,8 +44,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -63,6 +63,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.i386_linux26.h b/src/config/param.i386_linux26.h index 696766711..60146da33 100644 --- a/src/config/param.i386_linux26.h +++ b/src/config/param.i386_linux26.h @@ -50,8 +50,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #endif /* __KERNEL__ && !DUMP_KERNEL */ @@ -64,6 +64,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.i386_umlinux22.h b/src/config/param.i386_umlinux22.h index 88454c1cd..55c7c70f9 100644 --- a/src/config/param.i386_umlinux22.h +++ b/src/config/param.i386_umlinux22.h @@ -49,8 +49,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -73,6 +73,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.i386_umlinux24.h b/src/config/param.i386_umlinux24.h index 89544da7b..e0d20f34c 100644 --- a/src/config/param.i386_umlinux24.h +++ b/src/config/param.i386_umlinux24.h @@ -52,8 +52,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -71,6 +71,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.i386_umlinux26.h b/src/config/param.i386_umlinux26.h index 831eb2a2a..eca41dcbc 100644 --- a/src/config/param.i386_umlinux26.h +++ b/src/config/param.i386_umlinux26.h @@ -50,8 +50,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #endif /* __KERNEL__ && !DUMP_KERNEL */ @@ -64,6 +64,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.ia64_linux24.h b/src/config/param.ia64_linux24.h index 83f843392..24944af94 100644 --- a/src/config/param.ia64_linux24.h +++ b/src/config/param.ia64_linux24.h @@ -55,8 +55,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -78,6 +78,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.ia64_linux26.h b/src/config/param.ia64_linux26.h index 6fcbda30c..03b2f5b41 100644 --- a/src/config/param.ia64_linux26.h +++ b/src/config/param.ia64_linux26.h @@ -64,8 +64,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -87,6 +87,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.parisc_linux24.h b/src/config/param.parisc_linux24.h index a4d71afb3..c5713576c 100644 --- a/src/config/param.parisc_linux24.h +++ b/src/config/param.parisc_linux24.h @@ -39,8 +39,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -61,6 +61,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.ppc64_linux24.h b/src/config/param.ppc64_linux24.h index a207e8957..8f909a538 100644 --- a/src/config/param.ppc64_linux24.h +++ b/src/config/param.ppc64_linux24.h @@ -43,8 +43,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -66,6 +66,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.ppc64_linux26.h b/src/config/param.ppc64_linux26.h index e20ff6f7d..50e8cc30e 100644 --- a/src/config/param.ppc64_linux26.h +++ b/src/config/param.ppc64_linux26.h @@ -49,9 +49,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif - +#define AFS_GLOBAL_SUNLOCK #endif /* __KERNEL__ && !DUMP_KERNEL*/ @@ -68,6 +67,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.ppc_darwin_80.h b/src/config/param.ppc_darwin_80.h new file mode 100644 index 000000000..443166bb9 --- /dev/null +++ b/src/config/param.ppc_darwin_80.h @@ -0,0 +1,141 @@ +#ifndef UKERNEL +/* This section for kernel libafs compiles only */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define AFS_ENV 1 +#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ +#define AFS_64BIT_CLIENT 1 +#define AFS_64BIT_IOPS_ENV 1 +#define AFS_PPC_ENV 1 +#define AFS_VFSINCL_ENV 1 + +#include + +#define AFS_DARWIN_ENV +#define AFS_DARWIN13_ENV +#define AFS_DARWIN14_ENV +#define AFS_DARWIN60_ENV +#define AFS_DARWIN70_ENV +#define AFS_DARWIN80_ENV +#define AFS_NONFSTRANS +#define AFS_SYSCALL 230 +#define AFS_NAMEI_ENV 1 +#define DARWIN_REFBASE 3 + +/* File system entry (used if mount.h doesn't define MOUNT_AFS */ +#define AFS_MOUNT_AFS "afs" + +/* Machine / Operating system information */ +#define sys_ppc_darwin_12 1 +#define sys_ppc_darwin_13 1 +#define sys_ppc_darwin_14 1 +#define sys_ppc_darwin_60 1 +#define sys_ppc_darwin_70 1 +#define sys_ppc_darwin_80 1 +#define SYS_NAME "ppc_darwin_80" +#define SYS_NAME_ID SYS_NAME_ID_ppc_darwin_80 +#define AFSBIG_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ + +#define AFS_GCPAGS 1 /* if nonzero, garbage collect PAGs */ +#define RXK_LISTENER_ENV 1 + +#ifdef KERNEL +#undef MACRO_BEGIN +#undef MACRO_END +#include +#define AFS_GLOBAL_SUNLOCK 1 +#define AFS_VFS34 1 /* What is VFS34??? */ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_resid uio_resid +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES CLBYTES +#define osi_GetTime(x) microtime(x) +#define AFS_KALLOC(x) kalloc(x) +#define AFS_KFREE(x,y) kfree(x,y) +#define v_count v_usecount +#define v_vfsp v_mount +#define vfs_bsize mnt_stat.f_bsize +#define vfs_fsid mnt_stat.f_fsid +#define va_nodeid va_fileid +#define vfs_vnodecovered mnt_vnodecovered +#define direct dirent +#define vnode_t struct vnode + +//#define VN_RELE(vp) vrele(((struct vnode *)(vp))) +//#define VN_HOLD(vp) VREF(((struct vnode *)(vp))) +#define BIND_8_COMPAT + +#endif +#endif /* AFS_PARAM_H */ + +#else /* !defined(UKERNEL) */ + +/* This section for user space compiles only */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define AFS_VFSINCL_ENV 1 /* NOBODY uses this.... */ +#define AFS_ENV 1 +#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ +#define AFS_PPC_ENV 1 + +#include +#define AFS_USERSPACE_ENV +#define AFS_USR_DARWIN_ENV +#define AFS_USR_DARWIN13_ENV +#define AFS_USR_DARWIN14_ENV +#define AFS_USR_DARWIN60_ENV +#define AFS_USR_DARWIN70_ENV +#define AFS_USR_DARWIN80_ENV +#define AFS_NONFSTRANS +#define AFS_SYSCALL 230 +#define DARWIN_REFBASE 0 + +/* File system entry (used if mount.h doesn't define MOUNT_AFS */ +#define AFS_MOUNT_AFS "afs" + +/* Machine / Operating system information */ +#define sys_ppc_darwin_12 1 +#define sys_ppc_darwin_13 1 +#define sys_ppc_darwin_14 1 +#define sys_ppc_darwin_60 1 +#define sys_ppc_darwin_70 1 +#define sys_ppc_darwin_80 1 +#define SYS_NAME "ppc_darwin_80" +#define SYS_NAME_ID SYS_NAME_ID_ppc_darwin_80 +#define AFSBIG_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ + +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE + +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ +#define RXK_LISTENER_ENV 1 + +#define AFS_VFS34 1 /* What is VFS34??? */ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_resid uio_resid +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE +#define VATTR_NULL usr_vattr_null + +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#define BIND_8_COMPAT +#endif /* AFS_PARAM_H */ + +#endif /* !defined(UKERNEL) */ diff --git a/src/config/param.ppc_linux22.h b/src/config/param.ppc_linux22.h index ad1d4658d..26f3d7fe5 100644 --- a/src/config/param.ppc_linux22.h +++ b/src/config/param.ppc_linux22.h @@ -35,8 +35,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -58,6 +58,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.ppc_linux24.h b/src/config/param.ppc_linux24.h index 3ee2508c4..7f7704bde 100644 --- a/src/config/param.ppc_linux24.h +++ b/src/config/param.ppc_linux24.h @@ -41,8 +41,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -63,6 +63,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.ppc_linux26.h b/src/config/param.ppc_linux26.h index fd32b6a0b..24154013e 100644 --- a/src/config/param.ppc_linux26.h +++ b/src/config/param.ppc_linux26.h @@ -47,8 +47,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #endif /* __KERNEL__ && !DUMP_KERNEL */ @@ -65,6 +65,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.rs_aix53.h b/src/config/param.rs_aix53.h new file mode 100644 index 000000000..ba4f151f3 --- /dev/null +++ b/src/config/param.rs_aix53.h @@ -0,0 +1,182 @@ +#ifndef UKERNEL +/* This section for kernel libafs compiles only */ + +/* + * Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define AFS_AIX_ENV 1 +#define AFS_AIX32_ENV 1 +#define AFS_AIX41_ENV 1 +#define AFS_AIX42_ENV 1 +#define AFS_AIX51_ENV 1 +#define AFS_AIX52_ENV 1 +#define AFS_AIX53_ENV 1 + +#define AFS_64BIT_ENV 1 +#define AFS_64BIT_CLIENT 1 +#define AFS_NAMEI_ENV 1 +#ifdef AFS_NAMEI_ENV +#define AFS_64BIT_IOPS_ENV 1 +#endif +#define BITMAP_LATER 1 +#define FAST_RESTART 1 + +#define AFS_HAVE_FLOCK_SYSID 1 + +#include + +/* Global lock in AFS part of client. */ +#define AFS_GLOBAL_SUNLOCK 1 +#define AFS_GCPAGS 1 /* if nonzero, garbage collect PAGs */ + +/* File system entry (used if vmount.h doesn't define MNT_AFS */ +#define AFS_MOUNT_AFS 4 +#define AFS_SYSCALL 31 + +/* Machine / Operating system information */ +#define SYS_NAME "rs_aix53" +#define SYS_NAME_ID SYS_NAME_ID_rs_aix53 +#define AFSBIG_ENDIAN 1 +#define RIOS 1 /* POWERseries 6000. (sj/pc) */ +#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ +#define AFS_HAVE_STATVFS 1 /* System supports statvfs */ + +#ifndef _POWER +#define _POWER 1 /* _POWERseries! */ +#endif +#ifndef COMPAT_43 +#define COMPAT_43 +#endif + +#define KERNEL_HAVE_UERROR 1 +#define KERNEL_HAVE_PIN 1 + +/* Extra kernel definitions (from kdefs file) */ +#ifdef _KERNEL +#define AFS_SHORTGID 1 +#define AFS_UIOFMODE 1 +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_fmode uio_fmode +#define afsio_resid uio_resid +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES CLBYTES +#define AFS_MINCHANGE 2 +#define osi_GetTime(x) do {curtime(x); (x)->tv_usec = (x)->tv_usec/1000;} while (0) +#define osi_GTime(x) time /* something for the silly time(0)?? */ +#define AFS_KALLOC kmem_alloc +#define AFS_KFREE kmem_free +#define VATTR_NULL(V) memset((void*)V, -1, sizeof(*(V))) +#define va_nodeid va_serialno +#endif /* !_KERNEL */ +#define AFS_DIRENT +#endif /* AFS_PARAM_H */ + +#else /* !defined(UKERNEL) */ + +/* This section for user space compiles only */ + +/* + * Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define AFS_64BIT_ENV 1 +#define AFS_64BIT_CLIENT 1 +#define AFS_NAMEI_ENV 1 +#ifdef AFS_NAMEI_ENV +#define AFS_64BIT_IOPS_ENV 1 +#endif +#define BITMAP_LATER 1 +#define FAST_RESTART 1 + +#define AFS_VFS_ENV 1 +/* Used only in vfsck code; is it needed any more???? */ +#define RXK_LISTENER_ENV 1 +#define AFS_USERSPACE_IP_ADDR 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ + +#ifdef KERNEL + +#define UKERNEL 1 /* user space kernel */ +#define AFS_ENV 1 +#define AFS_USR_AIX_ENV 1 +#define AFS_USR_AIX41_ENV 1 +#define AFS_USR_AIX42_ENV 1 +#define AFS_USR_AIX51_ENV 1 + +#else /* KERNEL */ + +#define AFS_AIX_ENV 1 +#define AFS_AIX32_ENV 1 +#define AFS_AIX41_ENV 1 +#define AFS_AIX42_ENV 1 +#define AFS_AIX51_ENV 1 + +#define AFS_HAVE_FLOCK_SYSID 1 + +#endif /* KERNEL */ + +#include + + /*#define AFS_GLOBAL_SUNLOCK 1 *//* For global locking */ + +#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */ +#define AFS_SYSCALL 105 + +/* File system entry (used if mount.h doesn't define MOUNT_AFS */ +#define AFS_MOUNT_AFS 4 + +/* Machine / Operating system information */ +#define sys_rs_aix51 1 +#define SYS_NAME "rs_aix51" +#define SYS_NAME_ID SYS_NAME_ID_rs_aix51 +#define AFSBIG_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ + +/* Extra kernel definitions (from kdefs file) */ +#ifdef KERNEL +#define AFS_UIOFMODE 1 /* Only in afs/afs_vnodeops.c (afs_ustrategy) */ +#define AFS_SYSVLOCK 1 /* sys v locking supported */ +/*#define AFS_USEBUFFERS 1*/ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_fmode uio_fmode +#define afsio_resid uio_resid +#define AFS_UIOSYS 1 +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES MCLBYTES +#define AFS_MINCHANGE 2 +#define VATTR_NULL usr_vattr_null +#endif /* KERNEL */ +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#endif /* AFS_PARAM_H */ + +#endif /* !defined(UKERNEL) */ diff --git a/src/config/param.s390_linux22.h b/src/config/param.s390_linux22.h index c4f473f1d..c19b3997b 100644 --- a/src/config/param.s390_linux22.h +++ b/src/config/param.s390_linux22.h @@ -48,8 +48,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -71,6 +71,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.s390_linux24.h b/src/config/param.s390_linux24.h index 986abb73f..b44c5fa5f 100644 --- a/src/config/param.s390_linux24.h +++ b/src/config/param.s390_linux24.h @@ -54,8 +54,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS #include @@ -75,6 +75,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.s390x_linux24.h b/src/config/param.s390x_linux24.h index ed1942196..699132df5 100644 --- a/src/config/param.s390x_linux24.h +++ b/src/config/param.s390x_linux24.h @@ -59,8 +59,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS #include @@ -80,6 +80,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.s390x_linux26.h b/src/config/param.s390x_linux26.h index f4cc8931b..31680bd42 100644 --- a/src/config/param.s390x_linux26.h +++ b/src/config/param.s390x_linux26.h @@ -63,8 +63,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK extern unsigned long __per_cpu_offset[NR_CPUS]; extern SYSCALLTYPE sys_call_table_emu[] __attribute__((weak)); #endif /* __KERNEL__ && !DUMP_KERNEL */ @@ -82,6 +82,7 @@ extern SYSCALLTYPE sys_call_table_emu[] __attribute__((weak)); #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.sparc64_linux22.h b/src/config/param.sparc64_linux22.h index 18e72588e..bd5547c8d 100644 --- a/src/config/param.sparc64_linux22.h +++ b/src/config/param.sparc64_linux22.h @@ -50,8 +50,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -73,6 +73,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.sparc64_linux24.h b/src/config/param.sparc64_linux24.h index 654a0848b..dd71e3531 100644 --- a/src/config/param.sparc64_linux24.h +++ b/src/config/param.sparc64_linux24.h @@ -57,8 +57,8 @@ #ifdef AFS_SMP #define CONFIG_SMP 1 #define __SMP__ -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #endif /* __KERNEL__ && !DUMP_KERNEL */ #include @@ -74,6 +74,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL diff --git a/src/config/param.sparc_linux22.h b/src/config/param.sparc_linux22.h index bde15329e..d2a2eb789 100644 --- a/src/config/param.sparc_linux22.h +++ b/src/config/param.sparc_linux22.h @@ -45,8 +45,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -67,6 +67,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN diff --git a/src/config/param.sparc_linux24.h b/src/config/param.sparc_linux24.h index 015500c07..a156eb5d6 100644 --- a/src/config/param.sparc_linux24.h +++ b/src/config/param.sparc_linux24.h @@ -50,8 +50,8 @@ #ifndef __SMP__ #define __SMP__ #endif -#define AFS_GLOBAL_SUNLOCK #endif +#define AFS_GLOBAL_SUNLOCK #if defined(MODULE) && defined(CONFIG_MODVERSIONS) #define MODVERSIONS @@ -72,6 +72,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #ifdef KERNEL #ifndef MIN @@ -149,6 +150,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ #define afsio_iov uio_iov #define afsio_iovcnt uio_iovcnt diff --git a/src/config/param.sunx86_510.h b/src/config/param.sunx86_510.h index d45a789af..c99fe5804 100644 --- a/src/config/param.sunx86_510.h +++ b/src/config/param.sunx86_510.h @@ -34,7 +34,6 @@ #define AFS_X86_ENV 1 #define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ -#define AFS_64BIT_CLIENT 1 #define AFS_HAVE_FLOCK_SYSID 1 @@ -101,6 +100,7 @@ #if defined(__amd64) #define AFS_SUN57_64BIT_ENV 1 #define AFS_64BIT_INO 1 +#define AFS_64BIT_CLIENT 1 #endif /** diff --git a/src/config/param.sunx86_57.h b/src/config/param.sunx86_57.h index 0814f1037..1fb6f94c5 100644 --- a/src/config/param.sunx86_57.h +++ b/src/config/param.sunx86_57.h @@ -86,27 +86,6 @@ #define AFS_MINCHANGE 2 #define osi_GetTime(x) uniqtime(x) -/** - * These defines are for the 64 bit Solaris 7 port - * AFS_SYSCALL32 is used to protect the ILP32 syscall interface - * AFS_64BIT_ENV is for use of 64 bit inode numbers - */ -#if defined(__sparcv9) -#define AFS_SUN57_64BIT_ENV 1 -#define AFS_64BIT_INO 1 -#endif - -/** - * Solaris 7 64 bit has two versions of uniqtime. Since we consistently - * use 32 bit quantities for time in afs, we now use uniqtime32 - */ -#if defined(AFS_SUN57_64BIT_ENV) -#undef osi_GetTime -#define osi_GetTime(x) uniqtime32(x) -#endif - - - #define AFS_KALLOC(n) kmem_alloc(n, KM_SLEEP) #define AFS_KALLOC_NOSLEEP(n) kmem_alloc(n, KM_NOSLEEP) #define AFS_KFREE kmem_free diff --git a/src/config/param.sunx86_58.h b/src/config/param.sunx86_58.h index 18c08e041..4bb5d7db3 100644 --- a/src/config/param.sunx86_58.h +++ b/src/config/param.sunx86_58.h @@ -33,7 +33,6 @@ #define AFS_X86_ENV 1 #define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ -#define AFS_64BIT_CLIENT 1 #define AFS_HAVE_FLOCK_SYSID 1 @@ -92,27 +91,6 @@ #define AFS_MINCHANGE 2 #define osi_GetTime(x) uniqtime(x) -/** - * These defines are for the 64 bit Solaris 7 port - * AFS_SYSCALL32 is used to protect the ILP32 syscall interface - * AFS_64BIT_ENV is for use of 64 bit inode numbers - */ -#if defined(__sparcv9) -#define AFS_SUN57_64BIT_ENV 1 -#define AFS_64BIT_INO 1 -#endif - -/** - * Solaris 7 64 bit has two versions of uniqtime. Since we consistently - * use 32 bit quantities for time in afs, we now use uniqtime32 - */ -#if defined(AFS_SUN57_64BIT_ENV) -#undef osi_GetTime -#define osi_GetTime(x) uniqtime32(x) -#endif - - - #define AFS_KALLOC(n) kmem_alloc(n, KM_SLEEP) #define AFS_KALLOC_NOSLEEP(n) kmem_alloc(n, KM_NOSLEEP) #define AFS_KFREE kmem_free diff --git a/src/config/param.sunx86_59.h b/src/config/param.sunx86_59.h index 457ce5ad1..b1f69460e 100644 --- a/src/config/param.sunx86_59.h +++ b/src/config/param.sunx86_59.h @@ -34,7 +34,6 @@ #define AFS_X86_ENV 1 #define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ -#define AFS_64BIT_CLIENT 1 #define AFS_HAVE_FLOCK_SYSID 1 @@ -93,27 +92,6 @@ #define AFS_MINCHANGE 2 #define osi_GetTime(x) uniqtime(x) -/** - * These defines are for the 64 bit Solaris 7 port - * AFS_SYSCALL32 is used to protect the ILP32 syscall interface - * AFS_64BIT_ENV is for use of 64 bit inode numbers - */ -#if defined(__sparcv9) -#define AFS_SUN57_64BIT_ENV 1 -#define AFS_64BIT_INO 1 -#endif - -/** - * Solaris 7 64 bit has two versions of uniqtime. Since we consistently - * use 32 bit quantities for time in afs, we now use uniqtime32 - */ -#if defined(AFS_SUN57_64BIT_ENV) -#undef osi_GetTime -#define osi_GetTime(x) uniqtime32(x) -#endif - - - #define AFS_KALLOC(n) kmem_alloc(n, KM_SLEEP) #define AFS_KALLOC_NOSLEEP(n) kmem_alloc(n, KM_NOSLEEP) #define AFS_KFREE kmem_free diff --git a/src/export/Makefile.in b/src/export/Makefile.in index b84ff8f84..c9ac0cbf2 100644 --- a/src/export/Makefile.in +++ b/src/export/Makefile.in @@ -163,7 +163,7 @@ ${DEST}/root.client/usr/vice/etc/dkload/cfgexport64: @AIX64@cfgexport64 @AIX64@ ${INSTALL} $? $@ ${DEST}/root.client/usr/vice/etc/dkload/cfgafs: cfgafs -@AIX64@ ${INSTALL} $? $@ + ${INSTALL} $? $@ ${DEST}/root.client/usr/vice/etc/dkload/cfgafs64: @AIX64@cfgafs64 @AIX64@ ${INSTALL} $? $@ diff --git a/src/libacl/acl.h b/src/libacl/acl.h index 6289854eb..96567f374 100644 --- a/src/libacl/acl.h +++ b/src/libacl/acl.h @@ -54,7 +54,7 @@ of entries. Each entry consists of a username or groupname followed by a decimal number representing the rights mask for that name. Each entry in the list looks as if it had been produced by printf() using a format list of "%s\t%d\n". -Note that the number of entries must be less than ACL_MAXENTRIES +Note that the number of entries must be less than or equal to ACL_MAXENTRIES */ /* This is temporary hack to get around changing the volume package diff --git a/src/libafs/MakefileProto.AIX.in b/src/libafs/MakefileProto.AIX.in index 610427718..c135afe43 100644 --- a/src/libafs/MakefileProto.AIX.in +++ b/src/libafs/MakefileProto.AIX.in @@ -70,7 +70,7 @@ DESTDIRS = aix_destdirs KMODS=32 - + KMODS=32 64 diff --git a/src/libafs/MakefileProto.DARWIN.in b/src/libafs/MakefileProto.DARWIN.in index 553e83f45..337db9c4b 100644 --- a/src/libafs/MakefileProto.DARWIN.in +++ b/src/libafs/MakefileProto.DARWIN.in @@ -4,7 +4,7 @@ # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html -# $Header: /cvs/openafs/src/libafs/MakefileProto.DARWIN.in,v 1.21 2004/08/08 23:12:57 shadow Exp $ +# $Header: /cvs/openafs/src/libafs/MakefileProto.DARWIN.in,v 1.21.2.1 2005/04/19 16:03:07 shadow Exp $ # # MakefileProto for Digital Unix systems # @@ -40,7 +40,7 @@ KOPTS=-no-cpp-precomp -static -fno-common -finline -fno-keep-inline-functions -f KOPTS=-no-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch -CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${KINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG} ${OPTMZ} +CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG} ${OPTMZ} KINCLUDES=-I${KROOT}/System/Library/Frameworks/Kernel.Framework/Headers diff --git a/src/libafs/MakefileProto.HPUX.in b/src/libafs/MakefileProto.HPUX.in index 7ebfb1687..594584eba 100644 --- a/src/libafs/MakefileProto.HPUX.in +++ b/src/libafs/MakefileProto.HPUX.in @@ -21,13 +21,13 @@ AFS_OS_OBJS = \ osi_vm.o AFS_OS_NFSOBJS = \ - + hpux_mod_nfs.modmeta.o \ osi_vfsops_nfs.o AFS_OS_NONFSOBJS = \ - + hpux_mod.modmeta.o \ osi_vfsops.o @@ -57,6 +57,8 @@ AFS_OS_NONFSOBJS = \ # for 11.23, see the DDK BE/Sample_makefiles/Makefile.bld # for mod drivers. # +# 11.23 uses new compiler, with new options. The same compiler is on pa_risc and ia64 +# KDEFS= +ES1.Xindirect_calls +XixdU +Hx0 +ESlit +ESsfc +ESssf -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \ -DMP +R500 -Wl,+k $(CPU_KDEFS) @@ -76,6 +78,12 @@ KDEFS_32 = KDEFS_64 = +DD64 +ARCH=ipf + + +ARCH=pa + + CCOPTS_common= -Ae +DD64 +O2 @@ -93,11 +101,24 @@ IDENTS_ipf= -DKERNEL_DEBUGGER -DVARIABLE_UAREA -D_SYSCALL_64 -D__NO_PA_HDRS LDOPTS_ipf= +noobjdebug +# Definitions which apply to PA only + +CCOPTS_pa= +DS2.0 +ES1.Xindirect_calls +ESlit +ESsfc +ESssf \ + +ordering_unaware +Oentrysched +Ofastaccess +Omultiprocessor \ + -Wp,-H300000 +Xid + +IDENTS_pa= -DCOMB_FLIPPER -DKGDB_ON -DLP64_TMP_NODBG -DNEW_MFCTL_W \ + -DNEW_RDB -DPARISC -DRDB -DSPP_OBP_BOOT -DSPP_RUNWAY_ERR_ENABLED \ + -D__NO_EM_HDRS -D__ROSEVILLE__ -D__TEMP64__ -D__hp9000s800 + +LDOPTS_pa= + + # above from the Makefile.bld example -LDOPTS= $(LDOPTS_ipf) +LDOPTS= ${LDOPTS_${ARCH}} KDEFS= $(CCOPTS_common) $(IDENTS_common) $(CPU_KDEFS) -KDEFS_64= $(CCOPTS_ipf) $(IDENTS_ipf) +KDEFS_64= ${CCOPTS_${ARCH}} ${IDENTS_${ARCH}} MODLINK=/opt/ddk/11.23/BE/bin/modlink MODMETA=/opt/ddk/11.23/BE/bin/modmeta @@ -121,7 +142,7 @@ include Makefile.common BITS = 64 32 - + BITS = 64 @@ -144,7 +165,7 @@ setup: ln -fs /etc/conf/ufs ufs ln -fs /etc/conf/sys ufs - + ln -fs /usr/include/sys h ln -fs /usr/include/net net ln -fs /usr/include/netinet netinet @@ -190,10 +211,10 @@ hpux_destdirs_libafs: dest_libafs # Below this line are targets when in the static directory: - + LIBAFS = libafs$(BITSUFFIX).a LIBAFSNONFS = libafs$(BITSUFFIX).nonfs.a - + LIBAFS = afs$(BITSUFFIX)_nfs LIBAFSNONFS =afs$(BITSUFFIX) @@ -222,22 +243,22 @@ $(DEST_LIBAFSNONFS): $(LIBAFSNONFS) ${INSTALL} -f $? $@ ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS) - + $(AR) cru $@ $? $(RANLIB) $@ - + $(MODLINK) -o $@ $(AFSAOBJS) $(AFSNFSOBJS) ${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS) - + $(AR) cru $@ $? $(RANLIB) $@ - + $(MODLINK) -o $@ $(AFSAOBJS) $(AFSNONFSOBJS) - + hpux_mod.modmeta.c: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/hpux_mod.modmeta $(MODMETA) ${IDENTS_common} ${IDENTS_ipf} \ -DAFSLIB_NAME=${LIBAFSNONFS} \ diff --git a/src/libafs/afs.ppc_darwin_70.plist.in b/src/libafs/afs.ppc_darwin_70.plist.in index 09fb06390..96ee62660 100644 --- a/src/libafs/afs.ppc_darwin_70.plist.in +++ b/src/libafs/afs.ppc_darwin_70.plist.in @@ -15,11 +15,11 @@ CFBundlePackageType KEXT CFBundleShortVersionString - 1.2.10 + 1.3.82 CFBundleSignature ???? CFBundleVersion - 1.2.10 + 1.3.82 OSBundleLibraries com.apple.kernel.bsd diff --git a/src/libafs/afs.ppc_darwin_80.plist.in b/src/libafs/afs.ppc_darwin_80.plist.in new file mode 100644 index 000000000..0383e3e82 --- /dev/null +++ b/src/libafs/afs.ppc_darwin_80.plist.in @@ -0,0 +1,31 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + afs + CFBundleIdentifier + org.openafs.filesystems.afs + CFBundleInfoDictionaryVersion + 8.0 + CFBundleName + afs + CFBundlePackageType + KEXT + CFBundleShortVersionString + 1.3.82 + CFBundleSignature + ???? + CFBundleVersion + 1.3.82 + OSBundleLibraries + + com.apple.kernel.bsd + 8.0.0 + com.apple.kernel.mach + 8.0.0 + + + diff --git a/src/libafsauthent/NTMakefile b/src/libafsauthent/NTMakefile index 692b2d2d1..e5e0b5b12 100644 --- a/src/libafsauthent/NTMakefile +++ b/src/libafsauthent/NTMakefile @@ -8,7 +8,7 @@ # This is a pthread safe library containing ubikclient, auth, kauth. -AFSDEV_AUXCDEFINES = -DAFS_PTHREAD_ENV +AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -DAFS_PTHREAD_ENV -I..\WINNT\kfw\inc\loadfuncs -I..\WINNT\kfw\inc\krb5 RELDIR=libafsauthent !include ..\config\NTMakefile.$(SYS_NAME) diff --git a/src/libafsrpc/afsrpc.def b/src/libafsrpc/afsrpc.def index 00bc3da9a..69feb9674 100644 --- a/src/libafsrpc/afsrpc.def +++ b/src/libafsrpc/afsrpc.def @@ -212,5 +212,6 @@ EXPORTS RXAFS_ResidencyCmd @217 StartRXAFS_FetchData64 @218 StartRXAFS_StoreData64 @219 + rx_StartClientThread @220 diff --git a/src/packaging/MacOS/OpenAFS.Info.plist b/src/packaging/MacOS/OpenAFS.Info.plist index 17dcfdfbf..beec2c80f 100644 --- a/src/packaging/MacOS/OpenAFS.Info.plist +++ b/src/packaging/MacOS/OpenAFS.Info.plist @@ -3,13 +3,13 @@ CFBundleGetInfoString - OpenAFS 1.3.81 + OpenAFS 1.3.82 CFBundleIdentifier org.openafs.OpenAFS.pkg CFBundleName OpenAFS CFBundleShortVersionString - 1.3.81 + 1.3.82 IFMajorVersion 1 IFMinorVersion diff --git a/src/packaging/MacOS/OpenAFS.info b/src/packaging/MacOS/OpenAFS.info index f540733e5..52e632655 100644 --- a/src/packaging/MacOS/OpenAFS.info +++ b/src/packaging/MacOS/OpenAFS.info @@ -1,5 +1,5 @@ Title OpenAFS -Version 1.3.81 +Version 1.3.82 Description The OpenAFS distributed filesystem. This package installs an almost-ready-to-run client for OpenAFS. see http://www.openafs.org for more information. DefaultLocation / Diskname (null) diff --git a/src/ptserver/Makefile.in b/src/ptserver/Makefile.in index 303545234..480244516 100644 --- a/src/ptserver/Makefile.in +++ b/src/ptserver/Makefile.in @@ -14,7 +14,7 @@ INCLS=${TOP_INCDIR}/ubik.h \ ${TOP_INCDIR}/rx/xdr.h \ ${TOP_INCDIR}/afs/keys.h \ ${TOP_INCDIR}/afs/cellconfig.h \ - ptserver.h ptclient.h ptuser.h ptint.h pterror.h map.h + ptserver.h ptclient.h ptuser.h ptint.h pterror.h map.h ptprototypes.h LINCLS=${TOP_INCDIR}/ubik.h \ ${TOP_INCDIR}/lock.h \ diff --git a/src/ptserver/pt_util.c b/src/ptserver/pt_util.c index 7739f45e1..4bf4c8123 100644 --- a/src/ptserver/pt_util.c +++ b/src/ptserver/pt_util.c @@ -1,4 +1,4 @@ -/* $Id: pt_util.c,v 1.9 2004/06/23 14:27:41 shadow Exp $ */ +/* $Id: pt_util.c,v 1.9.2.1 2005/04/15 19:40:43 shadow Exp $ */ /* * @@ -23,7 +23,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/ptserver/pt_util.c,v 1.9 2004/06/23 14:27:41 shadow Exp $"); + ("$Header: /cvs/openafs/src/ptserver/pt_util.c,v 1.9.2.1 2005/04/15 19:40:43 shadow Exp $"); #include /*Command line parsing */ #include @@ -44,6 +44,7 @@ RCSID extern char *optarg; extern int optind; +int restricted = 0; int display_entry(); void add_group(); void display_groups(); diff --git a/src/ptserver/ptprocs.c b/src/ptserver/ptprocs.c index 70e91481d..1e481f973 100644 --- a/src/ptserver/ptprocs.c +++ b/src/ptserver/ptprocs.c @@ -51,7 +51,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/ptserver/ptprocs.c,v 1.21 2004/06/23 13:45:09 shadow Exp $"); + ("$Header: /cvs/openafs/src/ptserver/ptprocs.c,v 1.21.2.2 2005/04/27 01:55:54 shadow Exp $"); #include #include @@ -67,6 +67,7 @@ RCSID #include #else #include +#include #endif #ifdef HAVE_STRING_H #include @@ -77,6 +78,7 @@ RCSID #endif #include "ptserver.h" #include "pterror.h" +#include "ptprototypes.h" #include "afs/audit.h" #ifdef AFS_ATHENA_STDENV @@ -86,6 +88,7 @@ RCSID #define IP_WILDCARDS 1 /* XXX Should be defined outside of here XXX */ +extern int restricted; extern struct ubik_dbase *dbase; extern afs_int32 Initdb(); extern int pr_noAuth; @@ -119,6 +122,9 @@ CreateOK(ut, cid, oid, flag, admin) afs_int32 flag; /* indicates type of entry */ int admin; /* sysadmin membership */ { + if (restricted && !admin) + return 0; + if (flag & PRFOREIGN) { /* Foreign users are recognized by the '@' sign and * not by the PRFOREIGN flag. @@ -346,7 +352,7 @@ newEntry(call, aname, flag, oid, aid) ABORT_WITH(tt, PRPERM); admin = IsAMemberOf(tt, cid, SYSADMINID); } else { - admin = (!strcmp(aname, cname)) || IsAMemberOf(tt, cid, SYSADMINID); + admin = ((!restricted && !strcmp(aname, cname))) || IsAMemberOf(tt, cid, SYSADMINID); oid = cid = SYSADMINID; } if (!CreateOK(tt, cid, oid, flag, admin)) diff --git a/src/ptserver/ptprototypes.h b/src/ptserver/ptprototypes.h new file mode 100644 index 000000000..041a9f286 --- /dev/null +++ b/src/ptserver/ptprototypes.h @@ -0,0 +1,46 @@ +/* + * Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ + +#ifndef _PTPROTOTYPES_H_ +#define _PTPROTOTYPES_H_ + +/* utils.c */ +#if defined(SUPERGROUPS) +extern afs_int32 IsAMemberOfSG(struct ubik_trans *at, afs_int32 aid, afs_int32 gid, afs_int32 depth) ; +#endif /* SUPERGROUPS */ + +extern afs_int32 IDHash(afs_int32 x); +extern afs_int32 NameHash(register unsigned char *aname); +extern afs_int32 pr_Write(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, char *buff, afs_int32 len); +extern afs_int32 pr_Read(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, char *buff, afs_int32 len); +extern int pr_WriteEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, struct prentry *tentry); +extern int pr_ReadEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, struct prentry *tentry); +extern int pr_WriteCoEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, struct contentry *tentry); +extern int pr_ReadCoEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, struct contentry *tentry); +extern afs_int32 AllocBlock(register struct ubik_trans *at); +extern afs_int32 FreeBlock(register struct ubik_trans *at, afs_int32 pos); +extern afs_int32 FindByID(register struct ubik_trans *at, afs_int32 aid); +extern afs_int32 FindByName(register struct ubik_trans *at, char aname[PR_MAXNAMELEN], struct prentry *tentryp); +extern afs_int32 AllocID(register struct ubik_trans *at, afs_int32 flag, afs_int32 *aid); +extern afs_int32 IDToName(register struct ubik_trans *at, afs_int32 aid, char aname[PR_MAXNAMELEN]); +extern afs_int32 NameToID(register struct ubik_trans *at, char aname[PR_MAXNAMELEN], afs_int32 *aid); +extern int IDCmp(afs_int32 *a, afs_int32 *b); +extern afs_int32 RemoveFromIDHash(struct ubik_trans *tt, afs_int32 aid, afs_int32 *loc); +extern afs_int32 AddToIDHash(struct ubik_trans *tt, afs_int32 aid, afs_int32 loc); +extern afs_int32 RemoveFromNameHash(struct ubik_trans *tt, char *aname, afs_int32 *loc); +extern afs_int32 AddToNameHash(struct ubik_trans *tt, char *aname, afs_int32 loc); +extern afs_int32 AddToOwnerChain(struct ubik_trans *at, afs_int32 gid, afs_int32 oid); +extern afs_int32 RemoveFromOwnerChain(struct ubik_trans *at, afs_int32 gid, afs_int32 oid); +extern afs_int32 AddToOrphan(struct ubik_trans *at, afs_int32 gid); +extern afs_int32 RemoveFromOrphan(struct ubik_trans *at, afs_int32 gid); +extern afs_int32 IsOwnerOf(struct ubik_trans *at, afs_int32 aid, afs_int32 gid); +extern afs_int32 OwnerOf(struct ubik_trans *at, afs_int32 gid); +extern afs_int32 IsAMemberOf(struct ubik_trans *at, afs_int32 aid, afs_int32 gid); + +#endif diff --git a/src/ptserver/ptserver.c b/src/ptserver/ptserver.c index 1fdab155d..a14dd58a9 100644 --- a/src/ptserver/ptserver.c +++ b/src/ptserver/ptserver.c @@ -112,7 +112,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/ptserver/ptserver.c,v 1.21 2004/06/23 14:27:42 shadow Exp $"); + ("$Header: /cvs/openafs/src/ptserver/ptserver.c,v 1.21.2.1 2005/04/15 19:40:43 shadow Exp $"); #include #ifdef AFS_AIX32_ENV @@ -163,6 +163,8 @@ extern int afsconf_CheckAuth(); int pr_realmNameLen; char *pr_realmName; +int restricted = 0; + static struct afsconf_cell info; extern int prp_group_default; @@ -296,6 +298,9 @@ main(int argc, char **argv) prp_user_default = prp_access_mask(argv[++a]); prp_group_default = prp_access_mask(argv[++a]); } + else if (strncmp(arg, "-restricted", alen) == 0) { + restricted = 1; + } else if (strncmp(arg, "-enable_peer_stats", alen) == 0) { rx_enablePeerRPCStats(); } else if (strncmp(arg, "-enable_process_stats", alen) == 0) { @@ -319,6 +324,7 @@ main(int argc, char **argv) "[-syslog[=FACILITY]] " "[-p ] [-rebuild] " "[-groupdepth ] " + "[-restricted] " "[-enable_peer_stats] [-enable_process_stats] " "[-default_access default_user_access default_group_access] " "[-help]\n"); @@ -326,6 +332,7 @@ main(int argc, char **argv) printf("Usage: ptserver [-database ] " "[-p ] [-rebuild] " "[-default_access default_user_access default_group_access] " + "[-restricted] " "[-groupdepth ] " "[-help]\n"); #endif #else @@ -335,10 +342,12 @@ main(int argc, char **argv) "[-p ] [-rebuild] " "[-enable_peer_stats] [-enable_process_stats] " "[-default_access default_user_access default_group_access] " + "[-restricted] " "[-help]\n"); #else /* AFS_NT40_ENV */ printf("Usage: ptserver [-database ] " "[-default_access default_user_access default_group_access] " + "[-restricted] " "[-p ] [-rebuild] " "[-help]\n"); #endif #endif diff --git a/src/ptserver/ptuser.h b/src/ptserver/ptuser.h index 90d23838e..68631e144 100644 --- a/src/ptserver/ptuser.h +++ b/src/ptserver/ptuser.h @@ -41,4 +41,4 @@ int pr_SetMaxUserId(afs_int32 mid); int pr_ListMaxGroupId(afs_int32 *mid); int pr_SetMaxGroupId(afs_int32 mid); afs_int32 pr_SetFieldsEntry(afs_int32 id, afs_int32 mask, afs_int32 flags, afs_int32 ngroups, afs_int32 nusers); -#endif /* PTUSER_H */ \ No newline at end of file +#endif /* PTUSER_H */ diff --git a/src/ptserver/ptutils.c b/src/ptserver/ptutils.c index 96cbabf4e..336f839be 100644 --- a/src/ptserver/ptutils.c +++ b/src/ptserver/ptutils.c @@ -24,7 +24,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/ptserver/ptutils.c,v 1.18 2004/06/23 15:01:04 shadow Exp $"); + ("$Header: /cvs/openafs/src/ptserver/ptutils.c,v 1.18.2.1 2005/04/15 19:40:43 shadow Exp $"); #include #include @@ -53,7 +53,7 @@ RCSID /* Foreign cells are represented by the group system:authuser@cell*/ #define AUTHUSER_GROUP "system:authuser" - +extern int restricted; extern struct ubik_dbase *dbase; extern struct afsconf_dir *prdir; extern int pr_noAuth; @@ -319,6 +319,8 @@ AccessOK(struct ubik_trans *ut, afs_int32 cid, /* caller id */ return 1; if (cid == SYSADMINID) return 1; /* special case fileserver */ + if (restricted && ((mem == PRP_ADD_MEM) || (mem == any == 0))) + return 0; if (tentry) { flags = tentry->flags; oid = tentry->owner; @@ -1866,6 +1868,8 @@ ChangeEntry(struct ubik_trans *at, afs_int32 aid, afs_int32 cid, char *name, afs code = pr_ReadEntry(at, 0, loc, &tentry); if (code) return PRDBFAIL; + if (restricted && !IsAMemberOf(at, cid, SYSADMINID)) + return PRPERM; if (tentry.owner != cid && !IsAMemberOf(at, cid, SYSADMINID) && !IsAMemberOf(at, cid, tentry.owner) && !pr_noAuth) return PRPERM; diff --git a/src/rx/AIX/rx_kmutex.h b/src/rx/AIX/rx_kmutex.h index e3862ac30..ed8f5513d 100644 --- a/src/rx/AIX/rx_kmutex.h +++ b/src/rx/AIX/rx_kmutex.h @@ -68,15 +68,6 @@ typedef tid_t afs_kcondvar_t; __LINE__), \ simple_unlock((void *)(a)) - -#define RXObtainWriteLock(a) simple_lock((void *)(a)), \ - rxdb_grablock((void *)(a), thread_self(),rxdb_fileID,\ - __LINE__) - -#define RXReleaseWriteLock(a) rxdb_droplock((void *)(a), thread_self(), rxdb_fileID,\ - __LINE__), \ - simple_unlock((void *)(a)) - #define CV_WAIT(_cv, _lck) \ do { \ int haveGlock = ISAFS_GLOCK(); \ @@ -112,8 +103,6 @@ typedef tid_t afs_kcondvar_t; #define MUTEX_ENTER(a) simple_lock((void *)(a)) #define MUTEX_TRYENTER(a) simple_lock_try((void *)(a)) #define MUTEX_EXIT(a) simple_unlock((void *)(a)) -#define RXObtainWriteLock(a) simple_lock((void *)(a)) -#define RXReleaseWriteLock(a) simple_unlock((void *)(a)) #define CV_WAIT(_cv, _lck) \ do { \ diff --git a/src/rx/DUX/rx_knet.c b/src/rx/DUX/rx_knet.c index c82c2812d..b16ba0990 100644 --- a/src/rx/DUX/rx_knet.c +++ b/src/rx/DUX/rx_knet.c @@ -11,7 +11,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/rx/DUX/rx_knet.c,v 1.11 2004/08/09 00:58:50 shadow Exp $"); + ("$Header: /cvs/openafs/src/rx/DUX/rx_knet.c,v 1.11.2.1 2005/04/14 02:31:45 shadow Exp $"); #ifdef AFS_DUX40_ENV #include "rx/rx_kcommon.h" @@ -144,7 +144,6 @@ rxk_input(struct mbuf *am, int iphlen) */ data_len = ntohs(tu->uh_ulen); data_len -= 8; - AFS_RXGLOCK(); if (!(*rxk_GetPacketProc) (&phandle, data_len)) { if (rx_mb_to_packet(am, m_freem, 28, data_len, phandle)) { /* XXX should just increment counter here.. */ @@ -155,7 +154,6 @@ rxk_input(struct mbuf *am, int iphlen) rxk_portRocks[i], data_len); } else m_freem(am); - AFS_RXGUNLOCK(); USERPRI; return; } diff --git a/src/rx/FBSD/rx_knet.c b/src/rx/FBSD/rx_knet.c index bd611cc3a..4db3ffec6 100644 --- a/src/rx/FBSD/rx_knet.c +++ b/src/rx/FBSD/rx_knet.c @@ -11,7 +11,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/rx/FBSD/rx_knet.c,v 1.14 2004/03/10 23:01:55 rees Exp $"); + ("$Header: /cvs/openafs/src/rx/FBSD/rx_knet.c,v 1.14.2.1 2005/04/14 02:31:46 shadow Exp $"); #ifdef AFS_FBSD40_ENV #include @@ -283,7 +283,6 @@ rxk_input(struct mbuf *am, int iphlen) */ data_len = ntohs(tu->uh_ulen); data_len -= 8; - AFS_RXGLOCK(); if (!(*rxk_GetPacketProc) (&phandle, data_len)) { if (rx_mb_to_packet(am, m_freem, 28, data_len, phandle)) { /* XXX should just increment counter here.. */ @@ -294,7 +293,6 @@ rxk_input(struct mbuf *am, int iphlen) rxk_portRocks[i], data_len); } else m_freem(am); - AFS_RXGUNLOCK(); USERPRI; return; } diff --git a/src/rx/HPUX/rx_kmutex.h b/src/rx/HPUX/rx_kmutex.h index 3a4f4c848..09bd3bd8b 100644 --- a/src/rx/HPUX/rx_kmutex.h +++ b/src/rx/HPUX/rx_kmutex.h @@ -132,10 +132,6 @@ typedef caddr_t afs_kcondvar_t; #ifdef AFS_HPUX102_ENV -#define RXObtainWriteLock(a) AFS_ASSERT_RXGLOCK() -#define RXReleaseWriteLock(a) - - #if defined(AFS_HPUX110_ENV) #undef osirx_AssertMine extern void osirx_AssertMine(afs_kmutex_t * lockaddr, char *msg); diff --git a/src/rx/IRIX/rx_knet.c b/src/rx/IRIX/rx_knet.c index bf3ad3adc..1544171b0 100644 --- a/src/rx/IRIX/rx_knet.c +++ b/src/rx/IRIX/rx_knet.c @@ -11,7 +11,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/rx/IRIX/rx_knet.c,v 1.14 2003/07/15 23:16:21 shadow Exp $"); + ("$Header: /cvs/openafs/src/rx/IRIX/rx_knet.c,v 1.14.2.1 2005/04/15 18:37:15 shadow Exp $"); #include "rx/rx_kcommon.h" #include "h/tcp-param.h" @@ -416,7 +416,7 @@ rxi_GetIFInfo() #ifdef AFS_SGI65_ENV osi_NetSend(asocket, addr, dvec, nvec, asize, istack) - register struct osi_socket *asocket; + register osi_socket *asocket; struct iovec *dvec; int nvec; register afs_int32 asize; diff --git a/src/rx/LINUX/rx_kmutex.c b/src/rx/LINUX/rx_kmutex.c index bca77a1fc..e20168ec5 100644 --- a/src/rx/LINUX/rx_kmutex.c +++ b/src/rx/LINUX/rx_kmutex.c @@ -17,14 +17,12 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/rx/LINUX/rx_kmutex.c,v 1.7.2.1 2005/03/20 20:13:45 shadow Exp $"); + ("$Header: /cvs/openafs/src/rx/LINUX/rx_kmutex.c,v 1.7.2.2 2005/04/25 17:20:00 shadow Exp $"); #include "rx/rx_kcommon.h" #include "rx_kmutex.h" #include "rx/rx_kernel.h" -#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT) - void afs_mutex_init(afs_kmutex_t * l) { @@ -139,5 +137,3 @@ afs_cv_timedwait(afs_kcondvar_t * cv, afs_kmutex_t * l, int waittime) AFS_GLOCK(); MUTEX_ENTER(l); } - -#endif diff --git a/src/rx/LINUX/rx_kmutex.h b/src/rx/LINUX/rx_kmutex.h index bc1bed815..8473e19f7 100644 --- a/src/rx/LINUX/rx_kmutex.h +++ b/src/rx/LINUX/rx_kmutex.h @@ -24,7 +24,6 @@ #define AFS_GLOBAL_RXLOCK_KERNEL 1 -#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT) #define RX_ENABLE_LOCKS 1 #ifndef _LINUX_CODA_FS_I @@ -80,25 +79,4 @@ MUTEX_ISMINE(afs_kmutex_t * l) #define CV_BROADCAST(cv) wake_up((struct wait_queue**)cv) #endif -#else - -#define MUTEX_ISMINE(a) -#define osirx_AssertMine(addr, msg) - -#define MUTEX_DESTROY(a) -#define MUTEX_ENTER(a) -#define MUTEX_TRYENTER(a) 1 -#define MUTEX_EXIT(a) -#define MUTEX_INIT(a,b,c,d) -#define CV_INIT(a,b,c,d) -#define CV_DESTROY(a) -#endif - -/* Since we're using the RX listener daemon, we don't need to hold off - * interrupts. - */ -#define SPLVAR -#define NETPRI -#define USERPRI - #endif /* RX_KMUTEX_H_ */ diff --git a/src/rx/LINUX/rx_knet.c b/src/rx/LINUX/rx_knet.c index e636b8891..8d2ae8ecb 100644 --- a/src/rx/LINUX/rx_knet.c +++ b/src/rx/LINUX/rx_knet.c @@ -16,7 +16,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/rx/LINUX/rx_knet.c,v 1.23.2.5 2005/01/31 04:25:34 shadow Exp $"); + ("$Header: /cvs/openafs/src/rx/LINUX/rx_knet.c,v 1.23.2.6 2005/04/15 18:37:17 shadow Exp $"); #include #ifdef AFS_LINUX22_ENV @@ -29,7 +29,7 @@ RCSID /* rxk_NewSocket * open and bind RX socket */ -struct osi_socket * +osi_socket * rxk_NewSocketHost(afs_uint32 ahost, short aport) { struct socket *sockp; @@ -70,10 +70,10 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport) sockp->ops->setsockopt(sockp, SOL_IP, IP_MTU_DISCOVER, (char *)&pmtu, sizeof(pmtu)); TO_KERNEL_SPACE(); - return (struct osi_socket *)sockp; + return (osi_socket *)sockp; } -struct osi_socket * +osi_socket * rxk_NewSocket(short aport) { return rxk_NewSocketHost(htonl(INADDR_ANY), aport); diff --git a/src/rx/OBSD/rx_kmutex.h b/src/rx/OBSD/rx_kmutex.h index d19b92611..dfe0c162e 100644 --- a/src/rx/OBSD/rx_kmutex.h +++ b/src/rx/OBSD/rx_kmutex.h @@ -21,9 +21,6 @@ /* You can't have AFS_GLOBAL_SUNLOCK and not RX_ENABLE_LOCKS */ #define RX_ENABLE_LOCKS 1 #define AFS_GLOBAL_RXLOCK_KERNEL -#ifndef AFS_GLOBAL_SUNLOCK -#define AFS_ASSERT_RXGLOCK() -#endif /* This is incomplete and probably wouldn't work with NCPUS > 1 */ diff --git a/src/rx/SOLARIS/rx_knet.c b/src/rx/SOLARIS/rx_knet.c index 8505fffc3..d66ea045b 100644 --- a/src/rx/SOLARIS/rx_knet.c +++ b/src/rx/SOLARIS/rx_knet.c @@ -11,7 +11,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/rx/SOLARIS/rx_knet.c,v 1.19 2004/07/28 22:34:13 shadow Exp $"); + ("$Header: /cvs/openafs/src/rx/SOLARIS/rx_knet.c,v 1.19.2.1 2005/04/15 18:37:19 shadow Exp $"); #ifdef AFS_SUN5_ENV #include "rx/rx_kcommon.h" @@ -221,7 +221,7 @@ rxi_FindIfMTU(afs_uint32 addr) struct sockaddr_in rx_sockaddr; /* Allocate a new socket at specified port in network byte order. */ -struct osi_socket * +osi_socket * rxk_NewSocketHost(afs_uint32 ahost, short aport) { vnode_t *accessvp; @@ -315,17 +315,17 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport) return NULL; } - return (struct osi_socket *)so; + return (osi_socket *)so; } -struct osi_socket * +osi_socket * rxk_NewSocket(short aport) { return rxk_NewSocketHost(htonl(INADDR_ANY), aport); } int -osi_FreeSocket(register struct osi_socket *asocket) +osi_FreeSocket(register osi_socket *asocket) { extern int rxk_ListenerPid; struct sonode *so = (struct sonode *)asocket; @@ -509,7 +509,7 @@ rxi_GetIFInfo() dev_t afs_udp_rdev = (dev_t) 0; /* Allocate a new socket at specified port in network byte order. */ -struct osi_socket * +osi_socket * rxk_NewSocketHost(afs_uint32 ahost, short aport) { TIUSER *udp_tiptr; @@ -523,7 +523,7 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport) afs_udp_rdev = makedevice(11 /*CLONE*/, ddi_name_to_major("udp")); code = t_kopen(NULL, afs_udp_rdev, FREAD | FWRITE, &udp_tiptr, CRED()); if (code) { - return (struct osi_socket *)0; + return (osi_socket *)0; } code = t_kalloc(udp_tiptr, T_BIND, T_ADDR, (char **)&reqp); @@ -534,7 +534,7 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport) if (code) { t_kfree(udp_tiptr, (char *)reqp, T_BIND); t_kclose(udp_tiptr, 0); - return (struct osi_socket *)0; + return (osi_socket *)0; } reqp->addr.len = sizeof(struct sockaddr_in); @@ -548,13 +548,13 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport) t_kfree(udp_tiptr, (char *)reqp, T_BIND); t_kfree(udp_tiptr, (char *)rspp, T_BIND); t_kclose(udp_tiptr, 0); - return (struct osi_socket *)0; + return (osi_socket *)0; } if (memcmp(reqp->addr.buf, rspp->addr.buf, rspp->addr.len)) { t_kfree(udp_tiptr, (char *)reqp, T_BIND); t_kfree(udp_tiptr, (char *)rspp, T_BIND); t_kclose(udp_tiptr, 0); - return (struct osi_socket *)0; + return (osi_socket *)0; } t_kfree(udp_tiptr, (char *)reqp, T_BIND); t_kfree(udp_tiptr, (char *)rspp, T_BIND); @@ -568,17 +568,17 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport) q->q_next->q_hiwat = rx_UdpBufSize; RD(q)->q_hiwat = rx_UdpBufSize; - return (struct osi_socket *)udp_tiptr; + return (osi_socket *)udp_tiptr; } -struct osi_socket * +osi_socket * rxk_NewSocket(short aport) { return rxk_NewSocketHost(htonl(INADDR_ANY), aport); } int -osi_FreeSocket(register struct osi_socket *asocket) +osi_FreeSocket(register osi_socket *asocket) { extern int rxk_ListenerPid; TIUSER *udp_tiptr = (TIUSER *) asocket; @@ -681,7 +681,7 @@ osi_NetSend(osi_socket asocket, struct sockaddr_in *addr, struct iovec *dvec, int -osi_NetReceive(struct osi_socket *asocket, struct sockaddr_in *addr, +osi_NetReceive(osi_socket *asocket, struct sockaddr_in *addr, struct iovec *dvec, int nvecs, int *alength) { int i; diff --git a/src/rx/UKERNEL/rx_kmutex.h b/src/rx/UKERNEL/rx_kmutex.h index 5b5c8850f..38a140b0a 100644 --- a/src/rx/UKERNEL/rx_kmutex.h +++ b/src/rx/UKERNEL/rx_kmutex.h @@ -49,11 +49,6 @@ extern void osirx_AssertMine(afs_kmutex_t * lockaddr, char *msg); #endif -#define AFS_RXGLOCK() -#define AFS_RXGUNLOCK() -#define ISAFS_RXGLOCK() 1 -#define AFS_ASSERT_RXGLOCK() - #define SPLVAR #define NETPRI #define USERPRI diff --git a/src/rx/UKERNEL/rx_knet.c b/src/rx/UKERNEL/rx_knet.c index 3cc4db24d..2678a56ae 100644 --- a/src/rx/UKERNEL/rx_knet.c +++ b/src/rx/UKERNEL/rx_knet.c @@ -11,7 +11,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/rx/UKERNEL/rx_knet.c,v 1.10 2004/07/28 22:34:14 shadow Exp $"); + ("$Header: /cvs/openafs/src/rx/UKERNEL/rx_knet.c,v 1.10.2.1 2005/04/15 18:37:20 shadow Exp $"); #include "rx/rx_kcommon.h" @@ -169,7 +169,7 @@ rx_ServerProc(void) * routines. Allocate the socket buffer here, but don't open it until * we start the receiver threads. */ -struct osi_socket * +osi_socket * rxk_NewSocketHost(afs_uint32 ahost, short aport) { struct usr_socket *usockp; @@ -179,10 +179,10 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport) usockp->sock = -1; - return (struct osi_socket *)usockp; + return (osi_socket *)usockp; } -struct osi_socket * +osi_socket * rxk_NewSocket(short aport) { return rxk_NewSocketHost(htonl(INADDR_ANY), aport); diff --git a/src/rx/rx.c b/src/rx/rx.c index 6c8eca2f9..15b6178a8 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -17,7 +17,7 @@ #endif RCSID - ("$Header: /cvs/openafs/src/rx/rx.c,v 1.58.2.13 2005/04/04 04:27:01 shadow Exp $"); + ("$Header: /cvs/openafs/src/rx/rx.c,v 1.58.2.17 2005/04/20 21:23:47 jaltman Exp $"); #ifdef KERNEL #include "afs/sysincludes.h" @@ -217,6 +217,7 @@ rxi_InitPthread(void) assert(pthread_cond_init(&rx_listener_cond, (const pthread_condattr_t *)0) == 0); assert(pthread_key_create(&rx_thread_id_key, NULL) == 0); + assert(pthread_key_create(&rx_ts_info_key, NULL) == 0); } pthread_once_t rx_once_init = PTHREAD_ONCE_INIT; @@ -461,14 +462,18 @@ rx_InitHost(u_int host, u_int port) /* Malloc up a bunch of packets & buffers */ rx_nFreePackets = 0; - rx_nPackets = rx_extraPackets + RX_MAX_QUOTA + 2; /* fudge */ queue_Init(&rx_freePacketQueue); rxi_NeedMorePackets = FALSE; +#ifdef RX_ENABLE_TSFPQ + rx_nPackets = 0; /* in TSFPQ version, rx_nPackets is managed by rxi_MorePackets* */ + rxi_MorePacketsTSFPQ(rx_extraPackets + RX_MAX_QUOTA + 2, RX_TS_FPQ_FLUSH_GLOBAL, 0); +#else /* RX_ENABLE_TSFPQ */ + rx_nPackets = rx_extraPackets + RX_MAX_QUOTA + 2; /* fudge */ rxi_MorePackets(rx_nPackets); +#endif /* RX_ENABLE_TSFPQ */ rx_CheckPackets(); NETPRI; - AFS_RXGLOCK(); clock_Init(); @@ -534,7 +539,6 @@ rx_InitHost(u_int host, u_int port) * implementation environment--kernel or user space) */ rxi_StartListener(); - AFS_RXGUNLOCK(); USERPRI; tmp_status = rxinit_status = 0; UNLOCK_RX_INIT; @@ -655,6 +659,18 @@ rxi_StartServerProcs(int nExistingProcs) } #endif /* KERNEL */ +#ifdef AFS_NT40_ENV +/* This routine is only required on Windows */ +void +rx_StartClientThread(void) +{ +#ifdef AFS_PTHREAD_ENV + int pid; + pid = (int) pthread_self(); +#endif /* AFS_PTHREAD_ENV */ +} +#endif /* AFS_NT40_ENV */ + /* This routine must be called if any services are exported. If the * donateMe flag is set, the calling process is donated to the server * process pool */ @@ -667,7 +683,6 @@ rx_StartServer(int donateMe) clock_NewTime(); NETPRI; - AFS_RXGLOCK(); /* Start server processes, if necessary (exact function is dependent * on the implementation environment--kernel or user space). DonateMe * will be 1 if there is 1 pre-existing proc, i.e. this one. In this @@ -694,7 +709,6 @@ rx_StartServer(int donateMe) /* Turn on reaping of idle server connections */ rxi_ReapConnections(); - AFS_RXGUNLOCK(); USERPRI; if (donateMe) { @@ -717,6 +731,12 @@ rx_StartServer(int donateMe) #endif /* AFS_NT40_ENV */ rx_ServerProc(); /* Never returns */ } +#ifdef RX_ENABLE_TSFPQ + /* no use leaving packets around in this thread's local queue if + * it isn't getting donated to the server thread pool. + */ + rxi_FlushLocalPacketsTSFPQ(); +#endif /* RX_ENABLE_TSFPQ */ return; } @@ -746,7 +766,6 @@ rx_NewConnection(register afs_uint32 shost, u_short sport, u_short sservice, CV_INIT(&conn->conn_call_cv, "conn call cv", CV_DEFAULT, 0); #endif NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&rx_connHashTable_lock); cid = (rx_nextCid += RX_MAXCALLS); conn->type = RX_CLIENT_CONNECTION; @@ -780,7 +799,6 @@ rx_NewConnection(register afs_uint32 shost, u_short sport, u_short sservice, MUTEX_EXIT(&rx_stats_mutex); MUTEX_EXIT(&rx_connHashTable_lock); - AFS_RXGUNLOCK(); USERPRI; return conn; } @@ -1010,9 +1028,7 @@ rx_DestroyConnection(register struct rx_connection *conn) SPLVAR; NETPRI; - AFS_RXGLOCK(); rxi_DestroyConnection(conn); - AFS_RXGUNLOCK(); USERPRI; } @@ -1022,11 +1038,9 @@ rx_GetConnection(register struct rx_connection *conn) SPLVAR; NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&conn->conn_data_lock); conn->refCount++; MUTEX_EXIT(&conn->conn_data_lock); - AFS_RXGUNLOCK(); USERPRI; } @@ -1052,7 +1066,6 @@ rx_NewCall(register struct rx_connection *conn) NETPRI; clock_GetTime(&queueTime); - AFS_RXGLOCK(); MUTEX_ENTER(&conn->conn_call_lock); /* @@ -1127,12 +1140,10 @@ rx_NewCall(register struct rx_connection *conn) MUTEX_EXIT(&call->lock); MUTEX_EXIT(&conn->conn_call_lock); - AFS_RXGUNLOCK(); USERPRI; #ifdef AFS_GLOBAL_RXLOCK_KERNEL /* Now, if TQ wasn't cleared earlier, do it now. */ - AFS_RXGLOCK(); MUTEX_ENTER(&call->lock); while (call->flags & RX_CALL_TQ_BUSY) { call->flags |= RX_CALL_TQ_WAIT; @@ -1147,7 +1158,6 @@ rx_NewCall(register struct rx_connection *conn) queue_Init(&call->tq); } MUTEX_EXIT(&call->lock); - AFS_RXGUNLOCK(); #endif /* AFS_GLOBAL_RXLOCK_KERNEL */ return call; @@ -1250,7 +1260,6 @@ rx_NewService(u_short port, u_short serviceId, char *serviceName, tservice = rxi_AllocService(); NETPRI; - AFS_RXGLOCK(); for (i = 0; i < RX_MAX_SERVICES; i++) { register struct rx_service *service = rx_services[i]; if (service) { @@ -1263,7 +1272,6 @@ rx_NewService(u_short port, u_short serviceId, char *serviceName, (osi_Msg "rx_NewService: tried to install service %s with service id %d, which is already in use for service %s\n", serviceName, serviceId, service->serviceName); - AFS_RXGUNLOCK(); USERPRI; rxi_FreeService(tservice); return service; @@ -1278,7 +1286,6 @@ rx_NewService(u_short port, u_short serviceId, char *serviceName, * service on same port) get a new one */ socket = rxi_GetHostUDPSocket(htonl(INADDR_ANY), port); if (socket == OSI_NULLSOCKET) { - AFS_RXGUNLOCK(); USERPRI; rxi_FreeService(tservice); return 0; @@ -1298,12 +1305,10 @@ rx_NewService(u_short port, u_short serviceId, char *serviceName, service->executeRequestProc = serviceProc; service->checkReach = 0; rx_services[i] = service; /* not visible until now */ - AFS_RXGUNLOCK(); USERPRI; return service; } } - AFS_RXGUNLOCK(); USERPRI; rxi_FreeService(tservice); (osi_Msg "rx_NewService: cannot support > %d services\n", @@ -1343,14 +1348,12 @@ rxi_ServerProc(int threadID, struct rx_call *newcall, osi_socket * socketp) SPLVAR; NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&call->lock); rxi_CallError(call, RX_RESTARTING); rxi_SendCallAbort(call, (struct rx_packet *)0, 0, 0); MUTEX_EXIT(&call->lock); - AFS_RXGUNLOCK(); USERPRI; } #ifdef KERNEL @@ -1392,7 +1395,6 @@ rx_WakeupServerProcs(void) SPLVAR; NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&rx_serverPool_lock); #ifdef RX_ENABLE_LOCKS @@ -1420,7 +1422,6 @@ rx_WakeupServerProcs(void) #endif /* RX_ENABLE_LOCKS */ } MUTEX_EXIT(&rx_serverPool_lock); - AFS_RXGUNLOCK(); USERPRI; } @@ -1631,7 +1632,6 @@ rx_GetCall(int tno, struct rx_service *cur_service, osi_socket * socketp) SPLVAR; NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&freeSQEList_lock); if ((sq = rx_FreeSQEList)) { @@ -1726,7 +1726,6 @@ rx_GetCall(int tno, struct rx_service *cur_service, osi_socket * socketp) osi_rxSleep(sq); #ifdef KERNEL if (afs_termState == AFSOP_STOP_RXCALLBACK) { - AFS_RXGUNLOCK(); USERPRI; rxi_Free(sq, sizeof(struct rx_serverQueueEntry)); return (struct rx_call *)0; @@ -1767,7 +1766,6 @@ rx_GetCall(int tno, struct rx_service *cur_service, osi_socket * socketp) dpf(("rx_GetCall(socketp=0x%x, *socketp=0x%x)\n", socketp, *socketp)); } - AFS_RXGUNLOCK(); USERPRI; return call; @@ -1815,7 +1813,6 @@ rx_EndCall(register struct rx_call *call, afs_int32 rc) dpf(("rx_EndCall(call %x)\n", call)); NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&call->lock); if (rc == 0 && call->error == 0) { @@ -1926,7 +1923,6 @@ rx_EndCall(register struct rx_call *call, afs_int32 rc) MUTEX_EXIT(&conn->conn_call_lock); conn->flags &= ~RX_CONN_BUSY; } - AFS_RXGUNLOCK(); USERPRI; /* * Map errors to the local host's errno.h format. diff --git a/src/rx/rx_clock.h b/src/rx/rx_clock.h index 0668c1418..01d1c54ed 100644 --- a/src/rx/rx_clock.h +++ b/src/rx/rx_clock.h @@ -110,13 +110,6 @@ extern int clock_nUpdates; #define clock_ElapsedTime(cv1, cv2) \ (((cv2)->sec - (cv1)->sec)*1000 + ((cv2)->usec - (cv1)->usec)/1000) -#ifdef AFS_PTHREAD_ENV -#define clock_Advance(cv) -#else -/* Advance the known value of the current clock time (clock_now) by the specified clock value */ -#define clock_Advance(cv) clock_Add(&clock_now, cv) -#endif /* AFS_PTHREAD_ENV */ - /* Some comparison operators for clock values */ #define clock_Gt(a, b) ((a)->sec>(b)->sec || ((a)->sec==(b)->sec && (a)->usec>(b)->usec)) #define clock_Ge(a, b) ((a)->sec>(b)->sec || ((a)->sec==(b)->sec && (a)->usec>=(b)->usec)) diff --git a/src/rx/rx_event.c b/src/rx/rx_event.c index 5c7421445..a7084790a 100644 --- a/src/rx/rx_event.c +++ b/src/rx/rx_event.c @@ -19,7 +19,7 @@ #endif RCSID - ("$Header: /cvs/openafs/src/rx/rx_event.c,v 1.14.2.2 2004/12/07 06:10:06 shadow Exp $"); + ("$Header: /cvs/openafs/src/rx/rx_event.c,v 1.14.2.3 2005/04/14 02:31:44 shadow Exp $"); #ifdef KERNEL #ifndef UKERNEL @@ -198,7 +198,6 @@ _rxevent_Post(struct clock *when, void (*func) (), void *arg, void *arg1, int isEarliest = 0; MUTEX_ENTER(&rxevent_lock); - AFS_ASSERT_RXGLOCK(); #ifdef RXDEBUG if (rx_Log_event) { struct clock now; @@ -337,7 +336,6 @@ rxevent_Cancel_1(register struct rxevent *ev, register struct rx_call *call, /* Append it to the free list (rather than prepending) to keep the free * list hot so nothing pages out */ - AFS_ASSERT_RXGLOCK(); MUTEX_ENTER(&rxevent_lock); if (!ev) { MUTEX_EXIT(&rxevent_lock); @@ -383,8 +381,6 @@ rxevent_RaiseEvents(struct clock *next) MUTEX_ENTER(&rxevent_lock); - AFS_ASSERT_RXGLOCK(); - /* Events are sorted by time, so only scan until an event is found that has * not yet timed out */ diff --git a/src/rx/rx_globals.h b/src/rx/rx_globals.h index 48774f00f..2cb72941c 100644 --- a/src/rx/rx_globals.h +++ b/src/rx/rx_globals.h @@ -9,6 +9,10 @@ /* RX: Globals for internal use, basically */ +#ifndef AFS_RX_GLOBALS_H +#define AFS_RX_GLOBALS_H + + #ifdef KERNEL #include "rx/rx.h" #else /* KERNEL */ @@ -22,7 +26,7 @@ #else #define EXT extern #endif -#endif +#endif /* !INIT */ /* Basic socket for client requests; other sockets (for receiving server requests) are in the service structures */ EXT osi_socket rx_socket; @@ -141,11 +145,200 @@ EXT int rxi_HardAckRate INIT(RX_FAST_ACK_RATE + 1); EXT int rx_nPackets INIT(100); /* obsolete; use rx_extraPackets now */ +/* + * pthreads thread-specific rx info support + * the rx_ts_info_t struct is meant to support all kinds of + * thread-specific rx data: + * + * _FPQ member contains a thread-specific free packet queue + */ +#ifdef AFS_PTHREAD_ENV +EXT pthread_key_t rx_ts_info_key; +typedef struct rx_ts_info_t { + struct { + struct rx_queue queue; + int len; /* local queue length */ + int delta; /* number of new packets alloc'd locally since last sync w/ global queue */ + + /* FPQ stats */ + int checkin_ops; + int checkout_ops; + int gtol_ops; + int gtol_xfer; + int ltog_ops; + int ltog_xfer; + int alloc_ops; + int alloc_xfer; + } _FPQ; +} rx_ts_info_t; +EXT struct rx_ts_info_t * rx_ts_info_init(); /* init function for thread-specific data struct */ +#define RX_TS_INFO_GET(ts_info_p) \ + do { \ + ts_info_p = (struct rx_ts_info_t*)pthread_getspecific(rx_ts_info_key); \ + if (ts_info_p == NULL) { \ + assert((ts_info_p = rx_ts_info_init()) != NULL); \ + } \ + } while(0) +#endif /* AFS_PTHREAD_ENV */ + + /* List of free packets */ +/* in pthreads rx, free packet queue is now a two-tiered queueing system + * in which the first tier is thread-specific, and the second tier is + * a global free packet queue */ EXT struct rx_queue rx_freePacketQueue; +#define RX_FPQ_MARK_FREE(p) \ + do { \ + if ((p)->flags & RX_PKTFLAG_FREE) \ + osi_Panic("rx packet already free\n"); \ + (p)->flags |= RX_PKTFLAG_FREE; \ + } while(0) +#define RX_FPQ_MARK_USED(p) \ + do { \ + if (!((p)->flags & RX_PKTFLAG_FREE)) \ + osi_Panic("rx packet not free\n"); \ + (p)->flags = 0; /* clear RX_PKTFLAG_FREE, initialize the rest */ \ + (p)->header.flags = 0; \ + } while(0) +#define RX_PACKET_IOV_INIT(p) \ + do { \ + (p)->wirevec[0].iov_base = (char *)((p)->wirehead); \ + (p)->wirevec[0].iov_len = RX_HEADER_SIZE; \ + (p)->wirevec[1].iov_base = (char *)((p)->localdata); \ + (p)->wirevec[1].iov_len = RX_FIRSTBUFFERSIZE; \ + } while(0) +#define RX_PACKET_IOV_FULLINIT(p) \ + do { \ + (p)->wirevec[0].iov_base = (char *)((p)->wirehead); \ + (p)->wirevec[0].iov_len = RX_HEADER_SIZE; \ + (p)->wirevec[1].iov_base = (char *)((p)->localdata); \ + (p)->wirevec[1].iov_len = RX_FIRSTBUFFERSIZE; \ + (p)->niovecs = 2; \ + (p)->length = RX_FIRSTBUFFERSIZE; \ + } while(0) #ifdef RX_ENABLE_LOCKS EXT afs_kmutex_t rx_freePktQ_lock; -#endif +#endif /* RX_ENABLE_LOCKS */ + +#if defined(AFS_PTHREAD_ENV) +#define RX_ENABLE_TSFPQ +EXT int rx_TSFPQGlobSize INIT(3); /* number of packets to transfer between global and local queues in one op */ +EXT int rx_TSFPQLocalMax INIT(15); /* max number of packets on local FPQ before returning a glob to the global pool */ +EXT int rx_TSFPQMaxProcs INIT(0); /* max number of threads expected */ +EXT void rxi_MorePacketsTSFPQ(int apackets, int flush_global, int num_keep_local); /* more flexible packet alloc function */ +EXT void rxi_AdjustLocalPacketsTSFPQ(int num_keep_local, int allow_overcommit); /* adjust thread-local queue length, for places where we know how many packets we will need a priori */ +EXT void rxi_FlushLocalPacketsTSFPQ(void); /* flush all thread-local packets to global queue */ +#define RX_TS_FPQ_FLUSH_GLOBAL 1 +#define RX_TS_FPQ_PULL_GLOBAL 1 +#define RX_TS_FPQ_ALLOW_OVERCOMMIT 1 +/* compute the localmax and globsize values from rx_TSFPQMaxProcs and rx_nPackets. + arbitarily set local max so that all threads consume 90% of packets, if all local queues are full. + arbitarily set transfer glob size to 20% of max local packet queue length. + also set minimum values of 15 and 3. */ +#define RX_TS_FPQ_COMPUTE_LIMITS \ + do { \ + register int newmax, newglob; \ + newmax = (rx_nPackets * 9) / (10 * rx_TSFPQMaxProcs); \ + newmax = (newmax >= 15) ? newmax : 15; \ + newglob = newmax / 5; \ + newglob = (newglob >= 3) ? newglob : 3; \ + rx_TSFPQLocalMax = newmax; \ + rx_TSFPQGlobSize = newglob; \ + } while(0) +/* move packets from local (thread-specific) to global free packet queue. + rx_freePktQ_lock must be held. default is to move the difference between the current lenght, and the + allowed max plus one extra glob. */ +#define RX_TS_FPQ_LTOG(rx_ts_info_p) \ + do { \ + register int i; \ + register struct rx_packet * p; \ + register int tsize = (rx_ts_info_p)->_FPQ.len - rx_TSFPQLocalMax + rx_TSFPQGlobSize; \ + for (i=0,p=queue_Last(&((rx_ts_info_p)->_FPQ), rx_packet); \ + i < tsize; i++,p=queue_Prev(p, rx_packet)); \ + queue_SplitAfterPrepend(&((rx_ts_info_p)->_FPQ),&rx_freePacketQueue,p); \ + (rx_ts_info_p)->_FPQ.len -= tsize; \ + rx_nFreePackets += tsize; \ + (rx_ts_info_p)->_FPQ.ltog_ops++; \ + (rx_ts_info_p)->_FPQ.ltog_xfer += tsize; \ + if ((rx_ts_info_p)->_FPQ.delta) { \ + (rx_ts_info_p)->_FPQ.alloc_ops++; \ + (rx_ts_info_p)->_FPQ.alloc_xfer += (rx_ts_info_p)->_FPQ.delta; \ + MUTEX_ENTER(&rx_stats_mutex); \ + rx_nPackets += (rx_ts_info_p)->_FPQ.delta; \ + RX_TS_FPQ_COMPUTE_LIMITS; \ + MUTEX_EXIT(&rx_stats_mutex); \ + (rx_ts_info_p)->_FPQ.delta = 0; \ + } \ + } while(0) +/* same as above, except user has direct control over number to transfer */ +#define RX_TS_FPQ_LTOG2(rx_ts_info_p,num_transfer) \ + do { \ + register int i; \ + register struct rx_packet * p; \ + for (i=0,p=queue_Last(&((rx_ts_info_p)->_FPQ), rx_packet); \ + i < (num_transfer); i++,p=queue_Prev(p, rx_packet)); \ + queue_SplitAfterPrepend(&((rx_ts_info_p)->_FPQ),&rx_freePacketQueue,p); \ + (rx_ts_info_p)->_FPQ.len -= (num_transfer); \ + rx_nFreePackets += (num_transfer); \ + (rx_ts_info_p)->_FPQ.ltog_ops++; \ + (rx_ts_info_p)->_FPQ.ltog_xfer += (num_transfer); \ + if ((rx_ts_info_p)->_FPQ.delta) { \ + (rx_ts_info_p)->_FPQ.alloc_ops++; \ + (rx_ts_info_p)->_FPQ.alloc_xfer += (rx_ts_info_p)->_FPQ.delta; \ + MUTEX_ENTER(&rx_stats_mutex); \ + rx_nPackets += (rx_ts_info_p)->_FPQ.delta; \ + RX_TS_FPQ_COMPUTE_LIMITS; \ + MUTEX_EXIT(&rx_stats_mutex); \ + (rx_ts_info_p)->_FPQ.delta = 0; \ + } \ + } while(0) +/* move packets from global to local (thread-specific) free packet queue. + rx_freePktQ_lock must be held. */ +#define RX_TS_FPQ_GTOL(rx_ts_info_p) \ + do { \ + register int i, tsize; \ + register struct rx_packet * p; \ + tsize = (rx_TSFPQGlobSize <= rx_nFreePackets) ? \ + rx_TSFPQGlobSize : rx_nFreePackets; \ + for (i=0,p=queue_First(&rx_freePacketQueue, rx_packet); \ + i < tsize; i++,p=queue_Next(p, rx_packet)); \ + queue_SplitBeforeAppend(&rx_freePacketQueue,&((rx_ts_info_p)->_FPQ),p); \ + (rx_ts_info_p)->_FPQ.len += i; \ + rx_nFreePackets -= i; \ + (rx_ts_info_p)->_FPQ.gtol_ops++; \ + (rx_ts_info_p)->_FPQ.gtol_xfer += i; \ + } while(0) +/* same as above, except user has direct control over number to transfer */ +#define RX_TS_FPQ_GTOL2(rx_ts_info_p,num_transfer) \ + do { \ + register int i; \ + register struct rx_packet * p; \ + for (i=0,p=queue_First(&rx_freePacketQueue, rx_packet); \ + i < (num_transfer); i++,p=queue_Next(p, rx_packet)); \ + queue_SplitBeforeAppend(&rx_freePacketQueue,&((rx_ts_info_p)->_FPQ),p); \ + (rx_ts_info_p)->_FPQ.len += i; \ + rx_nFreePackets -= i; \ + (rx_ts_info_p)->_FPQ.gtol_ops++; \ + (rx_ts_info_p)->_FPQ.gtol_xfer += i; \ + } while(0) +/* checkout a packet from the thread-specific free packet queue */ +#define RX_TS_FPQ_CHECKOUT(rx_ts_info_p,p) \ + do { \ + (p) = queue_First(&((rx_ts_info_p)->_FPQ), rx_packet); \ + queue_Remove(p); \ + RX_FPQ_MARK_USED(p); \ + (rx_ts_info_p)->_FPQ.len--; \ + (rx_ts_info_p)->_FPQ.checkout_ops++; \ + } while(0) +/* check a packet into the thread-specific free packet queue */ +#define RX_TS_FPQ_CHECKIN(rx_ts_info_p,p) \ + do { \ + queue_Prepend(&((rx_ts_info_p)->_FPQ), (p)); \ + RX_FPQ_MARK_FREE(p); \ + (rx_ts_info_p)->_FPQ.len++; \ + (rx_ts_info_p)->_FPQ.checkin_ops++; \ + } while(0) +#endif /* AFS_PTHREAD_ENV */ /* Number of free packets */ EXT int rx_nFreePackets INIT(0); @@ -338,3 +531,5 @@ EXT int rx_enable_stats INIT(0); * the request path. */ EXT int rx_enable_hot_thread INIT(0); + +#endif /* AFS_RX_GLOBALS_H */ diff --git a/src/rx/rx_kcommon.c b/src/rx/rx_kcommon.c index df07e8062..69c2d9b83 100644 --- a/src/rx/rx_kcommon.c +++ b/src/rx/rx_kcommon.c @@ -15,7 +15,7 @@ #include "afs/param.h" RCSID - ("$Header: /cvs/openafs/src/rx/rx_kcommon.c,v 1.44.2.1 2004/08/25 07:09:41 shadow Exp $"); + ("$Header: /cvs/openafs/src/rx/rx_kcommon.c,v 1.44.2.3 2005/04/15 18:37:14 shadow Exp $"); #include "rx/rx_kcommon.h" @@ -30,7 +30,7 @@ int (*rxk_PacketArrivalProc) (register struct rx_packet * ahandle, register stru int (*rxk_GetPacketProc) (char **ahandle, int asize); #endif -struct osi_socket *rxk_NewSocketHost(afs_uint32 ahost, short aport); +osi_socket *rxk_NewSocketHost(afs_uint32 ahost, short aport); extern struct interfaceAddr afs_cb_interface; rxk_ports_t rxk_ports; @@ -105,9 +105,9 @@ rxk_shutdownPorts(void) osi_socket rxi_GetHostUDPSocket(u_int host, u_short port) { - struct osi_socket *sockp; - sockp = (struct osi_socket *)rxk_NewSocketHost(host, port); - if (sockp == (struct osi_socket *)0) + osi_socket *sockp; + sockp = (osi_socket *)rxk_NewSocketHost(host, port); + if (sockp == (osi_socket *)0) return OSI_NULLSOCKET; rxk_AddPort(port, (char *)sockp); return (osi_socket) sockp; @@ -761,7 +761,7 @@ rxi_FindIfnet(afs_uint32 addr, afs_uint32 * maskp) /* rxk_NewSocket creates a new socket on the specified port. The port is * in network byte order. */ -struct osi_socket * +osi_socket * rxk_NewSocketHost(afs_uint32 ahost, short aport) { register afs_int32 code; @@ -905,17 +905,17 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport) #if defined(AFS_DARWIN_ENV) && defined(KERNEL_FUNNEL) thread_funnel_switch(NETWORK_FUNNEL, KERNEL_FUNNEL); #endif - return (struct osi_socket *)newSocket; + return (osi_socket *)newSocket; bad: AFS_GLOCK(); #if defined(AFS_DARWIN_ENV) && defined(KERNEL_FUNNEL) thread_funnel_switch(NETWORK_FUNNEL, KERNEL_FUNNEL); #endif - return (struct osi_socket *)0; + return (osi_socket *)0; } -struct osi_socket * +osi_socket * rxk_NewSocket(short aport) { return rxk_NewSocketHost(0, aport); @@ -964,9 +964,7 @@ afs_rxevent_daemon(void) AFS_GUNLOCK(); #endif /* RX_ENABLE_LOCKS */ NETPRI; - AFS_RXGLOCK(); rxevent_RaiseEvents(&temp); - AFS_RXGUNLOCK(); USERPRI; #ifdef RX_ENABLE_LOCKS AFS_GLOCK(); @@ -1151,9 +1149,7 @@ rxk_Listener(void) osi_Panic("rxk_Listener: No more Rx buffers!\n"); } if (!(code = rxk_ReadPacket(rx_socket, rxp, &host, &port))) { - AFS_RXGLOCK(); rxp = rxi_ReceivePacket(rxp, rx_socket, host, port, 0, 0); - AFS_RXGUNLOCK(); } } diff --git a/src/rx/rx_lwp.h b/src/rx/rx_lwp.h index aea794576..720196dd3 100644 --- a/src/rx/rx_lwp.h +++ b/src/rx/rx_lwp.h @@ -19,8 +19,6 @@ #define CALL_HOLD(call, type) #define CALL_RELE(call, type) -#define RXObtainWriteLock(a) AFS_ASSERT_RXGLOCK() -#define RXReleaseWriteLock(a) #define MUTEX_DESTROY(a) #define MUTEX_ENTER(a) diff --git a/src/rx/rx_packet.c b/src/rx/rx_packet.c index 2290d9fdd..c5304ee59 100644 --- a/src/rx/rx_packet.c +++ b/src/rx/rx_packet.c @@ -15,7 +15,7 @@ #endif RCSID - ("$Header: /cvs/openafs/src/rx/rx_packet.c,v 1.35.2.10 2005/04/04 04:27:02 shadow Exp $"); + ("$Header: /cvs/openafs/src/rx/rx_packet.c,v 1.35.2.14 2005/04/20 21:23:47 jaltman Exp $"); #ifdef KERNEL #if defined(UKERNEL) @@ -244,6 +244,35 @@ rx_SlowWritePacket(struct rx_packet * packet, int offset, int resid, char *in) return (resid ? (r - resid) : r); } +#ifdef RX_ENABLE_TSFPQ +static struct rx_packet * +allocCBuf(int class) +{ + struct rx_packet *c; + register struct rx_ts_info_t * rx_ts_info; + SPLVAR; + + RX_TS_INFO_GET(rx_ts_info); + + if (queue_IsEmpty(&rx_ts_info->_FPQ)) { + NETPRI; + MUTEX_ENTER(&rx_freePktQ_lock); + + if (queue_IsEmpty(&rx_freePacketQueue)) { + rxi_MorePacketsNoLock(rx_initSendWindow); + } + + RX_TS_FPQ_GTOL(rx_ts_info); + + MUTEX_EXIT(&rx_freePktQ_lock); + USERPRI; + } + + RX_TS_FPQ_CHECKOUT(rx_ts_info, c); + + return c; +} +#else /* RX_ENABLE_TSFPQ */ static struct rx_packet * allocCBuf(int class) { @@ -251,6 +280,7 @@ allocCBuf(int class) SPLVAR; NETPRI; + MUTEX_ENTER(&rx_freePktQ_lock); #ifdef KERNEL @@ -306,10 +336,36 @@ allocCBuf(int class) USERPRI; return c; } +#endif /* RX_ENABLE_TSFPQ */ /* * Free a packet currently used as a continuation buffer */ +#ifdef RX_ENABLE_TSFPQ +void +rxi_freeCBuf(struct rx_packet *c) +{ + register struct rx_ts_info_t * rx_ts_info; + register int i; + SPLVAR; + + RX_TS_INFO_GET(rx_ts_info); + RX_TS_FPQ_CHECKIN(rx_ts_info,c); + + if (rx_ts_info->_FPQ.len > rx_TSFPQLocalMax) { + NETPRI; + MUTEX_ENTER(&rx_freePktQ_lock); + + RX_TS_FPQ_LTOG(rx_ts_info); + + /* Wakeup anyone waiting for packets */ + rxi_PacketsUnWait(); + + MUTEX_EXIT(&rx_freePktQ_lock); + USERPRI; + } +} +#else /* RX_ENABLE_TSFPQ */ void rxi_freeCBuf(struct rx_packet *c) { @@ -325,6 +381,7 @@ rxi_freeCBuf(struct rx_packet *c) MUTEX_EXIT(&rx_freePktQ_lock); USERPRI; } +#endif /* RX_ENABLE_TSFPQ */ /* this one is kind of awful. * In rxkad, the packet has been all shortened, and everything, ready for @@ -380,6 +437,43 @@ rxi_AllocDataBuf(struct rx_packet *p, int nb, int class) } /* Add more packet buffers */ +#ifdef RX_ENABLE_TSFPQ +void +rxi_MorePackets(int apackets) +{ + struct rx_packet *p, *e; + register struct rx_ts_info_t * rx_ts_info; + int getme; + SPLVAR; + + getme = apackets * sizeof(struct rx_packet); + p = rx_mallocedP = (struct rx_packet *)osi_Alloc(getme); + + PIN(p, getme); /* XXXXX */ + memset((char *)p, 0, getme); + RX_TS_INFO_GET(rx_ts_info); + + for (e = p + apackets; p < e; p++) { + RX_PACKET_IOV_INIT(p); + p->niovecs = 2; + + RX_TS_FPQ_CHECKIN(rx_ts_info,p); + } + rx_ts_info->_FPQ.delta += apackets; + + if (rx_ts_info->_FPQ.len > rx_TSFPQLocalMax) { + NETPRI; + MUTEX_ENTER(&rx_freePktQ_lock); + + RX_TS_FPQ_LTOG(rx_ts_info); + rxi_NeedMorePackets = FALSE; + rxi_PacketsUnWait(); + + MUTEX_EXIT(&rx_freePktQ_lock); + USERPRI; + } +} +#else /* RX_ENABLE_TSFPQ */ void rxi_MorePackets(int apackets) { @@ -393,14 +487,10 @@ rxi_MorePackets(int apackets) PIN(p, getme); /* XXXXX */ memset((char *)p, 0, getme); NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&rx_freePktQ_lock); for (e = p + apackets; p < e; p++) { - p->wirevec[0].iov_base = (char *)(p->wirehead); - p->wirevec[0].iov_len = RX_HEADER_SIZE; - p->wirevec[1].iov_base = (char *)(p->localdata); - p->wirevec[1].iov_len = RX_FIRSTBUFFERSIZE; + RX_PACKET_IOV_INIT(p); p->flags |= RX_PKTFLAG_FREE; p->niovecs = 2; @@ -410,10 +500,49 @@ rxi_MorePackets(int apackets) rxi_NeedMorePackets = FALSE; rxi_PacketsUnWait(); - AFS_RXGUNLOCK(); MUTEX_EXIT(&rx_freePktQ_lock); USERPRI; } +#endif /* RX_ENABLE_TSFPQ */ + +#ifdef RX_ENABLE_TSFPQ +void +rxi_MorePacketsTSFPQ(int apackets, int flush_global, int num_keep_local) +{ + struct rx_packet *p, *e; + register struct rx_ts_info_t * rx_ts_info; + int getme; + SPLVAR; + + getme = apackets * sizeof(struct rx_packet); + p = rx_mallocedP = (struct rx_packet *)osi_Alloc(getme); + + PIN(p, getme); /* XXXXX */ + memset((char *)p, 0, getme); + RX_TS_INFO_GET(rx_ts_info); + + for (e = p + apackets; p < e; p++) { + RX_PACKET_IOV_INIT(p); + p->niovecs = 2; + + RX_TS_FPQ_CHECKIN(rx_ts_info,p); + } + rx_ts_info->_FPQ.delta += apackets; + + if (flush_global && + (num_keep_local < apackets)) { + NETPRI; + MUTEX_ENTER(&rx_freePktQ_lock); + + RX_TS_FPQ_LTOG2(rx_ts_info, (apackets - num_keep_local)); + rxi_NeedMorePackets = FALSE; + rxi_PacketsUnWait(); + + MUTEX_EXIT(&rx_freePktQ_lock); + USERPRI; + } +} +#endif /* RX_ENABLE_TSFPQ */ #ifndef KERNEL /* Add more packet buffers */ @@ -433,16 +562,21 @@ rxi_MorePacketsNoLock(int apackets) memset((char *)p, 0, getme); for (e = p + apackets; p < e; p++) { - p->wirevec[0].iov_base = (char *)(p->wirehead); - p->wirevec[0].iov_len = RX_HEADER_SIZE; - p->wirevec[1].iov_base = (char *)(p->localdata); - p->wirevec[1].iov_len = RX_FIRSTBUFFERSIZE; + RX_PACKET_IOV_INIT(p); p->flags |= RX_PKTFLAG_FREE; p->niovecs = 2; queue_Append(&rx_freePacketQueue, p); } + rx_nFreePackets += apackets; +#ifdef RX_ENABLE_TSFPQ + /* TSFPQ patch also needs to keep track of total packets */ + MUTEX_ENTER(&rx_stats_mutex); + rx_nPackets += apackets; + RX_TS_FPQ_COMPUTE_LIMITS; + MUTEX_EXIT(&rx_stats_mutex); +#endif /* RX_ENABLE_TSFPQ */ rxi_NeedMorePackets = FALSE; rxi_PacketsUnWait(); } @@ -458,6 +592,44 @@ rxi_FreeAllPackets(void) UNPIN(rx_mallocedP, (rx_maxReceiveWindow + 2) * sizeof(struct rx_packet)); } +#ifdef RX_ENABLE_TSFPQ +void +rxi_AdjustLocalPacketsTSFPQ(int num_keep_local, int allow_overcommit) +{ + register struct rx_ts_info_t * rx_ts_info; + register int xfer; + SPLVAR; + + RX_TS_INFO_GET(rx_ts_info); + + if (num_keep_local != rx_ts_info->_FPQ.len) { + NETPRI; + MUTEX_ENTER(&rx_freePktQ_lock); + if (num_keep_local < rx_ts_info->_FPQ.len) { + xfer = rx_ts_info->_FPQ.len - num_keep_local; + RX_TS_FPQ_LTOG2(rx_ts_info, xfer); + rxi_PacketsUnWait(); + } else { + xfer = num_keep_local - rx_ts_info->_FPQ.len; + if ((num_keep_local > rx_TSFPQLocalMax) && !allow_overcommit) + xfer = rx_TSFPQLocalMax - rx_ts_info->_FPQ.len; + if (rx_nFreePackets < xfer) { + rxi_MorePacketsNoLock(xfer - rx_nFreePackets); + } + RX_TS_FPQ_GTOL2(rx_ts_info, xfer); + } + MUTEX_EXIT(&rx_freePktQ_lock); + USERPRI; + } +} + +void +rxi_FlushLocalPacketsTSFPQ(void) +{ + rxi_AdjustLocalPacketsTSFPQ(0, 0); +} +#endif /* RX_ENABLE_TSFPQ */ + /* Allocate more packets iff we need more continuation buffers */ /* In kernel, can't page in memory with interrupts disabled, so we * don't use the event mechanism. */ @@ -483,17 +655,55 @@ rx_CheckPackets(void) */ /* Actually free the packet p. */ +#ifdef RX_ENABLE_TSFPQ +void +rxi_FreePacketNoLock(struct rx_packet *p) +{ + register struct rx_ts_info_t * rx_ts_info; + dpf(("Free %lx\n", (unsigned long)p)); + + RX_TS_INFO_GET(rx_ts_info); + RX_TS_FPQ_CHECKIN(rx_ts_info,p); + if (rx_ts_info->_FPQ.len > rx_TSFPQLocalMax) { + RX_TS_FPQ_LTOG(rx_ts_info); + } +} +#else /* RX_ENABLE_TSFPQ */ void rxi_FreePacketNoLock(struct rx_packet *p) { dpf(("Free %lx\n", (unsigned long)p)); - if (p->flags & RX_PKTFLAG_FREE) - osi_Panic("rxi_FreePacketNoLock: packet already free\n"); + RX_FPQ_MARK_FREE(p); rx_nFreePackets++; - p->flags |= RX_PKTFLAG_FREE; queue_Append(&rx_freePacketQueue, p); } +#endif /* RX_ENABLE_TSFPQ */ + +#ifdef RX_ENABLE_TSFPQ +void +rxi_FreePacketTSFPQ(struct rx_packet *p, int flush_global) +{ + register struct rx_ts_info_t * rx_ts_info; + dpf(("Free %lx\n", (unsigned long)p)); + + RX_TS_INFO_GET(rx_ts_info); + RX_TS_FPQ_CHECKIN(rx_ts_info,p); + + if (flush_global && (rx_ts_info->_FPQ.len > rx_TSFPQLocalMax)) { + NETPRI; + MUTEX_ENTER(&rx_freePktQ_lock); + + RX_TS_FPQ_LTOG(rx_ts_info); + + /* Wakeup anyone waiting for packets */ + rxi_PacketsUnWait(); + + MUTEX_EXIT(&rx_freePktQ_lock); + USERPRI; + } +} +#endif /* RX_ENABLE_TSFPQ */ int rxi_FreeDataBufsNoLock(struct rx_packet *p, int first) @@ -517,6 +727,45 @@ rxi_FreeDataBufsNoLock(struct rx_packet *p, int first) return 0; } +#ifdef RX_ENABLE_TSFPQ +int +rxi_FreeDataBufsTSFPQ(struct rx_packet *p, int first, int flush_global) +{ + struct iovec *iov, *end; + register struct rx_ts_info_t * rx_ts_info; + + RX_TS_INFO_GET(rx_ts_info); + + if (first != 1) /* MTUXXX */ + osi_Panic("FreeDataBufs 1: first must be 1"); + iov = &p->wirevec[1]; + end = iov + (p->niovecs - 1); + if (iov->iov_base != (caddr_t) p->localdata) /* MTUXXX */ + osi_Panic("FreeDataBufs 2: vec 1 must be localdata"); + for (iov++; iov < end; iov++) { + if (!iov->iov_base) + osi_Panic("FreeDataBufs 3: vecs 2-niovecs must not be NULL"); + RX_TS_FPQ_CHECKIN(rx_ts_info,RX_CBUF_TO_PACKET(iov->iov_base, p)); + } + p->length = 0; + p->niovecs = 0; + + if (flush_global && (rx_ts_info->_FPQ.len > rx_TSFPQLocalMax)) { + NETPRI; + MUTEX_ENTER(&rx_freePktQ_lock); + + RX_TS_FPQ_LTOG(rx_ts_info); + + /* Wakeup anyone waiting for packets */ + rxi_PacketsUnWait(); + + MUTEX_EXIT(&rx_freePktQ_lock); + USERPRI; + } + return 0; +} +#endif /* RX_ENABLE_TSFPQ */ + int rxi_nBadIovecs = 0; /* rxi_RestoreDataBufs @@ -530,10 +779,7 @@ rxi_RestoreDataBufs(struct rx_packet *p) int i; struct iovec *iov = &p->wirevec[2]; - p->wirevec[0].iov_base = (char *)(p->wirehead); - p->wirevec[0].iov_len = RX_HEADER_SIZE; - p->wirevec[1].iov_base = (char *)(p->localdata); - p->wirevec[1].iov_len = RX_FIRSTBUFFERSIZE; + RX_PACKET_IOV_INIT(p); for (i = 2, iov = &p->wirevec[2]; i < p->niovecs; i++, iov++) { if (!iov->iov_base) { @@ -545,6 +791,53 @@ rxi_RestoreDataBufs(struct rx_packet *p) } } +#ifdef RX_ENABLE_TSFPQ +int +rxi_TrimDataBufs(struct rx_packet *p, int first) +{ + int length; + struct iovec *iov, *end; + register struct rx_ts_info_t * rx_ts_info; + SPLVAR; + + if (first != 1) + osi_Panic("TrimDataBufs 1: first must be 1"); + + /* Skip over continuation buffers containing message data */ + iov = &p->wirevec[2]; + end = iov + (p->niovecs - 2); + length = p->length - p->wirevec[1].iov_len; + for (; iov < end && length > 0; iov++) { + if (!iov->iov_base) + osi_Panic("TrimDataBufs 3: vecs 1-niovecs must not be NULL"); + length -= iov->iov_len; + } + + /* iov now points to the first empty data buffer. */ + if (iov >= end) + return 0; + + RX_TS_INFO_GET(rx_ts_info); + for (; iov < end; iov++) { + if (!iov->iov_base) + osi_Panic("TrimDataBufs 4: vecs 2-niovecs must not be NULL"); + RX_TS_FPQ_CHECKIN(rx_ts_info,RX_CBUF_TO_PACKET(iov->iov_base, p)); + p->niovecs--; + } + if (rx_ts_info->_FPQ.len > rx_TSFPQLocalMax) { + NETPRI; + MUTEX_ENTER(&rx_freePktQ_lock); + + RX_TS_FPQ_LTOG(rx_ts_info); + rxi_PacketsUnWait(); + + MUTEX_EXIT(&rx_freePktQ_lock); + USERPRI; + } + + return 0; +} +#else /* RX_ENABLE_TSFPQ */ int rxi_TrimDataBufs(struct rx_packet *p, int first) { @@ -585,9 +878,18 @@ rxi_TrimDataBufs(struct rx_packet *p, int first) return 0; } +#endif /* RX_ENABLE_TSFPQ */ /* Free the packet p. P is assumed not to be on any queue, i.e. * remove it yourself first if you call this routine. */ +#ifdef RX_ENABLE_TSFPQ +void +rxi_FreePacket(struct rx_packet *p) +{ + rxi_FreeDataBufsTSFPQ(p, 1, 0); + rxi_FreePacketTSFPQ(p, RX_TS_FPQ_FLUSH_GLOBAL); +} +#else /* RX_ENABLE_TSFPQ */ void rxi_FreePacket(struct rx_packet *p) { @@ -604,12 +906,78 @@ rxi_FreePacket(struct rx_packet *p) MUTEX_EXIT(&rx_freePktQ_lock); USERPRI; } - +#endif /* RX_ENABLE_TSFPQ */ /* rxi_AllocPacket sets up p->length so it reflects the number of * bytes in the packet at this point, **not including** the header. * The header is absolutely necessary, besides, this is the way the * length field is usually used */ +#ifdef RX_ENABLE_TSFPQ +struct rx_packet * +rxi_AllocPacketNoLock(int class) +{ + register struct rx_packet *p; + register struct rx_ts_info_t * rx_ts_info; + + RX_TS_INFO_GET(rx_ts_info); + +#ifdef KERNEL + if (rxi_OverQuota(class)) { + rxi_NeedMorePackets = TRUE; + MUTEX_ENTER(&rx_stats_mutex); + switch (class) { + case RX_PACKET_CLASS_RECEIVE: + rx_stats.receivePktAllocFailures++; + break; + case RX_PACKET_CLASS_SEND: + rx_stats.sendPktAllocFailures++; + break; + case RX_PACKET_CLASS_SPECIAL: + rx_stats.specialPktAllocFailures++; + break; + case RX_PACKET_CLASS_RECV_CBUF: + rx_stats.receiveCbufPktAllocFailures++; + break; + case RX_PACKET_CLASS_SEND_CBUF: + rx_stats.sendCbufPktAllocFailures++; + break; + } + MUTEX_EXIT(&rx_stats_mutex); + return (struct rx_packet *)0; + } +#endif /* KERNEL */ + + MUTEX_ENTER(&rx_stats_mutex); + rx_stats.packetRequests++; + MUTEX_EXIT(&rx_stats_mutex); + + if (queue_IsEmpty(&rx_ts_info->_FPQ)) { + +#ifdef KERNEL + if (queue_IsEmpty(&rx_freePacketQueue)) + osi_Panic("rxi_AllocPacket error"); +#else /* KERNEL */ + if (queue_IsEmpty(&rx_freePacketQueue)) + rxi_MorePacketsNoLock(rx_initSendWindow); +#endif /* KERNEL */ + + + RX_TS_FPQ_GTOL(rx_ts_info); + } + + RX_TS_FPQ_CHECKOUT(rx_ts_info,p); + + dpf(("Alloc %lx, class %d\n", (unsigned long)p, class)); + + + /* have to do this here because rx_FlushWrite fiddles with the iovs in + * order to truncate outbound packets. In the near future, may need + * to allocate bufs from a static pool here, and/or in AllocSendPacket + */ + RX_PACKET_IOV_FULLINIT(p); + return p; +} +#else /* RX_ENABLE_TSFPQ */ struct rx_packet * rxi_AllocPacketNoLock(int class) { @@ -655,28 +1023,70 @@ rxi_AllocPacketNoLock(int class) rx_nFreePackets--; p = queue_First(&rx_freePacketQueue, rx_packet); - if (!(p->flags & RX_PKTFLAG_FREE)) - osi_Panic("rxi_AllocPacket: packet not free\n"); + queue_Remove(p); + RX_FPQ_MARK_USED(p); dpf(("Alloc %lx, class %d\n", (unsigned long)p, class)); - queue_Remove(p); - p->flags = 0; /* clear RX_PKTFLAG_FREE, initialize the rest */ - p->header.flags = 0; /* have to do this here because rx_FlushWrite fiddles with the iovs in * order to truncate outbound packets. In the near future, may need * to allocate bufs from a static pool here, and/or in AllocSendPacket */ - p->wirevec[0].iov_base = (char *)(p->wirehead); - p->wirevec[0].iov_len = RX_HEADER_SIZE; - p->wirevec[1].iov_base = (char *)(p->localdata); - p->wirevec[1].iov_len = RX_FIRSTBUFFERSIZE; - p->niovecs = 2; - p->length = RX_FIRSTBUFFERSIZE; + RX_PACKET_IOV_FULLINIT(p); + return p; +} +#endif /* RX_ENABLE_TSFPQ */ + +#ifdef RX_ENABLE_TSFPQ +struct rx_packet * +rxi_AllocPacketTSFPQ(int class, int pull_global) +{ + register struct rx_packet *p; + register struct rx_ts_info_t * rx_ts_info; + + RX_TS_INFO_GET(rx_ts_info); + + MUTEX_ENTER(&rx_stats_mutex); + rx_stats.packetRequests++; + MUTEX_EXIT(&rx_stats_mutex); + + if (pull_global && queue_IsEmpty(&rx_ts_info->_FPQ)) { + MUTEX_ENTER(&rx_freePktQ_lock); + + if (queue_IsEmpty(&rx_freePacketQueue)) + rxi_MorePacketsNoLock(rx_initSendWindow); + + RX_TS_FPQ_GTOL(rx_ts_info); + + MUTEX_EXIT(&rx_freePktQ_lock); + } else if (queue_IsEmpty(&rx_ts_info->_FPQ)) { + return NULL; + } + + RX_TS_FPQ_CHECKOUT(rx_ts_info,p); + + dpf(("Alloc %lx, class %d\n", (unsigned long)p, class)); + + /* have to do this here because rx_FlushWrite fiddles with the iovs in + * order to truncate outbound packets. In the near future, may need + * to allocate bufs from a static pool here, and/or in AllocSendPacket + */ + RX_PACKET_IOV_FULLINIT(p); return p; } +#endif /* RX_ENABLE_TSFPQ */ + +#ifdef RX_ENABLE_TSFPQ +struct rx_packet * +rxi_AllocPacket(int class) +{ + register struct rx_packet *p; + p = rxi_AllocPacketTSFPQ(class, RX_TS_FPQ_PULL_GLOBAL); + return p; +} +#else /* RX_ENABLE_TSFPQ */ struct rx_packet * rxi_AllocPacket(int class) { @@ -687,6 +1097,7 @@ rxi_AllocPacket(int class) MUTEX_EXIT(&rx_freePktQ_lock); return p; } +#endif /* RX_ENABLE_TSFPQ */ /* This guy comes up with as many buffers as it {takes,can get} given * the MTU for this call. It also sets the packet length before @@ -706,6 +1117,28 @@ rxi_AllocSendPacket(register struct rx_call *call, int want) rx_GetSecurityHeaderSize(rx_ConnectionOf(call)) + rx_GetSecurityMaxTrailerSize(rx_ConnectionOf(call)); +#ifdef RX_ENABLE_TSFPQ + if ((p = rxi_AllocPacketTSFPQ(RX_PACKET_CLASS_SEND, 0))) { + want += delta; + want = MIN(want, mud); + + if ((unsigned)want > p->length) + (void)rxi_AllocDataBuf(p, (want - p->length), + RX_PACKET_CLASS_SEND_CBUF); + + if ((unsigned)p->length > mud) + p->length = mud; + + if (delta >= p->length) { + rxi_FreePacket(p); + p = NULL; + } else { + p->length -= delta; + } + return p; + } +#endif /* RX_ENABLE_TSFPQ */ + while (!(call->error)) { MUTEX_ENTER(&rx_freePktQ_lock); /* if an error occurred, or we get the packet we want, we're done */ @@ -1487,7 +1920,6 @@ rxi_SendDebugPacket(struct rx_packet *apacket, osi_socket asocket, } else nbytes -= apacket->wirevec[i].iov_len; } - AFS_RXGUNLOCK(); #ifdef KERNEL #ifdef RX_KERNEL_TRACE if (ICL_SETACTIVE(afs_iclSetp)) { @@ -1519,7 +1951,6 @@ rxi_SendDebugPacket(struct rx_packet *apacket, osi_socket asocket, AFS_GLOCK(); #endif #endif - AFS_RXGLOCK(); if (saven) { /* means we truncated the packet above. */ apacket->wirevec[i - 1].iov_len = savelen; apacket->niovecs = saven; @@ -1605,7 +2036,6 @@ rxi_SendPacket(struct rx_call *call, struct rx_connection *conn, * blocking socket, but unfortunately the interface doesn't * allow us to have the socket block in send mode, and not * block in receive mode */ - AFS_RXGUNLOCK(); #ifdef KERNEL waslocked = ISAFS_GLOCK(); #ifdef RX_KERNEL_TRACE @@ -1656,7 +2086,6 @@ rxi_SendPacket(struct rx_call *call, struct rx_connection *conn, AFS_GLOCK(); #endif #endif - AFS_RXGLOCK(); #ifdef RXDEBUG } dpf(("%c %d %s: %x.%u.%u.%u.%u.%u.%u flags %d, packet %lx resend %d.%0.3d len %d", deliveryType, p->header.serial, rx_packetTypes[p->header.type - 1], peer->host, peer->port, p->header.serial, p->header.epoch, p->header.cid, p->header.callNumber, p->header.seq, p->header.flags, (unsigned long)p, p->retryTime.sec, p->retryTime.usec / 1000, p->length)); @@ -1799,7 +2228,6 @@ rxi_SendPacketList(struct rx_call *call, struct rx_connection *conn, * blocking socket, but unfortunately the interface doesn't * allow us to have the socket block in send mode, and not * block in receive mode */ - AFS_RXGUNLOCK(); #if defined(AFS_SUN5_ENV) && defined(KERNEL) waslocked = ISAFS_GLOCK(); if (!istack && waslocked) @@ -1832,7 +2260,6 @@ rxi_SendPacketList(struct rx_call *call, struct rx_connection *conn, if (!istack && waslocked) AFS_GLOCK(); #endif - AFS_RXGLOCK(); #ifdef RXDEBUG } diff --git a/src/rx/rx_prototypes.h b/src/rx/rx_prototypes.h index 35a086e0d..bc1024efe 100644 --- a/src/rx/rx_prototypes.h +++ b/src/rx/rx_prototypes.h @@ -335,7 +335,7 @@ extern int rxi_GetIFInfo(void); extern int rxk_FreeSocket(register struct socket *asocket); #endif #ifndef AFS_NT40_ENV -extern struct osi_socket *rxk_NewSocket(short aport); +extern osi_socket *rxk_NewSocket(short aport); #endif #endif extern int rxk_ReadPacket(osi_socket so, struct rx_packet *p, int *host, @@ -354,7 +354,7 @@ extern void osi_StopListener(void); /* ARCH/rx_kmutex.c */ -#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT) +#if defined(KERNEL) && defined(AFS_LINUX20_ENV) extern void afs_mutex_init(afs_kmutex_t * l); extern void afs_mutex_enter(afs_kmutex_t * l); extern int afs_mutex_tryenter(afs_kmutex_t * l); diff --git a/src/rx/rx_pthread.c b/src/rx/rx_pthread.c index 0d73bf8e3..a4cb88e16 100644 --- a/src/rx/rx_pthread.c +++ b/src/rx/rx_pthread.c @@ -19,7 +19,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/rx/rx_pthread.c,v 1.17.2.3 2005/04/04 04:27:02 shadow Exp $"); + ("$Header: /cvs/openafs/src/rx/rx_pthread.c,v 1.17.2.5 2005/04/20 21:23:47 jaltman Exp $"); #include #include @@ -420,3 +420,19 @@ rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags) } return 0; } + +struct rx_ts_info_t * rx_ts_info_init() { + register struct rx_ts_info_t * rx_ts_info; + rx_ts_info = (rx_ts_info_t *) malloc(sizeof(rx_ts_info_t)); + assert(rx_ts_info != NULL && pthread_setspecific(rx_ts_info_key, rx_ts_info) == 0); + memset(rx_ts_info, 0, sizeof(rx_ts_info_t)); +#ifdef RX_ENABLE_TSFPQ + queue_Init(&rx_ts_info->_FPQ); + + MUTEX_ENTER(&rx_stats_mutex); + rx_TSFPQMaxProcs++; + RX_TS_FPQ_COMPUTE_LIMITS; + MUTEX_EXIT(&rx_stats_mutex); +#endif /* RX_ENABLE_TSFPQ */ + return rx_ts_info; +} diff --git a/src/rx/rx_pthread.h b/src/rx/rx_pthread.h index d7e59b5a8..6ae4af768 100644 --- a/src/rx/rx_pthread.h +++ b/src/rx/rx_pthread.h @@ -94,16 +94,6 @@ extern void osirx_AssertMine(afs_kmutex_t * lockaddr, char *msg); #endif #define MUTEX_EXIT(l) osi_Assert(pthread_mutex_unlock(l) == 0) -#ifdef RXObtainWriteLock -#undef RXObtainWriteLock -#endif -#define RXObtainWriteLock(l) MUTEX_ENTER(l) - -#ifdef RXReleaseWriteLock -#undef RXReleaseWriteLock -#endif -#define RXReleaseWriteLock(l) MUTEX_EXIT(l) - #ifdef CV_INIT #undef CV_INIT #endif diff --git a/src/rx/rx_queue.h b/src/rx/rx_queue.h index 3e4096afb..3fbc1861d 100644 --- a/src/rx/rx_queue.h +++ b/src/rx/rx_queue.h @@ -64,10 +64,20 @@ for (n=0, queue_Scan(&myqueue, qe, nqe, myelement), n++) {} /* N.B. I don't think it is possible to write this expression, correctly, with less than one comma (you can easily write an alternative expression with no commas that works with most or all compilers, but it's not clear that it really is un-ambiguous, legal C-code). */ #define _QA(q,i,a,b) (((i->a=q->a)->b=i)->b=q, q->a=i) -/* These ones splice two queues together. If (a,b) is (next,prev) then (*q2) is appended to (*q1), otherwise (*q2) is prepended to (*q1). */ +/* These ones splice two queues together. If (a,b) is (next,prev) then (*q2) is prepended to (*q1), otherwise (*q2) is appended to (*q1). */ #define _QS(q1,q2,a,b) if (queue_IsEmpty(q2)); else \ ((((q2->a->b=q1)->a->b=q2->b)->a=q1->a, q1->a=q2->a), queue_Init(q2)) +/* This one removes part of queue (*q1) and attaches it to queue (*q2). + * If (a,b) is (next,prev) then the subchain is prepended to (*q2), + * otherwise the subchain is appended to (*q2). + * If (c,d) is (prev,next) then the subchain is the elements in (*q1) before (i), + * otherwise the subchain is the elements in (*q1) after (i). + * If (x,y) is (q1,i) then operation is either BeforePrepend of AfterAppend. + * If (x,y) is (i,q1) then operation is either BeforeAppend or AfterPrepend. */ +#define _QSP(q1,q2,i,a,b,c,d,x,y) if (!queue_IsEnd(q1,i->c)) \ + (((y->b->a=q2->a)->b=y->b), ((x->a->b=q2)->a=x->a), ((i->c=q1)->d=i)) + /* Basic remove operation. Doesn't update the queue item to indicate it's been removed */ #define _QR(i) ((_Q(i)->prev->next=_Q(i)->next)->prev=_Q(i)->prev) @@ -94,6 +104,18 @@ for (n=0, queue_Scan(&myqueue, qe, nqe, myelement), n++) {} /* Splice the members of queue (*q2) to the end of (*q1), re-initialize (*q2) */ #define queue_SpliceAppend(q1,q2) _QS(_Q(q1),_Q(q2),prev,next) +/* split the members after i off of queue (*q1), and append them onto queue (*q2) */ +#define queue_SplitAfterAppend(q1,q2,i) _QSP(_Q(q1),_Q(q2),_Q(i),prev,next,next,prev,_Q(q1),_Q(i)) + +/* split the members after i off of queue (*q1), and prepend them onto queue (*q2) */ +#define queue_SplitAfterPrepend(q1,q2,i) _QSP(_Q(q1),_Q(q2),_Q(i),next,prev,next,prev,_Q(i),_Q(q1)) + +/* split the members before i off of queue (*q1), and append them onto queue (*q2) */ +#define queue_SplitBeforeAppend(q1,q2,i) _QSP(_Q(q1),_Q(q2),_Q(i),prev,next,prev,next,_Q(i),_Q(q1)) + +/* split the members before i off of queue (*q1), and prepend them onto queue (*q2) */ +#define queue_SplitBeforePrepend(q1,q2,i) _QSP(_Q(q1),_Q(q2),_Q(i),next,prev,prev,next,_Q(q1),_Q(i)) + /* Replace the queue (*q1) with the contents of the queue (*q2), re-initialize (*q2) */ #define queue_Replace(q1,q2) if (queue_IsEmpty(q2)) queue_Init(q1); else \ (*_Q(q1) = *_Q(q2), _Q(q1)->next->prev = _Q(q1)->prev->next = _Q(q1), queue_Init(q2)) diff --git a/src/rx/rx_rdwr.c b/src/rx/rx_rdwr.c index 24e6cb929..69785ce58 100644 --- a/src/rx/rx_rdwr.c +++ b/src/rx/rx_rdwr.c @@ -15,7 +15,7 @@ #endif RCSID - ("$Header: /cvs/openafs/src/rx/rx_rdwr.c,v 1.21.2.3 2005/04/03 18:15:51 shadow Exp $"); + ("$Header: /cvs/openafs/src/rx/rx_rdwr.c,v 1.21.2.4 2005/04/14 02:31:44 shadow Exp $"); #ifdef KERNEL #ifndef UKERNEL @@ -337,11 +337,9 @@ rx_ReadProc(struct rx_call *call, char *buf, int nbytes) } NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&call->lock); bytes = rxi_ReadProc(call, buf, nbytes); MUTEX_EXIT(&call->lock); - AFS_RXGUNLOCK(); USERPRI; return bytes; } @@ -396,11 +394,9 @@ rx_ReadProc32(struct rx_call *call, afs_int32 * value) } NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&call->lock); bytes = rxi_ReadProc(call, (char *)value, sizeof(afs_int32)); MUTEX_EXIT(&call->lock); - AFS_RXGUNLOCK(); USERPRI; return bytes; } @@ -644,11 +640,9 @@ rx_ReadvProc(struct rx_call *call, struct iovec *iov, int *nio, int maxio, SPLVAR; NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&call->lock); bytes = rxi_ReadvProc(call, iov, nio, maxio, nbytes); MUTEX_EXIT(&call->lock); - AFS_RXGUNLOCK(); USERPRI; return bytes; } @@ -867,11 +861,9 @@ rx_WriteProc(struct rx_call *call, char *buf, int nbytes) } NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&call->lock); bytes = rxi_WriteProc(call, buf, nbytes); MUTEX_EXIT(&call->lock); - AFS_RXGUNLOCK(); USERPRI; return bytes; } @@ -926,11 +918,9 @@ rx_WriteProc32(register struct rx_call *call, register afs_int32 * value) } NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&call->lock); bytes = rxi_WriteProc(call, (char *)value, sizeof(afs_int32)); MUTEX_EXIT(&call->lock); - AFS_RXGUNLOCK(); USERPRI; return bytes; } @@ -1059,11 +1049,9 @@ rx_WritevAlloc(struct rx_call *call, struct iovec *iov, int *nio, int maxio, SPLVAR; NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&call->lock); bytes = rxi_WritevAlloc(call, iov, nio, maxio, nbytes); MUTEX_EXIT(&call->lock); - AFS_RXGUNLOCK(); USERPRI; return bytes; } @@ -1230,11 +1218,9 @@ rx_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes) SPLVAR; NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&call->lock); bytes = rxi_WritevProc(call, iov, nio, nbytes); MUTEX_EXIT(&call->lock); - AFS_RXGUNLOCK(); USERPRI; return bytes; } @@ -1324,10 +1310,8 @@ rx_FlushWrite(struct rx_call *call) { SPLVAR; NETPRI; - AFS_RXGLOCK(); MUTEX_ENTER(&call->lock); rxi_FlushWrite(call); MUTEX_EXIT(&call->lock); - AFS_RXGUNLOCK(); USERPRI; } diff --git a/src/rx/rx_user.h b/src/rx/rx_user.h index 3810be403..35bec90c4 100644 --- a/src/rx/rx_user.h +++ b/src/rx/rx_user.h @@ -24,14 +24,10 @@ error - foo error - foo error - foo #define AFS_GLOCK() #define AFS_GUNLOCK() #define AFS_ASSERT_GLOCK() -#define AFS_RXGLOCK() -#define AFS_RXGUNLOCK() #ifndef UKERNEL /* Defined in rx/UKERNEL/rx_kmutex.h */ #define ISAFS_GLOCK() -#define ISAFS_RXGLOCK() #endif -#define AFS_ASSERT_RXGLOCK() /* Some "operating-system independent" stuff, for the user mode implementation */ #ifdef UAFS_CLIENT typedef void *osi_socket; diff --git a/src/rxkad/rxkad_prototypes.h b/src/rxkad/rxkad_prototypes.h index b7ce30758..a610d612b 100644 --- a/src/rxkad/rxkad_prototypes.h +++ b/src/rxkad/rxkad_prototypes.h @@ -31,7 +31,7 @@ extern int fc_keysched(struct ktc_encryptionKey *key, extern afs_int32 fc_ecb_encrypt(void * clear, void * cipher, fc_KeySchedule schedule, int encrypt); extern afs_int32 fc_cbc_encrypt(void *input, void *output, afs_int32 length, - fc_KeySchedule key, afs_uint32 * xor, + fc_KeySchedule key, afs_uint32 * iv, int encrypt); /* rxkad_client.c */ diff --git a/src/sys/NTMakefile b/src/sys/NTMakefile index a7dec7094..1d8d7bdac 100644 --- a/src/sys/NTMakefile +++ b/src/sys/NTMakefile @@ -5,6 +5,7 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -I..\WINNT\kfw\inc\loadfuncs -I..\WINNT\kfw\inc\krb5 RELDIR=sys !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version diff --git a/src/sys/pioctl_nt.c b/src/sys/pioctl_nt.c index 93cb4d0af..26a4abbae 100644 --- a/src/sys/pioctl_nt.c +++ b/src/sys/pioctl_nt.c @@ -11,7 +11,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/sys/pioctl_nt.c,v 1.18.2.8 2005/03/11 07:03:37 shadow Exp $"); + ("$Header: /cvs/openafs/src/sys/pioctl_nt.c,v 1.18.2.9 2005/04/28 12:11:38 jaltman Exp $"); #include #include @@ -43,6 +43,9 @@ RCSID #include #include +#include +#include + static char AFSConfigKeyName[] = AFSREG_CLT_SVC_PARAM_SUBKEY; #define FS_IOCTLREQUEST_MAXSIZE 8192 @@ -123,6 +126,177 @@ IoctlDebug(void) return debug; } + +// krb5 functions +DECL_FUNC_PTR(krb5_cc_default_name); +DECL_FUNC_PTR(krb5_cc_set_default_name); +DECL_FUNC_PTR(krb5_get_default_config_files); +DECL_FUNC_PTR(krb5_free_config_files); +DECL_FUNC_PTR(krb5_free_context); +DECL_FUNC_PTR(krb5_get_default_realm); +DECL_FUNC_PTR(krb5_free_default_realm); +DECL_FUNC_PTR(krb5_init_context); +DECL_FUNC_PTR(krb5_cc_default); +DECL_FUNC_PTR(krb5_parse_name); +DECL_FUNC_PTR(krb5_free_principal); +DECL_FUNC_PTR(krb5_cc_close); +DECL_FUNC_PTR(krb5_cc_get_principal); +DECL_FUNC_PTR(krb5_build_principal); +DECL_FUNC_PTR(krb5_c_random_make_octets); +DECL_FUNC_PTR(krb5_get_init_creds_password); +DECL_FUNC_PTR(krb5_free_cred_contents); +DECL_FUNC_PTR(krb5_cc_resolve); +DECL_FUNC_PTR(krb5_unparse_name); +DECL_FUNC_PTR(krb5_free_unparsed_name); + +FUNC_INFO krb5_fi[] = { + MAKE_FUNC_INFO(krb5_cc_default_name), + MAKE_FUNC_INFO(krb5_cc_set_default_name), + MAKE_FUNC_INFO(krb5_get_default_config_files), + MAKE_FUNC_INFO(krb5_free_config_files), + MAKE_FUNC_INFO(krb5_free_context), + MAKE_FUNC_INFO(krb5_get_default_realm), + MAKE_FUNC_INFO(krb5_free_default_realm), + MAKE_FUNC_INFO(krb5_init_context), + MAKE_FUNC_INFO(krb5_cc_default), + MAKE_FUNC_INFO(krb5_parse_name), + MAKE_FUNC_INFO(krb5_free_principal), + MAKE_FUNC_INFO(krb5_cc_close), + MAKE_FUNC_INFO(krb5_cc_get_principal), + MAKE_FUNC_INFO(krb5_build_principal), + MAKE_FUNC_INFO(krb5_c_random_make_octets), + MAKE_FUNC_INFO(krb5_get_init_creds_password), + MAKE_FUNC_INFO(krb5_free_cred_contents), + MAKE_FUNC_INFO(krb5_cc_resolve), + MAKE_FUNC_INFO(krb5_unparse_name), + MAKE_FUNC_INFO(krb5_free_unparsed_name), + END_FUNC_INFO +}; + +static int +LoadFuncs( + const char* dll_name, + FUNC_INFO fi[], + HINSTANCE* ph, // [out, optional] - DLL handle + int* pindex, // [out, optional] - index of last func loaded (-1 if none) + int cleanup, // cleanup function pointers and unload on error + int go_on, // continue loading even if some functions cannot be loaded + int silent // do not pop-up a system dialog if DLL cannot be loaded + ) +{ + HINSTANCE h; + int i, n, last_i; + int error = 0; + UINT em; + + if (ph) *ph = 0; + if (pindex) *pindex = -1; + + for (n = 0; fi[n].func_ptr_var; n++) + *(fi[n].func_ptr_var) = 0; + + if (silent) + em = SetErrorMode(SEM_FAILCRITICALERRORS); + h = LoadLibrary(dll_name); + if (silent) + SetErrorMode(em); + + if (!h) + return 0; + + last_i = -1; + for (i = 0; (go_on || !error) && (i < n); i++) + { + void* p = (void*)GetProcAddress(h, fi[i].func_name); + if (!p) + error = 1; + else + { + last_i = i; + *(fi[i].func_ptr_var) = p; + } + } + if (pindex) *pindex = last_i; + if (error && cleanup && !go_on) { + for (i = 0; i < n; i++) { + *(fi[i].func_ptr_var) = 0; + } + FreeLibrary(h); + return 0; + } + if (ph) *ph = h; + if (error) return 0; + return 1; +} + +#define KERB5DLL "krb5_32.dll" +static BOOL +IsKrb5Available() +{ + static HINSTANCE hKrb5DLL = 0; + + if ( hKrb5DLL ) + return TRUE; + + hKrb5DLL = LoadLibrary(KERB5DLL); + if (hKrb5DLL) { + if (!LoadFuncs(KERB5DLL, krb5_fi, 0, 0, 1, 0, 0)) + { + FreeLibrary(hKrb5DLL); + hKrb5DLL = 0; + return FALSE; + } + } + return TRUE; +} + +static BOOL +GetLSAPrincipalName(char * szUser, DWORD *dwSize) +{ + krb5_context ctx = 0; + krb5_error_code code; + krb5_ccache mslsa_ccache=0; + krb5_principal princ = 0; + char * pname = 0; + BOOL success = 0; + + if (!IsKrb5Available()) + return FALSE; + + if (code = pkrb5_init_context(&ctx)) + goto cleanup; + + if (code = pkrb5_cc_resolve(ctx, "MSLSA:", &mslsa_ccache)) + goto cleanup; + + if (code = pkrb5_cc_get_principal(ctx, mslsa_ccache, &princ)) + goto cleanup; + + if (code = pkrb5_unparse_name(ctx, princ, &pname)) + goto cleanup; + + if ( strlen(pname) < *dwSize ) { + strncpy(szUser, pname, *dwSize); + szUser[*dwSize-1] = '\0'; + success = 1; + } + *dwSize = strlen(pname); + + cleanup: + if (pname) + pkrb5_free_unparsed_name(ctx, pname); + + if (princ) + pkrb5_free_principal(ctx, princ); + + if (mslsa_ccache) + pkrb5_cc_close(ctx, mslsa_ccache); + + if (ctx) + pkrb5_free_context(ctx); + return success; +} + static long GetIoctlHandle(char *fileNamep, HANDLE * handlep) { @@ -213,14 +387,10 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep) (va_list *) NULL ) ) { - fprintf(stderr,"pioctl CreateFile(%s) failed: 0x%8X\r\n\t[%s]\r\n", + fprintf(stderr,"pioctl CreateFile(%s) failed: 0x%X\r\n\t[%s]\r\n", tbuffer,gle,buf); } } -#ifdef COMMENT - if (gle != ERROR_DOWNGRADE_DETECTED) - return -1; -#endif lana_GetNetbiosName(szClient, LANA_NETBIOS_NAME_FULL); @@ -234,7 +404,69 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep) if ( szUser[0] ) { if ( ioctlDebug ) - fprintf(stderr, "pioctl logon user: [%s]\r\n",szUser); + fprintf(stderr, "pioctl Explorer logon user: [%s]\r\n",szUser); + + sprintf(szPath, "\\\\%s", szClient); + memset (&nr, 0x00, sizeof(NETRESOURCE)); + nr.dwType=RESOURCETYPE_DISK; + nr.lpLocalName=0; + nr.lpRemoteName=szPath; + res = WNetAddConnection2(&nr,NULL,szUser,0); + if (res) { + if ( ioctlDebug ) { + fprintf(stderr, "pioctl WNetAddConnection2(%s,%s) failed: 0x%X\r\n", + szPath,szUser,res); + } + gonext = 1; + } + + sprintf(szPath, "\\\\%s\\all", szClient); + res = WNetAddConnection2(&nr,NULL,szUser,0); + if (res) { + if ( ioctlDebug ) { + fprintf(stderr, "pioctl WNetAddConnection2(%s,%s) failed: 0x%X\r\n", + szPath,szUser,res); + } + gonext = 1; + } + + if (gonext) + goto try_lsa_principal; + + fh = CreateFile(tbuffer, GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, + FILE_FLAG_WRITE_THROUGH, NULL); + fflush(stdout); + if (fh == INVALID_HANDLE_VALUE) { + gle = GetLastError(); + if (gle && ioctlDebug ) { + char buf[4096]; + + if ( FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, + NULL, + gle, + MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US), + buf, + 4096, + (va_list *) NULL + ) ) + { + fprintf(stderr,"pioctl CreateFile(%s) failed: 0x%X\r\n\t[%s]\r\n", + tbuffer,gle,buf); + } + } + } + } + } + + try_lsa_principal: + if (fh == INVALID_HANDLE_VALUE) { + int gonext = 0; + + dwSize = sizeof(szUser); + if (GetLSAPrincipalName(szUser, &dwSize)) { + if ( ioctlDebug ) + fprintf(stderr, "pioctl LSA Principal logon user: [%s]\r\n",szUser); sprintf(szPath, "\\\\%s", szClient); memset (&nr, 0x00, sizeof(NETRESOURCE)); @@ -261,7 +493,7 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep) } if (gonext) - goto next_attempt; + goto try_sam_compat; fh = CreateFile(tbuffer, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, @@ -281,7 +513,7 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep) (va_list *) NULL ) ) { - fprintf(stderr,"pioctl CreateFile(%s) failed: 0x%8X\r\n\t[%s]\r\n", + fprintf(stderr,"pioctl CreateFile(%s) failed: 0x%X\r\n\t[%s]\r\n", tbuffer,gle,buf); } } @@ -289,11 +521,12 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep) } } - next_attempt: + try_sam_compat: if ( fh == INVALID_HANDLE_VALUE ) { + dwSize = sizeof(szUser); if (GetUserNameEx(NameSamCompatible, szUser, &dwSize)) { if ( ioctlDebug ) - fprintf(stderr, "pioctl logon user: [%s]\r\n",szUser); + fprintf(stderr, "pioctl SamCompatible logon user: [%s]\r\n",szUser); sprintf(szPath, "\\\\%s", szClient); memset (&nr, 0x00, sizeof(NETRESOURCE)); @@ -336,13 +569,14 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep) (va_list *) NULL ) ) { - fprintf(stderr,"pioctl CreateFile(%s) failed: 0x%8X\r\n\t[%s]\r\n", + fprintf(stderr,"pioctl CreateFile(%s) failed: 0x%X\r\n\t[%s]\r\n", tbuffer,gle,buf); } } return -1; } } else { + fprintf(stderr, "GetUserNameEx(NameSamCompatible) failed: 0x%X\r\n", GetLastError()); return -1; } } diff --git a/src/tbutc/Makefile.in b/src/tbutc/Makefile.in index 1521b7760..af7a09760 100644 --- a/src/tbutc/Makefile.in +++ b/src/tbutc/Makefile.in @@ -24,16 +24,14 @@ VOLSER = ${srcdir}/../volser BUCOORDOBJS=ubik_db_if.o ../bucoord/volstub.o ../bucoord/dlq.o \ status.o ../bucoord/bucoord_errs.o -VOLSERLIBOBJ=../volser/volint.cs.o vsprocs.o ../volser/vsutils.o \ - ../volser/lockprocs.o ../volser/volint.xdr.o ../volser/volerr.o \ - ../volser/volint.ss.o AFS_component_version_number.o -VOLSERLIBS =libvolser.a +VOLSEROBJS=vsprocs.o +VOLSERLIBS=${TOP_LIBDIR}/libvosadmin.a ${TOP_LIBDIR}/libafsadminutil.a LWPOBJS =lock.o BUTCOBJS =dbentries.o tcprocs.o lwps.o tcmain.o list.o recoverDb.o \ tcudbprocs.o dump.o tcstatus.o butc_xbsa.o \ - ${LWPOBJS} ${BUCOORDOBJS} + ${LWPOBJS} ${BUCOORDOBJS} ${VOLSEROBJS} BUTCINCLS=${TOP_INCDIR}/afs/partition.h \ ${TOP_INCDIR}/afs/volume.h \ @@ -54,14 +52,12 @@ BUTCLIBS=${TOP_LIBDIR}/libbudb.a \ ${TOP_LIBDIR}/libbubasics.a \ ${VOLSERLIBS} \ ${BUTMLIBS} \ - ${TOP_LIBDIR}/libvldb.a \ ${TOP_LIBDIR}/libafsauthent.a \ ${TOP_LIBDIR}/libafsrpc.a \ ${TOP_LIBDIR}/libcmd.a \ ${TOP_LIBDIR}/util.a \ ${TOP_LIBDIR}/libusd.a \ - ${TOP_LIBDIR}/libprocmgmt.a \ - ${TOP_LIBDIR}/librx.a + ${TOP_LIBDIR}/libprocmgmt.a # # Build targets @@ -72,11 +68,6 @@ all: butc butc: ${BUTCOBJS} ${BUTCLIBS} ${CC} ${CFLAGS} ${BUTCOBJS} ${BUTCLIBS} ${MT_LIBS} ${XLIBS} -o butc -libvolser.a: vsprocs.o ${VOLSERLIBOBJ} - -$(RM) -f $@ - $(AR) crv $@ vsprocs.o ${VOLSERLIBOBJ} - $(RANLIB) $@ - libbutm.a: ${BUTMOBJS} AFS_component_version_number.o -$(RM) -f libbutm.a $(AR) crv libbutm.a $(BUTMOBJS) AFS_component_version_number.o diff --git a/src/util/Makefile.in b/src/util/Makefile.in index 58ca05e0a..d4f3a58b7 100644 --- a/src/util/Makefile.in +++ b/src/util/Makefile.in @@ -13,7 +13,8 @@ HELPER_SPLINT=@HELPER_SPLINT@ objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \ hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \ dirpath.o fileutil.o netutils.o flipbase64.o \ - afs_atomlist.o afs_lhash.o snprintf.o strlcat.o strlcpy.o ${REGEX_OBJ} + afs_atomlist.o afs_lhash.o snprintf.o strlcat.o strlcpy.o \ + daemon.o ${REGEX_OBJ} includes = \ ${TOP_INCDIR}/afs/dirpath.h \ @@ -130,6 +131,9 @@ strlcat.o: ${srcdir}/strlcat.c ${includes} strlcpy.o: ${srcdir}/strlcpy.c ${includes} ${CCOBJ} ${CFLAGS} -c ${srcdir}/strlcpy.c +daemon.o: ${srcdir}/daemon.c ${includes} + ${CCOBJ} ${CFLAGS} -c ${srcdir}/daemon.c + # # Install targets # diff --git a/src/util/afsutil_prototypes.h b/src/util/afsutil_prototypes.h index 76f2cfd8c..89f5b71c0 100644 --- a/src/util/afsutil_prototypes.h +++ b/src/util/afsutil_prototypes.h @@ -33,6 +33,11 @@ extern char *lcstring(char *d, char *s, int n); extern char *ucstring(char *d, char *s, int n); extern char *strcompose(char *buf, size_t len, ...); +/* daemon.c */ +#ifndef HAVE_DAEMON +int daemon(int nochdir, int noclose); +#endif + /* dirpath.c */ extern unsigned int initAFSDirPath(void); extern const char *getDirPath(afsdir_id_t string_id); diff --git a/src/util/daemon.c b/src/util/daemon.c new file mode 100644 index 000000000..e08845cf8 --- /dev/null +++ b/src/util/daemon.c @@ -0,0 +1,56 @@ +#include +#include + +#ifndef HAVE_DAEMON + +#include +#include +#include + +#include + +int daemon(int nochdir, int noclose) +{ + int err = -1; + pid_t pid; + + pid = fork(); + if (pid == -1) { + goto out; + } else if (pid) { + exit(0); + } + + err = setsid(); + if (err == -1) { + goto out; + } + + if (!nochdir) { + err = chdir("/"); + if (err == -1) { + goto out; + } + } + + err = -1; + if (!noclose) { + if (!freopen("/dev/null", "r", stdin)) { + goto out; + } + + if (!freopen("/dev/null", "w", stdout)) { + goto out; + } + + if (!freopen("/dev/null", "w", stderr)) { + goto out; + } + } + + err = 0; + +out: + return(err); +} +#endif diff --git a/src/util/serverLog.c b/src/util/serverLog.c index 9f831c191..e3bc6cb8c 100644 --- a/src/util/serverLog.c +++ b/src/util/serverLog.c @@ -20,7 +20,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/util/serverLog.c,v 1.22.2.1 2004/10/18 07:12:18 shadow Exp $"); + ("$Header: /cvs/openafs/src/util/serverLog.c,v 1.22.2.5 2005/04/19 05:14:40 jaltman Exp $"); #include #ifdef AFS_NT40_ENV @@ -44,6 +44,7 @@ RCSID #include #endif #endif +#include #include "afsutil.h" #include "fileutil.h" #if defined(AFS_PTHREAD_ENV) @@ -66,6 +67,7 @@ static pthread_mutex_t serverLogMutex; #ifdef AFS_NT40_ENV #define F_OK 0 +#define O_NONBLOCK 0 #endif char *(*threadNameProgram) (); @@ -212,6 +214,9 @@ SetupLogSignals(void) (void)signal(SIGHUP, ResetDebug_Signal); /* Note that we cannot use SIGUSR1 -- Linux stole it for pthreads! */ (void)signal(SIGTSTP, SetDebug_Signal); +#ifndef AFS_NT40_ENV + (void)signal(SIGPIPE, SIG_IGN); +#endif } int @@ -221,17 +226,24 @@ OpenLog(const char *fileName) * This function should allow various libraries that inconsistently * use stdout/stderr to all go to the same place */ - int tempfd; + int tempfd, isfifo = 0; char oldName[MAXPATHLEN]; struct timeval Start; struct tm *TimeFields; char FileName[MAXPATHLEN]; #ifndef AFS_NT40_ENV + struct stat statbuf; + if (serverLogSyslog) { openlog(serverLogSyslogTag, LOG_PID, serverLogSyslogFacility); return (0); } + + /* Support named pipes as logs by not rotating them */ + if ((fstat(fileName, &statbuf) == 0) && (S_ISFIFO(statbuf.st_mode))) { + isfifo = 1; + } #endif if (mrafsStyleLogs) { @@ -247,15 +259,17 @@ OpenLog(const char *fileName) TimeFields->tm_mon + 1, TimeFields->tm_mday, TimeFields->tm_hour, TimeFields->tm_min, TimeFields->tm_sec); - rename(fileName, FileName); /* don't check error code */ - tempfd = open(fileName, O_WRONLY | O_TRUNC | O_CREAT, 0666); + if (!isfifo) + renamefile(fileName, FileName); /* don't check error code */ + tempfd = open(fileName, O_WRONLY | O_TRUNC | O_CREAT | (isfifo?O_NONBLOCK:0), 0666); } else { strcpy(oldName, fileName); strcat(oldName, ".old"); /* don't check error */ - renamefile(fileName, oldName); - tempfd = open(fileName, O_WRONLY | O_TRUNC | O_CREAT, 0666); + if (!isfifo) + renamefile(fileName, oldName); + tempfd = open(fileName, O_WRONLY | O_TRUNC | O_CREAT | (isfifo?O_NONBLOCK:0), 0666); } if (tempfd < 0) { @@ -283,9 +297,13 @@ OpenLog(const char *fileName) int ReOpenLog(const char *fileName) { + int isfifo = 0; #if !defined(AFS_PTHREAD_ENV) int tempfd; #endif +#if !defined(AFS_NT40_ENV) + struct stat statbuf; +#endif if (access(fileName, F_OK) == 0) return 0; /* exists, no need to reopen. */ @@ -294,18 +312,23 @@ ReOpenLog(const char *fileName) if (serverLogSyslog) { return 0; } + + /* Support named pipes as logs by not rotating them */ + if ((fstat(fileName, &statbuf) == 0) && (S_ISFIFO(statbuf.st_mode))) { + isfifo = 1; + } #endif #if defined(AFS_PTHREAD_ENV) LOCK_SERVERLOG(); if (serverLogFD > 0) close(serverLogFD); - serverLogFD = open(fileName, O_WRONLY | O_APPEND | O_CREAT, 0666); + serverLogFD = open(fileName, O_WRONLY | O_APPEND | O_CREAT | (isfifo?O_NONBLOCK:0), 0666); UNLOCK_SERVERLOG(); return serverLogFD < 0 ? -1 : 0; #else - tempfd = open(fileName, O_WRONLY | O_APPEND | O_CREAT, 0666); + tempfd = open(fileName, O_WRONLY | O_APPEND | O_CREAT | (isfifo?O_NONBLOCK:0), 0666); if (tempfd < 0) { printf("Unable to open log file %s\n", fileName); return -1; diff --git a/src/viced/callback.c b/src/viced/callback.c index b8db9bf8f..26f091d17 100644 --- a/src/viced/callback.c +++ b/src/viced/callback.c @@ -83,7 +83,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/viced/callback.c,v 1.55.2.8 2005/03/11 07:03:46 shadow Exp $"); + ("$Header: /cvs/openafs/src/viced/callback.c,v 1.55.2.9 2005/04/11 18:12:33 shadow Exp $"); #include #include /* for malloc() */ @@ -1408,7 +1408,9 @@ BreakVolumeCallBacksLater(afs_uint32 volume) ViceLog(25, ("Fsync thread wakeup\n")); #ifdef AFS_PTHREAD_ENV + FSYNC_LOCK; assert(pthread_cond_broadcast(&fsync_cond) == 0); + FSYNC_UNLOCK; #else LWP_NoYieldSignal(fsync_wait); #endif diff --git a/src/viced/viced.c b/src/viced/viced.c index fa8a51b8b..9ec8da235 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -20,7 +20,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/viced/viced.c,v 1.58.2.3 2005/02/24 15:23:41 shadow Exp $"); + ("$Header: /cvs/openafs/src/viced/viced.c,v 1.58.2.4 2005/04/15 18:25:01 shadow Exp $"); #include #include @@ -1475,7 +1475,7 @@ Do_VLRegisterRPC() if (code) { if (code == VL_MULTIPADDR) { ViceLog(0, - ("VL_RegisterAddrs rpc failed; The ethernet address exist on a different server; repair it\n")); + ("VL_RegisterAddrs rpc failed; The IP address exists on a different server; repair it\n")); ViceLog(0, ("VL_RegisterAddrs rpc failed; See VLLog for details\n")); return code; diff --git a/src/vlserver/vlprocs.c b/src/vlserver/vlprocs.c index e4f438308..6b9689d22 100644 --- a/src/vlserver/vlprocs.c +++ b/src/vlserver/vlprocs.c @@ -11,7 +11,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/vlserver/vlprocs.c,v 1.13 2003/11/29 21:38:04 jaltman Exp $"); + ("$Header: /cvs/openafs/src/vlserver/vlprocs.c,v 1.13.2.1 2005/04/27 01:37:06 shadow Exp $"); #include #include @@ -1952,7 +1952,7 @@ SVL_GetAddrs(rxcall, Handle, spare2, spare3, nentries, addrsp) return (ubik_EndTrans(trans)); } -#define PADDR(addr) printf("%d.%d.%d.%d", (addr>>24)&0xff, (addr>>16)&0xff, (addr>>8) &0xff, addr&0xff); +#define PADDR(addr) VLog(0,("%d.%d.%d.%d", (addr>>24)&0xff, (addr>>16)&0xff, (addr>>8) &0xff, addr&0xff)); afs_int32 SVL_RegisterAddrs(rxcall, uuidp, spare1, addrsp) @@ -2087,18 +2087,18 @@ SVL_RegisterAddrs(rxcall, uuidp, spare1, addrsp) || (!foundUuidEntry && (count > 1))) { VLog(0, ("The following fileserver is being registered in the VLDB:\n")); - printf(" ["); + VLog(0, (" [")); for (k = 0; k < cnt; k++) { if (k > 0) - printf(" "); + VLog(0,(" ")); PADDR(addrs[k]); } - printf("]\n"); + VLog(0,("]\n")); if (foundUuidEntry) { - printf - (" It would have replaced the existing VLDB server entry:\n"); - printf(" entry %d: [", FoundUuid); + VLog(0, + (" It would have replaced the existing VLDB server entry:\n")); + VLog(0, (" entry %d: [", FoundUuid)); base = (HostAddress[FoundUuid] >> 16) & 0xff; index = HostAddress[FoundUuid] & 0x0000ffff; exp = &ex_addr[base][index]; @@ -2106,21 +2106,21 @@ SVL_RegisterAddrs(rxcall, uuidp, spare1, addrsp) if (!exp->ex_addrs[mhidx]) continue; if (mhidx > 0) - printf(" "); + VLog(0,(" ")); PADDR(ntohl(exp->ex_addrs[mhidx])); } - printf("]\n"); + VLog(0, ("]\n")); } if (count == 1) - printf(" Yet another VLDB server entry exists:\n"); + VLog(0, (" Yet another VLDB server entry exists:\n")); else - printf(" Yet other VLDB server entries exist:\n"); + VLog(0, (" Yet other VLDB server entries exist:\n")); for (j = 0; j < count; j++) { srvidx = WillChange[j]; - printf(" entry %d: ", srvidx); + VLog(0, (" entry %d: ", srvidx)); if ((HostAddress[srvidx] & 0xff000000) == 0xff000000) { - printf("["); + VLog(0, ("[")); base = (HostAddress[srvidx] >> 16) & 0xff; index = HostAddress[srvidx] & 0x0000ffff; exp = &ex_addr[base][index]; @@ -2128,25 +2128,25 @@ SVL_RegisterAddrs(rxcall, uuidp, spare1, addrsp) if (!exp->ex_addrs[mhidx]) continue; if (mhidx > 0) - printf(" "); + VLog(0, (" ")); PADDR(ntohl(exp->ex_addrs[mhidx])); } - printf("]"); + VLog(0, ("]")); } else { PADDR(HostAddress[srvidx]); } - printf("\n"); + VLog(0, ("\n")); } if (count == 1) - printf(" You must 'vos changeaddr' this other server entry\n"); + VLog(0, (" You must 'vos changeaddr' this other server entry\n")); else - printf - (" You must 'vos changeaddr' these other server entries\n"); + VLog(0, + (" You must 'vos changeaddr' these other server entries\n")); if (foundUuidEntry) - printf - (" and/or remove the sysid file from the registering fileserver\n"); - printf(" before the fileserver can be registered in the VLDB.\n"); + VLog(0, + (" and/or remove the sysid file from the registering fileserver\n")); + VLog(0, (" before the fileserver can be registered in the VLDB.\n")); ubik_AbortTrans(trans); return VL_MULTIPADDR; @@ -2178,26 +2178,26 @@ SVL_RegisterAddrs(rxcall, uuidp, spare1, addrsp) } VLog(0, ("The following fileserver is being registered in the VLDB:\n")); - printf(" ["); + VLog(0, (" [")); for (k = 0; k < cnt; k++) { if (k > 0) - printf(" "); + VLog(0, (" ")); PADDR(addrs[k]); } - printf("]\n"); + VLog(0, ("]\n")); if (foundUuidEntry) { - printf - (" It will replace the following existing entry in the VLDB (same uuid):\n"); - printf(" entry %d: [", FoundUuid); + VLog(0, + (" It will replace the following existing entry in the VLDB (same uuid):\n")); + VLog(0, (" entry %d: [", FoundUuid)); for (k = 0; k < VL_MAXIPADDRS_PERMH; k++) { if (exp->ex_addrs[k] == 0) continue; if (k > 0) - printf(" "); + VLog(0, (" ")); PADDR(ntohl(exp->ex_addrs[k])); } - printf("]\n"); + VLog(0, ("]\n")); } else if (willReplaceCnt || (count == 1)) { /* If we are not replacing an entry and there is only one entry to change, * then we will replace that entry. @@ -2213,24 +2213,24 @@ SVL_RegisterAddrs(rxcall, uuidp, spare1, addrsp) index = HostAddress[ReplaceEntry] & 0x0000ffff; exp = &ex_addr[fbase][index]; - printf - (" It will replace the following existing entry in the VLDB (new uuid):\n"); - printf(" entry %d: [", ReplaceEntry); + VLog(0, + (" It will replace the following existing entry in the VLDB (new uuid):\n")); + VLog(0, (" entry %d: [", ReplaceEntry)); for (k = 0; k < VL_MAXIPADDRS_PERMH; k++) { if (exp->ex_addrs[k] == 0) continue; if (k > 0) - printf(" "); + VLog(0, (" ")); PADDR(ntohl(exp->ex_addrs[k])); } - printf("]\n"); + VLog(0, ("]\n")); } else { /* Not a mh entry. So we have to create a new mh entry and * put it on the ReplaceEntry slot of the HostAddress array. */ - printf(" It will replace existing entry %d, ", ReplaceEntry); + VLog(0, (" It will replace existing entry %d, ", ReplaceEntry)); PADDR(HostAddress[ReplaceEntry]); - printf(", in the VLDB (new uuid):\n"); + VLog(0,(", in the VLDB (new uuid):\n")); code = FindExtentBlock(trans, uuidp, 1, ReplaceEntry, &exp, &fbase); @@ -2243,7 +2243,7 @@ SVL_RegisterAddrs(rxcall, uuidp, spare1, addrsp) /* There is no entry for this server, must create a new mh entry as * well as use a new slot of the HostAddress array. */ - printf(" It will create a new entry in the VLDB.\n"); + VLog(0, (" It will create a new entry in the VLDB.\n")); code = FindExtentBlock(trans, uuidp, 1, -1, &exp, &fbase); if (code || !exp) { ubik_AbortTrans(trans); @@ -2291,10 +2291,10 @@ SVL_RegisterAddrs(rxcall, uuidp, spare1, addrsp) tex = &ex_addr[fbase][index]; if (++m == 1) - printf - (" The following existing entries in the VLDB will be updated:\n"); + VLog(0, + (" The following existing entries in the VLDB will be updated:\n")); - printf(" entry %d: [", WillChange[i]); + VLog(0, (" entry %d: [", WillChange[i])); for (h = j = 0; j < VL_MAXIPADDRS_PERMH; j++) { if (tex->ex_addrs[j]) { if (j > 0) @@ -2315,7 +2315,7 @@ SVL_RegisterAddrs(rxcall, uuidp, spare1, addrsp) for (j = h; j < VL_MAXIPADDRS_PERMH; j++) { tex->ex_addrs[j] = 0; /* zero rest of mh entry */ } - printf("]\n"); + VLog(0, ("]\n")); /* Write out the modified mh entry */ tex->ex_uniquifier = htonl(ntohl(tex->ex_uniquifier) + 1); @@ -3212,25 +3212,25 @@ ChangeIPAddr(ipaddr1, ipaddr2, atrans) VLog(0, ("The following IP address is being %s:\n", (ipaddr2 ? "changed" : "removed"))); - printf(" entry %d: ", i); + VLog(0, (" entry %d: ", i)); if (exp) { - printf("["); + VLog(0, ("[")); for (mhidx = 0; mhidx < VL_MAXIPADDRS_PERMH; mhidx++) { if (!exp->ex_addrs[mhidx]) continue; if (mhidx > 0) - printf(" "); + VLog(0, (" ")); PADDR(ntohl(exp->ex_addrs[mhidx])); } - printf("]"); + VLog(0, ("]")); } else { PADDR(ipaddr1); } if (ipaddr2) { - printf(" -> "); + VLog(0, (" -> ")); PADDR(ipaddr2); } - printf("\n"); + VLog(0, ("\n")); /* Change the registered uuuid addresses */ if (exp) { diff --git a/src/vol/fssync.c b/src/vol/fssync.c index c00a704c8..c43d20fab 100644 --- a/src/vol/fssync.c +++ b/src/vol/fssync.c @@ -50,7 +50,7 @@ static int newVLDB = 1; #include RCSID - ("$Header: /cvs/openafs/src/vol/fssync.c,v 1.26.2.1 2004/08/25 07:14:19 shadow Exp $"); + ("$Header: /cvs/openafs/src/vol/fssync.c,v 1.26.2.3 2005/04/27 01:37:09 shadow Exp $"); #include #include @@ -169,18 +169,10 @@ FSYNC_clientInit(void) FS_sd = getport(&addr); if (connect(FS_sd, (struct sockaddr *)&addr, sizeof(addr)) >= 0) return 1; -#if defined(AFS_SGI_ENV) - /* down with worthless error messages! */ - if (!*timeout) { - perror("FSYNC_clientInit failed (after many retries)"); - break; - } -#else if (!*timeout) break; if (!(*timeout & 1)) - perror("FSYNC_clientInit temporary failure (will retry)"); -#endif + Log(0, ("FSYNC_clientInit temporary failure (will retry)")); FSYNC_clientFinis(); sleep(*timeout++); } @@ -197,7 +189,6 @@ FSYNC_clientFinis(void) close(FS_sd); #endif FS_sd = -1; - Lock_Destroy(&FSYNC_handler_lock); } int diff --git a/src/vol/vnode.c b/src/vol/vnode.c index 26ff89e5e..2d4dcb793 100644 --- a/src/vol/vnode.c +++ b/src/vol/vnode.c @@ -17,7 +17,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/vol/vnode.c,v 1.19.2.1 2004/08/25 07:14:19 shadow Exp $"); + ("$Header: /cvs/openafs/src/vol/vnode.c,v 1.19.2.2 2005/04/24 14:21:36 shadow Exp $"); #include #include @@ -428,6 +428,7 @@ VAllocVnode_r(Error * ec, Volume * vp, VnodeType type) vnp->disk.uniquifier = unique; vnp->handle = NULL; vcp->allocs++; + vp->header->diskstuff.filecount++; return vnp; } @@ -760,6 +761,8 @@ VPutVnode_r(Error * ec, register Vnode * vnp) * (doing so could cause a "addled bitmap" message). */ if (vnp->delete && !*ec) { + if (vnp->volumePtr->header->diskstuff.filecount-- < 1) + vnp->volumePtr->header->diskstuff.filecount = 0; VFreeBitMapEntry_r(ec, &vp->vnodeIndex[class], vnodeIdToBitNumber(vnp->vnodeNumber)); } diff --git a/src/vol/vnode.h b/src/vol/vnode.h index efde399cb..0bf724508 100644 --- a/src/vol/vnode.h +++ b/src/vol/vnode.h @@ -138,7 +138,7 @@ typedef struct Vnode { VnodeId vnodeNumber; struct Volume *volumePtr; /* Pointer to the volume containing this file */ - byte nUsers; /* Number of lwp's who have done a VGetVnode */ + bit32 nUsers; /* Number of lwp's who have done a VGetVnode */ bit32 cacheCheck; /* Must equal the value in the volume Header * for the cache entry to be valid */ struct Lock lock; /* Internal lock */ diff --git a/src/vol/volume.c b/src/vol/volume.c index cf464a57f..24e57432f 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -20,7 +20,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/vol/volume.c,v 1.35.2.2 2004/12/13 19:41:10 shadow Exp $"); + ("$Header: /cvs/openafs/src/vol/volume.c,v 1.35.2.3 2005/04/14 02:00:36 shadow Exp $"); #include #include @@ -325,6 +325,7 @@ VInitVolumePackage(ProgramType pt, int nLargeVnodes, int nSmallVnodes, if (programType == volumeUtility && connect) { if (!VConnectFS()) { Log("Unable to connect to file server; aborted\n"); + Lock_Destroy(&FSYNC_handler_lock); exit(1); } } diff --git a/src/volser/vos.c b/src/volser/vos.c index 8947a7dd4..b936187d3 100644 --- a/src/volser/vos.c +++ b/src/volser/vos.c @@ -11,7 +11,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/volser/vos.c,v 1.40.2.8 2005/04/03 20:23:00 shadow Exp $"); + ("$Header: /cvs/openafs/src/volser/vos.c,v 1.40.2.9 2005/04/15 18:46:25 shadow Exp $"); #include #ifdef AFS_NT40_ENV @@ -3138,7 +3138,7 @@ RestoreVolume(as) restoreflags |= RV_LUNEW; break; default: - restoreflags |= RV_LUKEEP; + restoreflags |= RV_LUDUMP; } code = diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index 906f23356..ceb4149aa 100644 --- a/src/volser/vsprocs.c +++ b/src/volser/vsprocs.c @@ -11,7 +11,7 @@ #include RCSID - ("$Header: /cvs/openafs/src/volser/vsprocs.c,v 1.33.2.3 2005/01/31 04:34:47 shadow Exp $"); + ("$Header: /cvs/openafs/src/volser/vsprocs.c,v 1.33.2.4 2005/04/15 18:46:26 shadow Exp $"); #include #include @@ -68,7 +68,8 @@ struct ubik_client *cstruct; int verbose = 0; struct release { - afs_int32 time; + afs_int32 crtime; + afs_int32 uptime; afs_int32 vldbEntryIndex; }; @@ -162,12 +163,11 @@ static int DelVol(struct rx_connection *conn, afs_int32 vid, afs_int32 part, afs_int32 flags); static int GetTrans(struct nvldbentry *vldbEntryPtr, afs_int32 index, struct rx_connection **connPtr, afs_int32 * transPtr, - afs_int32 * timePtr); + afs_int32 * crtimePtr, afs_int32 * uptimePtr); static int SimulateForwardMultiple(struct rx_connection *fromconn, afs_int32 fromtid, afs_int32 fromdate, manyDests * tr, afs_int32 flags, void *cookie, manyResults * results); -static int rel_compar(struct release *r1, struct release *r2); static afs_int32 CheckVolume(volintInfo * volumeinfo, afs_int32 aserver, afs_int32 apart, afs_int32 * modentry, afs_uint32 * maxvolid); @@ -3006,15 +3006,16 @@ DelVol(struct rx_connection *conn, afs_int32 vid, afs_int32 part, static int GetTrans(struct nvldbentry *vldbEntryPtr, afs_int32 index, struct rx_connection **connPtr, afs_int32 * transPtr, - afs_int32 * timePtr) + afs_int32 * crtimePtr, afs_int32 * uptimePtr) { afs_int32 volid; struct volser_status tstatus; int code, rcode, tcode; *connPtr = (struct rx_connection *)0; - *timePtr = 0; *transPtr = 0; + *crtimePtr = 0; + *uptimePtr = 0; /* get connection to the replication site */ *connPtr = UV_Bind(vldbEntryPtr->serverNumber[index], AFSCONF_VOLUMEPORT); @@ -3086,7 +3087,8 @@ GetTrans(struct nvldbentry *vldbEntryPtr, afs_int32 index, code); goto fail; } - *timePtr = tstatus.creationDate - CLOCKSKEW; + *crtimePtr = tstatus.creationDate - CLOCKSKEW; + *uptimePtr = tstatus.updateDate - CLOCKSKEW; } return 0; @@ -3121,12 +3123,6 @@ SimulateForwardMultiple(struct rx_connection *fromconn, afs_int32 fromtid, } -static int -rel_compar(struct release *r1, struct release *r2) -{ - return (r1->time - r2->time); -} - /* UV_ReleaseVolume() * Release volume on to all * its RO sites (full release). Unless the previous release was @@ -3166,10 +3162,10 @@ UV_ReleaseVolume(afs_int32 afromvol, afs_int32 afromserver, manyDests tr; manyResults results; int rwindex, roindex, roclone, roexists; - afs_int32 rwcrdate, clcrdate; + afs_int32 rwcrdate, rwupdate, clcrdate; struct rtime { int validtime; - afs_uint32 time; + afs_uint32 uptime; } remembertime[NMAXNSERVERS]; int releasecount = 0; struct volser_status volstatus; @@ -3266,6 +3262,7 @@ UV_ReleaseVolume(afs_int32 afromvol, afs_int32 afromserver, ONERROR(code, afromvol, "Failed to get the status of RW volume %u\n"); rwcrdate = volstatus.creationDate; + rwupdate = volstatus.updateDate; /* End transaction on RW */ code = AFSVolEndTrans(fromconn, fromtid, &rcode); @@ -3286,11 +3283,11 @@ UV_ReleaseVolume(afs_int32 afromvol, afs_int32 afromserver, "Failed to get the status of RW clone %u\n"); clcrdate = volstatus.creationDate; - /* End transaction on RW */ + /* End transaction on clone */ code = AFSVolEndTrans(fromconn, clonetid, &rcode); clonetid = 0; ONERROR((code ? code : rcode), cloneVolId, - "Failed to end transaction on RW volume %u\n"); + "Failed to end transaction on RW clone %u\n"); if (rwcrdate > clcrdate) fullrelease = 2;/* Do a full release if RO clone older than RW */ @@ -3354,10 +3351,10 @@ UV_ReleaseVolume(afs_int32 afromvol, afs_int32 afromserver, if (roclone) { strcpy(vname, entry.name); strcat(vname, ".readonly"); - VPRINT("Cloning RW volume %u to permanent RO..."); + VPRINT1("Cloning RW volume %u to permanent RO...", afromvol); } else { strcpy(vname, "readonly-clone-temp"); - VPRINT("Cloning RW volume %u to temporary RO..."); + VPRINT1("Cloning RW volume %u to temporary RO...", afromvol); } code = AFSVolClone(fromconn, clonetid, 0, readonlyVolume, vname, @@ -3367,18 +3364,19 @@ UV_ReleaseVolume(afs_int32 afromvol, afs_int32 afromserver, } /* Get the time the RW was created for future information */ - VPRINT1("Getting status of RW volume %u...", cloneVolId); + VPRINT1("Getting status of RW volume %u...", afromvol); code = AFSVolGetStatus(fromconn, clonetid, &volstatus); - ONERROR(code, cloneVolId, + ONERROR(code, afromvol, "Failed to get the status of the RW volume %u\n"); VDONE; rwcrdate = volstatus.creationDate; + rwupdate = volstatus.updateDate; /* End the transaction on the RW volume */ - VPRINT1("Ending cloning transaction on RW volume %u...", cloneVolId); + VPRINT1("Ending cloning transaction on RW volume %u...", afromvol); code = AFSVolEndTrans(fromconn, clonetid, &rcode); clonetid = 0; - ONERROR((code ? code : rcode), cloneVolId, + ONERROR((code ? code : rcode), afromvol, "Failed to end cloning transaction on RW %u\n"); VDONE; @@ -3520,13 +3518,14 @@ UV_ReleaseVolume(afs_int32 afromvol, afs_int32 afromserver, code = GetTrans(&entry, vldbindex, &(toconns[volcount]), &(replicas[volcount].trans), - &(times[volcount].time)); + &(times[volcount].crtime), + &(times[volcount].uptime)); if (code) continue; /* Thisdate is the date from which we want to pick up all changes */ if (forceflag || !fullrelease - || (rwcrdate > times[volcount].time)) { + || (rwcrdate > times[volcount].crtime)) { /* If the forceflag is set, then we want to do a full dump. * If it's not a full release, we can't be sure that the creation * date is good (so we also do a full dump). @@ -3541,14 +3540,14 @@ UV_ReleaseVolume(afs_int32 afromvol, afs_int32 afromserver, * case time[volcount].time would be now instead of 0. */ thisdate = - (remembertime[vldbindex].time < - times[volcount].time) ? remembertime[vldbindex]. - time : times[volcount].time; + (remembertime[vldbindex].uptime < times[volcount].uptime) + ? remembertime[vldbindex].uptime + : times[volcount].uptime; } else { - thisdate = times[volcount].time; + thisdate = times[volcount].uptime; } remembertime[vldbindex].validtime = 1; - remembertime[vldbindex].time = thisdate; + remembertime[vldbindex].uptime = thisdate; if (volcount == 0) { fromdate = thisdate; @@ -3586,6 +3585,8 @@ UV_ReleaseVolume(afs_int32 afromvol, afs_int32 afromserver, if (fromdate == 0) fprintf(STDOUT, " (full release)"); + else + fprintf(STDOUT, " (as of %.24s)", ctime((time_t *)&fromdate)); fprintf(STDOUT, ".\n"); fflush(STDOUT); }