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 \
${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} ;; \
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} ;; \
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} ;; \
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.
-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,
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"
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
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
AC_SIZEOF_TYPE(long)
AC_CHECK_FUNCS(timegm)
+AC_CHECK_FUNCS(daemon)
dnl Directory PATH handling
if test "x$enable_transarc_paths" = "xyes" ; then
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"
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
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
AC_SIZEOF_TYPE(long)
AC_CHECK_FUNCS(timegm)
+AC_CHECK_FUNCS(daemon)
dnl Directory PATH handling
if test "x$enable_transarc_paths" = "xyes" ; then
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 <linux/fs.h>],
+[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)
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"
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"
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"
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; }
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"
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-I${LINUX_KERNEL_PATH}/include $CPPFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 2703 "configure"
+#line 2707 "configure"
#include "confdefs.h"
#include <linux/autoconf.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 2755 "configure"
+#line 2759 "configure"
#include "confdefs.h"
int main() {
int x;
; return 0; }
EOF
-if { (eval echo configure:2762: \"$ac_compile\") 1>&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
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
else
cat > conftest.$ac_ext <<EOF
-#line 2793 "configure"
+#line 2797 "configure"
#include "confdefs.h"
int main() {
int x;
; return 0; }
EOF
-if { (eval echo configure:2800: \"$ac_compile\") 1>&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
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
else
cat > conftest.$ac_ext <<EOF
-#line 2828 "configure"
+#line 2832 "configure"
#include "confdefs.h"
int main() {
int x;
; return 0; }
EOF
-if { (eval echo configure:2835: \"$ac_compile\") 1>&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
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
else
cat > conftest.$ac_ext <<EOF
-#line 2863 "configure"
+#line 2867 "configure"
#include "confdefs.h"
int main() {
int x;
; return 0; }
EOF
-if { (eval echo configure:2870: \"$ac_compile\") 1>&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
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
else
cat > conftest.$ac_ext <<EOF
-#line 2898 "configure"
+#line 2902 "configure"
#include "confdefs.h"
int main() {
int x;
; return 0; }
EOF
-if { (eval echo configure:2905: \"$ac_compile\") 1>&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
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 2944 "configure"
+#line 2948 "configure"
#include "confdefs.h"
#include <linux/completion.h>
#include <linux/version.h>
; 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
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
else
cat > conftest.$ac_ext <<EOF
-#line 2980 "configure"
+#line 2984 "configure"
#include "confdefs.h"
#include <linux/sched.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3013 "configure"
+#line 3017 "configure"
#include "confdefs.h"
#include <linux/sched.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
+#line 3050 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3078 "configure"
+#line 3082 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3110 "configure"
+#line 3114 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3142 "configure"
+#line 3146 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3174 "configure"
+#line 3178 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3206 "configure"
+#line 3210 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3238 "configure"
+#line 3242 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3270 "configure"
+#line 3274 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3302 "configure"
+#line 3306 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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 <<EOF
+#line 3338 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+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
else
cat > conftest.$ac_ext <<EOF
-#line 3334 "configure"
+#line 3370 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3368 "configure"
+#line 3404 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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 <<EOF
-#line 3402 "configure"
+#line 3438 "configure"
#include "confdefs.h"
#include <linux/fs.h>
#include <linux/namei.h>
(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
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 <<EOF
-#line 3439 "configure"
+#line 3475 "configure"
#include "confdefs.h"
#include <linux/fs.h>
#include <linux/namei.h>
(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
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 <<EOF
-#line 3476 "configure"
+#line 3512 "configure"
#include "confdefs.h"
#include <linux/fs.h>
#include <linux/namei.h>
(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
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 <<EOF
-#line 3513 "configure"
+#line 3549 "configure"
#include "confdefs.h"
#include <linux/fs.h>
#include <linux/namei.h>
(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
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 <<EOF
-#line 3553 "configure"
+#line 3589 "configure"
#include "confdefs.h"
#include <linux/fs.h>
#include <linux/mm.h>
(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
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3606 "configure"
+#line 3642 "configure"
#include "confdefs.h"
#include <linux/autoconf.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3639 "configure"
+#line 3675 "configure"
#include "confdefs.h"
#include <linux/net.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3672 "configure"
+#line 3708 "configure"
#include "confdefs.h"
#include <linux/fs.h>
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
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"
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
else
cat > conftest.$ac_ext <<EOF
-#line 3729 "configure"
+#line 3765 "configure"
#include "confdefs.h"
#include <linux/sched.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3760 "configure"
+#line 3796 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3792 "configure"
+#line 3828 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3824 "configure"
+#line 3860 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3856 "configure"
+#line 3892 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3888 "configure"
+#line 3924 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3920 "configure"
+#line 3956 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3952 "configure"
+#line 3988 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3984 "configure"
+#line 4020 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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 <<EOF
-#line 4019 "configure"
+#line 4055 "configure"
#include "confdefs.h"
#include <linux/version.h>
#include <linux/config.h>
; 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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4056 "configure"
+#line 4092 "configure"
#include "confdefs.h"
#include <linux/config.h>
; 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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4107 "configure"
+#line 4143 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4140 "configure"
+#line 4176 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4173 "configure"
+#line 4209 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4206 "configure"
+#line 4242 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4239 "configure"
+#line 4275 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4272 "configure"
+#line 4308 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4305 "configure"
+#line 4341 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4338 "configure"
+#line 4374 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
;;
*)
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 <<EOF
-#line 4622 "configure"
+#line 4664 "configure"
#include "confdefs.h"
#include <sys/buf.h>
int main() {
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
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 <<EOF
-#line 4660 "configure"
+#line 4702 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
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
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 <<EOF
-#line 4699 "configure"
+#line 4741 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:4722: \"$ac_link\") 1>&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
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
ac_save_LIBS="$LIBS"
LIBS="-l${lib} $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4759 "configure"
+#line 4801 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
socket()
; return 0; }
EOF
-if { (eval echo configure:4770: \"$ac_link\") 1>&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
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 <<EOF
-#line 4805 "configure"
+#line 4847 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:4828: \"$ac_link\") 1>&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
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
ac_save_LIBS="$LIBS"
LIBS="-l${lib} $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4865 "configure"
+#line 4907 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
connect()
; return 0; }
EOF
-if { (eval echo configure:4876: \"$ac_link\") 1>&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
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 <<EOF
-#line 4911 "configure"
+#line 4953 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:4934: \"$ac_link\") 1>&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
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
ac_save_LIBS="$LIBS"
LIBS="-l${lib} $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4970 "configure"
+#line 5012 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:4981: \"$ac_link\") 1>&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
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 <<EOF
-#line 5011 "configure"
+#line 5053 "configure"
#include "confdefs.h"
#include <stdlib.h>
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
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 <<EOF
-#line 5050 "configure"
+#line 5092 "configure"
#include "confdefs.h"
#include <sys/types.h>
; 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
ac_cv_func_res_search=no
cat > conftest.$ac_ext <<EOF
-#line 5091 "configure"
+#line 5133 "configure"
#include "confdefs.h"
#include <sys/types.h>
; 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
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
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5157 "configure"
+#line 5199 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pthread_attr_init()
; return 0; }
EOF
-if { (eval echo configure:5168: \"$ac_link\") 1>&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
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
ac_save_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5198 "configure"
+#line 5240 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pthread_attr_init()
; return 0; }
EOF
-if { (eval echo configure:5209: \"$ac_link\") 1>&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
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
ac_save_LIBS="$LIBS"
LIBS="-lc_r $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5240 "configure"
+#line 5282 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pthread_attr_init()
; return 0; }
EOF
-if { (eval echo configure:5251: \"$ac_link\") 1>&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
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 <<EOF
-#line 5279 "configure"
+#line 5321 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pthread_attr_init(); below. */
; return 0; }
EOF
-if { (eval echo configure:5302: \"$ac_link\") 1>&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
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
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 <<EOF
-#line 5443 "configure"
+#line 5485 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
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*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 5468 "configure"
+#line 5510 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 5486 "configure"
+#line 5528 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 5507 "configure"
+#line 5549 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
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
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 <<EOF
-#line 5547 "configure"
+#line 5589 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
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
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 <<EOF
-#line 5593 "configure"
+#line 5635 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
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
# 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
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5634 "configure"
+#line 5676 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
opendir()
; return 0; }
EOF
-if { (eval echo configure:5645: \"$ac_link\") 1>&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
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
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5675 "configure"
+#line 5717 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
opendir()
; return 0; }
EOF
-if { (eval echo configure:5686: \"$ac_link\") 1>&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
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
-#line 5717 "configure"
+#line 5759 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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
-#line 5757 "configure"
+#line 5799 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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
-#line 5797 "configure"
+#line 5839 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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
-#line 5837 "configure"
+#line 5879 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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
-#line 5877 "configure"
+#line 5919 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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
-#line 5917 "configure"
+#line 5959 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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 <<EOF
-#line 5971 "configure"
+#line 6013 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:5994: \"$ac_link\") 1>&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
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 <<EOF
-#line 6026 "configure"
+#line 6068 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6049: \"$ac_link\") 1>&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
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 <<EOF
-#line 6082 "configure"
+#line 6124 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6105: \"$ac_link\") 1>&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
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" && \
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 <<EOF
-#line 6150 "configure"
+#line 6192 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
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
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 6186 "configure"
+#line 6228 "configure"
#include "confdefs.h"
#include <stdio.h>
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
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 <<EOF
-#line 6225 "configure"
+#line 6267 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6248: \"$ac_link\") 1>&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 <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&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 <<EOF
+#line 6322 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
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"
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"
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"
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
else
cat > conftest.$ac_ext <<EOF
-#line 7506 "configure"
+#line 7632 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/systm.h>
; 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
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; }
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"
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-I${LINUX_KERNEL_PATH}/include $CPPFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 2704 "configure"
+#line 2708 "configure"
#include "confdefs.h"
#include <linux/autoconf.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 2756 "configure"
+#line 2760 "configure"
#include "confdefs.h"
int main() {
int x;
; return 0; }
EOF
-if { (eval echo configure:2763: \"$ac_compile\") 1>&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
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
else
cat > conftest.$ac_ext <<EOF
-#line 2794 "configure"
+#line 2798 "configure"
#include "confdefs.h"
int main() {
int x;
; return 0; }
EOF
-if { (eval echo configure:2801: \"$ac_compile\") 1>&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
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
else
cat > conftest.$ac_ext <<EOF
-#line 2829 "configure"
+#line 2833 "configure"
#include "confdefs.h"
int main() {
int x;
; return 0; }
EOF
-if { (eval echo configure:2836: \"$ac_compile\") 1>&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
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
else
cat > conftest.$ac_ext <<EOF
-#line 2864 "configure"
+#line 2868 "configure"
#include "confdefs.h"
int main() {
int x;
; return 0; }
EOF
-if { (eval echo configure:2871: \"$ac_compile\") 1>&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
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
else
cat > conftest.$ac_ext <<EOF
-#line 2899 "configure"
+#line 2903 "configure"
#include "confdefs.h"
int main() {
int x;
; return 0; }
EOF
-if { (eval echo configure:2906: \"$ac_compile\") 1>&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
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 2944 "configure"
+#line 2948 "configure"
#include "confdefs.h"
#include <linux/completion.h>
#include <linux/version.h>
; 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
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
else
cat > conftest.$ac_ext <<EOF
-#line 2980 "configure"
+#line 2984 "configure"
#include "confdefs.h"
#include <linux/sched.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3013 "configure"
+#line 3017 "configure"
#include "confdefs.h"
#include <linux/sched.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3046 "configure"
+#line 3050 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3078 "configure"
+#line 3082 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3110 "configure"
+#line 3114 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3142 "configure"
+#line 3146 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3174 "configure"
+#line 3178 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3206 "configure"
+#line 3210 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3238 "configure"
+#line 3242 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3270 "configure"
+#line 3274 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3302 "configure"
+#line 3306 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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 <<EOF
+#line 3338 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+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
else
cat > conftest.$ac_ext <<EOF
-#line 3334 "configure"
+#line 3370 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3368 "configure"
+#line 3404 "configure"
#include "confdefs.h"
#include <linux/fs.h>
int main() {
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
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 <<EOF
-#line 3402 "configure"
+#line 3438 "configure"
#include "confdefs.h"
#include <linux/fs.h>
#include <linux/namei.h>
(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
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 <<EOF
-#line 3439 "configure"
+#line 3475 "configure"
#include "confdefs.h"
#include <linux/fs.h>
#include <linux/namei.h>
(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
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 <<EOF
-#line 3476 "configure"
+#line 3512 "configure"
#include "confdefs.h"
#include <linux/fs.h>
#include <linux/namei.h>
(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
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 <<EOF
-#line 3513 "configure"
+#line 3549 "configure"
#include "confdefs.h"
#include <linux/fs.h>
#include <linux/namei.h>
(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
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 <<EOF
-#line 3553 "configure"
+#line 3589 "configure"
#include "confdefs.h"
#include <linux/fs.h>
#include <linux/mm.h>
(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
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3606 "configure"
+#line 3642 "configure"
#include "confdefs.h"
#include <linux/autoconf.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3639 "configure"
+#line 3675 "configure"
#include "confdefs.h"
#include <linux/net.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3672 "configure"
+#line 3708 "configure"
#include "confdefs.h"
#include <linux/fs.h>
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
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"
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
else
cat > conftest.$ac_ext <<EOF
-#line 3729 "configure"
+#line 3765 "configure"
#include "confdefs.h"
#include <linux/sched.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3760 "configure"
+#line 3796 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3792 "configure"
+#line 3828 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3824 "configure"
+#line 3860 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3856 "configure"
+#line 3892 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3888 "configure"
+#line 3924 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3920 "configure"
+#line 3956 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3952 "configure"
+#line 3988 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 3984 "configure"
+#line 4020 "configure"
#include "confdefs.h"
#include <linux/sched.h>
int main() {
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
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 <<EOF
-#line 4019 "configure"
+#line 4055 "configure"
#include "confdefs.h"
#include <linux/version.h>
#include <linux/config.h>
; 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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4056 "configure"
+#line 4092 "configure"
#include "confdefs.h"
#include <linux/config.h>
; 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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4107 "configure"
+#line 4143 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4140 "configure"
+#line 4176 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4173 "configure"
+#line 4209 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4206 "configure"
+#line 4242 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4239 "configure"
+#line 4275 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4272 "configure"
+#line 4308 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4305 "configure"
+#line 4341 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
else
cat > conftest.$ac_ext <<EOF
-#line 4338 "configure"
+#line 4374 "configure"
#include "confdefs.h"
#include <linux/modversions.h>
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
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
;;
*)
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 <<EOF
-#line 4622 "configure"
+#line 4664 "configure"
#include "confdefs.h"
#include <sys/buf.h>
int main() {
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
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 <<EOF
-#line 4660 "configure"
+#line 4702 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
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
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 <<EOF
-#line 4699 "configure"
+#line 4741 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:4722: \"$ac_link\") 1>&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
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
ac_save_LIBS="$LIBS"
LIBS="-l${lib} $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4759 "configure"
+#line 4801 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
socket()
; return 0; }
EOF
-if { (eval echo configure:4770: \"$ac_link\") 1>&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
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 <<EOF
-#line 4805 "configure"
+#line 4847 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:4828: \"$ac_link\") 1>&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
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
ac_save_LIBS="$LIBS"
LIBS="-l${lib} $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4865 "configure"
+#line 4907 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
connect()
; return 0; }
EOF
-if { (eval echo configure:4876: \"$ac_link\") 1>&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
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 <<EOF
-#line 4911 "configure"
+#line 4953 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:4934: \"$ac_link\") 1>&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
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
ac_save_LIBS="$LIBS"
LIBS="-l${lib} $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4970 "configure"
+#line 5012 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:4981: \"$ac_link\") 1>&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
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 <<EOF
-#line 5011 "configure"
+#line 5053 "configure"
#include "confdefs.h"
#include <stdlib.h>
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
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 <<EOF
-#line 5050 "configure"
+#line 5092 "configure"
#include "confdefs.h"
#include <sys/types.h>
; 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
ac_cv_func_res_search=no
cat > conftest.$ac_ext <<EOF
-#line 5091 "configure"
+#line 5133 "configure"
#include "confdefs.h"
#include <sys/types.h>
; 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
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
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5157 "configure"
+#line 5199 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pthread_attr_init()
; return 0; }
EOF
-if { (eval echo configure:5168: \"$ac_link\") 1>&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
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
ac_save_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5198 "configure"
+#line 5240 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pthread_attr_init()
; return 0; }
EOF
-if { (eval echo configure:5209: \"$ac_link\") 1>&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
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
ac_save_LIBS="$LIBS"
LIBS="-lc_r $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5240 "configure"
+#line 5282 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pthread_attr_init()
; return 0; }
EOF
-if { (eval echo configure:5251: \"$ac_link\") 1>&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
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 <<EOF
-#line 5279 "configure"
+#line 5321 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pthread_attr_init(); below. */
; return 0; }
EOF
-if { (eval echo configure:5302: \"$ac_link\") 1>&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
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
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 <<EOF
-#line 5443 "configure"
+#line 5485 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
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*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 5468 "configure"
+#line 5510 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 5486 "configure"
+#line 5528 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 5507 "configure"
+#line 5549 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
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
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 <<EOF
-#line 5547 "configure"
+#line 5589 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
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
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 <<EOF
-#line 5593 "configure"
+#line 5635 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
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
# 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
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5634 "configure"
+#line 5676 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
opendir()
; return 0; }
EOF
-if { (eval echo configure:5645: \"$ac_link\") 1>&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
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
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5675 "configure"
+#line 5717 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
opendir()
; return 0; }
EOF
-if { (eval echo configure:5686: \"$ac_link\") 1>&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
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
-#line 5717 "configure"
+#line 5759 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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
-#line 5757 "configure"
+#line 5799 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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
-#line 5797 "configure"
+#line 5839 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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
-#line 5837 "configure"
+#line 5879 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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
-#line 5877 "configure"
+#line 5919 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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
-#line 5917 "configure"
+#line 5959 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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 <<EOF
-#line 5971 "configure"
+#line 6013 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:5994: \"$ac_link\") 1>&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
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 <<EOF
-#line 6026 "configure"
+#line 6068 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6049: \"$ac_link\") 1>&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
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 <<EOF
-#line 6082 "configure"
+#line 6124 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6105: \"$ac_link\") 1>&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
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" && \
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 <<EOF
-#line 6150 "configure"
+#line 6192 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
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
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 6186 "configure"
+#line 6228 "configure"
#include "confdefs.h"
#include <stdio.h>
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
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 <<EOF
-#line 6225 "configure"
+#line 6267 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6248: \"$ac_link\") 1>&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 <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&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 <<EOF
+#line 6322 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
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"
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"
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"
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
else
cat > conftest.$ac_ext <<EOF
-#line 7506 "configure"
+#line 7632 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/systm.h>
; 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
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)
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
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
+ */
--- /dev/null
+AFS_component_version_number.h
+lang/AFS_component_version_number.h
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 =\
extern void afsd_DbgBreakAllocInit();
extern void afsd_DbgBreakAdd(DWORD requestNumber);
+HANDLE WaitToTerminate = NULL;
+
/*
* Notifier function for use by osi_panic
*/
extern long rx_mtu;
+extern HANDLE WaitToTerminate;
+
#define CAPABILITY_ERRORTRANS (1<<0)
#define CAPABILITY_BITS 1
#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 */
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.
*/
#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*/ |
}
/* 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)
{
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;
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
}
}
+ /* 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");
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");
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);
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
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 */
#include <winsock2.h>
#include <lm.h>
+#include <nb30.h>
#include <afs/param.h>
#include <afs/stds.h>
#include "cm_config.h"
#include "krb.h"
#include "afskfw.h"
+#include "lanahelper.h"
#include <WINNT\afsreg.h>
}
if (hkTemp) {
- HRESULT hr;
- size_t len;
CHAR * thesecells;
/* dwSize still has the size of the required buffer in bytes. */
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))
{
if (!GetTokenInformation(pInfo->hToken, TokenUser, tokenUser, retLen, &retLen))
{
- DebugEvent("GetTokenInformation failed: GLE = %lX", GetLastError());
+ DebugEvent("AFS_Logoff_Event - GetTokenInformation failed: GLE = %lX", GetLastError());
}
}
}
}
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);
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");
+}
+
NPPasswordChangeNotify
AFS_Startup_Event
AFS_Logoff_Event
+ AFS_Logon_Event
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;
}
* 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__);
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;
}
* 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;
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) {
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);
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);
#include <string.h>
#include <rx/rx.h>
+#include <rx/rx_prototypes.h>
#include "afsd.h"
{
cm_bkgRequest_t *rp;
+ rx_StartClientThread();
+
lock_ObtainWrite(&cm_daemonLock);
while (daemon_ShutdownFlag == 0) {
if (!cm_bkgListEndp) {
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.
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);
+ }
+ }
}
}
}
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)
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();
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 &&
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;
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);
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;
*/
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;
}
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;
ourLock = fileLock;
qq = q;
}
- else if (fileLock->LockType & 0x1)
+ else if (fileLock->LockType & LOCKING_ANDX_SHARED_LOCK)
anotherReader = 1;
q = osi_QNext(q);
}
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;
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;
}
#include <time.h>
#include <osi.h>
+#include <rx\rx.h>
+#include <rx/rx_prototypes.h>
#include "afsd.h"
#include <WINNT\afsreg.h>
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:
dos_ptr dos_ncb;
#endif /* DJGPP */
+ rx_StartClientThread();
+
outncbp = GetNCB();
outbufp = GetPacket();
outbufp->ncbp = outncbp;
#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 */
op = smb_GetSMBData(inp, NULL);
for (i=0; i<NumberOfUnlocks; i++) {
- if (LockType & 0x10) {
+ if (LockType & LOCKING_ANDX_LARGE_FILES) {
/* Large Files */
LOffset.HighPart = *((LONG *)(op + 4));
LOffset.LowPart = *((DWORD *)(op + 8));
}
for (i=0; i<NumberOfLocks; i++) {
- if (LockType & 0x10) {
+ if (LockType & LOCKING_ANDX_LARGE_FILES) {
/* Large Files */
LOffset.HighPart = *((LONG *)(op + 4));
LOffset.LowPart = *((DWORD *)(op + 8));
hIpHlp = LoadLibrary("iphlpapi");
if (hIpHlp != NULL) {
- (FARPROC) pGetAdaptersAddresses = GetProcAddress(hIpHlp, "GetAdaptersAddressess");
+ (FARPROC) pGetAdaptersAddresses = GetProcAddress(hIpHlp, "GetAdaptersAddresses");
if (pGetAdaptersAddresses == NULL)
FreeLibrary(hIpHlp);
}
}
done:
- CloseHandle(hIpHlp);
+ FreeLibrary(hIpHlp);
return nConfig;
}
FILE *OpenFile(char *file, char *rwp)
{
- char wdir[256];
- long code;
- long tlen;
- FILE *fp;
+ char wdir[256];
+ long code;
+ long tlen;
+ FILE *fp;
- code = GetWindowsDirectory(wdir, sizeof(wdir));
- if (code == 0 || code > 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)
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)
{
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()
register LONG code;
struct ViceIoctl blob;
- HOURGLASS hourglass;
+ HOURGLASS hourglass;
blob.in_size = 0;
blob.in = (char *) 0;
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()
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)
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;
}
};
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;
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 */
{
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;
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("-");
if (arights & DFS_DELETE) str += "d"; else printf("-");
if (arights & (DFS_USRALL)) str += "+";
*/
- }
+ }
- return str;
+ return str;
}
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)
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;
}
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)
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)
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);
}
}
*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);
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;
}
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);
}
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)
{
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)
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)
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 */
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);
+}
/*
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;
}
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;
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;
}
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;
}
struct afsconf_cell info;
struct chservinfo checkserv;
- HOURGLASS hourglass;
+ HOURGLASS hourglass;
memset(&checkserv, 0, sizeof(struct chservinfo));
blob.in_size = sizeof(struct chservinfo);
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 <Enter> or <Return> 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(nlenPath<MAX_PATH);
+ ASSERT(nlenPath<MAX_PATH);
struct ViceIoctl blob;
char orig_name[MAX_PATH+1]; /*Original name, may be modified*/
char true_name[MAX_PATH+1]; /*``True'' dirname (e.g., symlink target)*/
char parent_dir[MAX_PATH+1]; /*Parent directory of true name*/
char *last_component; /*Last component of true name*/
- UINT code;
+ UINT code;
- HOURGLASS hourglass;
+ HOURGLASS hourglass;
strcpy(orig_name, strName);
- strcpy(true_name, orig_name);
+ strcpy(true_name, orig_name);
/*
* Find rightmost slash, if any.
*/
- last_component = (char *) strrchr(true_name, '\\');
- if (!last_component)
- last_component = (char *) strrchr(true_name, '/');
- if (last_component) {
+ 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 = 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);
- if ((code = pioctl(parent_dir, VIOC_LISTSYMLINK, &blob, 1)))
- strcpy(space,"???");
- ASSERT(strlen(space)<MAX_PATH);
- strncpy(strPath,space,nlenPath);
-}
+ 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);
+ if ((code = pioctl(parent_dir, VIOC_LISTSYMLINK, &blob, 1)))
+ strcpy(space,"???");
+ ASSERT(strlen(space)<MAX_PATH);
+ strncpy(strPath,space,nlenPath);
+}
long fs_StripDriveLetter(const char *inPathp, char *outPathp, long outSize);
long fs_ExtractDriveLetter(const char *inPathp, char *outPathp);
BOOL IsSymlink(const char * true_name);
+BOOL IsMountPoint(const char * name);
UINT MakeSymbolicLink(const char *,const char *);
void ListSymbolicLinkPath(const char *strName,char *strPath,UINT nlenPath);
#endif //__GUI2FS_H__
// Mount Point submenu of the AFS submenu
HMENU hMountPointMenu = CreatePopupMenu();
int indexMountPointMenu = 0;
- ::InsertMenu(hMountPointMenu, indexMountPointMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_MOUNTPOINT_SHOW, GetMessageString(IDS_MP_SHOW_ITEM));
- ::InsertMenu(hMountPointMenu, indexMountPointMenu++, MF_STRING | MF_BYPOSITION, 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));
+ int nMountPointSelected = MF_GRAYED;
+ for (int n = pThis->m_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));
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"
Description="$(loc.StrAFSProdDesc)" Display="expand" InstallDefault="local" Level="30"
Title="OpenAFS">
<ComponentRef Id="efl_desktop_INI" />
+ <ComponentRef Id="efl_replace_afs_CMD" />
<Feature Id="feaClient" AllowAdvertise="no" Description="$(loc.StrAFSClientLongDesc)" Display="expand"
InstallDefault="followParent" Level="30" Title="$(loc.StrAFSClientDesc)">
<Registry Id="reg_afslogon04" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" Name="Impersonate" Type="integer" Value="1" />
<Registry Id="reg_afslogon05" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" Name="DLLName" Type="string" Value="[#fileafslogon_DLL]" />
<Registry Id="reg_afslogon06" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" Name="Logoff" Type="string" Value="AFS_Logoff_Event" />
- <Registry Id="reg_afslogon07" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" Name="Startup" Type="string" Value="AFS_Startup_Event" />
+ <Registry Id="reg_afslogon07" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" Name="Logon" Type="string" Value="AFS_Logon_Event" />
+ <Registry Id="reg_afslogon08" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" Name="Startup" Type="string" Value="AFS_Startup_Event" />
</Component>
<?ifdef DebugSyms?>
<Component Id="cmp_ClientSystemDebug" Guid="DD34DA09-D9DA-4A5A-9521-87B7738A7D53">
<Component Id="efl_desktop_INI" Guid="0ADB427F-3648-4BE0-983B-C454AA51895C">
<File Id="fildesktop_INI" Name="desktop.ini" KeyPath="yes" DiskId="1" src="$(var.SrcDir)WINNT\install\wix\afsdesktop.ini" Hidden="yes" System="yes" />
</Component>
+ <Component Id="efl_replace_afs_CMD" Guid="C9C93F3E-EEBA-4056-9669-5EF78D748D50">
+ <File Id="filreplace_afs_CMD" Name="replafs.cmd" LongName="replace_afs.cmd" KeyPath="yes" DiskId="1" src="$(var.SrcDir)\WINNT\install\wix\replace_afs.cmd" />
+ </Component>
<Directory Id="dirCommon" Name="Common">
<Component Id="cmp_CommonDir" Guid="C86B03A1-AE97-48B1-A77B-1B2395F1E117" KeyPath="yes">
<Environment Id="envCommon" Name="PATH" Action="create" System="yes" Permanent="no" Part="last" Separator=";" Value="[AFSDIR]Common" />
--- /dev/null
+@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
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);
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)) {
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_ */
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
#include <afs/param.h>
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 <afs/sysincludes.h> /* Standard vendor system headers */
#include <afsincludes.h> /* Afs-based standard headers */
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)
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;
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;
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);
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);
}
#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);
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
#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) \
#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;
#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
#include <afs/param.h>
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 <afs/sysincludes.h> /* Standard vendor system headers */
#include <afsincludes.h> /* Afs-based standard headers */
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)
{
}
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;
}
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,
vfs_stdsysctl,
#endif
};
+#endif
#include <afs/param.h>
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 <afs/sysincludes.h> /* Standard vendor system headers */
#include <afsincludes.h> /* Afs-based standard headers */
#include <vm/vnode_pager.h>
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 *);
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 *);
};
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; \
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;
}
*/
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 /* {
return 0;
}
+#endif
int
afs_vop_strategy(ap)
#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)
(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()
#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 */
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)
{
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;
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)
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)
{
osi_FreeLargeSpace(afile);
return 0;
}
+#endif
int
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
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");
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;
}
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)
("\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;
}
/* 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
/* 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"
#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_ */
#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"
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;
#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;
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;
#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 <linux/module.h> /* early to avoid printf->printk mapping */
#include "afs/sysincludes.h"
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)
}
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
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
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
{
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)
}
}
+#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
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);
#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"
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
.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,
};
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,
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;
}
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
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? */
.follow_link = page_follow_link,
#else
.follow_link = page_follow_link_light,
+ .put_link = page_put_link,
#endif
.setattr = afs_notify_change,
#else
simple_unlock(&afs_global_lock); \
} while(0)
#endif /* 0 */
-#define AFS_RXGLOCK()
-#define AFS_RXGUNLOCK()
-#define ISAFS_RXGLOCK() 1
#undef SPLVAR
#define SPLVAR
* 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_
#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
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;
#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
#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
#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
{
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));
if (glockOwner) {
AFS_GLOCK();
}
- if (rxGlockOwner) {
- AFS_RXGLOCK();
- }
}
int
osi_wait_t *waitp;
struct timespec tv;
int ret;
- int rxGlockOwner = ISAFS_RXGLOCK();
int glockOwner = ISAFS_GLOCK();
tv.tv_sec = msec / 1000;
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));
if (glockOwner) {
AFS_GLOCK();
}
- if (rxGlockOwner) {
- AFS_RXGLOCK();
- }
}
return ret;
}
#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 */
/* 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,
#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 */
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();
#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)
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();
(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;
#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 */
}
#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();
#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 */
{
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);
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
/*
* 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
#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
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
#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
#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
#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
#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)
{
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();
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);
#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 */
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))
#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
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.
* 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());
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
#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)
#include <afs/param.h>
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
* Sets globals.
*---------------------------------------------------------------------------*/
-int
-ParseCacheInfoFile()
+int ParseCacheInfoFile(void)
{
static char rn[] = "ParseCacheInfoFile"; /*This routine's name */
FILE *cachefd; /*Descriptor for cache info file */
("\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);
}
* 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
}
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) {
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;
}
/*-----------------------------------------------------------------------------
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);
}
#include <afs/param.h>
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 <afs/stds.h>
#include <sys/types.h>
}
#endif
+#if 0
/*
* This routine causes the calling process to go into the background and
* to lose its controlling tty.
}
}
#endif /* ! AFS_NT40_ENV */
+#endif
/* start a process and monitor it */
char namebuf[AFSDIR_PATH_MAX];
#ifndef AFS_NT40_ENV
int nofork = 0;
+ struct stat sb;
#endif
#ifdef AFS_AIX32_ENV
struct sigaction nsa;
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 */
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 <linux/fs.h>],
+[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)
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"
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"
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"
Makefile
compile_et
et_lex.lex.c
+y.tab.h
#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
#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
#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
#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
#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
#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
/* 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
/* 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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#include <linux/modversions.h>
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#include <linux/modversions.h>
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#endif /* __KERNEL__ && !DUMP_KERNEL */
#include <afs/afs_sysnames.h>
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#endif /* __KERNEL__ && !DUMP_KERNEL */
#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
--- /dev/null
+/*
+ * 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 <afs/afs_sysnames.h>
+
+#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 */
--- /dev/null
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#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 <afs/afs_sysnames.h>
+
+#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 <afs/afs_sysnames.h>
+#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 <limits.h>
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/mount.h>
+#include <sys/fcntl.h>
+#include <netinet/in.h>
+#include <sys/uio.h>
+#include <sys/socket.h>
+
+#endif /* !defined(UKERNEL) */
+
+#endif /* AFS_PARAM_H */
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#endif /* __KERNEL__ && !DUMP_KERNEL */
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#endif /* __KERNEL__ && !DUMP_KERNEL */
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
-
+#define AFS_GLOBAL_SUNLOCK
#endif /* __KERNEL__ && !DUMP_KERNEL*/
#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
--- /dev/null
+#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 <afs/afs_sysnames.h>
+
+#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 <kern/macro_help.h>
+#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 <afs/afs_sysnames.h>
+#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) */
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#endif /* __KERNEL__ && !DUMP_KERNEL */
#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
--- /dev/null
+#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 <afs/afs_sysnames.h>
+
+/* 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 <afs/afs_sysnames.h>
+
+ /*#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) */
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#include <linux/modversions.h>
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#include <linux/modversions.h>
#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
#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 */
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#ifdef AFS_SMP
#define CONFIG_SMP 1
#define __SMP__
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#endif /* __KERNEL__ && !DUMP_KERNEL */
#include <afs/afs_sysnames.h>
#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 __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#ifndef __SMP__
#define __SMP__
#endif
-#define AFS_GLOBAL_SUNLOCK
#endif
+#define AFS_GLOBAL_SUNLOCK
#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#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
#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
#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
#if defined(__amd64)
#define AFS_SUN57_64BIT_ENV 1
#define AFS_64BIT_INO 1
+#define AFS_64BIT_CLIENT 1
#endif
/**
#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
#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
#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
#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
#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
@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} $? $@
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
<rs_aix42>
KMODS=32
-<rs_aix50 rs_aix51 rs_aix52>
+<rs_aix50 rs_aix51 rs_aix52 rs_aix53>
KMODS=32 64
<all>
# 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
#
<ppc_darwin_14 ppc_darwin_13 ppc_darwin_12>
KOPTS=-no-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch
<all>
-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
osi_vm.o
AFS_OS_NFSOBJS = \
-<ia64_hpux1123>
+<ia64_hpux1123 hp_ux1123>
hpux_mod_nfs.modmeta.o \
<all>
osi_vfsops_nfs.o
AFS_OS_NONFSOBJS = \
-<ia64_hpux1123>
+<ia64_hpux1123 hp_ux1123>
hpux_mod.modmeta.o \
<all>
osi_vfsops.o
# 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
+#
<hp_ux110 hp_ux102 hp_ux11i>
KDEFS= +ES1.Xindirect_calls +XixdU +Hx0 +ESlit +ESsfc +ESssf -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \
-DMP +R500 -Wl,+k $(CPU_KDEFS)
KDEFS_64 = +DD64
<ia64_hpux1123>
+ARCH=ipf
+
+<hp_ux1123>
+ARCH=pa
+
+<ia64_hpux1123 hp_ux1123>
CCOPTS_common= -Ae +DD64 +O2
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
<hp_ux11i hp_ux110 hp_ux102>
BITS = 64 32
-<ia64_hpux1122 ia64_hpux1123>
+<ia64_hpux1122 ia64_hpux1123 hp_ux1123>
BITS = 64
<all>
ln -fs /etc/conf/ufs ufs
<ia64_hpux1122>
ln -fs /etc/conf/sys ufs
-<ia64_hpux1123>
+<ia64_hpux1123 hp_ux1123>
ln -fs /usr/include/sys h
ln -fs /usr/include/net net
ln -fs /usr/include/netinet netinet
# Below this line are targets when in the static directory:
-<all -ia64_hpux1123>
+<all -ia64_hpux1123 -hp_ux1123>
LIBAFS = libafs$(BITSUFFIX).a
LIBAFSNONFS = libafs$(BITSUFFIX).nonfs.a
-<ia64_hpux1123>
+<ia64_hpux1123 hp_ux1123>
LIBAFS = afs$(BITSUFFIX)_nfs
LIBAFSNONFS =afs$(BITSUFFIX)
<all>
${INSTALL} -f $? $@
${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
-<all -ia64_hpux1123>
+<all -ia64_hpux1123 -hp_ux1123>
$(AR) cru $@ $?
$(RANLIB) $@
-<ia64_hpux1123>
+<ia64_hpux1123 hp_ux1123>
$(MODLINK) -o $@ $(AFSAOBJS) $(AFSNFSOBJS)
<all>
${LIBAFSNONFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
-<all -ia64_hpux1123>
+<all -ia64_hpux1123 -hp_ux1123>
$(AR) cru $@ $?
$(RANLIB) $@
-<ia64_hpux1123>
+<ia64_hpux1123 hp_ux1123>
$(MODLINK) -o $@ $(AFSAOBJS) $(AFSNONFSOBJS)
<all>
-<ia64_hpux1123>
+<ia64_hpux1123 hp_ux1123>
hpux_mod.modmeta.c: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/hpux_mod.modmeta
$(MODMETA) ${IDENTS_common} ${IDENTS_ipf} \
-DAFSLIB_NAME=${LIBAFSNONFS} \
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
- <string>1.2.10</string>
+ <string>1.3.82</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.2.10</string>
+ <string>1.3.82</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.kernel.bsd</key>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>afs</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.openafs.filesystems.afs</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>8.0</string>
+ <key>CFBundleName</key>
+ <string>afs</string>
+ <key>CFBundlePackageType</key>
+ <string>KEXT</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.3.82</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.3.82</string>
+ <key>OSBundleLibraries</key>
+ <dict>
+ <key>com.apple.kernel.bsd</key>
+ <string>8.0.0</string>
+ <key>com.apple.kernel.mach</key>
+ <string>8.0.0</string>
+ </dict>
+</dict>
+</plist>
# 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)
RXAFS_ResidencyCmd @217
StartRXAFS_FetchData64 @218
StartRXAFS_StoreData64 @219
+ rx_StartClientThread @220
<plist version="1.0">
<dict>
<key>CFBundleGetInfoString</key>
- <string>OpenAFS 1.3.81</string>
+ <string>OpenAFS 1.3.82</string>
<key>CFBundleIdentifier</key>
<string>org.openafs.OpenAFS.pkg</string>
<key>CFBundleName</key>
<string>OpenAFS</string>
<key>CFBundleShortVersionString</key>
- <string>1.3.81</string>
+ <string>1.3.82</string>
<key>IFMajorVersion</key>
<integer>1</integer>
<key>IFMinorVersion</key>
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)
${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 \
-/* $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 $ */
/*
*
#include <afs/param.h>
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 <afs/cmd.h> /*Command line parsing */
#include <errno.h>
extern char *optarg;
extern int optind;
+int restricted = 0;
int display_entry();
void add_group();
void display_groups();
#include <afs/param.h>
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 <afs/stds.h>
#include <ctype.h>
#include <winsock2.h>
#else
#include <netinet/in.h>
+#include <arpa/inet.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include "ptserver.h"
#include "pterror.h"
+#include "ptprototypes.h"
#include "afs/audit.h"
#ifdef AFS_ATHENA_STDENV
#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;
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.
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))
--- /dev/null
+/*
+ * 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
#include <afs/param.h>
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 <afs/stds.h>
#ifdef AFS_AIX32_ENV
int pr_realmNameLen;
char *pr_realmName;
+int restricted = 0;
+
static struct afsconf_cell info;
extern int prp_group_default;
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) {
"[-syslog[=FACILITY]] "
"[-p <number of processes>] [-rebuild] "
"[-groupdepth <depth>] "
+ "[-restricted] "
"[-enable_peer_stats] [-enable_process_stats] "
"[-default_access default_user_access default_group_access] "
"[-help]\n");
printf("Usage: ptserver [-database <db path>] "
"[-p <number of processes>] [-rebuild] "
"[-default_access default_user_access default_group_access] "
+ "[-restricted] "
"[-groupdepth <depth>] " "[-help]\n");
#endif
#else
"[-p <number of processes>] [-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 <db path>] "
"[-default_access default_user_access default_group_access] "
+ "[-restricted] "
"[-p <number of processes>] [-rebuild] " "[-help]\n");
#endif
#endif
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 */
#include <afs/param.h>
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 <afs/stds.h>
#include <sys/types.h>
/* 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;
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;
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;
__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(); \
#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 { \
#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"
*/
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.. */
rxk_portRocks[i], data_len);
} else
m_freem(am);
- AFS_RXGUNLOCK();
USERPRI;
return;
}
#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 <sys/malloc.h>
*/
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.. */
rxk_portRocks[i], data_len);
} else
m_freem(am);
- AFS_RXGUNLOCK();
USERPRI;
return;
}
#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);
#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"
#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;
#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)
{
AFS_GLOCK();
MUTEX_ENTER(l);
}
-
-#endif
#define AFS_GLOBAL_RXLOCK_KERNEL 1
-#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)
#define RX_ENABLE_LOCKS 1
#ifndef _LINUX_CODA_FS_I
#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_ */
#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 <linux/version.h>
#ifdef AFS_LINUX22_ENV
/* rxk_NewSocket
* open and bind RX socket
*/
-struct osi_socket *
+osi_socket *
rxk_NewSocketHost(afs_uint32 ahost, short aport)
{
struct socket *sockp;
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);
/* 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 */
#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"
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;
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;
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;
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);
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);
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);
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;
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;
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
#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"
* 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;
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);
#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"
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;
/* 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();
* implementation environment--kernel or user space) */
rxi_StartListener();
- AFS_RXGUNLOCK();
USERPRI;
tmp_status = rxinit_status = 0;
UNLOCK_RX_INIT;
}
#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 */
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
/* Turn on reaping of idle server connections */
rxi_ReapConnections();
- AFS_RXGUNLOCK();
USERPRI;
if (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;
}
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;
MUTEX_EXIT(&rx_stats_mutex);
MUTEX_EXIT(&rx_connHashTable_lock);
- AFS_RXGUNLOCK();
USERPRI;
return conn;
}
SPLVAR;
NETPRI;
- AFS_RXGLOCK();
rxi_DestroyConnection(conn);
- AFS_RXGUNLOCK();
USERPRI;
}
SPLVAR;
NETPRI;
- AFS_RXGLOCK();
MUTEX_ENTER(&conn->conn_data_lock);
conn->refCount++;
MUTEX_EXIT(&conn->conn_data_lock);
- AFS_RXGUNLOCK();
USERPRI;
}
NETPRI;
clock_GetTime(&queueTime);
- AFS_RXGLOCK();
MUTEX_ENTER(&conn->conn_call_lock);
/*
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;
queue_Init(&call->tq);
}
MUTEX_EXIT(&call->lock);
- AFS_RXGUNLOCK();
#endif /* AFS_GLOBAL_RXLOCK_KERNEL */
return call;
tservice = rxi_AllocService();
NETPRI;
- AFS_RXGLOCK();
for (i = 0; i < RX_MAX_SERVICES; i++) {
register struct rx_service *service = rx_services[i];
if (service) {
(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;
* 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;
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",
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
SPLVAR;
NETPRI;
- AFS_RXGLOCK();
MUTEX_ENTER(&rx_serverPool_lock);
#ifdef RX_ENABLE_LOCKS
#endif /* RX_ENABLE_LOCKS */
}
MUTEX_EXIT(&rx_serverPool_lock);
- AFS_RXGUNLOCK();
USERPRI;
}
SPLVAR;
NETPRI;
- AFS_RXGLOCK();
MUTEX_ENTER(&freeSQEList_lock);
if ((sq = rx_FreeSQEList)) {
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;
dpf(("rx_GetCall(socketp=0x%x, *socketp=0x%x)\n", socketp, *socketp));
}
- AFS_RXGUNLOCK();
USERPRI;
return call;
dpf(("rx_EndCall(call %x)\n", call));
NETPRI;
- AFS_RXGLOCK();
MUTEX_ENTER(&call->lock);
if (rc == 0 && call->error == 0) {
MUTEX_EXIT(&conn->conn_call_lock);
conn->flags &= ~RX_CONN_BUSY;
}
- AFS_RXGUNLOCK();
USERPRI;
/*
* Map errors to the local host's errno.h format.
#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))
#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
int isEarliest = 0;
MUTEX_ENTER(&rxevent_lock);
- AFS_ASSERT_RXGLOCK();
#ifdef RXDEBUG
if (rx_Log_event) {
struct clock now;
/* 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);
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 */
/* RX: Globals for internal use, basically */
+#ifndef AFS_RX_GLOBALS_H
+#define AFS_RX_GLOBALS_H
+
+
#ifdef KERNEL
#include "rx/rx.h"
#else /* KERNEL */
#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;
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);
* the request path.
*/
EXT int rx_enable_hot_thread INIT(0);
+
+#endif /* AFS_RX_GLOBALS_H */
#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"
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;
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;
/* 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;
#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);
AFS_GUNLOCK();
#endif /* RX_ENABLE_LOCKS */
NETPRI;
- AFS_RXGLOCK();
rxevent_RaiseEvents(&temp);
- AFS_RXGUNLOCK();
USERPRI;
#ifdef RX_ENABLE_LOCKS
AFS_GLOCK();
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();
}
}
#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)
#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)
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)
{
SPLVAR;
NETPRI;
+
MUTEX_ENTER(&rx_freePktQ_lock);
#ifdef KERNEL
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)
{
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
}
/* 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)
{
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;
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 */
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();
}
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. */
*/
/* 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)
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
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) {
}
}
+#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)
{
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)
{
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)
{
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)
{
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
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 */
} else
nbytes -= apacket->wirevec[i].iov_len;
}
- AFS_RXGUNLOCK();
#ifdef KERNEL
#ifdef RX_KERNEL_TRACE
if (ICL_SETACTIVE(afs_iclSetp)) {
AFS_GLOCK();
#endif
#endif
- AFS_RXGLOCK();
if (saven) { /* means we truncated the packet above. */
apacket->wirevec[i - 1].iov_len = savelen;
apacket->niovecs = saven;
* 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
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));
* 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)
if (!istack && waslocked)
AFS_GLOCK();
#endif
- AFS_RXGLOCK();
#ifdef RXDEBUG
}
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,
/* 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);
#include <afs/param.h>
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 <sys/types.h>
#include <errno.h>
}
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;
+}
#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
/* 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)
/* 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))
#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
}
NETPRI;
- AFS_RXGLOCK();
MUTEX_ENTER(&call->lock);
bytes = rxi_ReadProc(call, buf, nbytes);
MUTEX_EXIT(&call->lock);
- AFS_RXGUNLOCK();
USERPRI;
return bytes;
}
}
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;
}
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;
}
}
NETPRI;
- AFS_RXGLOCK();
MUTEX_ENTER(&call->lock);
bytes = rxi_WriteProc(call, buf, nbytes);
MUTEX_EXIT(&call->lock);
- AFS_RXGUNLOCK();
USERPRI;
return bytes;
}
}
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;
}
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;
}
SPLVAR;
NETPRI;
- AFS_RXGLOCK();
MUTEX_ENTER(&call->lock);
bytes = rxi_WritevProc(call, iov, nio, nbytes);
MUTEX_EXIT(&call->lock);
- AFS_RXGUNLOCK();
USERPRI;
return bytes;
}
{
SPLVAR;
NETPRI;
- AFS_RXGLOCK();
MUTEX_ENTER(&call->lock);
rxi_FlushWrite(call);
MUTEX_EXIT(&call->lock);
- AFS_RXGUNLOCK();
USERPRI;
}
#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;
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 */
# 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
#include <afs/param.h>
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 <afs/stds.h>
#include <windows.h>
#include <WINNT/afsreg.h>
#include <lanahelper.h>
+#include <loadfuncs-krb5.h>
+#include <krb5.h>
+
static char AFSConfigKeyName[] = AFSREG_CLT_SVC_PARAM_SUBKEY;
#define FS_IOCTLREQUEST_MAXSIZE 8192
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)
{
(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);
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));
}
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,
(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);
}
}
}
}
- 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));
(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;
}
}
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 \
${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
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
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 \
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
#
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);
--- /dev/null
+#include <afsconfig.h>
+#include <afs/param.h>
+
+#ifndef HAVE_DAEMON
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <sys/types.h>
+
+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
#include <afs/param.h>
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 <stdio.h>
#ifdef AFS_NT40_ENV
#include <strings.h>
#endif
#endif
+#include <sys/stat.h>
#include "afsutil.h"
#include "fileutil.h"
#if defined(AFS_PTHREAD_ENV)
#ifdef AFS_NT40_ENV
#define F_OK 0
+#define O_NONBLOCK 0
#endif
char *(*threadNameProgram) ();
(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
* 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) {
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) {
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. */
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;
#include <afs/param.h>
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 <stdio.h>
#include <stdlib.h> /* for malloc() */
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
#include <afs/param.h>
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 <stdio.h>
#include <stdlib.h>
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;
#include <afs/param.h>
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 <sys/types.h>
#include <stdio.h>
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)
|| (!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];
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];
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;
}
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.
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);
/* 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);
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)
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);
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) {
#include <afs/param.h>
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 <sys/types.h>
#include <stdio.h>
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++);
}
close(FS_sd);
#endif
FS_sd = -1;
- Lock_Destroy(&FSYNC_handler_lock);
}
int
#include <afs/param.h>
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 <errno.h>
#include <stdio.h>
vnp->disk.uniquifier = unique;
vnp->handle = NULL;
vcp->allocs++;
+ vp->header->diskstuff.filecount++;
return 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));
}
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 */
#include <afs/param.h>
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 <rx/xdr.h>
#include <afs/afsint.h>
if (programType == volumeUtility && connect) {
if (!VConnectFS()) {
Log("Unable to connect to file server; aborted\n");
+ Lock_Destroy(&FSYNC_handler_lock);
exit(1);
}
}
#include <afs/param.h>
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 <sys/types.h>
#ifdef AFS_NT40_ENV
restoreflags |= RV_LUNEW;
break;
default:
- restoreflags |= RV_LUKEEP;
+ restoreflags |= RV_LUDUMP;
}
code =
#include <afs/param.h>
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 <stdio.h>
#include <sys/types.h>
int verbose = 0;
struct release {
- afs_int32 time;
+ afs_int32 crtime;
+ afs_int32 uptime;
afs_int32 vldbEntryIndex;
};
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);
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);
code);
goto fail;
}
- *timePtr = tstatus.creationDate - CLOCKSKEW;
+ *crtimePtr = tstatus.creationDate - CLOCKSKEW;
+ *uptimePtr = tstatus.updateDate - CLOCKSKEW;
}
return 0;
}
-static int
-rel_compar(struct release *r1, struct release *r2)
-{
- return (r1->time - r2->time);
-}
-
/* UV_ReleaseVolume()
* Release volume <afromvol> on <afromserver> <afrompart> to all
* its RO sites (full release). Unless the previous release was
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;
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);
"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 */
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,
}
/* 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;
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).
* 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;
if (fromdate == 0)
fprintf(STDOUT, " (full release)");
+ else
+ fprintf(STDOUT, " (as of %.24s)", ctime((time_t *)&fromdate));
fprintf(STDOUT, ".\n");
fflush(STDOUT);
}