des: config pinstall
${COMPILE_PART1} des ${COMPILE_PART2}
-sys: cmd comerr afs des rx rxstat fsint
+sys: cmd comerr afs des rx rxstat fsint sys_depinstall
${COMPILE_PART1} sys ${COMPILE_PART2}
rxkad: cmd comerr sys des rx rxkad_depinstall
dir_depinstall: pinstall
${COMPILE_PART1} dir ${COMPILE_DEPINSTALL}
+sys_depinstall: pinstall
+ ${COMPILE_PART1} sys ${COMPILE_DEPINSTALL}
+
kauth_depinstall: pinstall rxgen comerr
${COMPILE_PART1} kauth ${COMPILE_DEPINSTALL}
src/config/config src/libafs/MakefileProto.${MKAFS_OSTYPE} src/libafs/Makefile ${SYS_NAME}
libafs: libafs_setup lwp_depinstall rx_depinstall vlserver_depinstall rxkad_depinstall fsint_depinstall \
- libacl_depinstall afs_depinstall dir_depinstall rxstat_depinstall
+ libacl_depinstall afs_depinstall dir_depinstall rxstat_depinstall sys_depinstall
${COMPILE_PART1} libafs ${COMPILE_PART2}
libafs_tree: libafs_setup lwp_depinstall rx_depinstall vlserver_depinstall rxkad_depinstall fsint_depinstall \
- libacl_depinstall afs_depinstall dir_depinstall rxstat_depinstall
+ libacl_depinstall afs_depinstall dir_depinstall rxstat_depinstall sys_depinstall
${TOP_SRCDIR}/config/make_libafs_tree.pl \
-sn $(SYS_NAME) \
-os $(MKAFS_OSTYPE) \
libuafs: libuafs_setup vlserver_depinstall rx_depinstall fsint_depinstall \
auth_depinstall dir_depinstall libacl_depinstall rxkad_depinstall \
ubik_depinstall afs_depinstall kauth_depinstall ptserver_depinstall \
- rxstat_depinstall lwp_depinstall des
+ rxstat_depinstall lwp_depinstall sys_depinstall des
set -x; \
case ${SYS_NAME} in \
hp_ux102* | *_obsd* | sun*_4* | *_nbsd*| hp_ux11i | ia64_hpux112*) \
alpha_linux22
alpha_linux24
ia64_linux24
+ ia64_linux26
sparc_linux22
sparc_linux24
sparc64_linux22
of storage depending on which compilers are selected. The following
versions are supported:
- Microsoft Visual .NET
+ Microsoft Visual Studio .NET
available via a MSDN subscription
- Microsoft Visual .NET 2003 (recommended)
+ Microsoft Visual Studio .NET 2003 (recommended)
available via a MSDN subscription
- Microsoft Visual C++ Toolkit 2003 (same as .NET 2003)
- http://msdn.microsoft.com/visualc/vctoolkit2003/
+ Microsoft Visual Studio .NET 2005 (do not use for production)
+ available via a MSDN subscription
The following Microsoft SDK is required:
STEP B. Install compiler and development tools.
-Install a copy of Microsoft Visual .NET, Visual .NET 2003, Visual C++
-Toolkit 2003. The "Typical" install setting is sufficient.
+Install a copy of Microsoft Visual Studio .NET, Visual Studio .NET 2003,
+or Visual Studio .NET 2005. The "Typical" install setting is sufficient.
(1) You can reduce the installation size by selecting "Custom" install
and remove all but the following Options:
must be defined to match your configuration:
AFSVER_CL: Set to 1200 if using MS Visual C++ 6.0
- Set to 1300 if using MS Visual .NET
- Set to 1310 if using MS Visual .NET 2003
- Set to 1400 if using MS Visual .NET 2005
+ Set to 1300 if using MS Visual Studio .NET
+ Set to 1310 if using MS Visual Studio .NET 2003
+ Set to 1400 if using MS Visual Studio .NET 2005
MSVCDIR: Set to the short name version of the directory into which
the visual C++ compiler was installed regardless of version
system=$host
case $system in
*-linux*)
+
MKAFS_OSTYPE=LINUX
if test "x$enable_redhat_buildsys" = "xyes"; then
AC_DEFINE(ENABLE_REDHAT_BUILDSYS, 1, [define if you have redhat buildsystem])
SUBARCH=default
fi
AC_MSG_RESULT(linux)
- if test "x$enable_kernel_module" = "xyes"; then
- if test "x$enable_debug_kernel" = "xno"; then
- LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fomit-frame-pointer"
- fi
- OPENAFS_GCC_SUPPORTS_MARCH
- AC_SUBST(P5PLUS_KOPTS)
- OPENAFS_GCC_NEEDS_NO_STRENGTH_REDUCE
- OPENAFS_GCC_NEEDS_NO_STRICT_ALIASING
- OPENAFS_GCC_SUPPORTS_NO_COMMON
- OPENAFS_GCC_SUPPORTS_PIPE
- AC_SUBST(LINUX_GCC_KOPTS)
- ifdef([OPENAFS_CONFIGURE_LIBAFS],
- [LINUX_BUILD_VNODE_FROM_INODE(src/config,afs)],
- [LINUX_BUILD_VNODE_FROM_INODE(${srcdir}/src/config,src/afs/LINUX,${srcdir}/src/afs/LINUX)]
- )
- LINUX_COMPLETION_H_EXISTS
- LINUX_DEFINES_FOR_EACH_PROCESS
- LINUX_DEFINES_PREV_TASK
- LINUX_EXPORTS_TASKLIST_LOCK
- LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
- LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
- LINUX_FS_STRUCT_INODE_HAS_I_ALLOC_SEM
- LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM
- LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
- LINUX_FS_STRUCT_INODE_HAS_I_DEVICES
- LINUX_FS_STRUCT_INODE_HAS_I_SECURITY
- LINUX_INODE_SETATTR_RETURN_TYPE
- LINUX_KERNEL_LINUX_SYSCALL_H
- LINUX_KERNEL_SELINUX
- LINUX_KERNEL_SOCK_CREATE
- LINUX_NEED_RHCONFIG
- LINUX_RECALC_SIGPENDING_ARG_TYPE
- LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_PARENT
- LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_REAL_PARENT
- LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIG
- LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGHAND
- LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK
- LINUX_WHICH_MODULES
- if test "x$ac_cv_linux_config_modversions" = "xno"; then
- AC_MSG_WARN([Cannot determine sys_call_table status. assuming it isn't exported])
- ac_cv_linux_exports_sys_call_table=no
- if test -f "$LINUX_KERNEL_PATH/include/asm/ia32_unistd.h"; then
- ac_cv_linux_exports_ia32_sys_call_table=yes
- fi
- else
- LINUX_EXPORTS_INIT_MM
- LINUX_EXPORTS_KALLSYMS_ADDRESS
- LINUX_EXPORTS_KALLSYMS_SYMBOL
- LINUX_EXPORTS_SYS_CALL_TABLE
- LINUX_EXPORTS_IA32_SYS_CALL_TABLE
- LINUX_EXPORTS_SYS_CHDIR
- LINUX_EXPORTS_SYS_CLOSE
- LINUX_EXPORTS_SYS_WAIT4
- if test "x$ac_cv_linux_exports_sys_call_table" = "xno"; then
- linux_syscall_method=none
- if test "x$ac_cv_linux_exports_init_mm" = "xyes"; then
- linux_syscall_method=scan
- if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
- linux_syscall_method=scan_with_kallsyms_address
- fi
- fi
- if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
- linux_syscall_method=kallsyms_symbol
- fi
- if test "x$linux_syscall_method" = "xnone"; then
- AC_MSG_ERROR([no available sys_call_table access method])
- fi
- fi
+ if test "x$enable_kernel_module" = "xyes"; then
+ AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $[]1 $[]2}'`
+ if test "x${AFS_SYSKVERS}" = "x"; then
+ AC_MSG_ERROR(Couldn't guess your Linux version [2])
fi
- if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
- AC_DEFINE(HAVE_IN_SYSTM_H, 1, [define if you have in_systm.h header file])
- fi
- if test -f "$LINUX_KERNEL_PATH/include/linux/mm_inline.h"; then
- AC_DEFINE(HAVE_MM_INLINE_H, 1, [define if you have mm_inline.h header file])
- fi
- if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
- AC_DEFINE(HAVE_IN_SYSTM_H, 1, [define if you have in_systm.h header file])
- fi
- if test "x$ac_cv_linux_exports_sys_chdir" = "xyes" ; then
- AC_DEFINE(EXPORTED_SYS_CHDIR, 1, [define if your linux kernel exports sys_chdir])
- fi
- if test "x$ac_cv_linux_exports_sys_close" = "xyes" ; then
- AC_DEFINE(EXPORTED_SYS_CLOSE, 1, [define if your linux kernel exports sys_close])
- fi
- if test "x$ac_cv_linux_exports_sys_wait4" = "xyes" ; then
- AC_DEFINE(EXPORTED_SYS_WAIT4, 1, [define if your linux kernel exports sys_wait4])
- fi
- if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then
- AC_DEFINE(EXPORTED_TASKLIST_LOCK, 1, [define if your linux kernel exports tasklist_lock])
- fi
- if test "x$ac_cv_linux_exports_sys_call_table" = "xyes"; then
- AC_DEFINE(EXPORTED_SYS_CALL_TABLE)
- fi
- if test "x$ac_cv_linux_exports_ia32_sys_call_table" = "xyes"; then
- AC_DEFINE(EXPORTED_IA32_SYS_CALL_TABLE)
- fi
- if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
- AC_DEFINE(EXPORTED_KALLSYMS_SYMBOL)
- fi
- if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
- AC_DEFINE(EXPORTED_KALLSYMS_ADDRESS)
- fi
- if test "x$ac_cv_linux_completion_h_exists" = "xyes" ; then
- AC_DEFINE(COMPLETION_H_EXISTS, 1, [define if completion_h exists])
- fi
- if test "x$ac_cv_linux_defines_for_each_process" = "xyes" ; then
- AC_DEFINE(DEFINED_FOR_EACH_PROCESS, 1, [define if for_each_process defined])
- fi
- if test "x$ac_cv_linux_defines_prev_task" = "xyes" ; then
- AC_DEFINE(DEFINED_PREV_TASK, 1, [define if prev_task defined])
- fi
- if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then
- AC_DEFINE(INODE_SETATTR_NOT_VOID, 1, [define if your setattr return return non-void])
- fi
- if test "x$ac_cv_linux_fs_struct_address_space_has_page_lock" = "xyes"; then
- AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK, 1, [define if your struct address_space has page_lock])
- fi
- if test "x$ac_cv_linux_fs_struct_address_space_has_gfp_mask" = "xyes"; then
- AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_GFP_MASK, 1, [define if your struct address_space has gfp_mask])
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then
- AC_DEFINE(STRUCT_INODE_HAS_I_TRUNCATE_SEM, 1, [define if your struct inode has truncate_sem])
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" = "xyes"; then
- AC_DEFINE(STRUCT_INODE_HAS_I_ALLOC_SEM, 1, [define if your struct inode has alloc_sem])
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_devices" = "xyes"; then
- AC_DEFINE(STRUCT_INODE_HAS_I_DEVICES, 1, [define if you struct inode has i_devices])
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_security" = "xyes"; then
- AC_DEFINE(STRUCT_INODE_HAS_I_SECURITY, 1, [define if you struct inode has i_security])
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" = "xyes"; then
- AC_DEFINE(STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS, 1, [define if your struct inode has data_buffers])
- 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
- if test "x$ac_cv_linux_kernel_is_selinux" = "xyes" ; then
- AC_DEFINE(LINUX_KERNEL_IS_SELINUX, 1, [define if your linux kernel uses SELinux features])
- fi
- if test "x$ac_cv_linux_kernel_sock_create_v" = "xyes" ; then
- AC_DEFINE(LINUX_KERNEL_SOCK_CREATE_V, 1, [define if your linux kernel uses 5 arguments for sock_create])
- fi
- if test "x$ac_linux_syscall" = "xyes" ; then
- AC_DEFINE(HAVE_KERNEL_LINUX_SYSCALL_H, 1, [define if your linux kernel has linux/syscall.h])
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_parent" = "xyes"; then
- AC_DEFINE(STRUCT_TASK_STRUCT_HAS_PARENT, 1, [define if your struct task_struct has parent])
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_real_parent" = "xyes"; then
- AC_DEFINE(STRUCT_TASK_STRUCT_HAS_REAL_PARENT, 1, [define if your struct task_struct has real_parent])
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" = "xyes"; then
- AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK, 1, [define if your struct task_struct has sigmask_lock])
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_sighand" = "xyes"; then
- AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIGHAND, 1, [define if your struct task_struct has sighand])
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_sig" = "xyes"; then
- AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIG, 1, [define if your struct task_struct has sig])
- fi
- :
- fi
+ fi
;;
*-solaris*)
MKAFS_OSTYPE=SOLARIS
AFS_PARAM_COMMON=param.nbsd16.h
AFS_SYSNAME="ppc_nbsd16"
;;
+ i?86-*-netbsd*2.99*)
+ AFS_PARAM_COMMON=param.nbsd21.h
+ AFS_SYSNAME="i386_nbsd21"
+ ;;
hppa*-hp-hpux11.0*)
AFS_SYSNAME="hp_ux110"
;;
;;
power*-ibm-aix4.2*)
AFS_SYSNAME="rs_aix42"
+ enable_pam="no"
;;
power*-ibm-aix4.3*)
AFS_SYSNAME="rs_aix42"
+ enable_pam="no"
;;
power*-ibm-aix5.1*)
AFS_SYSNAME="rs_aix51"
+ enable_pam="no"
;;
power*-ibm-aix5.2*)
AFS_SYSNAME="rs_aix52"
+ enable_pam="no"
;;
x86_64-*-linux-gnu)
AFS_SYSNAME="amd64_linuxXX"
;;
esac
case $AFS_SYSNAME in
- *_linux*)
- AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $[]1 $[]2}'`
+ *_linux* | *_umlinux*)
if test "x${AFS_SYSKVERS}" = "x"; then
AC_MSG_ERROR(Couldn't guess your Linux version. Please use the --with-afs-sysname option to configure an AFS sysname.)
fi
AC_MSG_RESULT($AFS_SYSNAME)
fi
+case $AFS_SYSNAME in *_linux* | *_umlinux*)
+
+ # Add (sub-) architecture-specific paths needed by conftests
+ case $AFS_SYSNAME in
+ *_umlinux26)
+ UMLINUX26_FLAGS="-I$LINUX_KERNEL_PATH/arch/um/include"
+ UMLINUX26_FLAGS="$UMLINUX26_FLAGS -I$LINUX_KERNEL_PATH/arch/um/kernel/tt/include"
+ UMLINUX26_FLAGS="$UMLINUX26_FLAGS -I$LINUX_KERNEL_PATH/arch/um/kernel/skas/include"
+ CPPFLAGS="$CPPFLAGS $UMLINUX26_FLAGS"
+ esac
+
+ if test "x$enable_kernel_module" = "xyes"; then
+ if test "x$enable_debug_kernel" = "xno"; then
+ LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fomit-frame-pointer"
+ fi
+ OPENAFS_GCC_SUPPORTS_MARCH
+ AC_SUBST(P5PLUS_KOPTS)
+ OPENAFS_GCC_NEEDS_NO_STRENGTH_REDUCE
+ OPENAFS_GCC_NEEDS_NO_STRICT_ALIASING
+ OPENAFS_GCC_SUPPORTS_NO_COMMON
+ OPENAFS_GCC_SUPPORTS_PIPE
+ AC_SUBST(LINUX_GCC_KOPTS)
+ ifdef([OPENAFS_CONFIGURE_LIBAFS],
+ [LINUX_BUILD_VNODE_FROM_INODE(src/config,afs)],
+ [LINUX_BUILD_VNODE_FROM_INODE(${srcdir}/src/config,src/afs/LINUX,${srcdir}/src/afs/LINUX)]
+ )
+ LINUX_COMPLETION_H_EXISTS
+ LINUX_DEFINES_FOR_EACH_PROCESS
+ LINUX_DEFINES_PREV_TASK
+ LINUX_EXPORTS_TASKLIST_LOCK
+ LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
+ LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
+ LINUX_FS_STRUCT_INODE_HAS_I_ALLOC_SEM
+ LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM
+ LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
+ LINUX_FS_STRUCT_INODE_HAS_I_DEVICES
+ LINUX_FS_STRUCT_INODE_HAS_I_SECURITY
+ LINUX_INODE_SETATTR_RETURN_TYPE
+ LINUX_WRITE_INODE_RETURN_TYPE
+ LINUX_IOP_NAMEIDATA
+ LINUX_AOP_WRITEBACK_CONTROL
+ LINUX_KERNEL_LINUX_SYSCALL_H
+ LINUX_KERNEL_SELINUX
+ LINUX_KERNEL_SOCK_CREATE
+ LINUX_KERNEL_PAGE_FOLLOW_LINK
+ LINUX_NEED_RHCONFIG
+ LINUX_RECALC_SIGPENDING_ARG_TYPE
+ LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_PARENT
+ LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_REAL_PARENT
+ LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIG
+ LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGHAND
+ LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK
+ LINUX_WHICH_MODULES
+ if test "x$ac_cv_linux_config_modversions" = "xno" -o $AFS_SYSKVERS -ge 26; then
+ AC_MSG_WARN([Cannot determine sys_call_table status. assuming it isn't exported])
+ ac_cv_linux_exports_sys_call_table=no
+ if test -f "$LINUX_KERNEL_PATH/include/asm/ia32_unistd.h"; then
+ ac_cv_linux_exports_ia32_sys_call_table=yes
+ fi
+ else
+ LINUX_EXPORTS_INIT_MM
+ LINUX_EXPORTS_KALLSYMS_ADDRESS
+ LINUX_EXPORTS_KALLSYMS_SYMBOL
+ LINUX_EXPORTS_SYS_CALL_TABLE
+ LINUX_EXPORTS_IA32_SYS_CALL_TABLE
+ LINUX_EXPORTS_SYS_CHDIR
+ LINUX_EXPORTS_SYS_CLOSE
+ LINUX_EXPORTS_SYS_WAIT4
+ if test "x$ac_cv_linux_exports_sys_call_table" = "xno"; then
+ linux_syscall_method=none
+ if test "x$ac_cv_linux_exports_init_mm" = "xyes"; then
+ linux_syscall_method=scan
+ if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
+ linux_syscall_method=scan_with_kallsyms_address
+ fi
+ fi
+ if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
+ linux_syscall_method=kallsyms_symbol
+ fi
+ if test "x$linux_syscall_method" = "xnone"; then
+ AC_MSG_ERROR([no available sys_call_table access method])
+ fi
+ fi
+ fi
+ if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
+ AC_DEFINE(HAVE_IN_SYSTM_H, 1, [define if you have in_systm.h header file])
+ fi
+ if test -f "$LINUX_KERNEL_PATH/include/linux/mm_inline.h"; then
+ AC_DEFINE(HAVE_MM_INLINE_H, 1, [define if you have mm_inline.h header file])
+ fi
+ if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
+ AC_DEFINE(HAVE_IN_SYSTM_H, 1, [define if you have in_systm.h header file])
+ fi
+ if test "x$ac_cv_linux_exports_sys_chdir" = "xyes" ; then
+ AC_DEFINE(EXPORTED_SYS_CHDIR, 1, [define if your linux kernel exports sys_chdir])
+ fi
+ if test "x$ac_cv_linux_exports_sys_close" = "xyes" ; then
+ AC_DEFINE(EXPORTED_SYS_CLOSE, 1, [define if your linux kernel exports sys_close])
+ fi
+ if test "x$ac_cv_linux_exports_sys_wait4" = "xyes" ; then
+ AC_DEFINE(EXPORTED_SYS_WAIT4, 1, [define if your linux kernel exports sys_wait4])
+ fi
+ if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then
+ AC_DEFINE(EXPORTED_TASKLIST_LOCK, 1, [define if your linux kernel exports tasklist_lock])
+ fi
+ if test "x$ac_cv_linux_exports_sys_call_table" = "xyes"; then
+ AC_DEFINE(EXPORTED_SYS_CALL_TABLE)
+ fi
+ if test "x$ac_cv_linux_exports_ia32_sys_call_table" = "xyes"; then
+ AC_DEFINE(EXPORTED_IA32_SYS_CALL_TABLE)
+ fi
+ if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
+ AC_DEFINE(EXPORTED_KALLSYMS_SYMBOL)
+ fi
+ if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
+ AC_DEFINE(EXPORTED_KALLSYMS_ADDRESS)
+ fi
+ if test "x$ac_cv_linux_completion_h_exists" = "xyes" ; then
+ AC_DEFINE(COMPLETION_H_EXISTS, 1, [define if completion_h exists])
+ fi
+ if test "x$ac_cv_linux_defines_for_each_process" = "xyes" ; then
+ AC_DEFINE(DEFINED_FOR_EACH_PROCESS, 1, [define if for_each_process defined])
+ fi
+ if test "x$ac_cv_linux_defines_prev_task" = "xyes" ; then
+ AC_DEFINE(DEFINED_PREV_TASK, 1, [define if prev_task defined])
+ fi
+ if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then
+ AC_DEFINE(INODE_SETATTR_NOT_VOID, 1, [define if your setattr return return non-void])
+ fi
+ if test "x$ac_cv_linux_func_write_inode_returns_int" = "xyes" ; then
+ AC_DEFINE(WRITE_INODE_NOT_VOID, 1, [define if your sops.write_inode returns non-void])
+ fi
+ if test "x$ac_cv_linux_fs_struct_address_space_has_page_lock" = "xyes"; then
+ AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK, 1, [define if your struct address_space has page_lock])
+ fi
+ if test "x$ac_cv_linux_fs_struct_address_space_has_gfp_mask" = "xyes"; then
+ AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_GFP_MASK, 1, [define if your struct address_space has gfp_mask])
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then
+ AC_DEFINE(STRUCT_INODE_HAS_I_TRUNCATE_SEM, 1, [define if your struct inode has truncate_sem])
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" = "xyes"; then
+ AC_DEFINE(STRUCT_INODE_HAS_I_ALLOC_SEM, 1, [define if your struct inode has alloc_sem])
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_devices" = "xyes"; then
+ AC_DEFINE(STRUCT_INODE_HAS_I_DEVICES, 1, [define if you struct inode has i_devices])
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_security" = "xyes"; then
+ AC_DEFINE(STRUCT_INODE_HAS_I_SECURITY, 1, [define if you struct inode has i_security])
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" = "xyes"; then
+ AC_DEFINE(STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS, 1, [define if your struct inode has data_buffers])
+ 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
+ if test "x$ac_cv_linux_kernel_is_selinux" = "xyes" ; then
+ AC_DEFINE(LINUX_KERNEL_IS_SELINUX, 1, [define if your linux kernel uses SELinux features])
+ fi
+ if test "x$ac_cv_linux_kernel_sock_create_v" = "xyes" ; then
+ AC_DEFINE(LINUX_KERNEL_SOCK_CREATE_V, 1, [define if your linux kernel uses 5 arguments for sock_create])
+ fi
+ if test "x$ac_cv_linux_kernel_page_follow_link" = "xyes" ; then
+ AC_DEFINE(HAVE_KERNEL_PAGE_FOLLOW_LINK, 1, [define if your linux kernel provides page_follow_link])
+ fi
+ if test "x$ac_linux_syscall" = "xyes" ; then
+ AC_DEFINE(HAVE_KERNEL_LINUX_SYSCALL_H, 1, [define if your linux kernel has linux/syscall.h])
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_parent" = "xyes"; then
+ AC_DEFINE(STRUCT_TASK_STRUCT_HAS_PARENT, 1, [define if your struct task_struct has parent])
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_real_parent" = "xyes"; then
+ AC_DEFINE(STRUCT_TASK_STRUCT_HAS_REAL_PARENT, 1, [define if your struct task_struct has real_parent])
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" = "xyes"; then
+ AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK, 1, [define if your struct task_struct has sigmask_lock])
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_sighand" = "xyes"; then
+ AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIGHAND, 1, [define if your struct task_struct has sighand])
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_sig" = "xyes"; then
+ AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIG, 1, [define if your struct task_struct has sig])
+ fi
+ :
+ fi
+esac
+
case $AFS_SYSNAME in
*_darwin*)
DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist
system=$host
case $system in
*-linux*)
+
MKAFS_OSTYPE=LINUX
if test "x$enable_redhat_buildsys" = "xyes"; then
AC_DEFINE(ENABLE_REDHAT_BUILDSYS, 1, [define if you have redhat buildsystem])
SUBARCH=default
fi
AC_MSG_RESULT(linux)
- if test "x$enable_kernel_module" = "xyes"; then
- if test "x$enable_debug_kernel" = "xno"; then
- LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fomit-frame-pointer"
- fi
- OPENAFS_GCC_SUPPORTS_MARCH
- AC_SUBST(P5PLUS_KOPTS)
- OPENAFS_GCC_NEEDS_NO_STRENGTH_REDUCE
- OPENAFS_GCC_NEEDS_NO_STRICT_ALIASING
- OPENAFS_GCC_SUPPORTS_NO_COMMON
- OPENAFS_GCC_SUPPORTS_PIPE
- AC_SUBST(LINUX_GCC_KOPTS)
- ifdef([OPENAFS_CONFIGURE_LIBAFS],
- [LINUX_BUILD_VNODE_FROM_INODE(src/config,afs)],
- [LINUX_BUILD_VNODE_FROM_INODE(${srcdir}/src/config,src/afs/LINUX,${srcdir}/src/afs/LINUX)]
- )
- LINUX_COMPLETION_H_EXISTS
- LINUX_DEFINES_FOR_EACH_PROCESS
- LINUX_DEFINES_PREV_TASK
- LINUX_EXPORTS_TASKLIST_LOCK
- LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
- LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
- LINUX_FS_STRUCT_INODE_HAS_I_ALLOC_SEM
- LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM
- LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
- LINUX_FS_STRUCT_INODE_HAS_I_DEVICES
- LINUX_FS_STRUCT_INODE_HAS_I_SECURITY
- LINUX_INODE_SETATTR_RETURN_TYPE
- LINUX_KERNEL_LINUX_SYSCALL_H
- LINUX_KERNEL_SELINUX
- LINUX_KERNEL_SOCK_CREATE
- LINUX_NEED_RHCONFIG
- LINUX_RECALC_SIGPENDING_ARG_TYPE
- LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_PARENT
- LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_REAL_PARENT
- LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIG
- LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGHAND
- LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK
- LINUX_WHICH_MODULES
- if test "x$ac_cv_linux_config_modversions" = "xno"; then
- AC_MSG_WARN([Cannot determine sys_call_table status. assuming it isn't exported])
- ac_cv_linux_exports_sys_call_table=no
- if test -f "$LINUX_KERNEL_PATH/include/asm/ia32_unistd.h"; then
- ac_cv_linux_exports_ia32_sys_call_table=yes
- fi
- else
- LINUX_EXPORTS_INIT_MM
- LINUX_EXPORTS_KALLSYMS_ADDRESS
- LINUX_EXPORTS_KALLSYMS_SYMBOL
- LINUX_EXPORTS_SYS_CALL_TABLE
- LINUX_EXPORTS_IA32_SYS_CALL_TABLE
- LINUX_EXPORTS_SYS_CHDIR
- LINUX_EXPORTS_SYS_CLOSE
- LINUX_EXPORTS_SYS_WAIT4
- if test "x$ac_cv_linux_exports_sys_call_table" = "xno"; then
- linux_syscall_method=none
- if test "x$ac_cv_linux_exports_init_mm" = "xyes"; then
- linux_syscall_method=scan
- if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
- linux_syscall_method=scan_with_kallsyms_address
- fi
- fi
- if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
- linux_syscall_method=kallsyms_symbol
- fi
- if test "x$linux_syscall_method" = "xnone"; then
- AC_MSG_ERROR([no available sys_call_table access method])
- fi
- fi
- fi
- if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
- AC_DEFINE(HAVE_IN_SYSTM_H, 1, [define if you have in_systm.h header file])
- fi
- if test -f "$LINUX_KERNEL_PATH/include/linux/mm_inline.h"; then
- AC_DEFINE(HAVE_MM_INLINE_H, 1, [define if you have mm_inline.h header file])
- fi
- if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
- AC_DEFINE(HAVE_IN_SYSTM_H, 1, [define if you have in_systm.h header file])
- fi
- if test "x$ac_cv_linux_exports_sys_chdir" = "xyes" ; then
- AC_DEFINE(EXPORTED_SYS_CHDIR, 1, [define if your linux kernel exports sys_chdir])
- fi
- if test "x$ac_cv_linux_exports_sys_close" = "xyes" ; then
- AC_DEFINE(EXPORTED_SYS_CLOSE, 1, [define if your linux kernel exports sys_close])
- fi
- if test "x$ac_cv_linux_exports_sys_wait4" = "xyes" ; then
- AC_DEFINE(EXPORTED_SYS_WAIT4, 1, [define if your linux kernel exports sys_wait4])
- fi
- if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then
- AC_DEFINE(EXPORTED_TASKLIST_LOCK, 1, [define if your linux kernel exports tasklist_lock])
- fi
- if test "x$ac_cv_linux_exports_sys_call_table" = "xyes"; then
- AC_DEFINE(EXPORTED_SYS_CALL_TABLE)
- fi
- if test "x$ac_cv_linux_exports_ia32_sys_call_table" = "xyes"; then
- AC_DEFINE(EXPORTED_IA32_SYS_CALL_TABLE)
+ if test "x$enable_kernel_module" = "xyes"; then
+ AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $[]1 $[]2}'`
+ if test "x${AFS_SYSKVERS}" = "x"; then
+ AC_MSG_ERROR(Couldn't guess your Linux version [2])
fi
- if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
- AC_DEFINE(EXPORTED_KALLSYMS_SYMBOL)
- fi
- if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
- AC_DEFINE(EXPORTED_KALLSYMS_ADDRESS)
- fi
- if test "x$ac_cv_linux_completion_h_exists" = "xyes" ; then
- AC_DEFINE(COMPLETION_H_EXISTS, 1, [define if completion_h exists])
- fi
- if test "x$ac_cv_linux_defines_for_each_process" = "xyes" ; then
- AC_DEFINE(DEFINED_FOR_EACH_PROCESS, 1, [define if for_each_process defined])
- fi
- if test "x$ac_cv_linux_defines_prev_task" = "xyes" ; then
- AC_DEFINE(DEFINED_PREV_TASK, 1, [define if prev_task defined])
- fi
- if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then
- AC_DEFINE(INODE_SETATTR_NOT_VOID, 1, [define if your setattr return return non-void])
- fi
- if test "x$ac_cv_linux_fs_struct_address_space_has_page_lock" = "xyes"; then
- AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK, 1, [define if your struct address_space has page_lock])
- fi
- if test "x$ac_cv_linux_fs_struct_address_space_has_gfp_mask" = "xyes"; then
- AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_GFP_MASK, 1, [define if your struct address_space has gfp_mask])
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then
- AC_DEFINE(STRUCT_INODE_HAS_I_TRUNCATE_SEM, 1, [define if your struct inode has truncate_sem])
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" = "xyes"; then
- AC_DEFINE(STRUCT_INODE_HAS_I_ALLOC_SEM, 1, [define if your struct inode has alloc_sem])
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_devices" = "xyes"; then
- AC_DEFINE(STRUCT_INODE_HAS_I_DEVICES, 1, [define if you struct inode has i_devices])
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_security" = "xyes"; then
- AC_DEFINE(STRUCT_INODE_HAS_I_SECURITY, 1, [define if you struct inode has i_security])
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" = "xyes"; then
- AC_DEFINE(STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS, 1, [define if your struct inode has data_buffers])
- 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
- if test "x$ac_cv_linux_kernel_is_selinux" = "xyes" ; then
- AC_DEFINE(LINUX_KERNEL_IS_SELINUX, 1, [define if your linux kernel uses SELinux features])
- fi
- if test "x$ac_cv_linux_kernel_sock_create_v" = "xyes" ; then
- AC_DEFINE(LINUX_KERNEL_SOCK_CREATE_V, 1, [define if your linux kernel uses 5 arguments for sock_create])
- fi
- if test "x$ac_linux_syscall" = "xyes" ; then
- AC_DEFINE(HAVE_KERNEL_LINUX_SYSCALL_H, 1, [define if your linux kernel has linux/syscall.h])
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_parent" = "xyes"; then
- AC_DEFINE(STRUCT_TASK_STRUCT_HAS_PARENT, 1, [define if your struct task_struct has parent])
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_real_parent" = "xyes"; then
- AC_DEFINE(STRUCT_TASK_STRUCT_HAS_REAL_PARENT, 1, [define if your struct task_struct has real_parent])
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" = "xyes"; then
- AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK, 1, [define if your struct task_struct has sigmask_lock])
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_sighand" = "xyes"; then
- AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIGHAND, 1, [define if your struct task_struct has sighand])
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_sig" = "xyes"; then
- AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIG, 1, [define if your struct task_struct has sig])
- fi
- :
- fi
+ fi
;;
*-solaris*)
MKAFS_OSTYPE=SOLARIS
AFS_PARAM_COMMON=param.nbsd16.h
AFS_SYSNAME="ppc_nbsd16"
;;
+ i?86-*-netbsd*2.99*)
+ AFS_PARAM_COMMON=param.nbsd21.h
+ AFS_SYSNAME="i386_nbsd21"
+ ;;
hppa*-hp-hpux11.0*)
AFS_SYSNAME="hp_ux110"
;;
;;
power*-ibm-aix4.2*)
AFS_SYSNAME="rs_aix42"
+ enable_pam="no"
;;
power*-ibm-aix4.3*)
AFS_SYSNAME="rs_aix42"
+ enable_pam="no"
;;
power*-ibm-aix5.1*)
AFS_SYSNAME="rs_aix51"
+ enable_pam="no"
;;
power*-ibm-aix5.2*)
AFS_SYSNAME="rs_aix52"
+ enable_pam="no"
;;
x86_64-*-linux-gnu)
AFS_SYSNAME="amd64_linuxXX"
;;
esac
case $AFS_SYSNAME in
- *_linux*)
- AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $[]1 $[]2}'`
+ *_linux* | *_umlinux*)
if test "x${AFS_SYSKVERS}" = "x"; then
AC_MSG_ERROR(Couldn't guess your Linux version. Please use the --with-afs-sysname option to configure an AFS sysname.)
fi
AC_MSG_RESULT($AFS_SYSNAME)
fi
+case $AFS_SYSNAME in *_linux* | *_umlinux*)
+
+ # Add (sub-) architecture-specific paths needed by conftests
+ case $AFS_SYSNAME in
+ *_umlinux26)
+ UMLINUX26_FLAGS="-I$LINUX_KERNEL_PATH/arch/um/include"
+ UMLINUX26_FLAGS="$UMLINUX26_FLAGS -I$LINUX_KERNEL_PATH/arch/um/kernel/tt/include"
+ UMLINUX26_FLAGS="$UMLINUX26_FLAGS -I$LINUX_KERNEL_PATH/arch/um/kernel/skas/include"
+ CPPFLAGS="$CPPFLAGS $UMLINUX26_FLAGS"
+ esac
+
+ if test "x$enable_kernel_module" = "xyes"; then
+ if test "x$enable_debug_kernel" = "xno"; then
+ LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fomit-frame-pointer"
+ fi
+ OPENAFS_GCC_SUPPORTS_MARCH
+ AC_SUBST(P5PLUS_KOPTS)
+ OPENAFS_GCC_NEEDS_NO_STRENGTH_REDUCE
+ OPENAFS_GCC_NEEDS_NO_STRICT_ALIASING
+ OPENAFS_GCC_SUPPORTS_NO_COMMON
+ OPENAFS_GCC_SUPPORTS_PIPE
+ AC_SUBST(LINUX_GCC_KOPTS)
+ ifdef([OPENAFS_CONFIGURE_LIBAFS],
+ [LINUX_BUILD_VNODE_FROM_INODE(src/config,afs)],
+ [LINUX_BUILD_VNODE_FROM_INODE(${srcdir}/src/config,src/afs/LINUX,${srcdir}/src/afs/LINUX)]
+ )
+ LINUX_COMPLETION_H_EXISTS
+ LINUX_DEFINES_FOR_EACH_PROCESS
+ LINUX_DEFINES_PREV_TASK
+ LINUX_EXPORTS_TASKLIST_LOCK
+ LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
+ LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
+ LINUX_FS_STRUCT_INODE_HAS_I_ALLOC_SEM
+ LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM
+ LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
+ LINUX_FS_STRUCT_INODE_HAS_I_DEVICES
+ LINUX_FS_STRUCT_INODE_HAS_I_SECURITY
+ LINUX_INODE_SETATTR_RETURN_TYPE
+ LINUX_WRITE_INODE_RETURN_TYPE
+ LINUX_IOP_NAMEIDATA
+ LINUX_AOP_WRITEBACK_CONTROL
+ LINUX_KERNEL_LINUX_SYSCALL_H
+ LINUX_KERNEL_SELINUX
+ LINUX_KERNEL_SOCK_CREATE
+ LINUX_KERNEL_PAGE_FOLLOW_LINK
+ LINUX_NEED_RHCONFIG
+ LINUX_RECALC_SIGPENDING_ARG_TYPE
+ LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_PARENT
+ LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_REAL_PARENT
+ LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIG
+ LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGHAND
+ LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK
+ LINUX_WHICH_MODULES
+ if test "x$ac_cv_linux_config_modversions" = "xno" -o $AFS_SYSKVERS -ge 26; then
+ AC_MSG_WARN([Cannot determine sys_call_table status. assuming it isn't exported])
+ ac_cv_linux_exports_sys_call_table=no
+ if test -f "$LINUX_KERNEL_PATH/include/asm/ia32_unistd.h"; then
+ ac_cv_linux_exports_ia32_sys_call_table=yes
+ fi
+ else
+ LINUX_EXPORTS_INIT_MM
+ LINUX_EXPORTS_KALLSYMS_ADDRESS
+ LINUX_EXPORTS_KALLSYMS_SYMBOL
+ LINUX_EXPORTS_SYS_CALL_TABLE
+ LINUX_EXPORTS_IA32_SYS_CALL_TABLE
+ LINUX_EXPORTS_SYS_CHDIR
+ LINUX_EXPORTS_SYS_CLOSE
+ LINUX_EXPORTS_SYS_WAIT4
+ if test "x$ac_cv_linux_exports_sys_call_table" = "xno"; then
+ linux_syscall_method=none
+ if test "x$ac_cv_linux_exports_init_mm" = "xyes"; then
+ linux_syscall_method=scan
+ if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
+ linux_syscall_method=scan_with_kallsyms_address
+ fi
+ fi
+ if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
+ linux_syscall_method=kallsyms_symbol
+ fi
+ if test "x$linux_syscall_method" = "xnone"; then
+ AC_MSG_ERROR([no available sys_call_table access method])
+ fi
+ fi
+ fi
+ if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
+ AC_DEFINE(HAVE_IN_SYSTM_H, 1, [define if you have in_systm.h header file])
+ fi
+ if test -f "$LINUX_KERNEL_PATH/include/linux/mm_inline.h"; then
+ AC_DEFINE(HAVE_MM_INLINE_H, 1, [define if you have mm_inline.h header file])
+ fi
+ if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
+ AC_DEFINE(HAVE_IN_SYSTM_H, 1, [define if you have in_systm.h header file])
+ fi
+ if test "x$ac_cv_linux_exports_sys_chdir" = "xyes" ; then
+ AC_DEFINE(EXPORTED_SYS_CHDIR, 1, [define if your linux kernel exports sys_chdir])
+ fi
+ if test "x$ac_cv_linux_exports_sys_close" = "xyes" ; then
+ AC_DEFINE(EXPORTED_SYS_CLOSE, 1, [define if your linux kernel exports sys_close])
+ fi
+ if test "x$ac_cv_linux_exports_sys_wait4" = "xyes" ; then
+ AC_DEFINE(EXPORTED_SYS_WAIT4, 1, [define if your linux kernel exports sys_wait4])
+ fi
+ if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then
+ AC_DEFINE(EXPORTED_TASKLIST_LOCK, 1, [define if your linux kernel exports tasklist_lock])
+ fi
+ if test "x$ac_cv_linux_exports_sys_call_table" = "xyes"; then
+ AC_DEFINE(EXPORTED_SYS_CALL_TABLE)
+ fi
+ if test "x$ac_cv_linux_exports_ia32_sys_call_table" = "xyes"; then
+ AC_DEFINE(EXPORTED_IA32_SYS_CALL_TABLE)
+ fi
+ if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
+ AC_DEFINE(EXPORTED_KALLSYMS_SYMBOL)
+ fi
+ if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
+ AC_DEFINE(EXPORTED_KALLSYMS_ADDRESS)
+ fi
+ if test "x$ac_cv_linux_completion_h_exists" = "xyes" ; then
+ AC_DEFINE(COMPLETION_H_EXISTS, 1, [define if completion_h exists])
+ fi
+ if test "x$ac_cv_linux_defines_for_each_process" = "xyes" ; then
+ AC_DEFINE(DEFINED_FOR_EACH_PROCESS, 1, [define if for_each_process defined])
+ fi
+ if test "x$ac_cv_linux_defines_prev_task" = "xyes" ; then
+ AC_DEFINE(DEFINED_PREV_TASK, 1, [define if prev_task defined])
+ fi
+ if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then
+ AC_DEFINE(INODE_SETATTR_NOT_VOID, 1, [define if your setattr return return non-void])
+ fi
+ if test "x$ac_cv_linux_func_write_inode_returns_int" = "xyes" ; then
+ AC_DEFINE(WRITE_INODE_NOT_VOID, 1, [define if your sops.write_inode returns non-void])
+ fi
+ if test "x$ac_cv_linux_fs_struct_address_space_has_page_lock" = "xyes"; then
+ AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK, 1, [define if your struct address_space has page_lock])
+ fi
+ if test "x$ac_cv_linux_fs_struct_address_space_has_gfp_mask" = "xyes"; then
+ AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_GFP_MASK, 1, [define if your struct address_space has gfp_mask])
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then
+ AC_DEFINE(STRUCT_INODE_HAS_I_TRUNCATE_SEM, 1, [define if your struct inode has truncate_sem])
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" = "xyes"; then
+ AC_DEFINE(STRUCT_INODE_HAS_I_ALLOC_SEM, 1, [define if your struct inode has alloc_sem])
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_devices" = "xyes"; then
+ AC_DEFINE(STRUCT_INODE_HAS_I_DEVICES, 1, [define if you struct inode has i_devices])
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_security" = "xyes"; then
+ AC_DEFINE(STRUCT_INODE_HAS_I_SECURITY, 1, [define if you struct inode has i_security])
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" = "xyes"; then
+ AC_DEFINE(STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS, 1, [define if your struct inode has data_buffers])
+ 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
+ if test "x$ac_cv_linux_kernel_is_selinux" = "xyes" ; then
+ AC_DEFINE(LINUX_KERNEL_IS_SELINUX, 1, [define if your linux kernel uses SELinux features])
+ fi
+ if test "x$ac_cv_linux_kernel_sock_create_v" = "xyes" ; then
+ AC_DEFINE(LINUX_KERNEL_SOCK_CREATE_V, 1, [define if your linux kernel uses 5 arguments for sock_create])
+ fi
+ if test "x$ac_cv_linux_kernel_page_follow_link" = "xyes" ; then
+ AC_DEFINE(HAVE_KERNEL_PAGE_FOLLOW_LINK, 1, [define if your linux kernel provides page_follow_link])
+ fi
+ if test "x$ac_linux_syscall" = "xyes" ; then
+ AC_DEFINE(HAVE_KERNEL_LINUX_SYSCALL_H, 1, [define if your linux kernel has linux/syscall.h])
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_parent" = "xyes"; then
+ AC_DEFINE(STRUCT_TASK_STRUCT_HAS_PARENT, 1, [define if your struct task_struct has parent])
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_real_parent" = "xyes"; then
+ AC_DEFINE(STRUCT_TASK_STRUCT_HAS_REAL_PARENT, 1, [define if your struct task_struct has real_parent])
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" = "xyes"; then
+ AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK, 1, [define if your struct task_struct has sigmask_lock])
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_sighand" = "xyes"; then
+ AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIGHAND, 1, [define if your struct task_struct has sighand])
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_sig" = "xyes"; then
+ AC_DEFINE(STRUCT_TASK_STRUCT_HAS_SIG, 1, [define if your struct task_struct has sig])
+ fi
+ :
+ fi
+esac
+
case $AFS_SYSNAME in
*_darwin*)
DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist
fi
])
+AC_DEFUN([SOLARIS_UFSVFS_HAS_DQRWLOCK], [
+AC_MSG_CHECKING(for vfs_dqrwlock in struct ufsvfs)
+AC_CACHE_VAL(ac_cv_solaris_ufsvfs_has_dqrwlock,
+[
+AC_TRY_COMPILE(
+[#define _KERNEL
+#include <sys/fs/ufs_inode.h>],
+[struct ufsvfs _ufsvfs;
+(void) _ufsvfs.vfs_dqrwlock;],
+ac_cv_solaris_ufsvfs_has_dqrwlock=yes,
+ac_cv_solaris_ufsvfs_has_dqrwlock=no)])
+AC_MSG_RESULT($ac_cv_solaris_ufsvfs_has_dqrwlock)
+if test "$ac_cv_solaris_ufsvfs_has_dqrwlock" = "yes"; then
+ AC_DEFINE(HAVE_VFS_DQRWLOCK, 1, [define if struct ufsvfs has vfs_dqrwlock])
+fi
+])
+
+
+AC_DEFUN([SOLARIS_PROC_HAS_P_COREFILE], [
+AC_MSG_CHECKING(for p_corefile in struct proc)
+AC_CACHE_VAL(ac_cv_solaris_proc_has_p_corefile,
+[
+AC_TRY_COMPILE(
+[#define _KERNEL
+#include <sys/proc.h>],
+[struct proc _proc;
+(void) _proc.p_corefile;],
+ac_cv_solaris_proc_has_p_corefile=yes,
+ac_cv_solaris_proc_has_p_corefile=no)])
+AC_MSG_RESULT($ac_cv_solaris_proc_has_p_corefile)
+if test "$ac_cv_solaris_proc_has_p_corefile" = "yes"; then
+ AC_DEFINE(HAVE_P_COREFILE, 1, [define if struct proc has p_corefile])
+fi
+])
+
+
+AC_DEFUN([SOLARIS_FS_HAS_FS_ROLLED], [
+AC_MSG_CHECKING(for fs_rolled in struct proc)
+AC_CACHE_VAL(ac_cv_solaris_fs_has_fs_rolled,
+[
+AC_TRY_COMPILE(
+[#include <sys/fs/ufs_fs.h>],
+[struct fs _fs;
+(void) _fs.fs_rolled;],
+ac_cv_solaris_fs_has_fs_rolled=yes,
+ac_cv_solaris_fs_has_fs_rolled=no)])
+AC_MSG_RESULT($ac_cv_solaris_fs_has_fs_rolled)
+if test "$ac_cv_solaris_fs_has_fs_rolled" = "yes"; then
+ AC_DEFINE(STRUCT_FS_HAS_FS_ROLLED, 1, [define if struct fs has fs_rolled])
+fi
+])
+
+
AC_DEFUN([OPENAFS_GCC_SUPPORTS_MARCH], [
AC_MSG_CHECKING(if $CC accepts -march=pentium)
AC_MSG_RESULT($ac_cv_linux_func_inode_setattr_returns_int)
CPPFLAGS="$save_CPPFLAGS"])
+AC_DEFUN([LINUX_WRITE_INODE_RETURN_TYPE],[
+AC_MSG_CHECKING(for write_inode return type)
+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_func_write_inode_returns_int,
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>],
+[struct inode _inode;
+struct super_operations _sops;
+int i;
+i = _sops.write_inode(&_inode, 0);],
+ac_cv_linux_func_write_inode_returns_int=yes,
+ac_cv_linux_func_write_inode_returns_int=no)])
+AC_MSG_RESULT($ac_cv_linux_func_write_inode_returns_int)
+CPPFLAGS="$save_CPPFLAGS"])
+
+AC_DEFUN([LINUX_IOP_NAMEIDATA],[
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+AC_MSG_CHECKING(whether inode_operations.create takes a nameidata)
+AC_CACHE_VAL(ac_cv_linux_func_i_create_takes_nameidata,
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>
+#include <linux/namei.h>],
+[struct inode _inode;
+struct dentry _dentry;
+struct nameidata _nameidata;
+(void)_inode.i_op->create(&_inode, &_dentry, 0, &_nameidata);],
+ac_cv_linux_func_i_create_takes_nameidata=yes,
+ac_cv_linux_func_i_create_takes_nameidata=no)])
+AC_MSG_RESULT($ac_cv_linux_func_i_create_takes_nameidata)
+if test "x$ac_cv_linux_func_i_create_takes_nameidata" = "xyes" ; then
+AC_DEFINE(IOP_CREATE_TAKES_NAMEIDATA, 1, [define if your iops.create takes a nameidata argument])
+fi
+AC_MSG_CHECKING(whether inode_operations.lookup takes a nameidata)
+AC_CACHE_VAL(ac_cv_linux_func_i_lookup_takes_nameidata,
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>
+#include <linux/namei.h>],
+[struct inode _inode;
+struct dentry _dentry;
+struct nameidata _nameidata;
+(void)_inode.i_op->lookup(&_inode, &_dentry, &_nameidata);],
+ac_cv_linux_func_i_lookup_takes_nameidata=yes,
+ac_cv_linux_func_i_lookup_takes_nameidata=no)])
+AC_MSG_RESULT($ac_cv_linux_func_i_lookup_takes_nameidata)
+if test "x$ac_cv_linux_func_i_lookup_takes_nameidata" = "xyes" ; then
+AC_DEFINE(IOP_LOOKUP_TAKES_NAMEIDATA, 1, [define if your iops.lookup takes a nameidata argument])
+fi
+AC_MSG_CHECKING(whether inode_operations.permission takes a nameidata)
+AC_CACHE_VAL(ac_cv_linux_func_i_permission_takes_nameidata,
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>
+#include <linux/namei.h>],
+[struct inode _inode;
+struct nameidata _nameidata;
+(void)_inode.i_op->permission(&_inode, 0, &_nameidata);],
+ac_cv_linux_func_i_permission_takes_nameidata=yes,
+ac_cv_linux_func_i_permission_takes_nameidata=no)])
+AC_MSG_RESULT($ac_cv_linux_func_i_permission_takes_nameidata)
+if test "x$ac_cv_linux_func_i_permission_takes_nameidata" = "xyes" ; then
+AC_DEFINE(IOP_PERMISSION_TAKES_NAMEIDATA, 1, [define if your iops.permission takes a nameidata argument])
+fi
+AC_MSG_CHECKING(whether dentry_operations.d_revalidate takes a nameidata)
+CPPFLAGS="$CPPFLAGS -Werror"
+AC_CACHE_VAL(ac_cv_linux_func_d_revalidate_takes_nameidata,
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>
+#include <linux/namei.h>],
+[struct dentry _dentry;
+struct nameidata _nameidata;
+(void)_dentry.d_op->d_revalidate(&_dentry, &_nameidata);],
+ac_cv_linux_func_d_revalidate_takes_nameidata=yes,
+ac_cv_linux_func_d_revalidate_takes_nameidata=no)])
+AC_MSG_RESULT($ac_cv_linux_func_d_revalidate_takes_nameidata)
+if test "x$ac_cv_linux_func_d_revalidate_takes_nameidata" = "xyes" ; then
+ AC_DEFINE(DOP_REVALIDATE_TAKES_NAMEIDATA, 1, [define if your dops.d_revalidate takes a nameidata argument])
+fi
+CPPFLAGS="$save_CPPFLAGS"])
+
+AC_DEFUN([LINUX_AOP_WRITEBACK_CONTROL],[
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+AC_MSG_CHECKING(whether address_space_operations.writepage takes a writeback_control)
+AC_CACHE_VAL(ac_cv_linux_func_a_writepage_takes_writeback_control,
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/writeback.h>],
+[struct address_space_operations _aops;
+struct page _page;
+struct writeback_control _writeback_control;
+(void)_aops.writepage(&_page, &_writeback_control);],
+ac_cv_linux_func_a_writepage_takes_writeback_control=yes,
+ac_cv_linux_func_a_writepage_takes_writeback_control=no)])
+AC_MSG_RESULT($ac_cv_linux_func_a_writepage_takes_writeback_control)
+if test "x$ac_cv_linux_func_a_writepage_takes_writeback_control" = "xyes" ; then
+AC_DEFINE(AOP_WRITEPAGE_TAKES_WRITEBACK_CONTROL, 1, [define if your aops.writepage takes a struct writeback_control argument])
+fi
+CPPFLAGS="$save_CPPFLAGS"])
+
AC_DEFUN([LINUX_KERNEL_LINUX_SYSCALL_H],[
AC_MSG_CHECKING(for linux/syscall.h in kernel)
if test -f "${LINUX_KERNEL_PATH}/include/linux/syscall.h"; then
[#include <linux/version.h>
#include <linux/config.h>
],
-[#if !defined(CONFIG_MODVERSIONS) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+[#if !defined(CONFIG_MODVERSIONS)
lose;
#endif
],
ac_cv_linux_config_modversions=no)])
AC_MSG_RESULT($ac_cv_linux_config_modversions)
AC_MSG_CHECKING(which kernel modules to build)
- if test "x$ac_linux_rhconfig" = "xyes" -o "x$ac_cv_linux_config_modversions" = "xno"; then
+ 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
MPS="MP SP"
else
AC_CACHE_VAL(ac_cv_linux_config_smp, [
AC_MSG_RESULT($ac_cv_linux_kernel_sock_create_v)
CPPFLAGS="$save_CPPFLAGS"])
-
-AC_DEFUN([SOLARIS_UFSVFS_HAS_DQRWLOCK], [
-AC_MSG_CHECKING(for vfs_dqrwlock in struct ufsvfs)
-AC_CACHE_VAL(ac_cv_solaris_ufsvfs_has_dqrwlock,
-[
-AC_TRY_COMPILE(
-[#define _KERNEL
-#include <sys/fs/ufs_inode.h>],
-[struct ufsvfs _ufsvfs;
-(void) _ufsvfs.vfs_dqrwlock;],
-ac_cv_solaris_ufsvfs_has_dqrwlock=yes,
-ac_cv_solaris_ufsvfs_has_dqrwlock=no)])
-AC_MSG_RESULT($ac_cv_solaris_ufsvfs_has_dqrwlock)
-if test "$ac_cv_solaris_ufsvfs_has_dqrwlock" = "yes"; then
- AC_DEFINE(HAVE_VFS_DQRWLOCK, 1, [define if struct ufsvfs has vfs_dqrwlock])
-fi
-])
-
-
-AC_DEFUN([SOLARIS_PROC_HAS_P_COREFILE], [
-AC_MSG_CHECKING(for p_corefile in struct proc)
-AC_CACHE_VAL(ac_cv_solaris_proc_has_p_corefile,
-[
-AC_TRY_COMPILE(
-[#define _KERNEL
-#include <sys/proc.h>],
-[struct proc _proc;
-(void) _proc.p_corefile;],
-ac_cv_solaris_proc_has_p_corefile=yes,
-ac_cv_solaris_proc_has_p_corefile=no)])
-AC_MSG_RESULT($ac_cv_solaris_proc_has_p_corefile)
-if test "$ac_cv_solaris_proc_has_p_corefile" = "yes"; then
- AC_DEFINE(HAVE_P_COREFILE, 1, [define if struct proc has p_corefile])
-fi
-])
-
-
-AC_DEFUN([SOLARIS_FS_HAS_FS_ROLLED], [
-AC_MSG_CHECKING(for fs_rolled in struct proc)
-AC_CACHE_VAL(ac_cv_solaris_fs_has_fs_rolled,
+AC_DEFUN([LINUX_KERNEL_PAGE_FOLLOW_LINK],[
+AC_MSG_CHECKING(for page_follow_link_light vs page_follow_link)
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+AC_CACHE_VAL(ac_cv_linux_kernel_page_follow_link,
[
AC_TRY_COMPILE(
-[#include <sys/fs/ufs_fs.h>],
-[struct fs _fs;
-(void) _fs.fs_rolled;],
-ac_cv_solaris_fs_has_fs_rolled=yes,
-ac_cv_solaris_fs_has_fs_rolled=no)])
-AC_MSG_RESULT($ac_cv_solaris_fs_has_fs_rolled)
-if test "$ac_cv_solaris_fs_has_fs_rolled" = "yes"; then
- AC_DEFINE(STRUCT_FS_HAS_FS_ROLLED, 1, [define if struct fs has fs_rolled])
-fi
-])
-
+ [#include <linux/fs.h>],
+ [
+ page_follow_link(0,0)
+ ],
+ ac_cv_linux_kernel_page_follow_link=yes,
+ ac_cv_linux_kernel_page_follow_link=no)])
+AC_MSG_RESULT($ac_cv_linux_kernel_page_follow_page)
+CPPFLAGS="$save_CPPFLAGS"])
AC_DEFUN([AC_FUNC_RES_SEARCH], [
ac_cv_func_res_search=no
YACC="byacc"
;;
- *nbsd20)
+ *nbsd2*)
LEX="flex -l"
MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -D_REENTRANT '
MT_LIBS="-lpthread" # XXX -pthread soon
YACC="bison -y"
;;
- ia64_linux24)
+ ia64_linux24|ia64_linux26)
KERN_OPTMZ=-O2
LEX="flex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
SHLIB_LINKER="${MT_CC} -shared"
;;
+ i386_umlinux26)
+ CC="gcc -pipe"
+ CCOBJ="gcc -pipe"
+ MT_CC="gcc -pipe"
+ KERN_OPTMZ=-O2
+ LEX="flex -l"
+ MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+ MT_LIBS="-lpthread"
+ DBG=-g
+ KERN_DBG=-g
+ LWP_DBG=-g
+ LWP_OPTMZ=-O2
+ OPTMZ=-O2
+ PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
+ SHLIB_LDFLAGS="-shared -Xlinker -x"
+ TXLIBS="-lncurses"
+ XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
+ SHLIB_LINKER="${MT_CC} -shared"
+ ;;
+
*_obsd*)
LEX="flex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
PACKAGE=openafs
-VERSION=1.3.74
+VERSION=1.3.77
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; }
system=$host
case $system in
*-linux*)
+
MKAFS_OSTYPE=LINUX
if test "x$enable_redhat_buildsys" = "xyes"; then
cat >> confdefs.h <<\EOF
SUBARCH=default
fi
echo "$ac_t""linux" 1>&6
- if test "x$enable_kernel_module" = "xyes"; then
- if test "x$enable_debug_kernel" = "xno"; then
- LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fomit-frame-pointer"
- fi
-
-echo $ac_n "checking if $CC accepts -march=pentium""... $ac_c" 1>&6
-echo "configure:2248: checking if $CC accepts -march=pentium" >&5
-save_CFLAGS="$CFLAGS"
-CFLAGS="-MARCH=pentium"
-if eval "test \"`echo '$''{'openafs_gcc_supports_march'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2256 "configure"
-#include "confdefs.h"
-
-int main() {
-int x;
-; return 0; }
-EOF
-if { (eval echo configure:2263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- openafs_gcc_supports_march=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- openafs_gcc_supports_march=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$openafs_gcc_supports_march" 1>&6
-if test x$openafs_gcc_supports_march = xyes; then
- P5PLUS_KOPTS="-march=pentium"
-else
- P5PLUS_KOPTS="-m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2"
-fi
-CFLAGS="$save_CFLAGS"
-
-
-
-echo $ac_n "checking if $CC needs -fno-strength-reduce""... $ac_c" 1>&6
-echo "configure:2286: 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
+ if test "x$enable_kernel_module" = "xyes"; then
+ AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $1 $2}'`
+ if test "x${AFS_SYSKVERS}" = "x"; then
+ { echo "configure: error: Couldn't guess your Linux version 2" 1>&2; exit 1; }
+ fi
+ fi
+ ;;
+ *-solaris*)
+ MKAFS_OSTYPE=SOLARIS
+ echo "$ac_t""sun4" 1>&6
+
+echo $ac_n "checking for vfs_dqrwlock in struct ufsvfs""... $ac_c" 1>&6
+echo "configure:2255: checking for vfs_dqrwlock in struct ufsvfs" >&5
+if eval "test \"`echo '$''{'ac_cv_solaris_ufsvfs_has_dqrwlock'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2294 "configure"
+#line 2261 "configure"
#include "confdefs.h"
-
+#define _KERNEL
+#include <sys/fs/ufs_inode.h>
int main() {
-int x;
+struct ufsvfs _ufsvfs;
+(void) _ufsvfs.vfs_dqrwlock;
; return 0; }
EOF
-if { (eval echo configure:2301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- openafs_gcc_needs_no_strength_reduce=yes
+ ac_cv_solaris_ufsvfs_has_dqrwlock=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- openafs_gcc_needs_no_strength_reduce=no
+ ac_cv_solaris_ufsvfs_has_dqrwlock=no
fi
rm -f conftest*
fi
-echo "$ac_t""$openafs_gcc_needs_no_strength_reduce" 1>&6
-if test x$openafs_gcc_needs_no_strength_reduce = xyes; then
- LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strength-reduce"
-fi
-CFLAGS="$save_CFLAGS"
-
-
-echo $ac_n "checking if $CC needs -fno-strict-aliasing""... $ac_c" 1>&6
-echo "configure:2321: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2329 "configure"
-#include "confdefs.h"
-
-int main() {
-int x;
-; return 0; }
+echo "$ac_t""$ac_cv_solaris_ufsvfs_has_dqrwlock" 1>&6
+if test "$ac_cv_solaris_ufsvfs_has_dqrwlock" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_VFS_DQRWLOCK 1
EOF
-if { (eval echo configure:2336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- openafs_gcc_needs_no_strict_aliasing=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- openafs_gcc_needs_no_strict_aliasing=no
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$openafs_gcc_needs_no_strict_aliasing" 1>&6
-if test x$openafs_gcc_needs_no_strict_aliasing = xyes; then
- LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strict-aliasing"
fi
-CFLAGS="$save_CFLAGS"
-
-echo $ac_n "checking if $CC supports -fno-common""... $ac_c" 1>&6
-echo "configure:2356: 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
+
+echo $ac_n "checking for p_corefile in struct proc""... $ac_c" 1>&6
+echo "configure:2292: checking for p_corefile in struct proc" >&5
+if eval "test \"`echo '$''{'ac_cv_solaris_proc_has_p_corefile'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2364 "configure"
+#line 2298 "configure"
#include "confdefs.h"
-
+#define _KERNEL
+#include <sys/proc.h>
int main() {
-int x;
+struct proc _proc;
+(void) _proc.p_corefile;
; return 0; }
EOF
-if { (eval echo configure:2371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- openafs_gcc_supports_no_common=yes
+ ac_cv_solaris_proc_has_p_corefile=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- openafs_gcc_supports_no_common=no
+ ac_cv_solaris_proc_has_p_corefile=no
fi
rm -f conftest*
fi
-echo "$ac_t""$openafs_gcc_supports_no_common" 1>&6
-if test x$openafs_gcc_supports_no_common = xyes; then
- LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-common"
-fi
-CFLAGS="$save_CFLAGS"
-
-
-echo $ac_n "checking if $CC supports -pipe""... $ac_c" 1>&6
-echo "configure:2391: checking if $CC supports -pipe" >&5
-save_CFLAGS="$CFLAGS"
-CFLAGS="-pipe"
-if eval "test \"`echo '$''{'openafs_gcc_supports_pipe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2399 "configure"
-#include "confdefs.h"
-
-int main() {
-int x;
-; return 0; }
+echo "$ac_t""$ac_cv_solaris_proc_has_p_corefile" 1>&6
+if test "$ac_cv_solaris_proc_has_p_corefile" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_P_COREFILE 1
EOF
-if { (eval echo configure:2406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- openafs_gcc_supports_pipe=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- openafs_gcc_supports_pipe=no
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$openafs_gcc_supports_pipe" 1>&6
-if test x$openafs_gcc_supports_pipe = xyes; then
- LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -pipe"
fi
-CFLAGS="$save_CFLAGS"
-
-
-
-echo $ac_n "checking whether to build osi_vfs.h""... $ac_c" 1>&6
-echo "configure:2427: checking whether to build osi_vfs.h" >&5
-configdir=${srcdir}/src/config
-outputdir=src/afs/LINUX
-tmpldir=${srcdir}/src/afs/LINUX
-chmod +x $configdir/make_vnode.pl
-$configdir/make_vnode.pl -i $LINUX_KERNEL_PATH -t ${tmpldir} -o $outputdir
-
-
-echo $ac_n "checking for linux/completion.h existance""... $ac_c" 1>&6
-echo "configure:2437: 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
+
+echo $ac_n "checking for fs_rolled in struct proc""... $ac_c" 1>&6
+echo "configure:2329: checking for fs_rolled in struct proc" >&5
+if eval "test \"`echo '$''{'ac_cv_solaris_fs_has_fs_rolled'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2445 "configure"
+#line 2335 "configure"
#include "confdefs.h"
-#include <linux/completion.h>
-#include <linux/version.h>
+#include <sys/fs/ufs_fs.h>
int main() {
-struct completion _c;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,8)
-lose
-#endif
-
+struct fs _fs;
+(void) _fs.fs_rolled;
; return 0; }
EOF
-if { (eval echo configure:2457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- ac_cv_linux_completion_h_exists=yes
+ ac_cv_solaris_fs_has_fs_rolled=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- ac_cv_linux_completion_h_exists=no
+ ac_cv_solaris_fs_has_fs_rolled=no
fi
rm -f conftest*
fi
-echo "$ac_t""$ac_cv_linux_completion_h_exists" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for defined for_each_process""... $ac_c" 1>&6
-echo "configure:2473: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2481 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-#ifndef for_each_process(p)
-#error for_each_process not defined
-#endif
-; return 0; }
+echo "$ac_t""$ac_cv_solaris_fs_has_fs_rolled" 1>&6
+if test "$ac_cv_solaris_fs_has_fs_rolled" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_FS_HAS_FS_ROLLED 1
EOF
-if { (eval echo configure:2490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_defines_for_each_process=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_defines_for_each_process=no
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_linux_defines_for_each_process" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for defined prev_task""... $ac_c" 1>&6
-echo "configure:2506: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2514 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-#ifndef prev_task(p)
-#error prev_task not defined
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:2523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_defines_prev_task=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_defines_prev_task=no
-fi
-rm -f conftest*
fi
-echo "$ac_t""$ac_cv_linux_defines_prev_task" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported tasklist_lock""... $ac_c" 1>&6
-echo "configure:2539: checking for exported tasklist_lock" >&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_tasklist_lock'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2547 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_tasklist_lock
-#error tasklist_lock not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:2556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_tasklist_lock=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_tasklist_lock=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_tasklist_lock" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for page_lock in struct address_space""... $ac_c" 1>&6
-echo "configure:2572: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct address_space _a_s;
-printf("%x\n", _a_s.page_lock);
-; return 0; }
-EOF
-if { (eval echo configure:2588: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_fs_struct_address_space_has_page_lock=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_fs_struct_address_space_has_page_lock" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for gfp_mask in struct address_space""... $ac_c" 1>&6
-echo "configure:2604: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2612 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct address_space _a;
-printf("%d\n", _a.gfp_mask);
-; return 0; }
-EOF
-if { (eval echo configure:2620: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_fs_struct_address_space_has_gfp_mask=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_fs_struct_address_space_has_gfp_mask" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for i_alloc_sem in struct inode""... $ac_c" 1>&6
-echo "configure:2636: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2644 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct inode _i;
-printf("%x\n", _i.i_alloc_sem);
-; return 0; }
-EOF
-if { (eval echo configure:2652: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_fs_struct_inode_has_i_alloc_sem=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for i_truncate_sem in struct inode""... $ac_c" 1>&6
-echo "configure:2668: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2676 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct inode _i;
-printf("%x\n", _i.i_truncate_sem);
-; return 0; }
-EOF
-if { (eval echo configure:2684: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_fs_struct_inode_has_i_truncate_sem=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for i_dirty_data_buffers in struct inode""... $ac_c" 1>&6
-echo "configure:2700: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2708 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct inode _inode;
-printf("%d\n", _inode.i_dirty_data_buffers);
-; return 0; }
-EOF
-if { (eval echo configure:2716: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=no
-fi
-rm -f conftest*
-fi
+ ;;
+ *-sunos*)
+ MKAFS_OSTYPE=SUNOS
+ enable_kernel_module=no
+ echo "$ac_t""sun4" 1>&6
+ ;;
+ *-hpux*)
+ MKAFS_OSTYPE=HPUX
+ echo "$ac_t""hp_ux" 1>&6
+ ;;
+ *-irix*)
+ if test -d /usr/include/sys/SN/SN1; then
+ IRIX_BUILD_IP35="IP35"
+ fi
+ MKAFS_OSTYPE=IRIX
+ echo "$ac_t""sgi" 1>&6
+ ;;
+ *-aix*)
+ MKAFS_OSTYPE=AIX
+ echo "$ac_t""rs_aix" 1>&6
+ ;;
+ *-osf*)
+ MKAFS_OSTYPE=DUX
+ echo "$ac_t""alpha_dux" 1>&6
+ if test "x$enable_kernel_module" = "xyes"; then
+ if test "x$with_dux_kernel_headers" != "x"; then
+ HEADER_RT=`ls ${with_dux_kernel_headers}/rt_preempt.h | head -1 | sed 's,/rt_preempt.h,,;s,/usr/sys/,,'`
+ else
+ HEADER_RT=`ls /usr/sys/*/rt_preempt.h | head -1 | sed 's,/rt_preempt.h,,;s,/usr/sys/,,'`
+ fi
+ fi
+ if test "$HEADER_RT" = "*" ; then
+ { echo "configure: error: Need a configured kernel directory" 1>&2; exit 1; }
+ fi
+
+ ;;
+ *-darwin*)
+ MKAFS_OSTYPE=DARWIN
+ echo "$ac_t""ppc_darwin" 1>&6
+ ;;
+ *-freebsd*)
+ MKAFS_OSTYPE=FBSD
+ echo "$ac_t""i386_fbsd" 1>&6
+ ;;
+ *-netbsd*)
+ MKAFS_OSTYPE=NBSD
+ echo "$ac_t""nbsd" 1>&6
+ ;;
+ *-openbsd*)
+ MKAFS_OSTYPE=OBSD
+ echo "$ac_t""i386_obsd" 1>&6
+ ;;
+ *)
+ echo "$ac_t""$system" 1>&6
+ ;;
+esac
-echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for i_devices in struct inode""... $ac_c" 1>&6
-echo "configure:2732: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2740 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct inode _inode;
-printf("%d\n", _inode.i_devices);
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_fs_struct_inode_has_i_devices=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_fs_struct_inode_has_i_devices=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_devices" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for i_security in struct inode""... $ac_c" 1>&6
-echo "configure:2764: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2772 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct inode _inode;
-printf("%d\n", _inode.i_security);
-; return 0; }
-EOF
-if { (eval echo configure:2780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_fs_struct_inode_has_i_security=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_fs_struct_inode_has_i_security=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_security" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for inode_setattr return type""... $ac_c" 1>&6
-echo "configure:2796: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2804 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct inode _inode;
-struct iattr _iattr;
-int i;
-i = inode_setattr(&_inode, &_iattr);
-; return 0; }
-EOF
-if { (eval echo configure:2814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_func_inode_setattr_returns_int=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_func_inode_setattr_returns_int=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_func_inode_setattr_returns_int" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
- echo $ac_n "checking for linux/syscall.h in kernel""... $ac_c" 1>&6
-echo "configure:2830: 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
- else
- ac_linux_syscall=no
- echo "$ac_t""$ac_linux_syscall" 1>&6
- fi
-
-
-echo $ac_n "checking for SELinux kernel""... $ac_c" 1>&6
-echo "configure:2841: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2849 "configure"
-#include "confdefs.h"
-#include <linux/autoconf.h>
-int main() {
-#ifndef CONFIG_SECURITY_SELINUX
- #error not SELINUX
- #endif
-; return 0; }
-EOF
-if { (eval echo configure:2858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_kernel_is_selinux=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_kernel_is_selinux=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_kernel_is_selinux" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for 5th argument in sock_create found in some SELinux kernels""... $ac_c" 1>&6
-echo "configure:2874: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2882 "configure"
-#include "confdefs.h"
-#include <linux/net.h>
-int main() {
-
- sock_create(0,0,0,0,0)
-
-; return 0; }
-EOF
-if { (eval echo configure:2891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_kernel_sock_create_v=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_kernel_sock_create_v=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_kernel_sock_create_v" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-RHCONFIG_SP=""
-RHCONFIG_MP=""
-if test "x$enable_redhat_buildsys" = "xyes"; then
- echo "configure: warning: Configured to build from a Red Hat SPEC file" 1>&2
-else
- echo $ac_n "checking for redhat kernel configuration""... $ac_c" 1>&6
-echo "configure:2912: 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"
- RHCONFIG_MP="-D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=1"
- echo "$ac_t""$ac_linux_rhconfig" 1>&6
- if test ! -f "/boot/kernel.h"; then
- echo "configure: warning: /boot/kernel.h does not exist. build may fail" 1>&2
- fi
- else
- ac_linux_rhconfig=no
- echo "$ac_t""$ac_linux_rhconfig" 1>&6
- fi
-fi
-
-
-
-
-echo $ac_n "checking for recalc_sigpending arg type""... $ac_c" 1>&6
-echo "configure:2931: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2939 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-recalc_sigpending();
-; return 0; }
-EOF
-if { (eval echo configure:2946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_func_recalc_sigpending_takes_void=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_func_recalc_sigpending_takes_void=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_func_recalc_sigpending_takes_void" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for parent in struct task_struct""... $ac_c" 1>&6
-echo "configure:2962: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2970 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-struct task_struct _tsk;
-printf("%d\n", _tsk.parent);
-; return 0; }
-EOF
-if { (eval echo configure:2978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_parent=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_parent=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_parent" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for real_parent in struct task_struct""... $ac_c" 1>&6
-echo "configure:2994: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3002 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-struct task_struct _tsk;
-printf("%d\n", _tsk.real_parent);
-; return 0; }
-EOF
-if { (eval echo configure:3010: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_real_parent=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_real_parent" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for sig in struct task_struct""... $ac_c" 1>&6
-echo "configure:3026: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3034 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-struct task_struct _tsk;
-printf("%d\n", _tsk.sig);
-; return 0; }
-EOF
-if { (eval echo configure:3042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_sig=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_sig=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sig" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for sighand in struct task_struct""... $ac_c" 1>&6
-echo "configure:3058: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3066 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-struct task_struct _tsk;
-printf("%d\n", _tsk.sighand);
-; return 0; }
-EOF
-if { (eval echo configure:3074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_sighand=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_sighand=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sighand" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for sigmask_lock in struct task_struct""... $ac_c" 1>&6
-echo "configure:3090: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3098 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-struct task_struct _tsk;
-printf("%d\n", _tsk.sigmask_lock);
-; return 0; }
-EOF
-if { (eval echo configure:3106: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_sigmask_lock=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-if test "x$enable_redhat_buildsys" = "xyes"; then
- MPS=Default
-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:3127: 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 3133 "configure"
-#include "confdefs.h"
-#include <linux/version.h>
-#include <linux/config.h>
-
-int main() {
-#if !defined(CONFIG_MODVERSIONS) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
-lose;
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_config_modversions=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_config_modversions=no
-fi
-rm -f conftest*
-fi
-
- echo "$ac_t""$ac_cv_linux_config_modversions" 1>&6
- echo $ac_n "checking which kernel modules to build""... $ac_c" 1>&6
-echo "configure:3159: checking which kernel modules to build" >&5
- if test "x$ac_linux_rhconfig" = "xyes" -o "x$ac_cv_linux_config_modversions" = "xno"; then
- MPS="MP SP"
- else
- if eval "test \"`echo '$''{'ac_cv_linux_config_smp'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 3168 "configure"
-#include "confdefs.h"
-#include <linux/config.h>
-
-int main() {
-#ifndef CONFIG_SMP
-lose;
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_config_smp=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_config_smp=no
-fi
-rm -f conftest*
-fi
-
- if test "x$ac_cv_linux_config_smp" = "xyes"; then
- MPS=MP
- else
- MPS=SP
- fi
- fi
- CPPFLAGS=$save_CPPFLAGS
- echo "$ac_t""$MPS" 1>&6
-fi
-
-
- if test "x$ac_cv_linux_config_modversions" = "xno"; then
- echo "configure: warning: Cannot determine sys_call_table status. assuming it isn't exported" 1>&2
- ac_cv_linux_exports_sys_call_table=no
- if test -f "$LINUX_KERNEL_PATH/include/asm/ia32_unistd.h"; then
- ac_cv_linux_exports_ia32_sys_call_table=yes
- fi
- else
-
-echo $ac_n "checking for exported init_mm""... $ac_c" 1>&6
-echo "configure:3211: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3219 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_init_mm
-#error init_mm not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_init_mm=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_init_mm=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_init_mm" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported kallsyms_address_to_symbol""... $ac_c" 1>&6
-echo "configure:3244: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3252 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_kallsyms_address_to_symbol
-#error kallsyms_address_to_symbol not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_kallsyms_address=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_kallsyms_address=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_kallsyms_address" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported kallsyms_symbol_to_address""... $ac_c" 1>&6
-echo "configure:3277: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3285 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_kallsyms_symbol_to_address
-#error kallsyms_symbol_to_address not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_kallsyms_symbol=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_kallsyms_symbol=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_kallsyms_symbol" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported sys_call_table""... $ac_c" 1>&6
-echo "configure:3310: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3318 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_sys_call_table
-#error sys_call_table not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_sys_call_table=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_sys_call_table=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_sys_call_table" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported ia32_sys_call_table""... $ac_c" 1>&6
-echo "configure:3343: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3351 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_ia32_sys_call_table
-#error ia32_sys_call_table not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_ia32_sys_call_table=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_ia32_sys_call_table=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_ia32_sys_call_table" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported sys_chdir""... $ac_c" 1>&6
-echo "configure:3376: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3384 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_sys_chdir
-#error sys_chdir not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_sys_chdir=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_sys_chdir=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_sys_chdir" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported sys_close""... $ac_c" 1>&6
-echo "configure:3409: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3417 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_sys_close
-#error sys_close not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_sys_close=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_sys_close=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_sys_close" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported sys_wait4""... $ac_c" 1>&6
-echo "configure:3442: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3450 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_sys_wait4
-#error sys_wait4 not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_sys_wait4=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_sys_wait4=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_sys_wait4" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
- if test "x$ac_cv_linux_exports_sys_call_table" = "xno"; then
- linux_syscall_method=none
- if test "x$ac_cv_linux_exports_init_mm" = "xyes"; then
- linux_syscall_method=scan
- if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
- linux_syscall_method=scan_with_kallsyms_address
- fi
- fi
- if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
- linux_syscall_method=kallsyms_symbol
- fi
- if test "x$linux_syscall_method" = "xnone"; then
- { echo "configure: error: no available sys_call_table access method" 1>&2; exit 1; }
- fi
- fi
- fi
- if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_IN_SYSTM_H 1
-EOF
-
- fi
- if test -f "$LINUX_KERNEL_PATH/include/linux/mm_inline.h"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_MM_INLINE_H 1
-EOF
-
- fi
- if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_IN_SYSTM_H 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_sys_chdir" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_SYS_CHDIR 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_sys_close" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_SYS_CLOSE 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_sys_wait4" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_SYS_WAIT4 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_TASKLIST_LOCK 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_sys_call_table" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_SYS_CALL_TABLE 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_ia32_sys_call_table" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_IA32_SYS_CALL_TABLE 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_KALLSYMS_SYMBOL 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_KALLSYMS_ADDRESS 1
-EOF
-
- fi
- if test "x$ac_cv_linux_completion_h_exists" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define COMPLETION_H_EXISTS 1
-EOF
-
- fi
- if test "x$ac_cv_linux_defines_for_each_process" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define DEFINED_FOR_EACH_PROCESS 1
-EOF
-
- fi
- if test "x$ac_cv_linux_defines_prev_task" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define DEFINED_PREV_TASK 1
-EOF
-
- fi
- if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define INODE_SETATTR_NOT_VOID 1
-EOF
-
- fi
- if test "x$ac_cv_linux_fs_struct_address_space_has_page_lock" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK 1
-EOF
-
- fi
- if test "x$ac_cv_linux_fs_struct_address_space_has_gfp_mask" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_ADDRESS_SPACE_HAS_GFP_MASK 1
-EOF
-
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_INODE_HAS_I_TRUNCATE_SEM 1
-EOF
-
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_INODE_HAS_I_ALLOC_SEM 1
-EOF
-
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_devices" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_INODE_HAS_I_DEVICES 1
-EOF
-
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_security" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_INODE_HAS_I_SECURITY 1
-EOF
-
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS 1
-EOF
-
- fi
- if test "x$ac_cv_linux_func_recalc_sigpending_takes_void" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define RECALC_SIGPENDING_TAKES_VOID 1
-EOF
-
- fi
- if test "x$ac_cv_linux_kernel_is_selinux" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define LINUX_KERNEL_IS_SELINUX 1
-EOF
-
- fi
- if test "x$ac_cv_linux_kernel_sock_create_v" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define LINUX_KERNEL_SOCK_CREATE_V 1
-EOF
-
- fi
- if test "x$ac_linux_syscall" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define HAVE_KERNEL_LINUX_SYSCALL_H 1
-EOF
-
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_parent" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_TASK_STRUCT_HAS_PARENT 1
-EOF
-
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_real_parent" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_TASK_STRUCT_HAS_REAL_PARENT 1
-EOF
-
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK 1
-EOF
-
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_sighand" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_TASK_STRUCT_HAS_SIGHAND 1
-EOF
-
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_sig" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_TASK_STRUCT_HAS_SIG 1
-EOF
-
- fi
- :
- fi
- ;;
- *-solaris*)
- MKAFS_OSTYPE=SOLARIS
- echo "$ac_t""sun4" 1>&6
-
-echo $ac_n "checking for vfs_dqrwlock in struct ufsvfs""... $ac_c" 1>&6
-echo "configure:3683: checking for vfs_dqrwlock in struct ufsvfs" >&5
-if eval "test \"`echo '$''{'ac_cv_solaris_ufsvfs_has_dqrwlock'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3689 "configure"
-#include "confdefs.h"
-#define _KERNEL
-#include <sys/fs/ufs_inode.h>
-int main() {
-struct ufsvfs _ufsvfs;
-(void) _ufsvfs.vfs_dqrwlock;
-; return 0; }
-EOF
-if { (eval echo configure:3698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_solaris_ufsvfs_has_dqrwlock=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_solaris_ufsvfs_has_dqrwlock=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_solaris_ufsvfs_has_dqrwlock" 1>&6
-if test "$ac_cv_solaris_ufsvfs_has_dqrwlock" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_VFS_DQRWLOCK 1
-EOF
-
-fi
-
-
-echo $ac_n "checking for p_corefile in struct proc""... $ac_c" 1>&6
-echo "configure:3720: checking for p_corefile in struct proc" >&5
-if eval "test \"`echo '$''{'ac_cv_solaris_proc_has_p_corefile'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3726 "configure"
-#include "confdefs.h"
-#define _KERNEL
-#include <sys/proc.h>
-int main() {
-struct proc _proc;
-(void) _proc.p_corefile;
-; return 0; }
-EOF
-if { (eval echo configure:3735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_solaris_proc_has_p_corefile=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_solaris_proc_has_p_corefile=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_solaris_proc_has_p_corefile" 1>&6
-if test "$ac_cv_solaris_proc_has_p_corefile" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_P_COREFILE 1
-EOF
-
-fi
-
-
-echo $ac_n "checking for fs_rolled in struct proc""... $ac_c" 1>&6
-echo "configure:3757: checking for fs_rolled in struct proc" >&5
-if eval "test \"`echo '$''{'ac_cv_solaris_fs_has_fs_rolled'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3763 "configure"
-#include "confdefs.h"
-#include <sys/fs/ufs_fs.h>
-int main() {
-struct fs _fs;
-(void) _fs.fs_rolled;
-; return 0; }
-EOF
-if { (eval echo configure:3771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_solaris_fs_has_fs_rolled=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_solaris_fs_has_fs_rolled=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_solaris_fs_has_fs_rolled" 1>&6
-if test "$ac_cv_solaris_fs_has_fs_rolled" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_FS_HAS_FS_ROLLED 1
-EOF
-
-fi
-
- ;;
- *-sunos*)
- MKAFS_OSTYPE=SUNOS
- enable_kernel_module=no
- echo "$ac_t""sun4" 1>&6
- ;;
- *-hpux*)
- MKAFS_OSTYPE=HPUX
- echo "$ac_t""hp_ux" 1>&6
- ;;
- *-irix*)
- if test -d /usr/include/sys/SN/SN1; then
- IRIX_BUILD_IP35="IP35"
- fi
- MKAFS_OSTYPE=IRIX
- echo "$ac_t""sgi" 1>&6
- ;;
- *-aix*)
- MKAFS_OSTYPE=AIX
- echo "$ac_t""rs_aix" 1>&6
- ;;
- *-osf*)
- MKAFS_OSTYPE=DUX
- echo "$ac_t""alpha_dux" 1>&6
- if test "x$enable_kernel_module" = "xyes"; then
- if test "x$with_dux_kernel_headers" != "x"; then
- HEADER_RT=`ls ${with_dux_kernel_headers}/rt_preempt.h | head -1 | sed 's,/rt_preempt.h,,;s,/usr/sys/,,'`
- else
- HEADER_RT=`ls /usr/sys/*/rt_preempt.h | head -1 | sed 's,/rt_preempt.h,,;s,/usr/sys/,,'`
- fi
- fi
- if test "$HEADER_RT" = "*" ; then
- { echo "configure: error: Need a configured kernel directory" 1>&2; exit 1; }
- fi
-
- ;;
- *-darwin*)
- MKAFS_OSTYPE=DARWIN
- echo "$ac_t""ppc_darwin" 1>&6
- ;;
- *-freebsd*)
- MKAFS_OSTYPE=FBSD
- echo "$ac_t""i386_fbsd" 1>&6
- ;;
- *-netbsd*)
- MKAFS_OSTYPE=NBSD
- echo "$ac_t""nbsd" 1>&6
- ;;
- *-openbsd*)
- MKAFS_OSTYPE=OBSD
- echo "$ac_t""i386_obsd" 1>&6
- ;;
- *)
- echo "$ac_t""$system" 1>&6
- ;;
-esac
-
-if test "x$with_afs_sysname" != "x"; then
- AFS_SYSNAME="$with_afs_sysname"
+if test "x$with_afs_sysname" != "x"; then
+ AFS_SYSNAME="$with_afs_sysname"
else
echo $ac_n "checking your AFS sysname""... $ac_c" 1>&6
-echo "configure:3852: checking your AFS sysname" >&5
+echo "configure:2424: checking your AFS sysname" >&5
case $host in
i?86-*-openbsd3.1)
AFS_SYSNAME="i386_obsd31"
AFS_PARAM_COMMON=param.nbsd16.h
AFS_SYSNAME="ppc_nbsd16"
;;
+ i?86-*-netbsd*2.99*)
+ AFS_PARAM_COMMON=param.nbsd21.h
+ AFS_SYSNAME="i386_nbsd21"
+ ;;
hppa*-hp-hpux11.0*)
AFS_SYSNAME="hp_ux110"
;;
;;
power*-ibm-aix4.2*)
AFS_SYSNAME="rs_aix42"
+ enable_pam="no"
;;
power*-ibm-aix4.3*)
AFS_SYSNAME="rs_aix42"
+ enable_pam="no"
;;
power*-ibm-aix5.1*)
AFS_SYSNAME="rs_aix51"
+ enable_pam="no"
;;
power*-ibm-aix5.2*)
AFS_SYSNAME="rs_aix52"
+ enable_pam="no"
;;
x86_64-*-linux-gnu)
AFS_SYSNAME="amd64_linuxXX"
;;
esac
case $AFS_SYSNAME in
- *_linux*)
- AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $1 $2}'`
+ *_linux* | *_umlinux*)
if test "x${AFS_SYSKVERS}" = "x"; then
{ echo "configure: error: Couldn't guess your Linux version. Please use the --with-afs-sysname option to configure an AFS sysname." 1>&2; exit 1; }
fi
- _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/XX\$/$AFS_SYSKVERS/`
+ _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/XX\$/$AFS_SYSKVERS/`
+ AFS_SYSNAME="$_AFS_SYSNAME"
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I${LINUX_KERNEL_PATH}/include $CPPFLAGS"
+ cat > conftest.$ac_ext <<EOF
+#line 2702 "configure"
+#include "confdefs.h"
+#include <linux/autoconf.h>
+int main() {
+#ifndef CONFIG_USERMODE
+ #error not UML
+ #endif
+; return 0; }
+EOF
+if { (eval echo configure:2711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_is_uml=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ if test "${ac_cv_linux_is_uml}" = yes; then
+ _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/linux/umlinux/`
+ fi
+ CPPFLAGS="$save_CPPFLAGS"
AFS_SYSNAME="$_AFS_SYSNAME"
- save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="-I${LINUX_KERNEL_PATH}/include $CPPFLAGS"
- cat > conftest.$ac_ext <<EOF
-#line 4123 "configure"
+ ;;
+ esac
+ echo "$ac_t""$AFS_SYSNAME" 1>&6
+fi
+
+case $AFS_SYSNAME in *_linux* | *_umlinux*)
+
+ # Add (sub-) architecture-specific paths needed by conftests
+ case $AFS_SYSNAME in
+ *_umlinux26)
+ UMLINUX26_FLAGS="-I$LINUX_KERNEL_PATH/arch/um/include"
+ UMLINUX26_FLAGS="$UMLINUX26_FLAGS -I$LINUX_KERNEL_PATH/arch/um/kernel/tt/include"
+ UMLINUX26_FLAGS="$UMLINUX26_FLAGS -I$LINUX_KERNEL_PATH/arch/um/kernel/skas/include"
+ CPPFLAGS="$CPPFLAGS $UMLINUX26_FLAGS"
+ esac
+
+ if test "x$enable_kernel_module" = "xyes"; then
+ if test "x$enable_debug_kernel" = "xno"; then
+ LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fomit-frame-pointer"
+ fi
+
+echo $ac_n "checking if $CC accepts -march=pentium""... $ac_c" 1>&6
+echo "configure:2746: checking if $CC accepts -march=pentium" >&5
+save_CFLAGS="$CFLAGS"
+CFLAGS="-MARCH=pentium"
+if eval "test \"`echo '$''{'openafs_gcc_supports_march'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 2754 "configure"
+#include "confdefs.h"
+
+int main() {
+int x;
+; return 0; }
+EOF
+if { (eval echo configure:2761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ openafs_gcc_supports_march=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ openafs_gcc_supports_march=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$openafs_gcc_supports_march" 1>&6
+if test x$openafs_gcc_supports_march = xyes; then
+ P5PLUS_KOPTS="-march=pentium"
+else
+ P5PLUS_KOPTS="-m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2"
+fi
+CFLAGS="$save_CFLAGS"
+
+
+
+echo $ac_n "checking if $CC needs -fno-strength-reduce""... $ac_c" 1>&6
+echo "configure:2784: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 2792 "configure"
+#include "confdefs.h"
+
+int main() {
+int x;
+; return 0; }
+EOF
+if { (eval echo configure:2799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ openafs_gcc_needs_no_strength_reduce=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ openafs_gcc_needs_no_strength_reduce=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$openafs_gcc_needs_no_strength_reduce" 1>&6
+if test x$openafs_gcc_needs_no_strength_reduce = xyes; then
+ LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strength-reduce"
+fi
+CFLAGS="$save_CFLAGS"
+
+
+echo $ac_n "checking if $CC needs -fno-strict-aliasing""... $ac_c" 1>&6
+echo "configure:2819: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 2827 "configure"
+#include "confdefs.h"
+
+int main() {
+int x;
+; return 0; }
+EOF
+if { (eval echo configure:2834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ openafs_gcc_needs_no_strict_aliasing=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ openafs_gcc_needs_no_strict_aliasing=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$openafs_gcc_needs_no_strict_aliasing" 1>&6
+if test x$openafs_gcc_needs_no_strict_aliasing = xyes; then
+ LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strict-aliasing"
+fi
+CFLAGS="$save_CFLAGS"
+
+
+echo $ac_n "checking if $CC supports -fno-common""... $ac_c" 1>&6
+echo "configure:2854: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 2862 "configure"
+#include "confdefs.h"
+
+int main() {
+int x;
+; return 0; }
+EOF
+if { (eval echo configure:2869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ openafs_gcc_supports_no_common=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ openafs_gcc_supports_no_common=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$openafs_gcc_supports_no_common" 1>&6
+if test x$openafs_gcc_supports_no_common = xyes; then
+ LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-common"
+fi
+CFLAGS="$save_CFLAGS"
+
+
+echo $ac_n "checking if $CC supports -pipe""... $ac_c" 1>&6
+echo "configure:2889: checking if $CC supports -pipe" >&5
+save_CFLAGS="$CFLAGS"
+CFLAGS="-pipe"
+if eval "test \"`echo '$''{'openafs_gcc_supports_pipe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 2897 "configure"
+#include "confdefs.h"
+
+int main() {
+int x;
+; return 0; }
+EOF
+if { (eval echo configure:2904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ openafs_gcc_supports_pipe=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ openafs_gcc_supports_pipe=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$openafs_gcc_supports_pipe" 1>&6
+if test x$openafs_gcc_supports_pipe = xyes; then
+ LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -pipe"
+fi
+CFLAGS="$save_CFLAGS"
+
+
+
+echo $ac_n "checking whether to build osi_vfs.h""... $ac_c" 1>&6
+echo "configure:2925: checking whether to build osi_vfs.h" >&5
+configdir=${srcdir}/src/config
+outputdir=src/afs/LINUX
+tmpldir=${srcdir}/src/afs/LINUX
+chmod +x $configdir/make_vnode.pl
+$configdir/make_vnode.pl -i $LINUX_KERNEL_PATH -t ${tmpldir} -o $outputdir
+
+
+
+echo $ac_n "checking for linux/completion.h existance""... $ac_c" 1>&6
+echo "configure:2935: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 2943 "configure"
+#include "confdefs.h"
+#include <linux/completion.h>
+#include <linux/version.h>
+int main() {
+struct completion _c;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,8)
+lose
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_completion_h_exists=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_completion_h_exists=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_completion_h_exists" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for defined for_each_process""... $ac_c" 1>&6
+echo "configure:2971: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 2979 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+#ifndef for_each_process(p)
+#error for_each_process not defined
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:2988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_defines_for_each_process=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_defines_for_each_process=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_defines_for_each_process" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for defined prev_task""... $ac_c" 1>&6
+echo "configure:3004: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3012 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+#ifndef prev_task(p)
+#error prev_task not defined
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:3021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_defines_prev_task=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_defines_prev_task=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_defines_prev_task" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported tasklist_lock""... $ac_c" 1>&6
+echo "configure:3037: checking for exported tasklist_lock" >&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_tasklist_lock'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3045 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_tasklist_lock
+#error tasklist_lock not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:3054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_tasklist_lock=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_tasklist_lock=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_tasklist_lock" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for page_lock in struct address_space""... $ac_c" 1>&6
+echo "configure:3070: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3078 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct address_space _a_s;
+printf("%x\n", _a_s.page_lock);
+; return 0; }
+EOF
+if { (eval echo configure:3086: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_address_space_has_page_lock=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_fs_struct_address_space_has_page_lock" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for gfp_mask in struct address_space""... $ac_c" 1>&6
+echo "configure:3102: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3110 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct address_space _a;
+printf("%d\n", _a.gfp_mask);
+; return 0; }
+EOF
+if { (eval echo configure:3118: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_address_space_has_gfp_mask=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_fs_struct_address_space_has_gfp_mask" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for i_alloc_sem in struct inode""... $ac_c" 1>&6
+echo "configure:3134: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3142 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct inode _i;
+printf("%x\n", _i.i_alloc_sem);
+; return 0; }
+EOF
+if { (eval echo configure:3150: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_inode_has_i_alloc_sem=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for i_truncate_sem in struct inode""... $ac_c" 1>&6
+echo "configure:3166: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3174 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct inode _i;
+printf("%x\n", _i.i_truncate_sem);
+; return 0; }
+EOF
+if { (eval echo configure:3182: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_inode_has_i_truncate_sem=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for i_dirty_data_buffers in struct inode""... $ac_c" 1>&6
+echo "configure:3198: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3206 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct inode _inode;
+printf("%d\n", _inode.i_dirty_data_buffers);
+; return 0; }
+EOF
+if { (eval echo configure:3214: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for i_devices in struct inode""... $ac_c" 1>&6
+echo "configure:3230: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3238 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct inode _inode;
+printf("%d\n", _inode.i_devices);
+; return 0; }
+EOF
+if { (eval echo configure:3246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_inode_has_i_devices=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_inode_has_i_devices=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_devices" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for i_security in struct inode""... $ac_c" 1>&6
+echo "configure:3262: checking for i_security in struct inode" >&5
+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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3270 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct inode _inode;
+printf("%d\n", _inode.i_security);
+; return 0; }
+EOF
+if { (eval echo configure:3278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_inode_has_i_security=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_inode_has_i_security=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_security" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for inode_setattr return type""... $ac_c" 1>&6
+echo "configure:3294: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3302 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct inode _inode;
+struct iattr _iattr;
+int i;
+i = inode_setattr(&_inode, &_iattr);
+; return 0; }
+EOF
+if { (eval echo configure:3312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_inode_setattr_returns_int=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_inode_setattr_returns_int=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_inode_setattr_returns_int" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for write_inode return type""... $ac_c" 1>&6
+echo "configure:3328: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3336 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct inode _inode;
+struct super_operations _sops;
+int i;
+i = _sops.write_inode(&_inode, 0);
+; return 0; }
+EOF
+if { (eval echo configure:3346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_write_inode_returns_int=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_write_inode_returns_int=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_write_inode_returns_int" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+echo $ac_n "checking whether inode_operations.create takes a nameidata""... $ac_c" 1>&6
+echo "configure:3364: 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 3370 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+#include <linux/namei.h>
+int main() {
+struct inode _inode;
+struct dentry _dentry;
+struct nameidata _nameidata;
+(void)_inode.i_op->create(&_inode, &_dentry, 0, &_nameidata);
+; return 0; }
+EOF
+if { (eval echo configure:3381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_i_create_takes_nameidata=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_i_create_takes_nameidata=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_i_create_takes_nameidata" 1>&6
+if test "x$ac_cv_linux_func_i_create_takes_nameidata" = "xyes" ; then
+cat >> confdefs.h <<\EOF
+#define IOP_CREATE_TAKES_NAMEIDATA 1
+EOF
+
+fi
+echo $ac_n "checking whether inode_operations.lookup takes a nameidata""... $ac_c" 1>&6
+echo "configure:3401: 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 3407 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+#include <linux/namei.h>
+int main() {
+struct inode _inode;
+struct dentry _dentry;
+struct nameidata _nameidata;
+(void)_inode.i_op->lookup(&_inode, &_dentry, &_nameidata);
+; return 0; }
+EOF
+if { (eval echo configure:3418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_i_lookup_takes_nameidata=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_i_lookup_takes_nameidata=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_i_lookup_takes_nameidata" 1>&6
+if test "x$ac_cv_linux_func_i_lookup_takes_nameidata" = "xyes" ; then
+cat >> confdefs.h <<\EOF
+#define IOP_LOOKUP_TAKES_NAMEIDATA 1
+EOF
+
+fi
+echo $ac_n "checking whether inode_operations.permission takes a nameidata""... $ac_c" 1>&6
+echo "configure:3438: 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 3444 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+#include <linux/namei.h>
+int main() {
+struct inode _inode;
+struct nameidata _nameidata;
+(void)_inode.i_op->permission(&_inode, 0, &_nameidata);
+; return 0; }
+EOF
+if { (eval echo configure:3454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_i_permission_takes_nameidata=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_i_permission_takes_nameidata=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_i_permission_takes_nameidata" 1>&6
+if test "x$ac_cv_linux_func_i_permission_takes_nameidata" = "xyes" ; then
+cat >> confdefs.h <<\EOF
+#define IOP_PERMISSION_TAKES_NAMEIDATA 1
+EOF
+
+fi
+echo $ac_n "checking whether dentry_operations.d_revalidate takes a nameidata""... $ac_c" 1>&6
+echo "configure:3474: 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 3481 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+#include <linux/namei.h>
+int main() {
+struct dentry _dentry;
+struct nameidata _nameidata;
+(void)_dentry.d_op->d_revalidate(&_dentry, &_nameidata);
+; return 0; }
+EOF
+if { (eval echo configure:3491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_d_revalidate_takes_nameidata=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_d_revalidate_takes_nameidata=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_d_revalidate_takes_nameidata" 1>&6
+if test "x$ac_cv_linux_func_d_revalidate_takes_nameidata" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define DOP_REVALIDATE_TAKES_NAMEIDATA 1
+EOF
+
+fi
+CPPFLAGS="$save_CPPFLAGS"
+
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+echo $ac_n "checking whether address_space_operations.writepage takes a writeback_control""... $ac_c" 1>&6
+echo "configure:3515: 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 3521 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/writeback.h>
+int main() {
+struct address_space_operations _aops;
+struct page _page;
+struct writeback_control _writeback_control;
+(void)_aops.writepage(&_page, &_writeback_control);
+; return 0; }
+EOF
+if { (eval echo configure:3533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_a_writepage_takes_writeback_control=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_a_writepage_takes_writeback_control=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_a_writepage_takes_writeback_control" 1>&6
+if test "x$ac_cv_linux_func_a_writepage_takes_writeback_control" = "xyes" ; then
+cat >> confdefs.h <<\EOF
+#define AOP_WRITEPAGE_TAKES_WRITEBACK_CONTROL 1
+EOF
+
+fi
+CPPFLAGS="$save_CPPFLAGS"
+
+ echo $ac_n "checking for linux/syscall.h in kernel""... $ac_c" 1>&6
+echo "configure:3555: 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
+ else
+ ac_linux_syscall=no
+ echo "$ac_t""$ac_linux_syscall" 1>&6
+ fi
+
+
+echo $ac_n "checking for SELinux kernel""... $ac_c" 1>&6
+echo "configure:3566: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3574 "configure"
+#include "confdefs.h"
+#include <linux/autoconf.h>
+int main() {
+#ifndef CONFIG_SECURITY_SELINUX
+ #error not SELINUX
+ #endif
+; return 0; }
+EOF
+if { (eval echo configure:3583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_kernel_is_selinux=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_kernel_is_selinux=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_kernel_is_selinux" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for 5th argument in sock_create found in some SELinux kernels""... $ac_c" 1>&6
+echo "configure:3599: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3607 "configure"
+#include "confdefs.h"
+#include <linux/net.h>
+int main() {
+
+ sock_create(0,0,0,0,0)
+
+; return 0; }
+EOF
+if { (eval echo configure:3616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_kernel_sock_create_v=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_kernel_sock_create_v=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_kernel_sock_create_v" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for page_follow_link_light vs page_follow_link""... $ac_c" 1>&6
+echo "configure:3632: checking for page_follow_link_light vs page_follow_link" >&5
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+if eval "test \"`echo '$''{'ac_cv_linux_kernel_page_follow_link'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3640 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+
+ page_follow_link(0,0)
+
+; return 0; }
+EOF
+if { (eval echo configure:3649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_kernel_page_follow_link=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_kernel_page_follow_link=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_kernel_page_follow_page" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+RHCONFIG_SP=""
+RHCONFIG_MP=""
+if test "x$enable_redhat_buildsys" = "xyes"; then
+ echo "configure: warning: Configured to build from a Red Hat SPEC file" 1>&2
+else
+ echo $ac_n "checking for redhat kernel configuration""... $ac_c" 1>&6
+echo "configure:3670: 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"
+ RHCONFIG_MP="-D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=1"
+ echo "$ac_t""$ac_linux_rhconfig" 1>&6
+ if test ! -f "/boot/kernel.h"; then
+ echo "configure: warning: /boot/kernel.h does not exist. build may fail" 1>&2
+ fi
+ else
+ ac_linux_rhconfig=no
+ echo "$ac_t""$ac_linux_rhconfig" 1>&6
+ fi
+fi
+
+
+
+
+echo $ac_n "checking for recalc_sigpending arg type""... $ac_c" 1>&6
+echo "configure:3689: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3697 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+recalc_sigpending();
+; return 0; }
+EOF
+if { (eval echo configure:3704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_recalc_sigpending_takes_void=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_recalc_sigpending_takes_void=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_recalc_sigpending_takes_void" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for parent in struct task_struct""... $ac_c" 1>&6
+echo "configure:3720: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3728 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+struct task_struct _tsk;
+printf("%d\n", _tsk.parent);
+; return 0; }
+EOF
+if { (eval echo configure:3736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_parent=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_parent=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_parent" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for real_parent in struct task_struct""... $ac_c" 1>&6
+echo "configure:3752: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3760 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+struct task_struct _tsk;
+printf("%d\n", _tsk.real_parent);
+; return 0; }
+EOF
+if { (eval echo configure:3768: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_real_parent=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_real_parent" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for sig in struct task_struct""... $ac_c" 1>&6
+echo "configure:3784: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3792 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+struct task_struct _tsk;
+printf("%d\n", _tsk.sig);
+; return 0; }
+EOF
+if { (eval echo configure:3800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_sig=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_sig=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sig" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for sighand in struct task_struct""... $ac_c" 1>&6
+echo "configure:3816: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3824 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+struct task_struct _tsk;
+printf("%d\n", _tsk.sighand);
+; return 0; }
+EOF
+if { (eval echo configure:3832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_sighand=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_sighand=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sighand" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for sigmask_lock in struct task_struct""... $ac_c" 1>&6
+echo "configure:3848: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3856 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+struct task_struct _tsk;
+printf("%d\n", _tsk.sigmask_lock);
+; return 0; }
+EOF
+if { (eval echo configure:3864: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_sigmask_lock=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+if test "x$enable_redhat_buildsys" = "xyes"; then
+ MPS=Default
+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:3885: 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 3891 "configure"
+#include "confdefs.h"
+#include <linux/version.h>
+#include <linux/config.h>
+
+int main() {
+#if !defined(CONFIG_MODVERSIONS)
+lose;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_config_modversions=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_config_modversions=no
+fi
+rm -f conftest*
+fi
+
+ echo "$ac_t""$ac_cv_linux_config_modversions" 1>&6
+ echo $ac_n "checking which kernel modules to build""... $ac_c" 1>&6
+echo "configure:3917: 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
+ MPS="MP SP"
+ else
+ if eval "test \"`echo '$''{'ac_cv_linux_config_smp'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ cat > conftest.$ac_ext <<EOF
+#line 3928 "configure"
+#include "confdefs.h"
+#include <linux/config.h>
+
+int main() {
+#ifndef CONFIG_SMP
+lose;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_config_smp=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_config_smp=no
+fi
+rm -f conftest*
+fi
+
+ if test "x$ac_cv_linux_config_smp" = "xyes"; then
+ MPS=MP
+ else
+ MPS=SP
+ fi
+ fi
+ CPPFLAGS=$save_CPPFLAGS
+ echo "$ac_t""$MPS" 1>&6
+fi
+
+
+ if test "x$ac_cv_linux_config_modversions" = "xno" -o $AFS_SYSKVERS -ge 26; then
+ echo "configure: warning: Cannot determine sys_call_table status. assuming it isn't exported" 1>&2
+ ac_cv_linux_exports_sys_call_table=no
+ if test -f "$LINUX_KERNEL_PATH/include/asm/ia32_unistd.h"; then
+ ac_cv_linux_exports_ia32_sys_call_table=yes
+ fi
+ else
+
+echo $ac_n "checking for exported init_mm""... $ac_c" 1>&6
+echo "configure:3971: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3979 "configure"
#include "confdefs.h"
-#include <linux/autoconf.h>
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_init_mm
+#error init_mm not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:3988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_init_mm=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_init_mm=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_init_mm" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported kallsyms_address_to_symbol""... $ac_c" 1>&6
+echo "configure:4004: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 4012 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_kallsyms_address_to_symbol
+#error kallsyms_address_to_symbol not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_kallsyms_address=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_kallsyms_address=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_kallsyms_address" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported kallsyms_symbol_to_address""... $ac_c" 1>&6
+echo "configure:4037: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 4045 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_kallsyms_symbol_to_address
+#error kallsyms_symbol_to_address not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_kallsyms_symbol=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_kallsyms_symbol=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_kallsyms_symbol" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported sys_call_table""... $ac_c" 1>&6
+echo "configure:4070: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 4078 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_sys_call_table
+#error sys_call_table not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_sys_call_table=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_sys_call_table=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_sys_call_table" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported ia32_sys_call_table""... $ac_c" 1>&6
+echo "configure:4103: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 4111 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_ia32_sys_call_table
+#error ia32_sys_call_table not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_ia32_sys_call_table=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_ia32_sys_call_table=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_ia32_sys_call_table" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported sys_chdir""... $ac_c" 1>&6
+echo "configure:4136: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 4144 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_sys_chdir
+#error sys_chdir not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_sys_chdir=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_sys_chdir=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_sys_chdir" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported sys_close""... $ac_c" 1>&6
+echo "configure:4169: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 4177 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_sys_close
+#error sys_close not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_sys_close=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_sys_close=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_sys_close" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported sys_wait4""... $ac_c" 1>&6
+echo "configure:4202: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 4210 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
int main() {
-#ifndef CONFIG_USERMODE
- #error not UML
- #endif
+#ifndef __ver_sys_wait4
+#error sys_wait4 not exported
+#endif
; return 0; }
EOF
-if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- ac_cv_linux_is_uml=yes
+ ac_cv_linux_exports_sys_wait4=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_sys_wait4=no
fi
rm -f conftest*
- if test "${ac_cv_linux_is_uml}" = yes; then
- _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/linux/umlinux/`
- fi
- CPPFLAGS="$save_CPPFLAGS"
- AFS_SYSNAME="$_AFS_SYSNAME"
- ;;
- esac
- echo "$ac_t""$AFS_SYSNAME" 1>&6
fi
+echo "$ac_t""$ac_cv_linux_exports_sys_wait4" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+ if test "x$ac_cv_linux_exports_sys_call_table" = "xno"; then
+ linux_syscall_method=none
+ if test "x$ac_cv_linux_exports_init_mm" = "xyes"; then
+ linux_syscall_method=scan
+ if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
+ linux_syscall_method=scan_with_kallsyms_address
+ fi
+ fi
+ if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
+ linux_syscall_method=kallsyms_symbol
+ fi
+ if test "x$linux_syscall_method" = "xnone"; then
+ { echo "configure: error: no available sys_call_table access method" 1>&2; exit 1; }
+ fi
+ fi
+ fi
+ if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_IN_SYSTM_H 1
+EOF
+
+ fi
+ if test -f "$LINUX_KERNEL_PATH/include/linux/mm_inline.h"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MM_INLINE_H 1
+EOF
+
+ fi
+ if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_IN_SYSTM_H 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_sys_chdir" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_SYS_CHDIR 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_sys_close" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_SYS_CLOSE 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_sys_wait4" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_SYS_WAIT4 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_TASKLIST_LOCK 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_sys_call_table" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_SYS_CALL_TABLE 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_ia32_sys_call_table" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_IA32_SYS_CALL_TABLE 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_KALLSYMS_SYMBOL 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_KALLSYMS_ADDRESS 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_completion_h_exists" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define COMPLETION_H_EXISTS 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_defines_for_each_process" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define DEFINED_FOR_EACH_PROCESS 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_defines_prev_task" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define DEFINED_PREV_TASK 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define INODE_SETATTR_NOT_VOID 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_func_write_inode_returns_int" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define WRITE_INODE_NOT_VOID 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_fs_struct_address_space_has_page_lock" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_fs_struct_address_space_has_gfp_mask" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_ADDRESS_SPACE_HAS_GFP_MASK 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_INODE_HAS_I_TRUNCATE_SEM 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_INODE_HAS_I_ALLOC_SEM 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_devices" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_INODE_HAS_I_DEVICES 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_security" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_INODE_HAS_I_SECURITY 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_func_recalc_sigpending_takes_void" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define RECALC_SIGPENDING_TAKES_VOID 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_kernel_is_selinux" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define LINUX_KERNEL_IS_SELINUX 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_kernel_sock_create_v" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define LINUX_KERNEL_SOCK_CREATE_V 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_kernel_page_follow_link" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_KERNEL_PAGE_FOLLOW_LINK 1
+EOF
+
+ fi
+ if test "x$ac_linux_syscall" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_KERNEL_LINUX_SYSCALL_H 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_parent" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_TASK_STRUCT_HAS_PARENT 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_real_parent" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_TASK_STRUCT_HAS_REAL_PARENT 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_sighand" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_TASK_STRUCT_HAS_SIGHAND 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_sig" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_TASK_STRUCT_HAS_SIG 1
+EOF
+
+ fi
+ :
+ fi
+esac
+
case $AFS_SYSNAME in
*_darwin*)
DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist
;;
*)
echo $ac_n "checking for definition of struct buf""... $ac_c" 1>&6
-echo "configure:4162: checking for definition of struct buf" >&5
+echo "configure:4463: 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 4169 "configure"
+#line 4470 "configure"
#include "confdefs.h"
#include <sys/buf.h>
int main() {
printf("%d\n", sizeof(x));
; return 0; }
EOF
-if { (eval echo configure:4177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4478: \"$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:4205: checking if struct sockaddr has sa_len field" >&5
+echo "configure:4506: checking if struct sockaddr has sa_len field" >&5
cat > conftest.$ac_ext <<EOF
-#line 4207 "configure"
+#line 4508 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
a->sa_len=0;
; return 0; }
EOF
-if { (eval echo configure:4216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4517: \"$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:4241: checking for $ac_func" >&5
+echo "configure:4542: checking for $ac_func" >&5
if 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 4246 "configure"
+#line 4547 "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:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4570: \"$ac_link\") 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:4298: checking for socket in -l${lib}" >&5
+echo "configure:4599: 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 4306 "configure"
+#line 4607 "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:4317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4618: \"$ac_link\") 1>&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:4347: checking for $ac_func" >&5
+echo "configure:4648: checking for $ac_func" >&5
if 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 4352 "configure"
+#line 4653 "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:4375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_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:4404: checking for connect in -l${lib}" >&5
+echo "configure:4705: 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 4412 "configure"
+#line 4713 "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:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4724: \"$ac_link\") 1>&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:4453: checking for $ac_func" >&5
+echo "configure:4754: checking for $ac_func" >&5
if 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 4458 "configure"
+#line 4759 "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:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_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:4509: checking for gethostbyname in -l${lib}" >&5
+echo "configure:4810: 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 4517 "configure"
+#line 4818 "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:4528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4829: \"$ac_link\") 1>&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:4556: checking for the useability of arpa/nameser_compat.h" >&5
+echo "configure:4857: checking for the useability of arpa/nameser_compat.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 4558 "configure"
+#line 4859 "configure"
#include "confdefs.h"
#include <stdlib.h>
static int i; i = 0;
; return 0; }
EOF
-if { (eval echo configure:4575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4876: \"$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:4593: checking for res_search" >&5
+echo "configure:4894: checking for res_search" >&5
ac_cv_func_res_search=no
cat > conftest.$ac_ext <<EOF
-#line 4597 "configure"
+#line 4898 "configure"
#include "confdefs.h"
#include <sys/types.h>
; return 0; }
EOF
-if { (eval echo configure:4621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4922: \"$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 4638 "configure"
+#line 4939 "configure"
#include "confdefs.h"
#include <sys/types.h>
; return 0; }
EOF
-if { (eval echo configure:4662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4963: \"$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:4696: checking for pthread_attr_init in -lpthread" >&5
+echo "configure:4997: 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 4704 "configure"
+#line 5005 "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:4715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5016: \"$ac_link\") 1>&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:4737: checking for pthread_attr_init in -lpthreads" >&5
+echo "configure:5038: 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 4745 "configure"
+#line 5046 "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:4756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5057: \"$ac_link\") 1>&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:4779: checking for pthread_attr_init in -lc_r" >&5
+echo "configure:5080: 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 4787 "configure"
+#line 5088 "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:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5099: \"$ac_link\") 1>&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:4821: checking for pthread_attr_init" >&5
+echo "configure:5122: 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 4826 "configure"
+#line 5127 "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:4849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5150: \"$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:4969: checking for tivoli tsm butc support" >&5
+echo "configure:5270: 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:4990: checking for ANSI C header files" >&5
+echo "configure:5291: 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 4995 "configure"
+#line 5296 "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:5003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5304: \"$ac_try\") 1>&5; (eval $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 5020 "configure"
+#line 5321 "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 5038 "configure"
+#line 5339 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 5059 "configure"
+#line 5360 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5371: \"$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:5094: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:5395: 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 5099 "configure"
+#line 5400 "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:5115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5416: \"$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:5140: checking for $ac_hdr that defines DIR" >&5
+echo "configure:5441: 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 5145 "configure"
+#line 5446 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:5153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5454: \"$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:5178: checking for opendir in -ldir" >&5
+echo "configure:5479: 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 5186 "configure"
+#line 5487 "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:5197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5498: \"$ac_link\") 1>&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:5219: checking for opendir in -lx" >&5
+echo "configure:5520: 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 5227 "configure"
+#line 5528 "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:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5539: \"$ac_link\") 1>&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:5264: checking for $ac_hdr" >&5
+echo "configure:5565: 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 5269 "configure"
+#line 5570 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5575: \"$ac_try\") 1>&5; (eval $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:5304: checking for $ac_hdr" >&5
+echo "configure:5605: 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 5309 "configure"
+#line 5610 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5615: \"$ac_try\") 1>&5; (eval $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:5344: checking for $ac_hdr" >&5
+echo "configure:5645: 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 5349 "configure"
+#line 5650 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5655: \"$ac_try\") 1>&5; (eval $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:5384: checking for $ac_hdr" >&5
+echo "configure:5685: 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 5389 "configure"
+#line 5690 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5695: \"$ac_try\") 1>&5; (eval $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:5424: checking for $ac_hdr" >&5
+echo "configure:5725: 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 5429 "configure"
+#line 5730 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5735: \"$ac_try\") 1>&5; (eval $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:5464: checking for $ac_hdr" >&5
+echo "configure:5765: 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 5469 "configure"
+#line 5770 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5775: \"$ac_try\") 1>&5; (eval $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:5518: checking for $ac_func" >&5
+echo "configure:5819: checking for $ac_func" >&5
if 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 5523 "configure"
+#line 5824 "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:5546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5847: \"$ac_link\") 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:5573: checking for $ac_func" >&5
+echo "configure:5874: checking for $ac_func" >&5
if 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 5578 "configure"
+#line 5879 "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:5601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5902: \"$ac_link\") 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:5629: checking for $ac_func" >&5
+echo "configure:5930: checking for $ac_func" >&5
if 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 5634 "configure"
+#line 5935 "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:5657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5958: \"$ac_link\") 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:5682: checking for POSIX regex library" >&5
+echo "configure:5983: 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:5697: checking for ssize_t" >&5
+echo "configure:5998: 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 5702 "configure"
+#line 6003 "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:5730: checking size of long" >&5
+echo "configure:6031: 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 5738 "configure"
+#line 6039 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:5749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6050: \"$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:5772: checking for $ac_func" >&5
+echo "configure:6073: checking for $ac_func" >&5
if 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 5777 "configure"
+#line 6078 "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:5800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6101: \"$ac_link\") 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:5904: checking for $ac_word" >&5
+echo "configure:6205: 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:5936: checking for $ac_word" >&5
+echo "configure:6237: 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:5971: checking for $ac_word" >&5
+echo "configure:6272: 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:6006: checking for $ac_word" >&5
+echo "configure:6307: 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:6041: checking for $ac_word" >&5
+echo "configure:6342: 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:6076: checking for $ac_word" >&5
+echo "configure:6377: 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:6111: checking for $ac_word" >&5
+echo "configure:6412: 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:6146: checking for $ac_word" >&5
+echo "configure:6447: 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:6181: checking for $ac_word" >&5
+echo "configure:6482: 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
YACC="byacc"
;;
- *nbsd20)
+ *nbsd2*)
LEX="flex -l"
MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -D_REENTRANT '
MT_LIBS="-lpthread" # XXX -pthread soon
YACC="bison -y"
;;
- ia64_linux24)
+ ia64_linux24|ia64_linux26)
KERN_OPTMZ=-O2
LEX="flex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
SHLIB_LINKER="${MT_CC} -shared"
;;
+ i386_umlinux26)
+ CC="gcc -pipe"
+ CCOBJ="gcc -pipe"
+ MT_CC="gcc -pipe"
+ KERN_OPTMZ=-O2
+ LEX="flex -l"
+ MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+ MT_LIBS="-lpthread"
+ DBG=-g
+ KERN_DBG=-g
+ LWP_DBG=-g
+ LWP_OPTMZ=-O2
+ OPTMZ=-O2
+ PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
+ SHLIB_LDFLAGS="-shared -Xlinker -x"
+ TXLIBS="-lncurses"
+ XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
+ SHLIB_LINKER="${MT_CC} -shared"
+ ;;
+
*_obsd*)
LEX="flex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
sgi_6*)
echo $ac_n "checking for mem* in sys/systm.h""... $ac_c" 1>&6
-echo "configure:7026: checking for mem* in sys/systm.h" >&5
+echo "configure:7347: 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 7034 "configure"
+#line 7355 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/systm.h>
; return 0; }
EOF
-if { (eval echo configure:7044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_irix_sys_systm_h_has_mem_funcs=no
else
s%@LEX@%$LEX%g
s%@LEXLIB@%$LEXLIB%g
s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
+s%@HEADER_RT@%$HEADER_RT%g
s%@P5PLUS_KOPTS@%$P5PLUS_KOPTS%g
s%@LINUX_GCC_KOPTS@%$LINUX_GCC_KOPTS%g
s%@RHCONFIG_SP@%$RHCONFIG_SP%g
s%@RHCONFIG_MP@%$RHCONFIG_MP%g
s%@MPS@%$MPS%g
-s%@HEADER_RT@%$HEADER_RT%g
s%@PTHREAD_LIBS@%$PTHREAD_LIBS%g
s%@XBSA_CFLAGS@%$XBSA_CFLAGS%g
s%@HAVE_PAM@%$HAVE_PAM%g
PACKAGE=openafs-libafs
-VERSION=1.3.74
+VERSION=1.3.77
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; }
system=$host
case $system in
*-linux*)
+
MKAFS_OSTYPE=LINUX
if test "x$enable_redhat_buildsys" = "xyes"; then
cat >> confdefs.h <<\EOF
SUBARCH=default
fi
echo "$ac_t""linux" 1>&6
- if test "x$enable_kernel_module" = "xyes"; then
- if test "x$enable_debug_kernel" = "xno"; then
- LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fomit-frame-pointer"
- fi
-
-echo $ac_n "checking if $CC accepts -march=pentium""... $ac_c" 1>&6
-echo "configure:2249: checking if $CC accepts -march=pentium" >&5
-save_CFLAGS="$CFLAGS"
-CFLAGS="-MARCH=pentium"
-if eval "test \"`echo '$''{'openafs_gcc_supports_march'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2257 "configure"
-#include "confdefs.h"
-
-int main() {
-int x;
-; return 0; }
-EOF
-if { (eval echo configure:2264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- openafs_gcc_supports_march=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- openafs_gcc_supports_march=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$openafs_gcc_supports_march" 1>&6
-if test x$openafs_gcc_supports_march = xyes; then
- P5PLUS_KOPTS="-march=pentium"
-else
- P5PLUS_KOPTS="-m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2"
-fi
-CFLAGS="$save_CFLAGS"
-
-
-
-echo $ac_n "checking if $CC needs -fno-strength-reduce""... $ac_c" 1>&6
-echo "configure:2287: 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
+ if test "x$enable_kernel_module" = "xyes"; then
+ AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $1 $2}'`
+ if test "x${AFS_SYSKVERS}" = "x"; then
+ { echo "configure: error: Couldn't guess your Linux version 2" 1>&2; exit 1; }
+ fi
+ fi
+ ;;
+ *-solaris*)
+ MKAFS_OSTYPE=SOLARIS
+ echo "$ac_t""sun4" 1>&6
+
+echo $ac_n "checking for vfs_dqrwlock in struct ufsvfs""... $ac_c" 1>&6
+echo "configure:2256: checking for vfs_dqrwlock in struct ufsvfs" >&5
+if eval "test \"`echo '$''{'ac_cv_solaris_ufsvfs_has_dqrwlock'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2295 "configure"
+#line 2262 "configure"
#include "confdefs.h"
-
+#define _KERNEL
+#include <sys/fs/ufs_inode.h>
int main() {
-int x;
+struct ufsvfs _ufsvfs;
+(void) _ufsvfs.vfs_dqrwlock;
; return 0; }
EOF
-if { (eval echo configure:2302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- openafs_gcc_needs_no_strength_reduce=yes
+ ac_cv_solaris_ufsvfs_has_dqrwlock=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- openafs_gcc_needs_no_strength_reduce=no
+ ac_cv_solaris_ufsvfs_has_dqrwlock=no
fi
rm -f conftest*
fi
-echo "$ac_t""$openafs_gcc_needs_no_strength_reduce" 1>&6
-if test x$openafs_gcc_needs_no_strength_reduce = xyes; then
- LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strength-reduce"
-fi
-CFLAGS="$save_CFLAGS"
-
-
-echo $ac_n "checking if $CC needs -fno-strict-aliasing""... $ac_c" 1>&6
-echo "configure:2322: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2330 "configure"
-#include "confdefs.h"
-
-int main() {
-int x;
-; return 0; }
+echo "$ac_t""$ac_cv_solaris_ufsvfs_has_dqrwlock" 1>&6
+if test "$ac_cv_solaris_ufsvfs_has_dqrwlock" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_VFS_DQRWLOCK 1
EOF
-if { (eval echo configure:2337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- openafs_gcc_needs_no_strict_aliasing=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- openafs_gcc_needs_no_strict_aliasing=no
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$openafs_gcc_needs_no_strict_aliasing" 1>&6
-if test x$openafs_gcc_needs_no_strict_aliasing = xyes; then
- LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strict-aliasing"
fi
-CFLAGS="$save_CFLAGS"
-
-echo $ac_n "checking if $CC supports -fno-common""... $ac_c" 1>&6
-echo "configure:2357: 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
+
+echo $ac_n "checking for p_corefile in struct proc""... $ac_c" 1>&6
+echo "configure:2293: checking for p_corefile in struct proc" >&5
+if eval "test \"`echo '$''{'ac_cv_solaris_proc_has_p_corefile'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2365 "configure"
+#line 2299 "configure"
#include "confdefs.h"
-
+#define _KERNEL
+#include <sys/proc.h>
int main() {
-int x;
+struct proc _proc;
+(void) _proc.p_corefile;
; return 0; }
EOF
-if { (eval echo configure:2372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- openafs_gcc_supports_no_common=yes
+ ac_cv_solaris_proc_has_p_corefile=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- openafs_gcc_supports_no_common=no
+ ac_cv_solaris_proc_has_p_corefile=no
fi
rm -f conftest*
fi
-echo "$ac_t""$openafs_gcc_supports_no_common" 1>&6
-if test x$openafs_gcc_supports_no_common = xyes; then
- LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-common"
-fi
-CFLAGS="$save_CFLAGS"
-
-
-echo $ac_n "checking if $CC supports -pipe""... $ac_c" 1>&6
-echo "configure:2392: checking if $CC supports -pipe" >&5
-save_CFLAGS="$CFLAGS"
-CFLAGS="-pipe"
-if eval "test \"`echo '$''{'openafs_gcc_supports_pipe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2400 "configure"
-#include "confdefs.h"
-
-int main() {
-int x;
-; return 0; }
+echo "$ac_t""$ac_cv_solaris_proc_has_p_corefile" 1>&6
+if test "$ac_cv_solaris_proc_has_p_corefile" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_P_COREFILE 1
EOF
-if { (eval echo configure:2407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- openafs_gcc_supports_pipe=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- openafs_gcc_supports_pipe=no
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$openafs_gcc_supports_pipe" 1>&6
-if test x$openafs_gcc_supports_pipe = xyes; then
- LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -pipe"
fi
-CFLAGS="$save_CFLAGS"
-
-
-
-echo $ac_n "checking whether to build osi_vfs.h""... $ac_c" 1>&6
-echo "configure:2428: checking whether to build osi_vfs.h" >&5
-configdir=src/config
-outputdir=afs
-tmpldir=src/afs/LINUX
-chmod +x $configdir/make_vnode.pl
-$configdir/make_vnode.pl -i $LINUX_KERNEL_PATH -t ${tmpldir} -o $outputdir
-
-echo $ac_n "checking for linux/completion.h existance""... $ac_c" 1>&6
-echo "configure:2437: 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
+
+echo $ac_n "checking for fs_rolled in struct proc""... $ac_c" 1>&6
+echo "configure:2330: checking for fs_rolled in struct proc" >&5
+if eval "test \"`echo '$''{'ac_cv_solaris_fs_has_fs_rolled'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2445 "configure"
+#line 2336 "configure"
#include "confdefs.h"
-#include <linux/completion.h>
-#include <linux/version.h>
+#include <sys/fs/ufs_fs.h>
int main() {
-struct completion _c;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,8)
-lose
-#endif
-
+struct fs _fs;
+(void) _fs.fs_rolled;
; return 0; }
EOF
-if { (eval echo configure:2457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- ac_cv_linux_completion_h_exists=yes
+ ac_cv_solaris_fs_has_fs_rolled=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- ac_cv_linux_completion_h_exists=no
+ ac_cv_solaris_fs_has_fs_rolled=no
fi
rm -f conftest*
fi
-echo "$ac_t""$ac_cv_linux_completion_h_exists" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for defined for_each_process""... $ac_c" 1>&6
-echo "configure:2473: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2481 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-#ifndef for_each_process(p)
-#error for_each_process not defined
-#endif
-; return 0; }
+echo "$ac_t""$ac_cv_solaris_fs_has_fs_rolled" 1>&6
+if test "$ac_cv_solaris_fs_has_fs_rolled" = "yes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_FS_HAS_FS_ROLLED 1
EOF
-if { (eval echo configure:2490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_defines_for_each_process=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_defines_for_each_process=no
-fi
-rm -f conftest*
-fi
-echo "$ac_t""$ac_cv_linux_defines_for_each_process" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for defined prev_task""... $ac_c" 1>&6
-echo "configure:2506: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2514 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-#ifndef prev_task(p)
-#error prev_task not defined
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:2523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_defines_prev_task=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_defines_prev_task=no
-fi
-rm -f conftest*
fi
-echo "$ac_t""$ac_cv_linux_defines_prev_task" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported tasklist_lock""... $ac_c" 1>&6
-echo "configure:2539: checking for exported tasklist_lock" >&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_tasklist_lock'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2547 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_tasklist_lock
-#error tasklist_lock not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:2556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_tasklist_lock=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_tasklist_lock=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_tasklist_lock" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for page_lock in struct address_space""... $ac_c" 1>&6
-echo "configure:2572: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2580 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct address_space _a_s;
-printf("%x\n", _a_s.page_lock);
-; return 0; }
-EOF
-if { (eval echo configure:2588: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_fs_struct_address_space_has_page_lock=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_fs_struct_address_space_has_page_lock" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for gfp_mask in struct address_space""... $ac_c" 1>&6
-echo "configure:2604: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2612 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct address_space _a;
-printf("%d\n", _a.gfp_mask);
-; return 0; }
-EOF
-if { (eval echo configure:2620: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_fs_struct_address_space_has_gfp_mask=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_fs_struct_address_space_has_gfp_mask" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for i_alloc_sem in struct inode""... $ac_c" 1>&6
-echo "configure:2636: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2644 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct inode _i;
-printf("%x\n", _i.i_alloc_sem);
-; return 0; }
-EOF
-if { (eval echo configure:2652: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_fs_struct_inode_has_i_alloc_sem=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for i_truncate_sem in struct inode""... $ac_c" 1>&6
-echo "configure:2668: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2676 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct inode _i;
-printf("%x\n", _i.i_truncate_sem);
-; return 0; }
-EOF
-if { (eval echo configure:2684: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_fs_struct_inode_has_i_truncate_sem=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for i_dirty_data_buffers in struct inode""... $ac_c" 1>&6
-echo "configure:2700: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2708 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct inode _inode;
-printf("%d\n", _inode.i_dirty_data_buffers);
-; return 0; }
-EOF
-if { (eval echo configure:2716: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=no
-fi
-rm -f conftest*
-fi
+ ;;
+ *-sunos*)
+ MKAFS_OSTYPE=SUNOS
+ enable_kernel_module=no
+ echo "$ac_t""sun4" 1>&6
+ ;;
+ *-hpux*)
+ MKAFS_OSTYPE=HPUX
+ echo "$ac_t""hp_ux" 1>&6
+ ;;
+ *-irix*)
+ if test -d /usr/include/sys/SN/SN1; then
+ IRIX_BUILD_IP35="IP35"
+ fi
+ MKAFS_OSTYPE=IRIX
+ echo "$ac_t""sgi" 1>&6
+ ;;
+ *-aix*)
+ MKAFS_OSTYPE=AIX
+ echo "$ac_t""rs_aix" 1>&6
+ ;;
+ *-osf*)
+ MKAFS_OSTYPE=DUX
+ echo "$ac_t""alpha_dux" 1>&6
+ if test "x$enable_kernel_module" = "xyes"; then
+ if test "x$with_dux_kernel_headers" != "x"; then
+ HEADER_RT=`ls ${with_dux_kernel_headers}/rt_preempt.h | head -1 | sed 's,/rt_preempt.h,,;s,/usr/sys/,,'`
+ else
+ HEADER_RT=`ls /usr/sys/*/rt_preempt.h | head -1 | sed 's,/rt_preempt.h,,;s,/usr/sys/,,'`
+ fi
+ fi
+ if test "$HEADER_RT" = "*" ; then
+ { echo "configure: error: Need a configured kernel directory" 1>&2; exit 1; }
+ fi
+
+ ;;
+ *-darwin*)
+ MKAFS_OSTYPE=DARWIN
+ echo "$ac_t""ppc_darwin" 1>&6
+ ;;
+ *-freebsd*)
+ MKAFS_OSTYPE=FBSD
+ echo "$ac_t""i386_fbsd" 1>&6
+ ;;
+ *-netbsd*)
+ MKAFS_OSTYPE=NBSD
+ echo "$ac_t""nbsd" 1>&6
+ ;;
+ *-openbsd*)
+ MKAFS_OSTYPE=OBSD
+ echo "$ac_t""i386_obsd" 1>&6
+ ;;
+ *)
+ echo "$ac_t""$system" 1>&6
+ ;;
+esac
-echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for i_devices in struct inode""... $ac_c" 1>&6
-echo "configure:2732: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2740 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct inode _inode;
-printf("%d\n", _inode.i_devices);
-; return 0; }
-EOF
-if { (eval echo configure:2748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_fs_struct_inode_has_i_devices=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_fs_struct_inode_has_i_devices=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_devices" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for i_security in struct inode""... $ac_c" 1>&6
-echo "configure:2764: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2772 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct inode _inode;
-printf("%d\n", _inode.i_security);
-; return 0; }
-EOF
-if { (eval echo configure:2780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_fs_struct_inode_has_i_security=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_fs_struct_inode_has_i_security=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_security" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for inode_setattr return type""... $ac_c" 1>&6
-echo "configure:2796: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2804 "configure"
-#include "confdefs.h"
-#include <linux/fs.h>
-int main() {
-struct inode _inode;
-struct iattr _iattr;
-int i;
-i = inode_setattr(&_inode, &_iattr);
-; return 0; }
-EOF
-if { (eval echo configure:2814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_func_inode_setattr_returns_int=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_func_inode_setattr_returns_int=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_func_inode_setattr_returns_int" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
- echo $ac_n "checking for linux/syscall.h in kernel""... $ac_c" 1>&6
-echo "configure:2830: 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
- else
- ac_linux_syscall=no
- echo "$ac_t""$ac_linux_syscall" 1>&6
- fi
-
-
-echo $ac_n "checking for SELinux kernel""... $ac_c" 1>&6
-echo "configure:2841: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2849 "configure"
-#include "confdefs.h"
-#include <linux/autoconf.h>
-int main() {
-#ifndef CONFIG_SECURITY_SELINUX
- #error not SELINUX
- #endif
-; return 0; }
-EOF
-if { (eval echo configure:2858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_kernel_is_selinux=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_kernel_is_selinux=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_kernel_is_selinux" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for 5th argument in sock_create found in some SELinux kernels""... $ac_c" 1>&6
-echo "configure:2874: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2882 "configure"
-#include "confdefs.h"
-#include <linux/net.h>
-int main() {
-
- sock_create(0,0,0,0,0)
-
-; return 0; }
-EOF
-if { (eval echo configure:2891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_kernel_sock_create_v=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_kernel_sock_create_v=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_kernel_sock_create_v" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-RHCONFIG_SP=""
-RHCONFIG_MP=""
-if test "x$enable_redhat_buildsys" = "xyes"; then
- echo "configure: warning: Configured to build from a Red Hat SPEC file" 1>&2
-else
- echo $ac_n "checking for redhat kernel configuration""... $ac_c" 1>&6
-echo "configure:2912: 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"
- RHCONFIG_MP="-D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=1"
- echo "$ac_t""$ac_linux_rhconfig" 1>&6
- if test ! -f "/boot/kernel.h"; then
- echo "configure: warning: /boot/kernel.h does not exist. build may fail" 1>&2
- fi
- else
- ac_linux_rhconfig=no
- echo "$ac_t""$ac_linux_rhconfig" 1>&6
- fi
-fi
-
-
-
-
-echo $ac_n "checking for recalc_sigpending arg type""... $ac_c" 1>&6
-echo "configure:2931: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2939 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-recalc_sigpending();
-; return 0; }
-EOF
-if { (eval echo configure:2946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_func_recalc_sigpending_takes_void=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_func_recalc_sigpending_takes_void=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_func_recalc_sigpending_takes_void" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for parent in struct task_struct""... $ac_c" 1>&6
-echo "configure:2962: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 2970 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-struct task_struct _tsk;
-printf("%d\n", _tsk.parent);
-; return 0; }
-EOF
-if { (eval echo configure:2978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_parent=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_parent=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_parent" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for real_parent in struct task_struct""... $ac_c" 1>&6
-echo "configure:2994: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3002 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-struct task_struct _tsk;
-printf("%d\n", _tsk.real_parent);
-; return 0; }
-EOF
-if { (eval echo configure:3010: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_real_parent=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_real_parent" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for sig in struct task_struct""... $ac_c" 1>&6
-echo "configure:3026: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3034 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-struct task_struct _tsk;
-printf("%d\n", _tsk.sig);
-; return 0; }
-EOF
-if { (eval echo configure:3042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_sig=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_sig=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sig" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for sighand in struct task_struct""... $ac_c" 1>&6
-echo "configure:3058: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3066 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-struct task_struct _tsk;
-printf("%d\n", _tsk.sighand);
-; return 0; }
-EOF
-if { (eval echo configure:3074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_sighand=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_sighand=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sighand" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for sigmask_lock in struct task_struct""... $ac_c" 1>&6
-echo "configure:3090: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3098 "configure"
-#include "confdefs.h"
-#include <linux/sched.h>
-int main() {
-struct task_struct _tsk;
-printf("%d\n", _tsk.sigmask_lock);
-; return 0; }
-EOF
-if { (eval echo configure:3106: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_sched_struct_task_struct_has_sigmask_lock=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-if test "x$enable_redhat_buildsys" = "xyes"; then
- MPS=Default
-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:3127: 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 3133 "configure"
-#include "confdefs.h"
-#include <linux/version.h>
-#include <linux/config.h>
-
-int main() {
-#if !defined(CONFIG_MODVERSIONS) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
-lose;
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_config_modversions=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_config_modversions=no
-fi
-rm -f conftest*
-fi
-
- echo "$ac_t""$ac_cv_linux_config_modversions" 1>&6
- echo $ac_n "checking which kernel modules to build""... $ac_c" 1>&6
-echo "configure:3159: checking which kernel modules to build" >&5
- if test "x$ac_linux_rhconfig" = "xyes" -o "x$ac_cv_linux_config_modversions" = "xno"; then
- MPS="MP SP"
- else
- if eval "test \"`echo '$''{'ac_cv_linux_config_smp'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- cat > conftest.$ac_ext <<EOF
-#line 3168 "configure"
-#include "confdefs.h"
-#include <linux/config.h>
-
-int main() {
-#ifndef CONFIG_SMP
-lose;
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_config_smp=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_config_smp=no
-fi
-rm -f conftest*
-fi
-
- if test "x$ac_cv_linux_config_smp" = "xyes"; then
- MPS=MP
- else
- MPS=SP
- fi
- fi
- CPPFLAGS=$save_CPPFLAGS
- echo "$ac_t""$MPS" 1>&6
-fi
-
-
- if test "x$ac_cv_linux_config_modversions" = "xno"; then
- echo "configure: warning: Cannot determine sys_call_table status. assuming it isn't exported" 1>&2
- ac_cv_linux_exports_sys_call_table=no
- if test -f "$LINUX_KERNEL_PATH/include/asm/ia32_unistd.h"; then
- ac_cv_linux_exports_ia32_sys_call_table=yes
- fi
- else
-
-echo $ac_n "checking for exported init_mm""... $ac_c" 1>&6
-echo "configure:3211: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3219 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_init_mm
-#error init_mm not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_init_mm=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_init_mm=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_init_mm" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported kallsyms_address_to_symbol""... $ac_c" 1>&6
-echo "configure:3244: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3252 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_kallsyms_address_to_symbol
-#error kallsyms_address_to_symbol not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_kallsyms_address=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_kallsyms_address=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_kallsyms_address" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported kallsyms_symbol_to_address""... $ac_c" 1>&6
-echo "configure:3277: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3285 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_kallsyms_symbol_to_address
-#error kallsyms_symbol_to_address not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_kallsyms_symbol=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_kallsyms_symbol=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_kallsyms_symbol" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported sys_call_table""... $ac_c" 1>&6
-echo "configure:3310: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3318 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_sys_call_table
-#error sys_call_table not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_sys_call_table=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_sys_call_table=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_sys_call_table" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported ia32_sys_call_table""... $ac_c" 1>&6
-echo "configure:3343: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3351 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_ia32_sys_call_table
-#error ia32_sys_call_table not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_ia32_sys_call_table=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_ia32_sys_call_table=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_ia32_sys_call_table" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported sys_chdir""... $ac_c" 1>&6
-echo "configure:3376: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3384 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_sys_chdir
-#error sys_chdir not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_sys_chdir=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_sys_chdir=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_sys_chdir" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported sys_close""... $ac_c" 1>&6
-echo "configure:3409: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3417 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_sys_close
-#error sys_close not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_sys_close=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_sys_close=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_sys_close" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
-
-echo $ac_n "checking for exported sys_wait4""... $ac_c" 1>&6
-echo "configure:3442: 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
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3450 "configure"
-#include "confdefs.h"
-#include <linux/modversions.h>
-int main() {
-#ifndef __ver_sys_wait4
-#error sys_wait4 not exported
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_linux_exports_sys_wait4=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_linux_exports_sys_wait4=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_linux_exports_sys_wait4" 1>&6
-CPPFLAGS="$save_CPPFLAGS"
- if test "x$ac_cv_linux_exports_sys_call_table" = "xno"; then
- linux_syscall_method=none
- if test "x$ac_cv_linux_exports_init_mm" = "xyes"; then
- linux_syscall_method=scan
- if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
- linux_syscall_method=scan_with_kallsyms_address
- fi
- fi
- if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
- linux_syscall_method=kallsyms_symbol
- fi
- if test "x$linux_syscall_method" = "xnone"; then
- { echo "configure: error: no available sys_call_table access method" 1>&2; exit 1; }
- fi
- fi
- fi
- if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_IN_SYSTM_H 1
-EOF
-
- fi
- if test -f "$LINUX_KERNEL_PATH/include/linux/mm_inline.h"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_MM_INLINE_H 1
-EOF
-
- fi
- if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_IN_SYSTM_H 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_sys_chdir" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_SYS_CHDIR 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_sys_close" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_SYS_CLOSE 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_sys_wait4" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_SYS_WAIT4 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_TASKLIST_LOCK 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_sys_call_table" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_SYS_CALL_TABLE 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_ia32_sys_call_table" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_IA32_SYS_CALL_TABLE 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_KALLSYMS_SYMBOL 1
-EOF
-
- fi
- if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define EXPORTED_KALLSYMS_ADDRESS 1
-EOF
-
- fi
- if test "x$ac_cv_linux_completion_h_exists" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define COMPLETION_H_EXISTS 1
-EOF
-
- fi
- if test "x$ac_cv_linux_defines_for_each_process" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define DEFINED_FOR_EACH_PROCESS 1
-EOF
-
- fi
- if test "x$ac_cv_linux_defines_prev_task" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define DEFINED_PREV_TASK 1
-EOF
-
- fi
- if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define INODE_SETATTR_NOT_VOID 1
-EOF
-
- fi
- if test "x$ac_cv_linux_fs_struct_address_space_has_page_lock" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK 1
-EOF
-
- fi
- if test "x$ac_cv_linux_fs_struct_address_space_has_gfp_mask" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_ADDRESS_SPACE_HAS_GFP_MASK 1
-EOF
-
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_INODE_HAS_I_TRUNCATE_SEM 1
-EOF
-
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_INODE_HAS_I_ALLOC_SEM 1
-EOF
-
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_devices" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_INODE_HAS_I_DEVICES 1
-EOF
-
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_security" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_INODE_HAS_I_SECURITY 1
-EOF
-
- fi
- if test "x$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS 1
-EOF
-
- fi
- if test "x$ac_cv_linux_func_recalc_sigpending_takes_void" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define RECALC_SIGPENDING_TAKES_VOID 1
-EOF
-
- fi
- if test "x$ac_cv_linux_kernel_is_selinux" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define LINUX_KERNEL_IS_SELINUX 1
-EOF
-
- fi
- if test "x$ac_cv_linux_kernel_sock_create_v" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define LINUX_KERNEL_SOCK_CREATE_V 1
-EOF
-
- fi
- if test "x$ac_linux_syscall" = "xyes" ; then
- cat >> confdefs.h <<\EOF
-#define HAVE_KERNEL_LINUX_SYSCALL_H 1
-EOF
-
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_parent" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_TASK_STRUCT_HAS_PARENT 1
-EOF
-
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_real_parent" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_TASK_STRUCT_HAS_REAL_PARENT 1
-EOF
-
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK 1
-EOF
-
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_sighand" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_TASK_STRUCT_HAS_SIGHAND 1
-EOF
-
- fi
- if test "x$ac_cv_linux_sched_struct_task_struct_has_sig" = "xyes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_TASK_STRUCT_HAS_SIG 1
-EOF
-
- fi
- :
- fi
- ;;
- *-solaris*)
- MKAFS_OSTYPE=SOLARIS
- echo "$ac_t""sun4" 1>&6
-
-echo $ac_n "checking for vfs_dqrwlock in struct ufsvfs""... $ac_c" 1>&6
-echo "configure:3683: checking for vfs_dqrwlock in struct ufsvfs" >&5
-if eval "test \"`echo '$''{'ac_cv_solaris_ufsvfs_has_dqrwlock'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3689 "configure"
-#include "confdefs.h"
-#define _KERNEL
-#include <sys/fs/ufs_inode.h>
-int main() {
-struct ufsvfs _ufsvfs;
-(void) _ufsvfs.vfs_dqrwlock;
-; return 0; }
-EOF
-if { (eval echo configure:3698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_solaris_ufsvfs_has_dqrwlock=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_solaris_ufsvfs_has_dqrwlock=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_solaris_ufsvfs_has_dqrwlock" 1>&6
-if test "$ac_cv_solaris_ufsvfs_has_dqrwlock" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_VFS_DQRWLOCK 1
-EOF
-
-fi
-
-
-echo $ac_n "checking for p_corefile in struct proc""... $ac_c" 1>&6
-echo "configure:3720: checking for p_corefile in struct proc" >&5
-if eval "test \"`echo '$''{'ac_cv_solaris_proc_has_p_corefile'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3726 "configure"
-#include "confdefs.h"
-#define _KERNEL
-#include <sys/proc.h>
-int main() {
-struct proc _proc;
-(void) _proc.p_corefile;
-; return 0; }
-EOF
-if { (eval echo configure:3735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_solaris_proc_has_p_corefile=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_solaris_proc_has_p_corefile=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_solaris_proc_has_p_corefile" 1>&6
-if test "$ac_cv_solaris_proc_has_p_corefile" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_P_COREFILE 1
-EOF
-
-fi
-
-
-echo $ac_n "checking for fs_rolled in struct proc""... $ac_c" 1>&6
-echo "configure:3757: checking for fs_rolled in struct proc" >&5
-if eval "test \"`echo '$''{'ac_cv_solaris_fs_has_fs_rolled'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
-cat > conftest.$ac_ext <<EOF
-#line 3763 "configure"
-#include "confdefs.h"
-#include <sys/fs/ufs_fs.h>
-int main() {
-struct fs _fs;
-(void) _fs.fs_rolled;
-; return 0; }
-EOF
-if { (eval echo configure:3771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_solaris_fs_has_fs_rolled=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_solaris_fs_has_fs_rolled=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_solaris_fs_has_fs_rolled" 1>&6
-if test "$ac_cv_solaris_fs_has_fs_rolled" = "yes"; then
- cat >> confdefs.h <<\EOF
-#define STRUCT_FS_HAS_FS_ROLLED 1
-EOF
-
-fi
-
- ;;
- *-sunos*)
- MKAFS_OSTYPE=SUNOS
- enable_kernel_module=no
- echo "$ac_t""sun4" 1>&6
- ;;
- *-hpux*)
- MKAFS_OSTYPE=HPUX
- echo "$ac_t""hp_ux" 1>&6
- ;;
- *-irix*)
- if test -d /usr/include/sys/SN/SN1; then
- IRIX_BUILD_IP35="IP35"
- fi
- MKAFS_OSTYPE=IRIX
- echo "$ac_t""sgi" 1>&6
- ;;
- *-aix*)
- MKAFS_OSTYPE=AIX
- echo "$ac_t""rs_aix" 1>&6
- ;;
- *-osf*)
- MKAFS_OSTYPE=DUX
- echo "$ac_t""alpha_dux" 1>&6
- if test "x$enable_kernel_module" = "xyes"; then
- if test "x$with_dux_kernel_headers" != "x"; then
- HEADER_RT=`ls ${with_dux_kernel_headers}/rt_preempt.h | head -1 | sed 's,/rt_preempt.h,,;s,/usr/sys/,,'`
- else
- HEADER_RT=`ls /usr/sys/*/rt_preempt.h | head -1 | sed 's,/rt_preempt.h,,;s,/usr/sys/,,'`
- fi
- fi
- if test "$HEADER_RT" = "*" ; then
- { echo "configure: error: Need a configured kernel directory" 1>&2; exit 1; }
- fi
-
- ;;
- *-darwin*)
- MKAFS_OSTYPE=DARWIN
- echo "$ac_t""ppc_darwin" 1>&6
- ;;
- *-freebsd*)
- MKAFS_OSTYPE=FBSD
- echo "$ac_t""i386_fbsd" 1>&6
- ;;
- *-netbsd*)
- MKAFS_OSTYPE=NBSD
- echo "$ac_t""nbsd" 1>&6
- ;;
- *-openbsd*)
- MKAFS_OSTYPE=OBSD
- echo "$ac_t""i386_obsd" 1>&6
- ;;
- *)
- echo "$ac_t""$system" 1>&6
- ;;
-esac
-
-if test "x$with_afs_sysname" != "x"; then
- AFS_SYSNAME="$with_afs_sysname"
+if test "x$with_afs_sysname" != "x"; then
+ AFS_SYSNAME="$with_afs_sysname"
else
echo $ac_n "checking your AFS sysname""... $ac_c" 1>&6
-echo "configure:3852: checking your AFS sysname" >&5
+echo "configure:2425: checking your AFS sysname" >&5
case $host in
i?86-*-openbsd3.1)
AFS_SYSNAME="i386_obsd31"
AFS_PARAM_COMMON=param.nbsd16.h
AFS_SYSNAME="ppc_nbsd16"
;;
+ i?86-*-netbsd*2.99*)
+ AFS_PARAM_COMMON=param.nbsd21.h
+ AFS_SYSNAME="i386_nbsd21"
+ ;;
hppa*-hp-hpux11.0*)
AFS_SYSNAME="hp_ux110"
;;
;;
power*-ibm-aix4.2*)
AFS_SYSNAME="rs_aix42"
+ enable_pam="no"
;;
power*-ibm-aix4.3*)
AFS_SYSNAME="rs_aix42"
+ enable_pam="no"
;;
power*-ibm-aix5.1*)
AFS_SYSNAME="rs_aix51"
+ enable_pam="no"
;;
power*-ibm-aix5.2*)
AFS_SYSNAME="rs_aix52"
+ enable_pam="no"
;;
x86_64-*-linux-gnu)
AFS_SYSNAME="amd64_linuxXX"
;;
esac
case $AFS_SYSNAME in
- *_linux*)
- AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $1 $2}'`
+ *_linux* | *_umlinux*)
if test "x${AFS_SYSKVERS}" = "x"; then
{ echo "configure: error: Couldn't guess your Linux version. Please use the --with-afs-sysname option to configure an AFS sysname." 1>&2; exit 1; }
fi
- _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/XX\$/$AFS_SYSKVERS/`
+ _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/XX\$/$AFS_SYSKVERS/`
+ AFS_SYSNAME="$_AFS_SYSNAME"
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I${LINUX_KERNEL_PATH}/include $CPPFLAGS"
+ cat > conftest.$ac_ext <<EOF
+#line 2703 "configure"
+#include "confdefs.h"
+#include <linux/autoconf.h>
+int main() {
+#ifndef CONFIG_USERMODE
+ #error not UML
+ #endif
+; return 0; }
+EOF
+if { (eval echo configure:2712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_is_uml=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ if test "${ac_cv_linux_is_uml}" = yes; then
+ _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/linux/umlinux/`
+ fi
+ CPPFLAGS="$save_CPPFLAGS"
AFS_SYSNAME="$_AFS_SYSNAME"
- save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="-I${LINUX_KERNEL_PATH}/include $CPPFLAGS"
- cat > conftest.$ac_ext <<EOF
-#line 4123 "configure"
+ ;;
+ esac
+ echo "$ac_t""$AFS_SYSNAME" 1>&6
+fi
+
+case $AFS_SYSNAME in *_linux* | *_umlinux*)
+
+ # Add (sub-) architecture-specific paths needed by conftests
+ case $AFS_SYSNAME in
+ *_umlinux26)
+ UMLINUX26_FLAGS="-I$LINUX_KERNEL_PATH/arch/um/include"
+ UMLINUX26_FLAGS="$UMLINUX26_FLAGS -I$LINUX_KERNEL_PATH/arch/um/kernel/tt/include"
+ UMLINUX26_FLAGS="$UMLINUX26_FLAGS -I$LINUX_KERNEL_PATH/arch/um/kernel/skas/include"
+ CPPFLAGS="$CPPFLAGS $UMLINUX26_FLAGS"
+ esac
+
+ if test "x$enable_kernel_module" = "xyes"; then
+ if test "x$enable_debug_kernel" = "xno"; then
+ LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fomit-frame-pointer"
+ fi
+
+echo $ac_n "checking if $CC accepts -march=pentium""... $ac_c" 1>&6
+echo "configure:2747: checking if $CC accepts -march=pentium" >&5
+save_CFLAGS="$CFLAGS"
+CFLAGS="-MARCH=pentium"
+if eval "test \"`echo '$''{'openafs_gcc_supports_march'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 2755 "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
+ rm -rf conftest*
+ openafs_gcc_supports_march=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ openafs_gcc_supports_march=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$openafs_gcc_supports_march" 1>&6
+if test x$openafs_gcc_supports_march = xyes; then
+ P5PLUS_KOPTS="-march=pentium"
+else
+ P5PLUS_KOPTS="-m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2"
+fi
+CFLAGS="$save_CFLAGS"
+
+
+
+echo $ac_n "checking if $CC needs -fno-strength-reduce""... $ac_c" 1>&6
+echo "configure:2785: checking if $CC needs -fno-strength-reduce" >&5
+save_CFLAGS="$CFLAGS"
+CFLAGS="-fno-strength-reduce"
+if eval "test \"`echo '$''{'openafs_gcc_needs_no_strength_reduce'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 2793 "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
+ rm -rf conftest*
+ openafs_gcc_needs_no_strength_reduce=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ openafs_gcc_needs_no_strength_reduce=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$openafs_gcc_needs_no_strength_reduce" 1>&6
+if test x$openafs_gcc_needs_no_strength_reduce = xyes; then
+ LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strength-reduce"
+fi
+CFLAGS="$save_CFLAGS"
+
+
+echo $ac_n "checking if $CC needs -fno-strict-aliasing""... $ac_c" 1>&6
+echo "configure:2820: checking if $CC needs -fno-strict-aliasing" >&5
+save_CFLAGS="$CFLAGS"
+CFLAGS="-fno-strict-aliasing"
+if eval "test \"`echo '$''{'openafs_gcc_needs_no_strict_aliasing'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 2828 "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
+ rm -rf conftest*
+ openafs_gcc_needs_no_strict_aliasing=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ openafs_gcc_needs_no_strict_aliasing=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$openafs_gcc_needs_no_strict_aliasing" 1>&6
+if test x$openafs_gcc_needs_no_strict_aliasing = xyes; then
+ LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-strict-aliasing"
+fi
+CFLAGS="$save_CFLAGS"
+
+
+echo $ac_n "checking if $CC supports -fno-common""... $ac_c" 1>&6
+echo "configure:2855: checking if $CC supports -fno-common" >&5
+save_CFLAGS="$CFLAGS"
+CFLAGS="-fno-common"
+if eval "test \"`echo '$''{'openafs_gcc_supports_no_common'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 2863 "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
+ rm -rf conftest*
+ openafs_gcc_supports_no_common=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ openafs_gcc_supports_no_common=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$openafs_gcc_supports_no_common" 1>&6
+if test x$openafs_gcc_supports_no_common = xyes; then
+ LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -fno-common"
+fi
+CFLAGS="$save_CFLAGS"
+
+
+echo $ac_n "checking if $CC supports -pipe""... $ac_c" 1>&6
+echo "configure:2890: checking if $CC supports -pipe" >&5
+save_CFLAGS="$CFLAGS"
+CFLAGS="-pipe"
+if eval "test \"`echo '$''{'openafs_gcc_supports_pipe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 2898 "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
+ rm -rf conftest*
+ openafs_gcc_supports_pipe=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ openafs_gcc_supports_pipe=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$openafs_gcc_supports_pipe" 1>&6
+if test x$openafs_gcc_supports_pipe = xyes; then
+ LINUX_GCC_KOPTS="$LINUX_GCC_KOPTS -pipe"
+fi
+CFLAGS="$save_CFLAGS"
+
+
+
+echo $ac_n "checking whether to build osi_vfs.h""... $ac_c" 1>&6
+echo "configure:2926: checking whether to build osi_vfs.h" >&5
+configdir=src/config
+outputdir=afs
+tmpldir=src/afs/LINUX
+chmod +x $configdir/make_vnode.pl
+$configdir/make_vnode.pl -i $LINUX_KERNEL_PATH -t ${tmpldir} -o $outputdir
+
+
+echo $ac_n "checking for linux/completion.h existance""... $ac_c" 1>&6
+echo "configure:2935: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 2943 "configure"
+#include "confdefs.h"
+#include <linux/completion.h>
+#include <linux/version.h>
+int main() {
+struct completion _c;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,8)
+lose
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_completion_h_exists=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_completion_h_exists=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_completion_h_exists" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for defined for_each_process""... $ac_c" 1>&6
+echo "configure:2971: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 2979 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+#ifndef for_each_process(p)
+#error for_each_process not defined
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:2988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_defines_for_each_process=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_defines_for_each_process=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_defines_for_each_process" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for defined prev_task""... $ac_c" 1>&6
+echo "configure:3004: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3012 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+#ifndef prev_task(p)
+#error prev_task not defined
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:3021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_defines_prev_task=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_defines_prev_task=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_defines_prev_task" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported tasklist_lock""... $ac_c" 1>&6
+echo "configure:3037: checking for exported tasklist_lock" >&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_tasklist_lock'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3045 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_tasklist_lock
+#error tasklist_lock not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:3054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_tasklist_lock=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_tasklist_lock=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_tasklist_lock" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for page_lock in struct address_space""... $ac_c" 1>&6
+echo "configure:3070: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3078 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct address_space _a_s;
+printf("%x\n", _a_s.page_lock);
+; return 0; }
+EOF
+if { (eval echo configure:3086: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_address_space_has_page_lock=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_fs_struct_address_space_has_page_lock" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for gfp_mask in struct address_space""... $ac_c" 1>&6
+echo "configure:3102: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3110 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct address_space _a;
+printf("%d\n", _a.gfp_mask);
+; return 0; }
+EOF
+if { (eval echo configure:3118: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_address_space_has_gfp_mask=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_fs_struct_address_space_has_gfp_mask" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for i_alloc_sem in struct inode""... $ac_c" 1>&6
+echo "configure:3134: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3142 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct inode _i;
+printf("%x\n", _i.i_alloc_sem);
+; return 0; }
+EOF
+if { (eval echo configure:3150: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_inode_has_i_alloc_sem=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for i_truncate_sem in struct inode""... $ac_c" 1>&6
+echo "configure:3166: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3174 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct inode _i;
+printf("%x\n", _i.i_truncate_sem);
+; return 0; }
+EOF
+if { (eval echo configure:3182: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_inode_has_i_truncate_sem=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for i_dirty_data_buffers in struct inode""... $ac_c" 1>&6
+echo "configure:3198: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3206 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct inode _inode;
+printf("%d\n", _inode.i_dirty_data_buffers);
+; return 0; }
+EOF
+if { (eval echo configure:3214: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for i_devices in struct inode""... $ac_c" 1>&6
+echo "configure:3230: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3238 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct inode _inode;
+printf("%d\n", _inode.i_devices);
+; return 0; }
+EOF
+if { (eval echo configure:3246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_inode_has_i_devices=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_inode_has_i_devices=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_devices" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for i_security in struct inode""... $ac_c" 1>&6
+echo "configure:3262: checking for i_security in struct inode" >&5
+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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3270 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct inode _inode;
+printf("%d\n", _inode.i_security);
+; return 0; }
+EOF
+if { (eval echo configure:3278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_inode_has_i_security=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_fs_struct_inode_has_i_security=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_fs_struct_inode_has_i_security" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for inode_setattr return type""... $ac_c" 1>&6
+echo "configure:3294: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3302 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct inode _inode;
+struct iattr _iattr;
+int i;
+i = inode_setattr(&_inode, &_iattr);
+; return 0; }
+EOF
+if { (eval echo configure:3312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_inode_setattr_returns_int=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_inode_setattr_returns_int=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_inode_setattr_returns_int" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for write_inode return type""... $ac_c" 1>&6
+echo "configure:3328: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3336 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+struct inode _inode;
+struct super_operations _sops;
+int i;
+i = _sops.write_inode(&_inode, 0);
+; return 0; }
+EOF
+if { (eval echo configure:3346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_write_inode_returns_int=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_write_inode_returns_int=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_write_inode_returns_int" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+echo $ac_n "checking whether inode_operations.create takes a nameidata""... $ac_c" 1>&6
+echo "configure:3364: 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 3370 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+#include <linux/namei.h>
+int main() {
+struct inode _inode;
+struct dentry _dentry;
+struct nameidata _nameidata;
+(void)_inode.i_op->create(&_inode, &_dentry, 0, &_nameidata);
+; return 0; }
+EOF
+if { (eval echo configure:3381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_i_create_takes_nameidata=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_i_create_takes_nameidata=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_i_create_takes_nameidata" 1>&6
+if test "x$ac_cv_linux_func_i_create_takes_nameidata" = "xyes" ; then
+cat >> confdefs.h <<\EOF
+#define IOP_CREATE_TAKES_NAMEIDATA 1
+EOF
+
+fi
+echo $ac_n "checking whether inode_operations.lookup takes a nameidata""... $ac_c" 1>&6
+echo "configure:3401: 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 3407 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+#include <linux/namei.h>
+int main() {
+struct inode _inode;
+struct dentry _dentry;
+struct nameidata _nameidata;
+(void)_inode.i_op->lookup(&_inode, &_dentry, &_nameidata);
+; return 0; }
+EOF
+if { (eval echo configure:3418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_i_lookup_takes_nameidata=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_i_lookup_takes_nameidata=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_i_lookup_takes_nameidata" 1>&6
+if test "x$ac_cv_linux_func_i_lookup_takes_nameidata" = "xyes" ; then
+cat >> confdefs.h <<\EOF
+#define IOP_LOOKUP_TAKES_NAMEIDATA 1
+EOF
+
+fi
+echo $ac_n "checking whether inode_operations.permission takes a nameidata""... $ac_c" 1>&6
+echo "configure:3438: 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 3444 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+#include <linux/namei.h>
+int main() {
+struct inode _inode;
+struct nameidata _nameidata;
+(void)_inode.i_op->permission(&_inode, 0, &_nameidata);
+; return 0; }
+EOF
+if { (eval echo configure:3454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_i_permission_takes_nameidata=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_i_permission_takes_nameidata=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_i_permission_takes_nameidata" 1>&6
+if test "x$ac_cv_linux_func_i_permission_takes_nameidata" = "xyes" ; then
+cat >> confdefs.h <<\EOF
+#define IOP_PERMISSION_TAKES_NAMEIDATA 1
+EOF
+
+fi
+echo $ac_n "checking whether dentry_operations.d_revalidate takes a nameidata""... $ac_c" 1>&6
+echo "configure:3474: 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 3481 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+#include <linux/namei.h>
+int main() {
+struct dentry _dentry;
+struct nameidata _nameidata;
+(void)_dentry.d_op->d_revalidate(&_dentry, &_nameidata);
+; return 0; }
+EOF
+if { (eval echo configure:3491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_d_revalidate_takes_nameidata=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_d_revalidate_takes_nameidata=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_d_revalidate_takes_nameidata" 1>&6
+if test "x$ac_cv_linux_func_d_revalidate_takes_nameidata" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define DOP_REVALIDATE_TAKES_NAMEIDATA 1
+EOF
+
+fi
+CPPFLAGS="$save_CPPFLAGS"
+
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+echo $ac_n "checking whether address_space_operations.writepage takes a writeback_control""... $ac_c" 1>&6
+echo "configure:3515: 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 3521 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/writeback.h>
+int main() {
+struct address_space_operations _aops;
+struct page _page;
+struct writeback_control _writeback_control;
+(void)_aops.writepage(&_page, &_writeback_control);
+; return 0; }
+EOF
+if { (eval echo configure:3533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_a_writepage_takes_writeback_control=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_a_writepage_takes_writeback_control=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_a_writepage_takes_writeback_control" 1>&6
+if test "x$ac_cv_linux_func_a_writepage_takes_writeback_control" = "xyes" ; then
+cat >> confdefs.h <<\EOF
+#define AOP_WRITEPAGE_TAKES_WRITEBACK_CONTROL 1
+EOF
+
+fi
+CPPFLAGS="$save_CPPFLAGS"
+
+ echo $ac_n "checking for linux/syscall.h in kernel""... $ac_c" 1>&6
+echo "configure:3555: 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
+ else
+ ac_linux_syscall=no
+ echo "$ac_t""$ac_linux_syscall" 1>&6
+ fi
+
+
+echo $ac_n "checking for SELinux kernel""... $ac_c" 1>&6
+echo "configure:3566: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3574 "configure"
+#include "confdefs.h"
+#include <linux/autoconf.h>
+int main() {
+#ifndef CONFIG_SECURITY_SELINUX
+ #error not SELINUX
+ #endif
+; return 0; }
+EOF
+if { (eval echo configure:3583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_kernel_is_selinux=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_kernel_is_selinux=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_kernel_is_selinux" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for 5th argument in sock_create found in some SELinux kernels""... $ac_c" 1>&6
+echo "configure:3599: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3607 "configure"
+#include "confdefs.h"
+#include <linux/net.h>
+int main() {
+
+ sock_create(0,0,0,0,0)
+
+; return 0; }
+EOF
+if { (eval echo configure:3616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_kernel_sock_create_v=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_kernel_sock_create_v=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_kernel_sock_create_v" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for page_follow_link_light vs page_follow_link""... $ac_c" 1>&6
+echo "configure:3632: checking for page_follow_link_light vs page_follow_link" >&5
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+if eval "test \"`echo '$''{'ac_cv_linux_kernel_page_follow_link'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3640 "configure"
+#include "confdefs.h"
+#include <linux/fs.h>
+int main() {
+
+ page_follow_link(0,0)
+
+; return 0; }
+EOF
+if { (eval echo configure:3649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_kernel_page_follow_link=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_kernel_page_follow_link=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_kernel_page_follow_page" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+RHCONFIG_SP=""
+RHCONFIG_MP=""
+if test "x$enable_redhat_buildsys" = "xyes"; then
+ echo "configure: warning: Configured to build from a Red Hat SPEC file" 1>&2
+else
+ echo $ac_n "checking for redhat kernel configuration""... $ac_c" 1>&6
+echo "configure:3670: 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"
+ RHCONFIG_MP="-D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=1"
+ echo "$ac_t""$ac_linux_rhconfig" 1>&6
+ if test ! -f "/boot/kernel.h"; then
+ echo "configure: warning: /boot/kernel.h does not exist. build may fail" 1>&2
+ fi
+ else
+ ac_linux_rhconfig=no
+ echo "$ac_t""$ac_linux_rhconfig" 1>&6
+ fi
+fi
+
+
+
+
+echo $ac_n "checking for recalc_sigpending arg type""... $ac_c" 1>&6
+echo "configure:3689: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3697 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+recalc_sigpending();
+; return 0; }
+EOF
+if { (eval echo configure:3704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_func_recalc_sigpending_takes_void=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_func_recalc_sigpending_takes_void=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_func_recalc_sigpending_takes_void" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for parent in struct task_struct""... $ac_c" 1>&6
+echo "configure:3720: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3728 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+struct task_struct _tsk;
+printf("%d\n", _tsk.parent);
+; return 0; }
+EOF
+if { (eval echo configure:3736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_parent=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_parent=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_parent" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for real_parent in struct task_struct""... $ac_c" 1>&6
+echo "configure:3752: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3760 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+struct task_struct _tsk;
+printf("%d\n", _tsk.real_parent);
+; return 0; }
+EOF
+if { (eval echo configure:3768: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_real_parent=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_real_parent" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for sig in struct task_struct""... $ac_c" 1>&6
+echo "configure:3784: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3792 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+struct task_struct _tsk;
+printf("%d\n", _tsk.sig);
+; return 0; }
+EOF
+if { (eval echo configure:3800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_sig=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_sig=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sig" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for sighand in struct task_struct""... $ac_c" 1>&6
+echo "configure:3816: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3824 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+struct task_struct _tsk;
+printf("%d\n", _tsk.sighand);
+; return 0; }
+EOF
+if { (eval echo configure:3832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_sighand=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_sighand=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sighand" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for sigmask_lock in struct task_struct""... $ac_c" 1>&6
+echo "configure:3848: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3856 "configure"
+#include "confdefs.h"
+#include <linux/sched.h>
+int main() {
+struct task_struct _tsk;
+printf("%d\n", _tsk.sigmask_lock);
+; return 0; }
+EOF
+if { (eval echo configure:3864: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_sched_struct_task_struct_has_sigmask_lock=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+if test "x$enable_redhat_buildsys" = "xyes"; then
+ MPS=Default
+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:3885: 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 3891 "configure"
+#include "confdefs.h"
+#include <linux/version.h>
+#include <linux/config.h>
+
+int main() {
+#if !defined(CONFIG_MODVERSIONS)
+lose;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_config_modversions=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_config_modversions=no
+fi
+rm -f conftest*
+fi
+
+ echo "$ac_t""$ac_cv_linux_config_modversions" 1>&6
+ echo $ac_n "checking which kernel modules to build""... $ac_c" 1>&6
+echo "configure:3917: 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
+ MPS="MP SP"
+ else
+ if eval "test \"`echo '$''{'ac_cv_linux_config_smp'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ cat > conftest.$ac_ext <<EOF
+#line 3928 "configure"
+#include "confdefs.h"
+#include <linux/config.h>
+
+int main() {
+#ifndef CONFIG_SMP
+lose;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_config_smp=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_config_smp=no
+fi
+rm -f conftest*
+fi
+
+ if test "x$ac_cv_linux_config_smp" = "xyes"; then
+ MPS=MP
+ else
+ MPS=SP
+ fi
+ fi
+ CPPFLAGS=$save_CPPFLAGS
+ echo "$ac_t""$MPS" 1>&6
+fi
+
+
+ if test "x$ac_cv_linux_config_modversions" = "xno" -o $AFS_SYSKVERS -ge 26; then
+ echo "configure: warning: Cannot determine sys_call_table status. assuming it isn't exported" 1>&2
+ ac_cv_linux_exports_sys_call_table=no
+ if test -f "$LINUX_KERNEL_PATH/include/asm/ia32_unistd.h"; then
+ ac_cv_linux_exports_ia32_sys_call_table=yes
+ fi
+ else
+
+echo $ac_n "checking for exported init_mm""... $ac_c" 1>&6
+echo "configure:3971: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 3979 "configure"
#include "confdefs.h"
-#include <linux/autoconf.h>
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_init_mm
+#error init_mm not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:3988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_init_mm=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_init_mm=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_init_mm" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported kallsyms_address_to_symbol""... $ac_c" 1>&6
+echo "configure:4004: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 4012 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_kallsyms_address_to_symbol
+#error kallsyms_address_to_symbol not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_kallsyms_address=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_kallsyms_address=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_kallsyms_address" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported kallsyms_symbol_to_address""... $ac_c" 1>&6
+echo "configure:4037: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 4045 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_kallsyms_symbol_to_address
+#error kallsyms_symbol_to_address not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_kallsyms_symbol=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_kallsyms_symbol=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_kallsyms_symbol" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported sys_call_table""... $ac_c" 1>&6
+echo "configure:4070: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 4078 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_sys_call_table
+#error sys_call_table not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_sys_call_table=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_sys_call_table=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_sys_call_table" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported ia32_sys_call_table""... $ac_c" 1>&6
+echo "configure:4103: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 4111 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_ia32_sys_call_table
+#error ia32_sys_call_table not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_ia32_sys_call_table=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_ia32_sys_call_table=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_ia32_sys_call_table" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported sys_chdir""... $ac_c" 1>&6
+echo "configure:4136: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 4144 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_sys_chdir
+#error sys_chdir not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_sys_chdir=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_sys_chdir=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_sys_chdir" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported sys_close""... $ac_c" 1>&6
+echo "configure:4169: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 4177 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
+int main() {
+#ifndef __ver_sys_close
+#error sys_close not exported
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:4186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_linux_exports_sys_close=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_sys_close=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_linux_exports_sys_close" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+
+echo $ac_n "checking for exported sys_wait4""... $ac_c" 1>&6
+echo "configure:4202: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 4210 "configure"
+#include "confdefs.h"
+#include <linux/modversions.h>
int main() {
-#ifndef CONFIG_USERMODE
- #error not UML
- #endif
+#ifndef __ver_sys_wait4
+#error sys_wait4 not exported
+#endif
; return 0; }
EOF
-if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- ac_cv_linux_is_uml=yes
+ ac_cv_linux_exports_sys_wait4=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_linux_exports_sys_wait4=no
fi
rm -f conftest*
- if test "${ac_cv_linux_is_uml}" = yes; then
- _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/linux/umlinux/`
- fi
- CPPFLAGS="$save_CPPFLAGS"
- AFS_SYSNAME="$_AFS_SYSNAME"
- ;;
- esac
- echo "$ac_t""$AFS_SYSNAME" 1>&6
fi
+echo "$ac_t""$ac_cv_linux_exports_sys_wait4" 1>&6
+CPPFLAGS="$save_CPPFLAGS"
+ if test "x$ac_cv_linux_exports_sys_call_table" = "xno"; then
+ linux_syscall_method=none
+ if test "x$ac_cv_linux_exports_init_mm" = "xyes"; then
+ linux_syscall_method=scan
+ if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
+ linux_syscall_method=scan_with_kallsyms_address
+ fi
+ fi
+ if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
+ linux_syscall_method=kallsyms_symbol
+ fi
+ if test "x$linux_syscall_method" = "xnone"; then
+ { echo "configure: error: no available sys_call_table access method" 1>&2; exit 1; }
+ fi
+ fi
+ fi
+ if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_IN_SYSTM_H 1
+EOF
+
+ fi
+ if test -f "$LINUX_KERNEL_PATH/include/linux/mm_inline.h"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_MM_INLINE_H 1
+EOF
+
+ fi
+ if test -f "$LINUX_KERNEL_PATH/include/linux/in_systm.h"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_IN_SYSTM_H 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_sys_chdir" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_SYS_CHDIR 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_sys_close" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_SYS_CLOSE 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_sys_wait4" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_SYS_WAIT4 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_TASKLIST_LOCK 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_sys_call_table" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_SYS_CALL_TABLE 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_ia32_sys_call_table" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_IA32_SYS_CALL_TABLE 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_KALLSYMS_SYMBOL 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_exports_kallsyms_address" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define EXPORTED_KALLSYMS_ADDRESS 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_completion_h_exists" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define COMPLETION_H_EXISTS 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_defines_for_each_process" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define DEFINED_FOR_EACH_PROCESS 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_defines_prev_task" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define DEFINED_PREV_TASK 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define INODE_SETATTR_NOT_VOID 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_func_write_inode_returns_int" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define WRITE_INODE_NOT_VOID 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_fs_struct_address_space_has_page_lock" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_fs_struct_address_space_has_gfp_mask" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_ADDRESS_SPACE_HAS_GFP_MASK 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_INODE_HAS_I_TRUNCATE_SEM 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_INODE_HAS_I_ALLOC_SEM 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_devices" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_INODE_HAS_I_DEVICES 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_security" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_INODE_HAS_I_SECURITY 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_func_recalc_sigpending_takes_void" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define RECALC_SIGPENDING_TAKES_VOID 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_kernel_is_selinux" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define LINUX_KERNEL_IS_SELINUX 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_kernel_sock_create_v" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define LINUX_KERNEL_SOCK_CREATE_V 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_kernel_page_follow_link" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_KERNEL_PAGE_FOLLOW_LINK 1
+EOF
+
+ fi
+ if test "x$ac_linux_syscall" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_KERNEL_LINUX_SYSCALL_H 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_parent" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_TASK_STRUCT_HAS_PARENT 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_real_parent" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_TASK_STRUCT_HAS_REAL_PARENT 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_sigmask_lock" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_sighand" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_TASK_STRUCT_HAS_SIGHAND 1
+EOF
+
+ fi
+ if test "x$ac_cv_linux_sched_struct_task_struct_has_sig" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define STRUCT_TASK_STRUCT_HAS_SIG 1
+EOF
+
+ fi
+ :
+ fi
+esac
+
case $AFS_SYSNAME in
*_darwin*)
DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist
;;
*)
echo $ac_n "checking for definition of struct buf""... $ac_c" 1>&6
-echo "configure:4162: checking for definition of struct buf" >&5
+echo "configure:4463: 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 4169 "configure"
+#line 4470 "configure"
#include "confdefs.h"
#include <sys/buf.h>
int main() {
printf("%d\n", sizeof(x));
; return 0; }
EOF
-if { (eval echo configure:4177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4478: \"$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:4205: checking if struct sockaddr has sa_len field" >&5
+echo "configure:4506: checking if struct sockaddr has sa_len field" >&5
cat > conftest.$ac_ext <<EOF
-#line 4207 "configure"
+#line 4508 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
a->sa_len=0;
; return 0; }
EOF
-if { (eval echo configure:4216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4517: \"$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:4241: checking for $ac_func" >&5
+echo "configure:4542: checking for $ac_func" >&5
if 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 4246 "configure"
+#line 4547 "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:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4570: \"$ac_link\") 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:4298: checking for socket in -l${lib}" >&5
+echo "configure:4599: 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 4306 "configure"
+#line 4607 "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:4317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4618: \"$ac_link\") 1>&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:4347: checking for $ac_func" >&5
+echo "configure:4648: checking for $ac_func" >&5
if 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 4352 "configure"
+#line 4653 "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:4375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_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:4404: checking for connect in -l${lib}" >&5
+echo "configure:4705: 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 4412 "configure"
+#line 4713 "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:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4724: \"$ac_link\") 1>&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:4453: checking for $ac_func" >&5
+echo "configure:4754: checking for $ac_func" >&5
if 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 4458 "configure"
+#line 4759 "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:4481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_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:4509: checking for gethostbyname in -l${lib}" >&5
+echo "configure:4810: 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 4517 "configure"
+#line 4818 "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:4528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4829: \"$ac_link\") 1>&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:4556: checking for the useability of arpa/nameser_compat.h" >&5
+echo "configure:4857: checking for the useability of arpa/nameser_compat.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 4558 "configure"
+#line 4859 "configure"
#include "confdefs.h"
#include <stdlib.h>
static int i; i = 0;
; return 0; }
EOF
-if { (eval echo configure:4575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4876: \"$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:4593: checking for res_search" >&5
+echo "configure:4894: checking for res_search" >&5
ac_cv_func_res_search=no
cat > conftest.$ac_ext <<EOF
-#line 4597 "configure"
+#line 4898 "configure"
#include "confdefs.h"
#include <sys/types.h>
; return 0; }
EOF
-if { (eval echo configure:4621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4922: \"$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 4638 "configure"
+#line 4939 "configure"
#include "confdefs.h"
#include <sys/types.h>
; return 0; }
EOF
-if { (eval echo configure:4662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4963: \"$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:4696: checking for pthread_attr_init in -lpthread" >&5
+echo "configure:4997: 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 4704 "configure"
+#line 5005 "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:4715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5016: \"$ac_link\") 1>&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:4737: checking for pthread_attr_init in -lpthreads" >&5
+echo "configure:5038: 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 4745 "configure"
+#line 5046 "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:4756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5057: \"$ac_link\") 1>&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:4779: checking for pthread_attr_init in -lc_r" >&5
+echo "configure:5080: 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 4787 "configure"
+#line 5088 "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:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5099: \"$ac_link\") 1>&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:4821: checking for pthread_attr_init" >&5
+echo "configure:5122: 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 4826 "configure"
+#line 5127 "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:4849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5150: \"$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:4969: checking for tivoli tsm butc support" >&5
+echo "configure:5270: 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:4990: checking for ANSI C header files" >&5
+echo "configure:5291: 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 4995 "configure"
+#line 5296 "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:5003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5304: \"$ac_try\") 1>&5; (eval $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 5020 "configure"
+#line 5321 "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 5038 "configure"
+#line 5339 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 5059 "configure"
+#line 5360 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5371: \"$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:5094: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:5395: 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 5099 "configure"
+#line 5400 "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:5115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5416: \"$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:5140: checking for $ac_hdr that defines DIR" >&5
+echo "configure:5441: 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 5145 "configure"
+#line 5446 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:5153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5454: \"$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:5178: checking for opendir in -ldir" >&5
+echo "configure:5479: 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 5186 "configure"
+#line 5487 "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:5197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5498: \"$ac_link\") 1>&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:5219: checking for opendir in -lx" >&5
+echo "configure:5520: 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 5227 "configure"
+#line 5528 "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:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5539: \"$ac_link\") 1>&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:5264: checking for $ac_hdr" >&5
+echo "configure:5565: 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 5269 "configure"
+#line 5570 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5575: \"$ac_try\") 1>&5; (eval $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:5304: checking for $ac_hdr" >&5
+echo "configure:5605: 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 5309 "configure"
+#line 5610 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5615: \"$ac_try\") 1>&5; (eval $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:5344: checking for $ac_hdr" >&5
+echo "configure:5645: 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 5349 "configure"
+#line 5650 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5655: \"$ac_try\") 1>&5; (eval $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:5384: checking for $ac_hdr" >&5
+echo "configure:5685: 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 5389 "configure"
+#line 5690 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5695: \"$ac_try\") 1>&5; (eval $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:5424: checking for $ac_hdr" >&5
+echo "configure:5725: 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 5429 "configure"
+#line 5730 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5735: \"$ac_try\") 1>&5; (eval $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:5464: checking for $ac_hdr" >&5
+echo "configure:5765: 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 5469 "configure"
+#line 5770 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5775: \"$ac_try\") 1>&5; (eval $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:5518: checking for $ac_func" >&5
+echo "configure:5819: checking for $ac_func" >&5
if 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 5523 "configure"
+#line 5824 "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:5546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5847: \"$ac_link\") 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:5573: checking for $ac_func" >&5
+echo "configure:5874: checking for $ac_func" >&5
if 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 5578 "configure"
+#line 5879 "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:5601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5902: \"$ac_link\") 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:5629: checking for $ac_func" >&5
+echo "configure:5930: checking for $ac_func" >&5
if 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 5634 "configure"
+#line 5935 "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:5657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5958: \"$ac_link\") 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:5682: checking for POSIX regex library" >&5
+echo "configure:5983: 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:5697: checking for ssize_t" >&5
+echo "configure:5998: 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 5702 "configure"
+#line 6003 "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:5730: checking size of long" >&5
+echo "configure:6031: 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 5738 "configure"
+#line 6039 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:5749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6050: \"$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:5772: checking for $ac_func" >&5
+echo "configure:6073: checking for $ac_func" >&5
if 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 5777 "configure"
+#line 6078 "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:5800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6101: \"$ac_link\") 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:5904: checking for $ac_word" >&5
+echo "configure:6205: 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:5936: checking for $ac_word" >&5
+echo "configure:6237: 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:5971: checking for $ac_word" >&5
+echo "configure:6272: 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:6006: checking for $ac_word" >&5
+echo "configure:6307: 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:6041: checking for $ac_word" >&5
+echo "configure:6342: 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:6076: checking for $ac_word" >&5
+echo "configure:6377: 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:6111: checking for $ac_word" >&5
+echo "configure:6412: 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:6146: checking for $ac_word" >&5
+echo "configure:6447: 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:6181: checking for $ac_word" >&5
+echo "configure:6482: 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
YACC="byacc"
;;
- *nbsd20)
+ *nbsd2*)
LEX="flex -l"
MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -D_REENTRANT '
MT_LIBS="-lpthread" # XXX -pthread soon
YACC="bison -y"
;;
- ia64_linux24)
+ ia64_linux24|ia64_linux26)
KERN_OPTMZ=-O2
LEX="flex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
SHLIB_LINKER="${MT_CC} -shared"
;;
+ i386_umlinux26)
+ CC="gcc -pipe"
+ CCOBJ="gcc -pipe"
+ MT_CC="gcc -pipe"
+ KERN_OPTMZ=-O2
+ LEX="flex -l"
+ MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+ MT_LIBS="-lpthread"
+ DBG=-g
+ KERN_DBG=-g
+ LWP_DBG=-g
+ LWP_OPTMZ=-O2
+ OPTMZ=-O2
+ PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
+ SHLIB_LDFLAGS="-shared -Xlinker -x"
+ TXLIBS="-lncurses"
+ XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
+ SHLIB_LINKER="${MT_CC} -shared"
+ ;;
+
*_obsd*)
LEX="flex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
sgi_6*)
echo $ac_n "checking for mem* in sys/systm.h""... $ac_c" 1>&6
-echo "configure:7026: checking for mem* in sys/systm.h" >&5
+echo "configure:7347: 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 7034 "configure"
+#line 7355 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/systm.h>
; return 0; }
EOF
-if { (eval echo configure:7044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_irix_sys_systm_h_has_mem_funcs=no
else
s%@LEX@%$LEX%g
s%@LEXLIB@%$LEXLIB%g
s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
+s%@HEADER_RT@%$HEADER_RT%g
s%@P5PLUS_KOPTS@%$P5PLUS_KOPTS%g
s%@LINUX_GCC_KOPTS@%$LINUX_GCC_KOPTS%g
s%@RHCONFIG_SP@%$RHCONFIG_SP%g
s%@RHCONFIG_MP@%$RHCONFIG_MP%g
s%@MPS@%$MPS%g
-s%@HEADER_RT@%$HEADER_RT%g
s%@PTHREAD_LIBS@%$PTHREAD_LIBS%g
s%@XBSA_CFLAGS@%$XBSA_CFLAGS%g
s%@HAVE_PAM@%$HAVE_PAM%g
AC_INIT(src/libafs/Makefile.common.in)
-AM_INIT_AUTOMAKE(openafs-libafs,1.3.74)
+AM_INIT_AUTOMAKE(openafs-libafs,1.3.77)
AC_CONFIG_HEADER(src/config/afsconfig.h)
define(OPENAFS_CONFIGURE_LIBAFS)
AC_INIT(src/config/stds.h)
-AM_INIT_AUTOMAKE(openafs,1.3.74)
+AM_INIT_AUTOMAKE(openafs,1.3.77)
AC_CONFIG_HEADER(src/config/afsconfig.h)
AC_PROG_CC
clean::
$(CD) lang
- for /f %l in ('dir /B ??_??') do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean
+ for /f %l in ('dir /B ??_??') do ( if exist @$(NTLANG) do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean )
$(CD) ..
AFSD_EXEFILE = $(EXEDIR)\afsd.exe
AFSD_SDKLIBS =\
- largeint.lib \
netapi32.lib \
- dnsapi.lib mpr.lib \
+ dnsapi.lib \
+ mpr.lib \
rpcrt4.lib \
user32.lib \
Dbghelp.lib \
# afsd_service.exe
$(EXEDIR)\afsd_service.exe: $(OUT)\afsd_service.obj $(AFSDOBJS) $(OUT)\afsd_service.res $(RXOBJS) $(AFSD_EXELIBS)
- $(EXECONLINK) $(AFSD_SDKLIBS) /MAP
+ $(EXECONLINK) $(AFSD_SDKLIBS) /MAP /LARGEADDRESSAWARE
$(EXEPREP)
# fs.exe
#include "cm_buf.h"
#include "cm_freelance.h"
#include "smb_ioctl.h"
+#include "afsd_init.h"
#ifdef DJGPP
#include "afs/afsmsg95.h"
#endif
#include <nb30.h>
#include <stdio.h>
#include <stdlib.h>
+#include <locale.h>
+#include <mbctype.h>
#include <winsock2.h>
#include <osi.h>
char AFSConfigKeyName[] =
"SYSTEM\\CurrentControlSet\\Services\\TransarcAFSDaemon\\Parameters";
+char OpenAFSConfigKeyName[] =
+ "SOFTWARE\\OpenAFS\\Client";
osi_log_t *afsd_logp;
int cm_dnsEnabled = 1;
#endif
+
+static int afsi_log_useTimestamp = 1;
+
+void
+afsi_log(char *pattern, ...)
+{
+ char s[256], t[100], d[100], u[512];
+ DWORD zilch;
+ va_list ap;
+ va_start(ap, pattern);
+
+ StringCbVPrintfA(s, sizeof(s), pattern, ap);
+ if ( afsi_log_useTimestamp ) {
+ GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, t, sizeof(t));
+ GetDateFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, d, sizeof(d));
+ StringCbPrintfA(u, sizeof(u), "%s %s: %s\n", d, t, s);
+ if (afsi_file != INVALID_HANDLE_VALUE)
+ WriteFile(afsi_file, u, strlen(u), &zilch, NULL);
+#ifdef NOTSERVICE
+ printf("%s", u);
+#endif
+ } else {
+ if (afsi_file != INVALID_HANDLE_VALUE)
+ WriteFile(afsi_file, s, strlen(s), &zilch, NULL);
+ }
+}
+
extern initUpperCaseTable();
void afsd_initUpperCaseTable()
{
- initUpperCaseTable();
+ initUpperCaseTable();
}
void
afsi_start()
{
- char wd[100];
- char t[100], u[100], *p, *path;
- int zilch;
- int code;
+ char wd[100];
+ char t[100], u[100], *p, *path;
+ int zilch;
+ int code;
DWORD dwLow, dwHigh;
- HKEY parmKey;
- DWORD dummyLen;
+ HKEY parmKey;
+ DWORD dummyLen;
DWORD maxLogSize = 100 * 1024;
- afsi_file = INVALID_HANDLE_VALUE;
+ afsi_file = INVALID_HANDLE_VALUE;
if (getenv("TEMP"))
{
StringCbCopyA(wd, sizeof(wd), getenv("TEMP"));
else
{
code = GetWindowsDirectory(wd, sizeof(wd));
- if (code == 0) return;
+ if (code == 0)
+ return;
}
- StringCbCatA(wd, sizeof(wd), "\\afsd_init.log");
- GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, t, sizeof(t));
- afsi_file = CreateFile(wd, GENERIC_WRITE, FILE_SHARE_READ, NULL,
+ StringCbCatA(wd, sizeof(wd), "\\afsd_init.log");
+ GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, t, sizeof(t));
+ afsi_file = CreateFile(wd, GENERIC_WRITE, FILE_SHARE_READ, NULL,
OPEN_ALWAYS, FILE_FLAG_WRITE_THROUGH, NULL);
code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSConfigKeyName,
0, KEY_QUERY_VALUE, &parmKey);
- if (code == ERROR_SUCCESS) {
+ if (code == ERROR_SUCCESS) {
dummyLen = sizeof(maxLogSize);
code = RegQueryValueEx(parmKey, "MaxLogSize", NULL, NULL,
(BYTE *) &maxLogSize, &dummyLen);
RegCloseKey (parmKey);
- }
+ }
if (maxLogSize) {
dwLow = GetFileSize( afsi_file, &dwHigh );
}
SetFilePointer(afsi_file, 0, NULL, FILE_END);
- GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, u, sizeof(u));
- StringCbCatA(t, sizeof(t), ": Create log file\n");
- StringCbCatA(u, sizeof(u), ": Created log file\n");
- WriteFile(afsi_file, t, strlen(t), &zilch, NULL);
- WriteFile(afsi_file, u, strlen(u), &zilch, NULL);
+ GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, u, sizeof(u));
+ StringCbCatA(t, sizeof(t), ": Create log file\n");
+ StringCbCatA(u, sizeof(u), ": Created log file\n");
+ WriteFile(afsi_file, t, strlen(t), &zilch, NULL);
+ WriteFile(afsi_file, u, strlen(u), &zilch, NULL);
p = "PATH=";
path = getenv("PATH");
- WriteFile(afsi_file, p, strlen(p), &zilch, NULL);
- WriteFile(afsi_file, path, strlen(path), &zilch, NULL);
- WriteFile(afsi_file, "\n", 1, &zilch, NULL);
-}
-
-static int afsi_log_useTimestamp = 1;
-
-void
-afsi_log(char *pattern, ...)
-{
- char s[256], t[100], d[100], u[512];
- int zilch;
- va_list ap;
- va_start(ap, pattern);
-
- StringCbVPrintfA(s, sizeof(s), pattern, ap);
- if ( afsi_log_useTimestamp ) {
- GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, t, sizeof(t));
- GetDateFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, d, sizeof(d));
- StringCbPrintfA(u, sizeof(u), "%s %s: %s\n", d, t, s);
- if (afsi_file != INVALID_HANDLE_VALUE)
- WriteFile(afsi_file, u, strlen(u), &zilch, NULL);
-#ifdef NOTSERVICE
- printf("%s", u);
-#endif
- } else {
- if (afsi_file != INVALID_HANDLE_VALUE)
- WriteFile(afsi_file, s, strlen(s), &zilch, NULL);
- }
+ WriteFile(afsi_file, p, strlen(p), &zilch, NULL);
+ WriteFile(afsi_file, path, strlen(path), &zilch, NULL);
+ WriteFile(afsi_file, "\n", 1, &zilch, NULL);
+
+ /* Initialize C RTL Code Page conversion functions */
+ /* All of the path info obtained from the SMB client is in the OEM code page */
+ afsi_log("OEM Code Page = %d", GetOEMCP());
+ afsi_log("locale = %s", setlocale(LC_ALL,NULL));
+#ifdef COMMENT
+ /* Two things to look into. First, should mbstowcs() be performing
+ * character set translations from OEM to Unicode in smb3.c;
+ * Second, do we need to set this translation in each function
+ * due to multi-threading.
+ */
+ afsi_log("locale -> %s", setlocale(LC_ALL, ".OCP"));
+ afsi_log("_setmbcp = %d -> %d", _setmbcp(_MB_CP_OEM), _getmbcp());
+#endif /* COMMENT */
}
/*
void afsd_ForceTrace(BOOL flush)
{
- HANDLE handle;
- int len;
- char buf[256];
+ HANDLE handle;
+ int len;
+ char buf[256];
- if (!logReady)
+ if (!logReady)
return;
- len = GetTempPath(sizeof(buf)-10, buf);
- StringCbCopyA(&buf[len], sizeof(buf)-len, "/afsd.log");
- handle = CreateFile(buf, GENERIC_WRITE, FILE_SHARE_READ,
- NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- if (handle == INVALID_HANDLE_VALUE) {
- logReady = 0;
- osi_panic("Cannot create log file", __FILE__, __LINE__);
- }
- osi_LogPrint(afsd_logp, handle);
- if (flush)
- FlushFileBuffers(handle);
- CloseHandle(handle);
+ len = GetTempPath(sizeof(buf)-10, buf);
+ StringCbCopyA(&buf[len], sizeof(buf)-len, "/afsd.log");
+ handle = CreateFile(buf, GENERIC_WRITE, FILE_SHARE_READ,
+ NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+ if (handle == INVALID_HANDLE_VALUE) {
+ logReady = 0;
+ osi_panic("Cannot create log file", __FILE__, __LINE__);
+ }
+ osi_LogPrint(afsd_logp, handle);
+ if (flush)
+ FlushFileBuffers(handle);
+ CloseHandle(handle);
}
static void
DWORD dwType;
DWORD dwSize;
DWORD dwValue;
- PBYTE pHostNames = NULL, pName;
+ PBYTE pHostNames = NULL, pName = NULL;
BOOL bNameFound = FALSE;
if ( RegOpenKeyEx( HKEY_LOCAL_MACHINE,
}
if ( !bNameFound ) {
+ int size = strlen(cm_NetbiosName) + 2;
if ( !pHostNames ) {
- pName = pHostNames = malloc(strlen(cm_NetbiosName) + 2);
+ pHostNames = malloc(size);
dwSize = 1;
}
- strcpy(pName, cm_NetbiosName);
- pName += strlen(cm_NetbiosName) + 1;
+ pName = pHostNames;
+ StringCbCopyA(pName, size, cm_NetbiosName);
+ pName += size - 1;
*pName = '\0'; /* add a second nul terminator */
dwType = REG_MULTI_SZ;
int afsd_InitDaemons(char **reasonP)
{
- long code;
- cm_req_t req;
+ long code;
+ cm_req_t req;
- cm_InitReq(&req);
+ cm_InitReq(&req);
- /* this should really be in an init daemon from here on down */
+ /* this should really be in an init daemon from here on down */
if (!cm_freelanceEnabled) {
osi_Log0(afsd_logp, "Loading Root Volume from cell");
}
}
- /* compute the root fid */
- if (!cm_freelanceEnabled) {
+ /* compute the root fid */
+ if (!cm_freelanceEnabled) {
cm_rootFid.cell = cm_rootCellp->cellID;
cm_rootFid.volume = cm_GetROVolumeID(cm_rootVolumep);
cm_rootFid.vnode = 1;
cm_rootFid.unique = 1;
- }
- else
+ }
+ else
cm_FakeRootFid(&cm_rootFid);
code = cm_GetSCache(&cm_rootFid, &cm_rootSCachep, cm_rootUserp, &req);
- afsi_log("cm_GetSCache code %x scache %x", code,
+ afsi_log("cm_GetSCache code %x scache %x", code,
(code ? (cm_scache_t *)-1 : cm_rootSCachep));
- if (code != 0) {
- *reasonP = "unknown error";
- return -1;
- }
+ if (code != 0) {
+ *reasonP = "unknown error";
+ return -1;
+ }
- cm_InitDaemon(numBkgD);
- afsi_log("cm_InitDaemon");
+ cm_InitDaemon(numBkgD);
+ afsi_log("cm_InitDaemon");
- return 0;
+ return 0;
}
int afsd_InitSMB(char **reasonP, void *aMBfunc)
{
- /* Do this last so that we don't handle requests before init is done.
+ HKEY parmKey;
+ DWORD dummyLen;
+ DWORD dwValue;
+ DWORD code;
+
+ code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, OpenAFSConfigKeyName,
+ 0, KEY_QUERY_VALUE, &parmKey);
+ if (code == ERROR_SUCCESS) {
+ dummyLen = sizeof(DWORD);
+ code = RegQueryValueEx(parmKey, "StoreAnsiFilenames", NULL, NULL,
+ (BYTE *) &dwValue, &dummyLen);
+ if (code == ERROR_SUCCESS)
+ smb_StoreAnsiFilenames = dwValue ? 1 : 0;
+ RegCloseKey (parmKey);
+ }
+
+ /* Do this last so that we don't handle requests before init is done.
* Here we initialize the SMB listener.
*/
smb_Init(afsd_logp, cm_NetbiosName, smb_UseV3, LANadapter, numSvThreads, aMBfunc);
- afsi_log("smb_Init");
+ afsi_log("smb_Init complete");
- return 0;
+ return 0;
}
#ifdef ReadOnly
#include <afs/stds.h>
#include <windows.h>
+#include <softpub.h>
+#include <psapi.h>
+#include <winerror.h>
#include <string.h>
#include <setjmp.h>
#include "afsd.h"
extern void afsi_log(char *pattern, ...);
+static SERVICE_STATUS ServiceStatus;
+static SERVICE_STATUS_HANDLE StatusHandle;
+
HANDLE hAFSDMainThread = NULL;
HANDLE WaitToTerminate;
smb_DumpVCP(afsi_file, "a");
afsi_log("--- end dump ---");
+#ifdef DEBUG
DebugBreak();
+#endif
SetEvent(WaitToTerminate);
#ifdef JUMP
if (GetCurrentThreadId() == MainThreadId)
longjmp(notifier_jmp, 1);
- else
#endif /* JUMP */
- ExitThread(1);
+
+ ServiceStatus.dwCurrentState = SERVICE_STOPPED;
+ ServiceStatus.dwWin32ExitCode = NO_ERROR;
+ ServiceStatus.dwCheckPoint = 0;
+ ServiceStatus.dwWaitHint = 0;
+ ServiceStatus.dwControlsAccepted = 0;
+ SetServiceStatus(StatusHandle, &ServiceStatus);
+
+ exit(1);
}
/*
return 0;
}
-static SERVICE_STATUS ServiceStatus;
-static SERVICE_STATUS_HANDLE StatusHandle;
-
DWORD
afsd_ServiceFlushVolume(DWORD dwlpEventData)
{
RegCloseKey(hKey);
}
+DWORD
+GetVersionInfo( CHAR * filename, CHAR * szOutput, DWORD dwOutput )
+{
+ DWORD dwVersionHandle;
+ LPVOID pVersionInfo = 0;
+ DWORD retval = 0;
+ LPDWORD pLangInfo = 0;
+ LPTSTR szVersion = 0;
+ UINT len = 0;
+ TCHAR szVerQ[] = TEXT("\\StringFileInfo\\12345678\\FileVersion");
+ DWORD size = GetFileVersionInfoSize(filename, &dwVersionHandle);
+
+ if (!size) {
+ afsi_log("GetFileVersionInfoSize failed");
+ return GetLastError();
+ }
+
+ pVersionInfo = malloc(size);
+ if (!pVersionInfo) {
+ afsi_log("out of memory 1");
+ return ERROR_NOT_ENOUGH_MEMORY;
+ }
+
+ GetFileVersionInfo(filename, dwVersionHandle, size, pVersionInfo);
+ if (retval = GetLastError())
+ {
+ afsi_log("GetFileVersionInfo failed: %d", retval);
+ goto cleanup;
+ }
+
+ VerQueryValue(pVersionInfo, TEXT("\\VarFileInfo\\Translation"),
+ (LPVOID*)&pLangInfo, &len);
+ if (retval = GetLastError())
+ {
+ afsi_log("VerQueryValue 1 failed: %d", retval);
+ goto cleanup;
+ }
+
+ wsprintf(szVerQ,
+ TEXT("\\StringFileInfo\\%04x%04x\\FileVersion"),
+ LOWORD(*pLangInfo), HIWORD(*pLangInfo));
+
+ VerQueryValue(pVersionInfo, szVerQ, (LPVOID*)&szVersion, &len);
+ if (retval = GetLastError())
+ {
+ /* try again with language 409 since the old binaries were tagged wrong */
+ wsprintf(szVerQ,
+ TEXT("\\StringFileInfo\\0409%04x\\FileVersion"),
+ HIWORD(*pLangInfo));
+
+ VerQueryValue(pVersionInfo, szVerQ, (LPVOID*)&szVersion, &len);
+ if (retval = GetLastError()) {
+ afsi_log("VerQueryValue 2 failed: [%s] %d", szVerQ, retval);
+ goto cleanup;
+ }
+ }
+ snprintf(szOutput, dwOutput, TEXT("%s"), szVersion);
+ szOutput[dwOutput - 1] = 0;
+
+ cleanup:
+ if (pVersionInfo)
+ free(pVersionInfo);
+
+ return retval;
+}
+
+static HINSTANCE hCrypt32;
+static DWORD (WINAPI *pCertGetNameString)(PCCERT_CONTEXT pCertContext, DWORD dwType, DWORD dwFlags,
+ void* pvTypePara, LPTSTR pszNameString, DWORD cchNameString);
+static BOOL (WINAPI *pCryptQueryObject)(DWORD dwObjectType, const void* pvObject, DWORD dwExpectedContentTypeFlags,
+ DWORD dwExpectedFormatTypeFlags, DWORD dwFlags,
+ DWORD* pdwMsgAndCertEncodingType, DWORD* pdwContentType,
+ DWORD* pdwFormatType, HCERTSTORE* phCertStore,
+ HCRYPTMSG* phMsg, const void** ppvContext);
+static BOOL (WINAPI *pCryptMsgGetParam)(HCRYPTMSG hCryptMsg, DWORD dwParamType, DWORD dwIndex,
+ void* pvData, DWORD* pcbData);
+static PCCERT_CONTEXT (WINAPI *pCertFindCertificateInStore)(HCERTSTORE hCertStore, DWORD dwCertEncodingType,
+ DWORD dwFindFlags, DWORD dwFindType,
+ const void* pvFindPara,
+ PCCERT_CONTEXT pPrevCertContext);
+static BOOL (WINAPI *pCertCloseStore)(HCERTSTORE hCertStore, DWORD dwFlags);
+static BOOL (WINAPI *pCryptMsgClose)(HCRYPTMSG hCryptMsg);
+static BOOL (WINAPI *pCertCompareCertificate)(DWORD dwCertEncodingType, PCERT_INFO pCertId1,
+ PCERT_INFO pCertId2);
+static BOOL (WINAPI *pCertFreeCertificateContext)(PCCERT_CONTEXT pCertContext);
+
+void LoadCrypt32(void)
+{
+ hCrypt32 = LoadLibrary("crypt32");
+ if ( !hCrypt32 )
+ return;
+
+ (FARPROC) pCertGetNameString = GetProcAddress( hCrypt32, "CertGetNameString" );
+ (FARPROC) pCryptQueryObject = GetProcAddress( hCrypt32, "CryptQueryObject" );
+ (FARPROC) pCryptMsgGetParam = GetProcAddress( hCrypt32, "CryptMsgGetParam" );
+ (FARPROC) pCertFindCertificateInStore = GetProcAddress( hCrypt32, "CertFindCertificateInStore" );
+ (FARPROC) pCertCloseStore = GetProcAddress( hCrypt32, "CertCloseStore" );
+ (FARPROC) pCryptMsgClose = GetProcAddress( hCrypt32, "CryptMsgClose" );
+ (FARPROC) pCertCompareCertificate = GetProcAddress( hCrypt32, "CertCompareCertificate" );
+ (FARPROC) pCertFreeCertificateContext = GetProcAddress( hCrypt32, "CertFreeCertificateContext" );
+
+ if ( !pCertGetNameString ||
+ !pCryptQueryObject ||
+ !pCryptMsgGetParam ||
+ !pCertFindCertificateInStore ||
+ !pCertCloseStore ||
+ !pCryptMsgClose ||
+ !pCertCompareCertificate ||
+ !pCertFreeCertificateContext)
+ {
+ FreeLibrary(hCrypt32);
+ hCrypt32 = NULL;
+ }
+}
+
+void UnloadCrypt32(void)
+{
+ FreeLibrary(hCrypt32);
+}
+
+#define ENCODING (X509_ASN_ENCODING | PKCS_7_ASN_ENCODING)
+
+PCCERT_CONTEXT GetCertCtx(CHAR * filename)
+{
+ wchar_t wfilename[260];
+ BOOL fResult;
+ DWORD dwEncoding;
+ DWORD dwContentType;
+ DWORD dwFormatType;
+ DWORD dwSignerInfo;
+ HCERTSTORE hStore = NULL;
+ HCRYPTMSG hMsg = NULL;
+ PCMSG_SIGNER_INFO pSignerInfo = NULL;
+ PCCERT_CONTEXT pCertContext = NULL;
+ CERT_INFO CertInfo;
+
+ if ( hCrypt32 == NULL )
+ return NULL;
+
+ ZeroMemory(&CertInfo, sizeof(CertInfo));
+ mbstowcs(wfilename, filename, 260);
+
+ fResult = pCryptQueryObject(CERT_QUERY_OBJECT_FILE,
+ wfilename,
+ CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED,
+ CERT_QUERY_FORMAT_FLAG_BINARY,
+ 0,
+ &dwEncoding,
+ &dwContentType,
+ &dwFormatType,
+ &hStore,
+ &hMsg,
+ NULL);
+
+ if (!fResult) {
+ afsi_log("CryptQueryObject failed for [%s] with error 0x%x",
+ filename,
+ GetLastError());
+ goto __exit;
+ }
+
+ fResult = pCryptMsgGetParam(hMsg,
+ CMSG_SIGNER_INFO_PARAM,
+ 0,
+ NULL,
+ &dwSignerInfo);
+
+ if (!fResult) {
+ afsi_log("CryptMsgGetParam failed for [%s] with error 0x%x",
+ filename,
+ GetLastError());
+ goto __exit;
+ }
+
+ pSignerInfo = (PCMSG_SIGNER_INFO)LocalAlloc(LPTR, dwSignerInfo);
+
+ fResult = pCryptMsgGetParam(hMsg,
+ CMSG_SIGNER_INFO_PARAM,
+ 0,
+ (PVOID)pSignerInfo,
+ &dwSignerInfo);
+
+ if (!fResult) {
+ afsi_log("CryptMsgGetParam failed for [%s] with error 0x%x",
+ filename,
+ GetLastError());
+ goto __exit;
+ }
+
+ CertInfo.Issuer = pSignerInfo->Issuer;
+ CertInfo.SerialNumber = pSignerInfo->SerialNumber;
+
+ pCertContext = pCertFindCertificateInStore(hStore,
+ ENCODING,
+ 0,
+ CERT_FIND_SUBJECT_CERT,
+ (PVOID) &CertInfo,
+ NULL);
+
+ if (!pCertContext) {
+ afsi_log("CertFindCertificateInStore for file [%s] failed with 0x%x",
+ filename,
+ GetLastError());
+ goto __exit;
+ }
+
+ __exit:
+ if (pSignerInfo)
+ LocalFree(pSignerInfo);
+
+ /* if (pCertContext)
+ CertFreeCertificateContext(pCertContext);*/
+
+ if (hStore)
+ pCertCloseStore(hStore,0);
+
+ if (hMsg)
+ pCryptMsgClose(hMsg);
+
+ return pCertContext;
+}
+
+BOOL VerifyTrust(CHAR * filename)
+{
+ WIN_TRUST_ACTDATA_CONTEXT_WITH_SUBJECT fContextWSubject;
+ WIN_TRUST_SUBJECT_FILE fSubjectFile;
+ GUID trustAction = WIN_SPUB_ACTION_PUBLISHED_SOFTWARE;
+ GUID subject = WIN_TRUST_SUBJTYPE_PE_IMAGE;
+ wchar_t wfilename[260];
+ LONG ret;
+ BOOL success = FALSE;
+
+ LONG (WINAPI *pWinVerifyTrust)(HWND hWnd, GUID* pgActionID, WINTRUST_DATA* pWinTrustData) = NULL;
+ HINSTANCE hWinTrust;
+
+ if (filename == NULL )
+ return FALSE;
+
+ hWinTrust = LoadLibrary("wintrust");
+ if ( !hWinTrust )
+ return FALSE;
+
+ if (((FARPROC) pWinVerifyTrust =
+ GetProcAddress( hWinTrust, "WinVerifyTrust" )) == NULL )
+ {
+ FreeLibrary(hWinTrust);
+ return FALSE;
+ }
+
+ mbstowcs(wfilename, filename, 260);
+
+ fSubjectFile.hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
+ 0, NULL);
+ fSubjectFile.lpPath = wfilename;
+ fContextWSubject.hClientToken = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,
+ FALSE, GetCurrentProcessId());
+ fContextWSubject.SubjectType = &subject;
+ fContextWSubject.Subject = &fSubjectFile;
+
+ ret = pWinVerifyTrust(INVALID_HANDLE_VALUE, &trustAction, (WINTRUST_DATA *)&fContextWSubject);
+
+ if ( fSubjectFile.hFile != INVALID_HANDLE_VALUE )
+ CloseHandle( fSubjectFile.hFile );
+ if ( fContextWSubject.hClientToken != INVALID_HANDLE_VALUE )
+ CloseHandle( fContextWSubject.hClientToken );
+
+ if (ret == ERROR_SUCCESS) {
+ success = TRUE;
+ } else {
+ DWORD gle = GetLastError();
+ switch (gle) {
+ case TRUST_E_PROVIDER_UNKNOWN:
+ afsi_log("VerifyTrust failed: \"Generic Verify V2\" Provider Unknown");
+ break;
+ case TRUST_E_NOSIGNATURE:
+ afsi_log("VerifyTrust failed: Unsigned executable");
+ break;
+ case TRUST_E_EXPLICIT_DISTRUST:
+ afsi_log("VerifyTrust failed: Certificate Marked as Untrusted by the user");
+ break;
+ case TRUST_E_SUBJECT_NOT_TRUSTED:
+ afsi_log("VerifyTrust failed: File is not trusted");
+ break;
+ case TRUST_E_BAD_DIGEST:
+ afsi_log("VerifyTrust failed: Executable has been modified");
+ break;
+ case CRYPT_E_SECURITY_SETTINGS:
+ afsi_log("VerifyTrust failed: local security options prevent verification");
+ break;
+ default:
+ afsi_log("VerifyTrust failed: 0x%X", GetLastError());
+ }
+ success = FALSE;
+ }
+ FreeLibrary(hWinTrust);
+ return success;
+}
+
+void LogCertCtx(PCCERT_CONTEXT pCtx) {
+ DWORD dwData;
+ LPTSTR szName = NULL;
+
+ if ( hCrypt32 == NULL )
+ return;
+
+ // Get Issuer name size.
+ if (!(dwData = pCertGetNameString(pCtx,
+ CERT_NAME_SIMPLE_DISPLAY_TYPE,
+ CERT_NAME_ISSUER_FLAG,
+ NULL,
+ NULL,
+ 0))) {
+ afsi_log("CertGetNameString failed: 0x%x", GetLastError());
+ goto __exit;
+ }
+
+ // Allocate memory for Issuer name.
+ szName = (LPTSTR)LocalAlloc(LPTR, dwData * sizeof(TCHAR));
+
+ // Get Issuer name.
+ if (!(pCertGetNameString(pCtx,
+ CERT_NAME_SIMPLE_DISPLAY_TYPE,
+ CERT_NAME_ISSUER_FLAG,
+ NULL,
+ szName,
+ dwData))) {
+ afsi_log("CertGetNameString failed: 0x%x", GetLastError());
+ goto __exit;
+ }
+
+ // print Issuer name.
+ afsi_log("Issuer Name: %s", szName);
+ LocalFree(szName);
+ szName = NULL;
+
+ // Get Subject name size.
+ if (!(dwData = pCertGetNameString(pCtx,
+ CERT_NAME_SIMPLE_DISPLAY_TYPE,
+ 0,
+ NULL,
+ NULL,
+ 0))) {
+ afsi_log("CertGetNameString failed: 0x%x", GetLastError());
+ goto __exit;
+ }
+
+ // Allocate memory for subject name.
+ szName = (LPTSTR)LocalAlloc(LPTR, dwData * sizeof(TCHAR));
+
+ // Get subject name.
+ if (!(pCertGetNameString(pCtx,
+ CERT_NAME_SIMPLE_DISPLAY_TYPE,
+ 0,
+ NULL,
+ szName,
+ dwData))) {
+ afsi_log("CertGetNameString failed: 0x%x", GetLastError());
+ goto __exit;
+ }
+
+ // Print Subject Name.
+ afsi_log("Subject Name: %s", szName);
+
+ __exit:
+
+ if (szName)
+ LocalFree(szName);
+}
+
+BOOL AFSModulesVerify(void)
+{
+ CHAR filename[1024];
+ CHAR afsdVersion[128];
+ CHAR modVersion[128];
+ CHAR checkName[1024];
+ BOOL trustVerified = FALSE;
+ HMODULE hMods[1024];
+ HANDLE hProcess;
+ DWORD cbNeeded;
+ unsigned int i;
+ BOOL success = TRUE;
+ PCCERT_CONTEXT pCtxService = NULL;
+ HINSTANCE hPSAPI;
+ DWORD (WINAPI *pGetModuleFileNameExA)(HANDLE hProcess, HMODULE hModule, LPTSTR lpFilename, DWORD nSize);
+ BOOL (WINAPI *pEnumProcessModules)(HANDLE hProcess, HMODULE* lphModule, DWORD cb, LPDWORD lpcbNeeded);
+ DWORD dummyLen, code;
+ DWORD cacheSize = CM_CONFIGDEFAULT_CACHESIZE;
+ DWORD verifyServiceSig = TRUE;
+ HKEY parmKey;
+
+ hPSAPI = LoadLibrary("psapi");
+
+ if ( hPSAPI == NULL )
+ return FALSE;
+
+ if (!GetModuleFileName(NULL, filename, sizeof(filename)))
+ return FALSE;
+
+ if (GetVersionInfo(filename, afsdVersion, sizeof(afsdVersion)))
+ return FALSE;
+
+ afsi_log("%s version %s", filename, afsdVersion);
+
+ if (((FARPROC) pGetModuleFileNameExA =
+ GetProcAddress( hPSAPI, "GetModuleFileNameExA" )) == NULL ||
+ ((FARPROC) pEnumProcessModules =
+ GetProcAddress( hPSAPI, "EnumProcessModules" )) == NULL)
+ {
+ FreeLibrary(hPSAPI);
+ return FALSE;
+ }
+
+
+ code = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+ "SYSTEM\\CurrentControlSet\\Services\\TransarcAFSDaemon\\Parameters",
+ 0, KEY_QUERY_VALUE, &parmKey);
+ if (code == ERROR_SUCCESS) {
+ dummyLen = sizeof(cacheSize);
+ code = RegQueryValueEx(parmKey, "CacheSize", NULL, NULL,
+ (BYTE *) &cacheSize, &dummyLen);
+ RegCloseKey (parmKey);
+ }
+
+ code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\OpenAFS\\Client",
+ 0, KEY_QUERY_VALUE, &parmKey);
+ if (code == ERROR_SUCCESS) {
+ dummyLen = sizeof(verifyServiceSig);
+ code = RegQueryValueEx(parmKey, "VerifyServiceSignature", NULL, NULL,
+ (BYTE *) &verifyServiceSig, &dummyLen);
+ RegCloseKey (parmKey);
+ }
+
+ if (verifyServiceSig && cacheSize < 716800) {
+ trustVerified = VerifyTrust(filename);
+ } else {
+ afsi_log("Signature Verification disabled");
+ }
+
+ if (trustVerified) {
+ LoadCrypt32();
+
+ // get a certificate context for the signer of afsd_service.
+ pCtxService = GetCertCtx(filename);
+ if (pCtxService)
+ LogCertCtx(pCtxService);
+ }
+
+ // Get a list of all the modules in this process.
+ hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,
+ FALSE, GetCurrentProcessId());
+
+ if (pEnumProcessModules(hProcess, hMods, sizeof(hMods), &cbNeeded))
+ {
+ afsi_log("Num of Process Modules: %d", (cbNeeded / sizeof(HMODULE)));
+
+ for (i = 0; i < (cbNeeded / sizeof(HMODULE)); i++)
+ {
+ char szModName[2048];
+
+ // Get the full path to the module's file.
+ if (pGetModuleFileNameExA(hProcess, hMods[i], szModName, sizeof(szModName)))
+ {
+ lstrcpy(checkName, szModName);
+ strlwr(checkName);
+
+ if ( strstr(checkName, "afspthread.dll") ||
+ strstr(checkName, "afsauthent.dll") ||
+ strstr(checkName, "afsrpc.dll") ||
+ strstr(checkName, "libafsconf.dll") ||
+ strstr(checkName, "libosi.dll") )
+ {
+ if (GetVersionInfo(szModName, modVersion, sizeof(modVersion))) {
+ success = FALSE;
+ continue;
+ }
+
+ afsi_log("%s version %s", szModName, modVersion);
+ if (strcmp(afsdVersion,modVersion)) {
+ afsi_log("Version mismatch: %s", szModName);
+ success = FALSE;
+ }
+ if ( trustVerified ) {
+ if ( !VerifyTrust(szModName) ) {
+ afsi_log("Signature Verification failed: %s", szModName);
+ success = FALSE;
+ }
+ else if (pCtxService) {
+ PCCERT_CONTEXT pCtx = GetCertCtx(szModName);
+
+ if (!pCtx || !pCertCompareCertificate(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING,
+ pCtxService->pCertInfo,
+ pCtx->pCertInfo)) {
+ afsi_log("Certificate mismatch: %s", szModName);
+ if (pCtx)
+ LogCertCtx(pCtx);
+
+ success = FALSE;
+ }
+
+ if (pCtx)
+ pCertFreeCertificateContext(pCtx);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (pCtxService) {
+ pCertFreeCertificateContext(pCtxService);
+ UnloadCrypt32();
+ }
+
+ FreeLibrary(hPSAPI);
+
+ CloseHandle(hProcess);
+ return success;
+}
+
typedef BOOL ( APIENTRY * AfsdInitHook )(void);
#define AFSD_INIT_HOOK "AfsdInitHook"
#define AFSD_HOOK_DLL "afsdhook.dll"
}
#endif
+ /* Verify the versions of the DLLs which were loaded */
+ if (!AFSModulesVerify()) {
+ 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;
+ }
+
/* allow an exit to be called prior to any initialization */
hInitHookDll = LoadLibrary(AFSD_HOOK_DLL);
if (hInitHookDll)
INetFwOpenPort * fwPort = NULL;
HRESULT hr;
HRESULT rhr = S_OK; /* return value */
+ int i = 0;
hr = fwProfile->get_GloballyOpenPorts(&fwPorts);
if (FAILED(hr)) {
}
// go through the supplied ports
- for (int i=0; i<nPorts; i++) {
+ for (i=0; i<nPorts; i++) {
VARIANT_BOOL vbEnabled;
BSTR bstName = NULL;
BOOL bCreate = FALSE;
GetCPInfo(CP_ACP, &CodePageInfo);
- if (CodePageInfo.MaxCharSize > 1)
- // Only supporting non-Unicode strings
- return FALSE;
-
if (uInputString.Buffer && ((LPBYTE) uInputString.Buffer)[1] == '\0')
{
// Looks like unicode, better translate it
}
else
lpszOutputString[0] = '\0';
+
return FALSE;
} // UnicodeStringToANSI
0, 0,
buf_nbuffers * buf_bufferSize);
if (data == NULL) {
+ afsi_log("Error mapping view of file: 0x%X", GetLastError());
if (hf != INVALID_HANDLE_VALUE)
CloseHandle(hf);
CloseHandle(hm);
lock_ObtainRead(&buf_globalLock);
- sprintf(output, "%s - dumping buf_HashTable - buf_hashSize=%d\n", cookie, buf_hashSize);
+ StringCbPrintfA(output, sizeof(output), "%s - dumping buf_HashTable - buf_hashSize=%d\n", cookie, buf_hashSize);
WriteFile(outputFile, output, strlen(output), &zilch, NULL);
for (i = 0; i < buf_hashSize; i++)
{
- for(bp = buf_hashTablepp[i]; bp; bp=bp->hashp)
+ for (bp = buf_hashTablepp[i]; bp; bp=bp->hashp)
{
if (bp->refCount)
{
- sprintf(output, "%s bp=0x%08X, hash=%d, fid (cell=%d, volume=%d,"
- "vnode=%d, unique=%d), size=%d refCount=%d\n",
+ StringCbPrintfA(output, sizeof(output), "vnode=%d, unique=%d), size=%d refCount=%d\n",
cookie, (void *)bp, i, bp->fid.cell, bp->fid.volume,
bp->fid.vnode, bp->fid.unique, bp->size, bp->refCount);
WriteFile(outputFile, output, strlen(output), &zilch, NULL);
}
}
- sprintf(output, "%s - Done dumping buf_HashTable.\n", cookie);
+ StringCbPrintfA(output, sizeof(output), "%s - Done dumping buf_HashTable.\n", cookie);
WriteFile(outputFile, output, strlen(output), &zilch, NULL);
lock_ReleaseRead(&buf_globalLock);
if (scp->fid.volume == tfid.volume &&
scp->fid.vnode == tfid.vnode &&
scp->fid.unique == tfid.unique) {
- scp->refCount++;
+ cm_HoldSCacheNoLock(scp);
lock_ReleaseWrite(&cm_scacheLock);
osi_Log1(afsd_logp, "Discarding SCache scp %x", scp);
lock_ObtainMutex(&scp->mx);
lock_ReleaseMutex(&scp->mx);
cm_CallbackNotifyChange(scp);
lock_ObtainWrite(&cm_scacheLock);
- scp->refCount--;
+ cm_ReleaseSCacheNoLock(scp);
}
}
lock_ReleaseWrite(&cm_scacheLock);
for (hash = 0; hash < cm_hashTableSize; hash++) {
for(scp=cm_hashTablep[hash]; scp; scp=scp->nextp) {
if (scp->fid.volume == fidp->Volume) {
- scp->refCount++;
+ cm_HoldSCacheNoLock(scp);
lock_ReleaseWrite(&cm_scacheLock);
lock_ObtainMutex(&scp->mx);
osi_Log1(afsd_logp, "Discarding SCache scp %x", scp);
lock_ReleaseMutex(&scp->mx);
cm_CallbackNotifyChange(scp);
lock_ObtainWrite(&cm_scacheLock);
- scp->refCount--;
+ cm_ReleaseSCacheNoLock(scp);
}
} /* search one hash bucket */
} /* search all hash buckets */
lock_ObtainWrite(&cm_scacheLock);
for (hash = 0; hash < cm_hashTableSize; hash++) {
for (scp=cm_hashTablep[hash]; scp; scp=scp->nextp) {
- scp->refCount++;
+ cm_HoldSCacheNoLock(scp);
lock_ReleaseWrite(&cm_scacheLock);
lock_ObtainMutex(&scp->mx);
discarded = 0;
if (discarded)
cm_CallbackNotifyChange(scp);
lock_ObtainWrite(&cm_scacheLock);
- scp->refCount--;
+ cm_ReleaseSCacheNoLock(scp);
} /* search one hash bucket */
} /* search all hash buckets */
lock_ObtainWrite(&cm_scacheLock);
for (i=0; i<cm_hashTableSize; i++) {
for (scp = cm_hashTablep[i]; scp; scp=scp->nextp) {
- scp->refCount++;
+ cm_HoldSCacheNoLock(scp);
lock_ReleaseWrite(&cm_scacheLock);
if (scp->cbExpires > 0 && (scp->cbServerp == NULL || now > scp->cbExpires)) {
osi_Log1(afsd_logp, "Callback Expiration Discarding SCache scp %x", scp);
- cm_CallbackNotifyChange(scp);
lock_ObtainMutex(&scp->mx);
cm_DiscardSCache(scp);
lock_ReleaseMutex(&scp->mx);
+ cm_CallbackNotifyChange(scp);
}
lock_ObtainWrite(&cm_scacheLock);
- osi_assert(scp->refCount-- > 0);
+ cm_ReleaseSCacheNoLock(scp);
}
}
lock_ReleaseWrite(&cm_scacheLock);
extern osi_rwlock_t cm_callbackLock;
+extern void cm_CallbackNotifyChange(cm_scache_t *scp);
+
#endif /* _CM_CALLBACK_H_ENV__ */
void cm_GetConfigDir(char *dir)
{
- char wdir[256];
+ char wdir[256];
int tlen;
#ifdef AFS_WIN95_ENV
char *afsconf_path;
extern long cm_GetCellServDB(char *cellNamep);
+extern void cm_GetConfigDir(char *dir);
+
#endif /* __CM_CONFIG_INTERFACES_ONLY__ */
#endif /* __CONFIG_H_ENV_ */
/* called directly from ioctl */
/* called while not holding freelance lock */
-int cm_noteLocalMountPointChange() {
+int cm_noteLocalMountPointChange(void) {
lock_ObtainMutex(&cm_Freelance_Lock);
cm_fakeDirVersion++;
cm_localMountPointChangeFlag = 1;
) {
// mark the scp to be reused
+ cm_HoldSCacheNoLock(scp);
lock_ReleaseWrite(&cm_scacheLock);
lock_ObtainMutex(&scp->mx);
cm_DiscardSCache(scp);
lock_ReleaseMutex(&scp->mx);
cm_CallbackNotifyChange(scp);
lock_ObtainWrite(&cm_scacheLock);
- scp->refCount--;
+ cm_ReleaseSCacheNoLock(scp);
// take the scp out of the hash
lscpp = &cm_hashTablep[hash];
#if !defined(DJGPP)
if (RegOpenKeyEx( HKEY_LOCAL_MACHINE,
- "SOFTWARE\\OpenAFS\\Client\\Freelance",
- 0,
- KEY_READ|KEY_WRITE|KEY_QUERY_VALUE,
- &hkFreelance) == ERROR_SUCCESS) {
+ "SOFTWARE\\OpenAFS\\Client\\Freelance",
+ 0,
+ KEY_READ|KEY_WRITE|KEY_QUERY_VALUE,
+ &hkFreelance) == ERROR_SUCCESS) {
RegQueryInfoKey( hkFreelance,
NULL, /* lpClass */
smb_UnixTimeFromLargeSearchTime(&FakeFreelanceModTime, &ftLastWriteTime);
if ( dwMountPoints == 0 ) {
- sprintf(line,"%s#%s:root.cell.\n",rootCellName,rootCellName);
- dwType = REG_SZ;
- dwSize = strlen(line) + 1;
- RegSetValueEx( hkFreelance, "0", 0, dwType, line, dwSize);
- sprintf(line,".%s%%%s:root.cell.\n",rootCellName,rootCellName);
- dwSize = strlen(line) + 1;
- RegSetValueEx( hkFreelance, "1", 0, dwType, line, dwSize);
- dwMountPoints = 2;
+ rootCellName[0] = '.';
+ code = cm_GetRootCellName(&rootCellName[1]);
+ if (code == 0) {
+ cm_FreelanceAddMount(&rootCellName[1], &rootCellName[1], "root.cell", 0, NULL);
+ cm_FreelanceAddMount(rootCellName, &rootCellName[1], "root.cell", 1, NULL);
+ dwMountPoints = 2;
+ }
}
if (RegCreateKeyEx( HKEY_LOCAL_MACHINE,
TCHAR szValueName[16];
DWORD dwValueSize = 16;
dwSize = sizeof(line);
- RegEnumValue( hkFreelance, dwIndex, szValueName, &dwValueSize, NULL,
- &dwType, line, &dwSize);
+ if (RegEnumValue( hkFreelance, dwIndex, szValueName, &dwValueSize, NULL,
+ &dwType, line, &dwSize))
+ {
+ afsi_log("RegEnumValue(hkFreelance) failed");
+ cm_noLocalMountPoints--;
+ continue;
+ }
+
+ afsi_log("Mountpoint[%d] = %s",dwIndex, line);
/* find the trailing dot; null terminate after it */
t2 = strrchr(line, '.');
TCHAR szValueName[16];
DWORD dwValueSize = 16;
dwSize = sizeof(line);
- RegEnumValue( hkFreelanceSymlinks, dwIndex, szValueName, &dwValueSize, NULL,
- &dwType, line, &dwSize);
+ if (RegEnumValue( hkFreelanceSymlinks, dwIndex, szValueName, &dwValueSize, NULL,
+ &dwType, line, &dwSize))
+ {
+ afsi_log("RegEnumValue(hkFreelanceSymlinks) failed");
+ cm_noLocalMountPoints--;
+ continue;
+ }
+
+ afsi_log("Symlink[%d] = %s",dwIndex, line);
/* find the trailing dot; null terminate after it */
t2 = strrchr(line, '.');
strcat(hdir, AFS_FREELANCE_INI);
// open the ini file for reading
fp = fopen(hdir, "r");
-
- // if we fail to open the file, create an empty one
if (!fp) {
- fp = fopen(hdir, "w");
- code = cm_GetRootCellName(rootCellName);
- if (code == 0) {
- fputs("1\n", fp);
- fprintf(fp,"%s#%s:root.cell.\n",rootCellName,rootCellName);
- fprintf(fp,".%s%%%s:root.cell.\n",rootCellName,rootCellName);
- fclose(fp);
- fp = fopen(hdir, "r");
- } else {
- fputs("0\n", fp);
- fclose(fp);
- return 0; /* success */
- }
+ /* look in the Windows directory where we used to store the file */
+ GetWindowsDirectory(hdir, sizeof(hdir));
+ strcat(hdir,"\\");
+ strcat(hdir, AFS_FREELANCE_INI);
+ fp = fopen(hdir, "r");
}
- // we successfully opened the file
- osi_Log0(afsd_logp,"opened afs_freelance.ini");
-
#if !defined(DJGPP)
RegCreateKeyEx( HKEY_LOCAL_MACHINE,
"SOFTWARE\\OpenAFS\\Client\\Freelance",
dwIndex = 0;
#endif
+ if (!fp) {
+#if !defined(DJGPP)
+ RegCloseKey(hkFreelance);
+#endif
+ rootCellName[0] = '.';
+ code = cm_GetRootCellName(&rootCellName[1]);
+ if (code == 0) {
+ cm_FreelanceAddMount(&rootCellName[1], &rootCellName[1], "root.cell", 0, NULL);
+ cm_FreelanceAddMount(rootCellName, &rootCellName[1], "root.cell", 1, NULL);
+ }
+ return 0;
+ }
+
+ // we successfully opened the file
+ osi_Log0(afsd_logp,"opened afs_freelance.ini");
+
// now we read the first line to see how many entries
// there are
fgets(line, sizeof(line), fp);
// that we read
cm_noLocalMountPoints = atoi(line);
- // create space to store the local mount points
- cm_localMountPoints = malloc(sizeof(cm_localMountPoint_t) * cm_noLocalMountPoints);
- aLocalMountPoint = cm_localMountPoints;
+ if (cm_noLocalMountPoints > 0) {
+ // create space to store the local mount points
+ cm_localMountPoints = malloc(sizeof(cm_localMountPoint_t) * cm_noLocalMountPoints);
+ aLocalMountPoint = cm_localMountPoints;
+ }
// now we read n lines and parse them into local mount points
// where n is the number of local mount points there are, as
return -1;
}
+ /* find the trailing dot; null terminate after it */
+ t2 = strrchr(line, '.');
+ if (t2)
+ *(t2+1) = '\0';
+
#if !defined(DJGPP)
if ( hkFreelance ) {
char szIndex[16];
*(aLocalMountPoint->namep + (t-line)) = 0;
aLocalMountPoint->mountPointStringp=malloc(strlen(line) - (t-line) + 1);
- memcpy(aLocalMountPoint->mountPointStringp, t, strlen(line)-(t-line)-2);
- *(aLocalMountPoint->mountPointStringp + (strlen(line)-(t-line)-2)) = 0;
+ memcpy(aLocalMountPoint->mountPointStringp, t, strlen(line)-(t-line)-1);
+ *(aLocalMountPoint->mountPointStringp + (strlen(line)-(t-line)-1)) = 0;
osi_Log2(afsd_logp,"found mount point: name %s, string %s",
aLocalMountPoint->namep,
return cm_noLocalMountPoints;
}
+#if !defined(DJGPP)
+long cm_FreelanceMountPointExists(char * filename)
+{
+ char* cp;
+ char line[512];
+ char shortname[200];
+ int found = 0;
+ HKEY hkFreelance = 0;
+ DWORD dwType, dwSize;
+ DWORD dwMountPoints;
+ DWORD dwIndex;
+
+ lock_ObtainMutex(&cm_Freelance_Lock);
+
+ if (RegOpenKeyEx( HKEY_LOCAL_MACHINE,
+ "SOFTWARE\\OpenAFS\\Client\\Freelance",
+ 0,
+ KEY_READ|KEY_QUERY_VALUE,
+ &hkFreelance) == ERROR_SUCCESS)
+ {
+ RegQueryInfoKey( hkFreelance,
+ NULL, /* lpClass */
+ NULL, /* lpcClass */
+ NULL, /* lpReserved */
+ NULL, /* lpcSubKeys */
+ NULL, /* lpcMaxSubKeyLen */
+ NULL, /* lpcMaxClassLen */
+ &dwMountPoints, /* lpcValues */
+ NULL, /* lpcMaxValueNameLen */
+ NULL, /* lpcMaxValueLen */
+ NULL, /* lpcbSecurityDescriptor */
+ NULL /* lpftLastWriteTime */
+ );
+
+ for ( dwIndex = 0; dwIndex < dwMountPoints; dwIndex++ ) {
+ TCHAR szValueName[16];
+ DWORD dwValueSize = 16;
+ dwSize = sizeof(line);
+ RegEnumValue( hkFreelance, dwIndex, szValueName, &dwValueSize, NULL,
+ &dwType, line, &dwSize);
+
+ cp=strchr(line, '#');
+ if (!cp)
+ cp=strchr(line, '%');
+ memcpy(shortname, line, cp-line);
+ shortname[cp-line]=0;
+
+ if (!strcmp(shortname, filename)) {
+ found = 1;
+ break;
+ }
+ }
+ for ( dwIndex = 0; dwIndex < dwMountPoints; dwIndex++ ) {
+ TCHAR szValueName[16];
+ DWORD dwValueSize = 16;
+ dwSize = sizeof(line);
+ RegEnumValue( hkFreelance, dwIndex, szValueName, &dwValueSize, NULL,
+ &dwType, line, &dwSize);
+
+ cp=strchr(line, '#');
+ if (!cp)
+ cp=strchr(line, '%');
+ memcpy(shortname, line, cp-line);
+ shortname[cp-line]=0;
+
+ if (!stricmp(shortname, filename)) {
+ found = 1;
+ break;
+ }
+ }
+ RegCloseKey(hkFreelance);
+ }
+
+ lock_ReleaseMutex(&cm_Freelance_Lock);
+
+ return found;
+}
+
+long cm_FreelanceSymlinkExists(char * filename)
+{
+ char* cp;
+ char line[512];
+ char shortname[200];
+ int found = 0;
+ HKEY hkFreelance = 0;
+ DWORD dwType, dwSize;
+ DWORD dwSymlinks;
+ DWORD dwIndex;
+
+ lock_ObtainMutex(&cm_Freelance_Lock);
+
+ if (RegOpenKeyEx( HKEY_LOCAL_MACHINE,
+ "SOFTWARE\\OpenAFS\\Client\\Freelance\\Symlinks",
+ 0,
+ KEY_READ|KEY_QUERY_VALUE,
+ &hkFreelance) == ERROR_SUCCESS)
+ {
+ RegQueryInfoKey( hkFreelance,
+ NULL, /* lpClass */
+ NULL, /* lpcClass */
+ NULL, /* lpReserved */
+ NULL, /* lpcSubKeys */
+ NULL, /* lpcMaxSubKeyLen */
+ NULL, /* lpcMaxClassLen */
+ &dwSymlinks, /* lpcValues */
+ NULL, /* lpcMaxValueNameLen */
+ NULL, /* lpcMaxValueLen */
+ NULL, /* lpcbSecurityDescriptor */
+ NULL /* lpftLastWriteTime */
+ );
+
+ for ( dwIndex = 0; dwIndex < dwSymlinks; dwIndex++ ) {
+ TCHAR szValueName[16];
+ DWORD dwValueSize = 16;
+ dwSize = sizeof(line);
+ RegEnumValue( hkFreelance, dwIndex, szValueName, &dwValueSize, NULL,
+ &dwType, line, &dwSize);
+
+ cp=strchr(line, ':');
+ memcpy(shortname, line, cp-line);
+ shortname[cp-line]=0;
+
+ if (!strcmp(shortname, filename)) {
+ found = 1;
+ break;
+ }
+ }
+ for ( dwIndex = 0; dwIndex < dwSymlinks; dwIndex++ ) {
+ TCHAR szValueName[16];
+ DWORD dwValueSize = 16;
+ dwSize = sizeof(line);
+ RegEnumValue( hkFreelance, dwIndex, szValueName, &dwValueSize, NULL,
+ &dwType, line, &dwSize);
+
+ cp=strchr(line, ':');
+ memcpy(shortname, line, cp-line);
+ shortname[cp-line]=0;
+
+ if (!stricmp(shortname, filename)) {
+ found = 1;
+ break;
+ }
+ }
+ RegCloseKey(hkFreelance);
+ }
+
+ lock_ReleaseMutex(&cm_Freelance_Lock);
+
+ return found;
+}
+#endif
+
long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw, cm_fid_t *fidp)
{
FILE *fp;
osi_LogSaveString(afsd_logp,cellname),
osi_LogSaveString(afsd_logp,volume),
rw ? "rw" : "ro");
+
+ if ( filename[0] == '\0' || cellname[0] == '\0' || volume[0] == '\0' )
+ return -1;
+
if (cellname[0] == '.') {
if (!cm_GetCell_Gen(&cellname[1], fullname, CM_FLAG_CREATE))
return -1;
if (!cm_GetCell_Gen(cellname, fullname, CM_FLAG_CREATE))
return -1;
}
+
+#if !defined(DJGPP)
+ if ( cm_FreelanceMountPointExists(filename) ||
+ cm_FreelanceSymlinkExists(filename) )
+ return -1;
+#endif
osi_Log1(afsd_logp,"Freelance Adding Mount for Cell: %s",
osi_LogSaveString(afsd_logp,cellname));
RegSetValueEx( hkFreelance, szIndex, 0, dwType, line, dwSize);
break;
} else {
- int len = strlen(filename);
- if ( dwType == REG_SZ && !strncmp(filename, szMount, len) &&
- (szMount[len] == '%' || szMount[len] == '#')) {
+ int len = strlen(filename);
+ if ( dwType == REG_SZ && !strncmp(filename, szMount, len) &&
+ (szMount[len] == '%' || szMount[len] == '#')) {
/* Replace the existing value */
dwType = REG_SZ;
dwSize = strlen(line) + 1;
lock_ObtainMutex(&cm_Freelance_Lock);
-
#if !defined(DJGPP)
if (RegOpenKeyEx( HKEY_LOCAL_MACHINE,
"SOFTWARE\\OpenAFS\\Client\\Freelance",
long cm_FreelanceAddSymlink(char *filename, char *destination, cm_fid_t *fidp)
{
- FILE *fp;
- char hfile[120];
char line[512];
char fullname[200];
- int n;
int alias = 0;
#if !defined(DJGPP)
HKEY hkFreelanceSymlinks = 0;
DWORD dwIndex;
#endif
- /* before adding, verify the cell name; if it is not a valid cell,
- don't add the mount point.
- allow partial matches as a means of poor man's alias. */
- /* major performance issue? */
+ /* before adding, verify the filename. If it is already in use, either as
+ * as mount point or a cellname, do not permit the creation of the symlink.
+ */
osi_Log2(afsd_logp,"Freelance Add Symlink request: filename=%s destination=%s",
osi_LogSaveString(afsd_logp,filename),
osi_LogSaveString(afsd_logp,destination));
+ if ( filename[0] == '\0' || destination[0] == '\0' )
+ return -1;
+
+ fullname[0] = '\0';
+ if (filename[0] == '.') {
+ cm_GetCell_Gen(&filename[1], fullname, CM_FLAG_CREATE);
+ if (stricmp(&filename[1],fullname) == 0)
+ return -1;
+ } else {
+ cm_GetCell_Gen(filename, fullname, CM_FLAG_CREATE);
+ if (stricmp(filename,fullname) == 0)
+ return -1;
+ }
+
+#if !defined(DJGPP)
+ if ( cm_FreelanceMountPointExists(filename) ||
+ cm_FreelanceSymlinkExists(filename) )
+ return -1;
+#endif
+
lock_ObtainMutex(&cm_Freelance_Lock);
#if !defined(DJGPP)
RegSetValueEx( hkFreelanceSymlinks, szIndex, 0, dwType, line, dwSize);
break;
} else {
- int len = strlen(filename);
- if ( dwType == REG_SZ && !strncmp(filename, szLink, len) && szLink[len] == ':') {
+ int len = strlen(filename);
+ if ( dwType == REG_SZ && !strncmp(filename, szLink, len) && szLink[len] == ':') {
/* Replace the existing value */
dwType = REG_SZ;
dwSize = strlen(line) + 1;
long cm_FreelanceRemoveSymlink(char *toremove)
{
- int i, n;
char* cp;
char line[512];
char shortname[200];
- char hfile[120], hfile2[120];
- FILE *fp1, *fp2;
int found=0;
#if !defined(DJGPP)
HKEY hkFreelanceSymlinks = 0;
lock_ObtainMutex(&cm_Freelance_Lock);
-
#if !defined(DJGPP)
if (RegOpenKeyEx( HKEY_LOCAL_MACHINE,
"SOFTWARE\\OpenAFS\\Client\\Freelance\\Symlinks",
extern int cm_getLocalMountPointChange();
extern int cm_reInitLocalMountPoints();
extern void cm_InitFreelance();
+extern int cm_noteLocalMountPointChange(void);
extern long cm_FreelanceRemoveMount(char *toremove);
extern long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw, cm_fid_t *fidp);
extern long cm_FreelanceRemoveSymlink(char *toremove);
lock_ObtainWrite(&cm_scacheLock);
for (hash=0; hash < cm_hashTableSize; hash++) {
for (scp=cm_hashTablep[hash]; scp; scp=scp->nextp) {
- scp->refCount++;
+ cm_HoldSCacheNoLock(scp);
lock_ReleaseWrite(&cm_scacheLock);
lock_ObtainMutex(&scp->mx);
cm_InvalidateACLUser(scp, userp);
lock_ReleaseMutex(&scp->mx);
lock_ObtainWrite(&cm_scacheLock);
- scp->refCount--;
+ cm_ReleaseSCacheNoLock(scp);
}
}
lock_ReleaseWrite(&cm_scacheLock);
* easier (because we can always jump past the initial "/afs" to find
* the AFS path that should be written into afsdsbmt.ini).
*/
-void cm_NormalizeAfsPath (char *outpathp, char *inpathp)
+void cm_NormalizeAfsPath(char *outpathp, long outlen, char *inpathp)
{
char *cp;
char bslash_mountRoot[256];
bslash_mountRoot[0] = '\\';
if (!strnicmp (inpathp, cm_mountRoot, strlen(cm_mountRoot)))
- lstrcpy (outpathp, inpathp);
+ StringCbCopy(outpathp, outlen, inpathp);
else if (!strnicmp (inpathp, bslash_mountRoot, strlen(bslash_mountRoot)))
- lstrcpy (outpathp, inpathp);
+ StringCbCopy(outpathp, outlen, inpathp);
else if ((inpathp[0] == '/') || (inpathp[0] == '\\'))
- sprintf (outpathp, "%s%s", cm_mountRoot, inpathp);
+ StringCbPrintfA(outpathp, outlen, "%s%s", cm_mountRoot, inpathp);
else // inpathp looks like "<cell>/usr"
- sprintf (outpathp, "%s/%s", cm_mountRoot, inpathp);
+ StringCbPrintfA(outpathp, outlen, "%s/%s", cm_mountRoot, inpathp);
for (cp = outpathp; *cp != 0; ++cp) {
if (*cp == '\\')
}
if (!strcmpi (outpathp, cm_mountRoot)) {
- strcpy (outpathp, cm_mountRoot);
+ StringCbCopy(outpathp, outlen, cm_mountRoot);
}
}
+#define LEAF_SIZE 256
/* parse the passed-in file name and do a namei on its parent. If we fail,
* return an error code, otherwise return the vnode located in *scpp.
*/
char *tp, *jp;
cm_scache_t *substRootp;
- strcpy(tbuffer, ioctlp->inDatap);
+ StringCbCopyA(tbuffer, sizeof(tbuffer), ioctlp->inDatap);
tp = strrchr(tbuffer, '\\');
jp = strrchr(tbuffer, '/');
if (!tp)
else if (jp && (tp - tbuffer) < (jp - tbuffer))
tp = jp;
if (!tp) {
- strcpy(tbuffer, "\\");
+ StringCbCopyA(tbuffer, sizeof(tbuffer), "\\");
if (leafp)
- strcpy(leafp, ioctlp->inDatap);
+ StringCbCopyA(leafp, LEAF_SIZE, ioctlp->inDatap);
}
else {
*tp = 0;
if (leafp)
- strcpy(leafp, tp+1);
+ StringCbCopyA(leafp, LEAF_SIZE, tp+1);
}
if (tbuffer[0] == tbuffer[1] &&
scp->fid.cell==AFS_FAKE_ROOT_CELL_ID &&
scp->fid.volume==AFS_FAKE_ROOT_VOL_ID &&
scp->fid.vnode==0x1 && scp->fid.unique==0x1 ) {
- strcpy(ioctlp->outDatap, "Freelance.Local.Root");
+ StringCbCopyA(ioctlp->outDatap, 999999, "Freelance.Local.Root");
ioctlp->outDatap += strlen(ioctlp->outDatap) + 1;
code = 0;
} else
{
cellp = cm_FindCellByID(scp->fid.cell);
if (cellp) {
- strcpy(ioctlp->outDatap, cellp->namep);
+ StringCbCopyA(ioctlp->outDatap, 999999, cellp->namep);
ioctlp->outDatap += strlen(ioctlp->outDatap) + 1;
code = 0;
}
for (i=0; i<cm_hashTableSize; i++) {
for (scp = cm_hashTablep[i]; scp; scp = scp->nextp) {
if (scp->fid.volume == volume) {
- scp->refCount++;
+ cm_HoldSCacheNoLock(scp);
lock_ReleaseWrite(&cm_scacheLock);
/* now flush the file */
if ( code )
afsi_log("cm_FlushFile returns error: [%x]",code);
lock_ObtainWrite(&cm_scacheLock);
- scp->refCount--;
+ cm_ReleaseSCacheNoLock(scp);
}
}
}
cp = ioctlp->inDatap;
memcpy((char *)&volStat, cp, sizeof(AFSFetchVolumeStatus));
cp += sizeof(AFSFetchVolumeStatus);
- strcpy(volName, cp);
+ StringCbCopyA(volName, sizeof(volName), cp);
cp += strlen(volName)+1;
- strcpy(offLineMsg, cp);
+ StringCbCopyA(offLineMsg, sizeof(offLineMsg), cp);
cp += strlen(offLineMsg)+1;
- strcpy(motd, cp);
+ StringCbCopyA(motd, sizeof(motd), cp);
storeStat.Mask = 0;
if (volStat.MinQuota != -1) {
storeStat.MinQuota = volStat.MinQuota;
cp = ioctlp->outDatap;
memcpy(cp, (char *)&volStat, sizeof(VolumeStatus));
cp += sizeof(VolumeStatus);
- strcpy(cp, volName);
+ StringCbCopyA(cp, 999999, volName);
cp += strlen(volName)+1;
- strcpy(cp, offLineMsg);
+ StringCbCopyA(cp, 999999, offLineMsg);
cp += strlen(offLineMsg)+1;
- strcpy(cp, motd);
+ StringCbCopyA(cp, 999999, motd);
cp += strlen(motd)+1;
/* now return updated return data pointer */
cp = ioctlp->outDatap;
memcpy(cp, (char *)&volStat, sizeof(AFSFetchVolumeStatus));
cp += sizeof(AFSFetchVolumeStatus);
- strcpy(cp, volName);
+ StringCbCopyA(cp, 999999, volName);
cp += strlen(volName)+1;
- strcpy(cp, offLineMsg);
+ StringCbCopyA(cp, 999999, offLineMsg);
cp += strlen(offLineMsg)+1;
- strcpy(cp, motd);
+ StringCbCopyA(cp, 999999, motd);
cp += strlen(motd)+1;
/* return new size */
code = cm_ReadMountPoint(scp, userp, &req);
if (code == 0) {
cp = ioctlp->outDatap;
- strcpy(cp, scp->mountPointStringp);
+ StringCbCopyA(cp, 999999, scp->mountPointStringp);
cp += strlen(cp) + 1;
ioctlp->outDatap = cp;
}
}
lock_ReleaseRead(&cm_serverLock);
cp = basep + max * sizeof(afs_int32);
- strcpy(cp, tcellp->namep);
+ StringCbCopyA(cp, 999999, tcellp->namep);
cp += strlen(tcellp->namep)+1;
ioctlp->outDatap = cp;
}
}
/* return the default cellname to the caller */
- strcpy(ioctlp->outDatap, cm_rootCellp->namep);
+ StringCbCopyA(ioctlp->outDatap, 999999, cm_rootCellp->namep);
ioctlp->outDatap += strlen(ioctlp->outDatap) +1;
/* done: success */
osi_panic("cm_IoctlSysName: !cm_sysName\n", __FILE__, __LINE__);
if (!setSysName) { /* user just wants the info */
- strcpy(outname, cm_sysName);
+ StringCbCopyA(outname, sizeof(outname), cm_sysName);
foundname = cm_sysNameCount;
*sysnamelist = cm_sysNameList;
} else {
/* clear @sys entries from the dnlc, once afs_lookup can
* do lookups of @sys entries and thinks it can trust them */
/* privs ok, store the entry, ... */
- strcpy(cm_sysName, inname);
- strcpy(cm_sysNameList[0], inname);
+ StringCbCopyA(cm_sysName, sizeof(cm_sysName), inname);
+ StringCbCopyA(cm_sysNameList[0], MAXSYSNAME, inname);
if (setSysName > 1) { /* ... or list */
cp = ioctlp->inDatap;
for (count = 1; count < setSysName; ++count) {
osi_panic("cm_IoctlSysName: no cm_sysNameList entry to write\n",
__FILE__, __LINE__);
t = strlen(cp);
- strcpy(cm_sysNameList[count], cp);
+ StringCbCopyA(cm_sysNameList[count], MAXSYSNAME, cp);
cp += t + 1;
}
}
memcpy(cp, (char *)&foundname, sizeof(afs_int32));
cp += sizeof(afs_int32); /* skip found flag */
if (foundname) {
- strcpy(cp, outname);
+ StringCbCopyA(cp, 999999, outname);
cp += strlen(outname) + 1; /* skip name and terminating null char */
for ( count=1; count < foundname ; ++count) { /* ... or list */
if ( !(*sysnamelist)[count] )
if (t >= MAXSYSNAME)
osi_panic("cm_IoctlSysName: sysname entry garbled\n",
__FILE__, __LINE__);
- strcpy(cp, (*sysnamelist)[count]);
+ StringCbCopyA(cp, 999999, (*sysnamelist)[count]);
cp += t + 1;
}
}
long cm_IoctlCreateMountPoint(struct smb_ioctl *ioctlp, struct cm_user *userp)
{
- char leaf[256];
+ char leaf[LEAF_SIZE];
long code;
cm_scache_t *dscp;
cm_attr_t tattr;
*/
/* Extract the possibly partial cell name */
- strcpy(cell, ioctlp->inDatap + 1); /* Skip the mp type character */
+ StringCbCopyA(cell, sizeof(cell), ioctlp->inDatap + 1); /* Skip the mp type character */
if (cp = strchr(cell, ':')) {
/* Extract the volume name */
*cp = 0;
- strcpy(volume, cp + 1);
+ StringCbCopyA(volume, sizeof(volume), cp + 1);
/* Get the full name for this cell */
code = cm_SearchCellFile(cell, fullCell, 0, 0);
if (code)
return CM_ERROR_NOSUCHCELL;
- sprintf(mpInfo, "%c%s:%s", *ioctlp->inDatap, fullCell, volume);
+ StringCbPrintfA(mpInfo, sizeof(mpInfo), "%c%s:%s", *ioctlp->inDatap, fullCell, volume);
} else {
/* No cell name specified */
- strcpy(mpInfo, ioctlp->inDatap);
+ StringCbCopyA(mpInfo, sizeof(mpInfo), ioctlp->inDatap);
}
#ifdef AFS_FREELANCE_CLIENT
long cm_IoctlSymlink(struct smb_ioctl *ioctlp, struct cm_user *userp)
{
- char leaf[256];
+ char leaf[LEAF_SIZE];
long code;
cm_scache_t *dscp;
cm_attr_t tattr;
if (code == 0) {
cp = ioctlp->outDatap;
if (newRootScp != NULL) {
- strcpy(cp, cm_mountRoot);
- strcat(cp, "/");
+ StringCbCopyA(cp, 999999, cm_mountRoot);
+ StringCbCatA(cp, 999999, "/");
cp += strlen(cp);
}
- strcpy(cp, spacep->data);
+ StringCbCopyA(cp, 999999, spacep->data);
cp += strlen(cp) + 1;
ioctlp->outDatap = cp;
cm_FreeSpace(spacep);
ucellp->kvno = ct.AuthHandle;
ucellp->expirationTime = ct.EndTimestamp;
ucellp->gen++;
- if (uname) strcpy(ucellp->userName, uname);
+ if (uname)
+ StringCbCopyA(ucellp->userName, MAXKTCNAMELEN, uname);
ucellp->flags |= CM_UCELLFLAG_RXKAD;
lock_ReleaseMutex(&userp->mx);
cp += sizeof(temp);
/* cell name */
- strcpy(cp, ucellp->cellp->namep);
+ StringCbCopyA(cp, 999999, ucellp->cellp->namep);
cp += strlen(cp) + 1;
/* user name */
- strcpy(cp, ucellp->userName);
+ StringCbCopyA(cp, 999999, ucellp->userName);
cp += strlen(cp) + 1;
ioctlp->outDatap = cp;
cp += sizeof(temp);
/* cell name */
- strcpy(cp, ucellp->cellp->namep);
+ StringCbCopyA(cp, 999999, ucellp->cellp->namep);
cp += strlen(cp) + 1;
/* user name */
- strcpy(cp, ucellp->userName);
+ StringCbCopyA(cp, 999999, ucellp->userName);
cp += strlen(cp) + 1;
ioctlp->outDatap = cp;
/* Parse the input parameters--first the required afs path,
* then the requested submount name (which may be "").
*/
- cm_NormalizeAfsPath (afspath, ioctlp->inDatap);
+ cm_NormalizeAfsPath (afspath, sizeof(afspath), ioctlp->inDatap);
submountreqp = ioctlp->inDatap + (strlen(ioctlp->inDatap)+1);
/* If the caller supplied a suggested submount name, see if
strlen(&afspath[strlen(cm_mountRoot)])+1:2);
RegCloseKey( hkSubmounts );
- strcpy(ioctlp->outDatap, submountreqp);
- ioctlp->outDatap += strlen(ioctlp->outDatap) +1;
- lock_ReleaseMutex(&cm_Afsdsbmt_Lock);
+ StringCbCopyA(ioctlp->outDatap, 999999, submountreqp);
+ ioctlp->outDatap += strlen(ioctlp->outDatap) +1;
+ lock_ReleaseMutex(&cm_Afsdsbmt_Lock);
return 0;
}
* supplied path matches the submount's path, we can still
* use the suggested submount name.
*/
- cm_NormalizeAfsPath (submountPathNormalized, submountPath);
+ cm_NormalizeAfsPath (submountPathNormalized, sizeof(submountPathNormalized), submountPath);
if (!strcmp (submountPathNormalized, afspath)) {
- strcpy(ioctlp->outDatap, submountreqp);
+ StringCbCopyA(ioctlp->outDatap, 999999, submountreqp);
ioctlp->outDatap += strlen(ioctlp->outDatap) +1;
RegCloseKey( hkSubmounts );
lock_ReleaseMutex(&cm_Afsdsbmt_Lock);
* that our caller specified. If so, we can return
* this submount.
*/
- cm_NormalizeAfsPath (submountPathNormalized, submountPath);
+ cm_NormalizeAfsPath (submountPathNormalized, sizeof(submountPathNormalized), submountPath);
if (!strcmp (submountPathNormalized, afspath)) {
- strcpy(ioctlp->outDatap, submountName);
+ StringCbCopyA(ioctlp->outDatap, 999999, submountName);
ioctlp->outDatap += strlen(ioctlp->outDatap) +1;
RegCloseKey(hkSubmounts);
lock_ReleaseMutex(&cm_Afsdsbmt_Lock);
* when writing out the submount.
*/
- sprintf(ioctlp->outDatap, "auto%ld", nextAutoSubmount);
+ StringCbPrintfA(ioctlp->outDatap, 999999, "auto%ld", nextAutoSubmount);
RegSetValueEx( hkSubmounts,
ioctlp->outDatap,
lock_ObtainWrite(&cm_scacheLock);
for(scp=cm_hashTablep[hash]; scp; scp=scp->nextp) {
if (cm_FidCmp(fidp, &scp->fid) == 0) {
- scp->refCount++;
+ cm_HoldSCacheNoLock(scp);
cm_AdjustLRU(scp);
lock_ReleaseWrite(&cm_scacheLock);
return scp;
// yj: check if we have the scp, if so, we don't need
// to do anything else
lock_ObtainWrite(&cm_scacheLock);
- for(scp=cm_hashTablep[hash]; scp; scp=scp->nextp) {
+ for (scp=cm_hashTablep[hash]; scp; scp=scp->nextp) {
if (cm_FidCmp(fidp, &scp->fid) == 0) {
- scp->refCount++;
+ cm_HoldSCacheNoLock(scp);
*outScpp = scp;
cm_AdjustLRU(scp);
lock_ReleaseWrite(&cm_scacheLock);
/* otherwise, we have the volume, now reverify that the scp doesn't
* exist, and proceed.
*/
- for(scp=cm_hashTablep[hash]; scp; scp=scp->nextp) {
+ for (scp=cm_hashTablep[hash]; scp; scp=scp->nextp) {
if (cm_FidCmp(fidp, &scp->fid) == 0) {
- scp->refCount++;
+ osi_assert(scp->volp == volp);
+ cm_HoldSCacheNoLock(scp);
cm_AdjustLRU(scp);
lock_ReleaseWrite(&cm_scacheLock);
if (volp)
afsFidp->Unique = fidp->unique;
}
+void cm_HoldSCacheNoLock(cm_scache_t *scp)
+{
+#ifdef NOLOCK_ASSERT
+ osi_assert(scp->refCount > 0);
+#endif
+ scp->refCount++;
+}
+
void cm_HoldSCache(cm_scache_t *scp)
{
lock_ObtainWrite(&cm_scacheLock);
lock_ReleaseWrite(&cm_scacheLock);
}
+void cm_ReleaseSCacheNoLock(cm_scache_t *scp)
+{
+ osi_assert(scp->refCount-- > 0);
+}
+
void cm_ReleaseSCache(cm_scache_t *scp)
{
lock_ObtainWrite(&cm_scacheLock);
for (scp = cm_scacheLRULastp; scp; scp = (cm_scache_t *) osi_QPrev(&scp->q))
{
- if (scp->refCount != 0)
+ if (scp->refCount > 0)
{
- sprintf(output, "%s fid (cell=%d, volume=%d, vnode=%d, unique=%d) refCount=%d\n",
+ sprintf(output, "%s fid (cell=%d, volume=%d, vnode=%d, unique=%d) refCount=%u\n",
cookie, scp->fid.cell, scp->fid.volume, scp->fid.vnode, scp->fid.unique,
scp->refCount);
WriteFile(outputFile, output, strlen(output), &zilch, NULL);
{
if (scp)
{
- if (scp->refCount)
+ if (scp->refCount > 0)
{
- sprintf(output, "%s scp=0x%08X, hash=%d, fid (cell=%d, volume=%d, vnode=%d, unique=%d) refCount=%d\n",
+ sprintf(output, "%s scp=0x%08X, hash=%d, fid (cell=%d, volume=%d, vnode=%d, unique=%d) refCount=%u\n",
cookie, (void *)scp, i, scp->fid.cell, scp->fid.volume, scp->fid.vnode,
scp->fid.unique, scp->refCount);
WriteFile(outputFile, output, strlen(output), &zilch, NULL);
* write-locked to prevent buffers from
* being created during a truncate op, etc.
*/
- unsigned long refCount; /* reference count; cm_scacheLock */
+ long refCount; /* reference count; cm_scacheLock */
osi_queueData_t *bufReadsp; /* queue of buffers being read */
osi_queueData_t *bufWritesp; /* queue of buffers being written */
extern void cm_AFSFidFromFid(struct AFSFid *, cm_fid_t *);
+extern void cm_HoldSCacheNoLock(cm_scache_t *);
+
extern void cm_HoldSCache(cm_scache_t *);
+extern void cm_ReleaseSCacheNoLock(cm_scache_t *);
+
extern void cm_ReleaseSCache(cm_scache_t *);
extern cm_scache_t *cm_FindSCache(cm_fid_t *fidp);
extern void cm_DiscardSCache(cm_scache_t *scp);
+extern int cm_FindFileType(cm_fid_t *fidp);
+
#endif /* __CM_SCACHE_H_ENV__ */
* at the appropriate times to change the pointers to these servers.
*/
typedef struct cm_server {
- struct cm_server *allNextp; /* locked by cm_serverLock */
+ struct cm_server *allNextp; /* locked by cm_serverLock */
struct sockaddr_in addr; /* by mx */
int type; /* by mx */
- struct cm_conn *connsp; /* locked by cm_connLock */
+ struct cm_conn *connsp; /* locked by cm_connLock */
long flags; /* by mx */
- struct cm_cell *cellp; /* cell containing this server */
- unsigned long refCount; /* locked by cm_serverLock */
- osi_mutex_t mx;
- unsigned short ipRank; /* server priority */
+ struct cm_cell *cellp; /* cell containing this server */
+ unsigned long refCount; /* locked by cm_serverLock */
+ osi_mutex_t mx;
+ unsigned short ipRank; /* server priority */
} cm_server_t;
enum repstate {not_busy, busy, offline};
void cm_InitUser(void)
{
- static osi_once_t once;
+ static osi_once_t once;
- if (osi_Once(&once)) {
- lock_InitializeRWLock(&cm_userLock, "cm_userLock");
- osi_EndOnce(&once);
- }
+ if (osi_Once(&once)) {
+ lock_InitializeRWLock(&cm_userLock, "cm_userLock");
+ osi_EndOnce(&once);
+ }
- cm_rootUserp = cm_NewUser();
+ cm_rootUserp = cm_NewUser();
}
cm_user_t *cm_NewUser(void)
{
- cm_user_t *up;
+ cm_user_t *up;
- up = malloc(sizeof(*up));
- memset(up, 0, sizeof(*up));
- up->refCount = 1;
- up->vcRefs = 1; /* from caller */
- lock_InitializeMutex(&up->mx, "cm_user_t");
- return up;
+ up = malloc(sizeof(*up));
+ memset(up, 0, sizeof(*up));
+ up->refCount = 1;
+ up->vcRefs = 1; /* from caller */
+ lock_InitializeMutex(&up->mx, "cm_user_t");
+ return up;
}
/* must be called with locked userp */
cm_ucell_t *cm_GetUCell(cm_user_t *userp, cm_cell_t *cellp)
{
- cm_ucell_t *ucp;
+ cm_ucell_t *ucp;
- lock_AssertMutex(&userp->mx);
- for(ucp = userp->cellInfop; ucp; ucp=ucp->nextp) {
- if (ucp->cellp == cellp) break;
- }
+ lock_AssertMutex(&userp->mx);
+ for (ucp = userp->cellInfop; ucp; ucp=ucp->nextp) {
+ if (ucp->cellp == cellp)
+ break;
+ }
- if (!ucp) {
- ucp = malloc(sizeof(*ucp));
- memset(ucp, 0, sizeof(*ucp));
- ucp->nextp = userp->cellInfop;
- if (userp->cellInfop)
- ucp->iterator = userp->cellInfop->iterator + 1;
- else
- ucp->iterator = 1;
- userp->cellInfop = ucp;
- ucp->cellp = cellp;
- }
+ if (!ucp) {
+ ucp = malloc(sizeof(*ucp));
+ memset(ucp, 0, sizeof(*ucp));
+ ucp->nextp = userp->cellInfop;
+ if (userp->cellInfop)
+ ucp->iterator = userp->cellInfop->iterator + 1;
+ else
+ ucp->iterator = 1;
+ userp->cellInfop = ucp;
+ ucp->cellp = cellp;
+ }
- return ucp;
+ return ucp;
}
cm_ucell_t *cm_FindUCell(cm_user_t *userp, int iterator)
{
- cm_ucell_t *ucp;
- cm_ucell_t *best;
-
- best = NULL;
- lock_AssertMutex(&userp->mx);
- for (ucp = userp->cellInfop; ucp; ucp = ucp->nextp) {
- if (ucp->iterator >= iterator)
- best = ucp;
- else
- break;
- }
- return best;
+ cm_ucell_t *ucp;
+ cm_ucell_t *best;
+
+ best = NULL;
+ lock_AssertMutex(&userp->mx);
+ for (ucp = userp->cellInfop; ucp; ucp = ucp->nextp) {
+ if (ucp->iterator >= iterator)
+ best = ucp;
+ else
+ break;
+ }
+ return best;
}
void cm_HoldUser(cm_user_t *up)
{
- lock_ObtainWrite(&cm_userLock);
- up->refCount++;
- lock_ReleaseWrite(&cm_userLock);
+ lock_ObtainWrite(&cm_userLock);
+ up->refCount++;
+ lock_ReleaseWrite(&cm_userLock);
}
void cm_ReleaseUser(cm_user_t *up)
{
- cm_ucell_t *ucp;
+ cm_ucell_t *ucp;
cm_ucell_t *ncp;
- if (up == NULL) return;
-
- lock_ObtainWrite(&cm_userLock);
- osi_assert(up->refCount-- > 0);
- if (up->refCount == 0) {
- lock_FinalizeMutex(&up->mx);
- for(ucp = up->cellInfop; ucp; ucp = ncp) {
- ncp = ucp->nextp;
- if (ucp->ticketp) free(ucp->ticketp);
+ if (up == NULL)
+ return;
+
+ lock_ObtainWrite(&cm_userLock);
+ osi_assert(up->refCount-- > 0);
+ if (up->refCount == 0) {
+ lock_FinalizeMutex(&up->mx);
+ for (ucp = up->cellInfop; ucp; ucp = ncp) {
+ ncp = ucp->nextp;
+ if (ucp->ticketp)
+ free(ucp->ticketp);
free(ucp);
}
free(up);
}
- lock_ReleaseWrite(&cm_userLock);
+ lock_ReleaseWrite(&cm_userLock);
}
/* release the count of the # of connections that use this user structure.
*/
void cm_ReleaseUserVCRef(cm_user_t *userp)
{
- lock_ObtainMutex(&userp->mx);
- osi_assert(userp->vcRefs-- > 0);
- lock_ReleaseMutex(&userp->mx);
-}
+ lock_ObtainMutex(&userp->mx);
+ osi_assert(userp->vcRefs-- > 0);
+ lock_ReleaseMutex(&userp->mx);
+}
/*
*/
void cm_CheckTokenCache(long now)
{
- extern smb_vc_t *smb_allVCsp; /* global vcp list */
- smb_vc_t *vcp;
- smb_user_t *usersp;
- cm_user_t *userp = NULL;
- cm_ucell_t *ucellp;
- BOOL bExpired=FALSE;
-
- /*
- * For every vcp, get the user and check his tokens
- */
- lock_ObtainWrite(&smb_rctLock);
- for(vcp=smb_allVCsp; vcp; vcp=vcp->nextp) {
- for(usersp=vcp->usersp; usersp; usersp=usersp->nextp) {
- if (usersp->unp) {
- if ((userp=usersp->unp->userp)==0)
- continue;
- } else
- continue;
- lock_ObtainMutex(&userp->mx);
- for(ucellp=userp->cellInfop; ucellp; ucellp=ucellp->nextp) {
- if(ucellp->flags & CM_UCELLFLAG_RXKAD) {
- if(ucellp->expirationTime < now) {
- /* this guy's tokens have expired */
- osi_Log3(afsd_logp, "cm_CheckTokens: Tokens for user:%s have expired expiration time:0x%x ucellp:%x", ucellp->userName, ucellp->expirationTime, ucellp);
- if (ucellp->ticketp) {
- free(ucellp->ticketp);
- ucellp->ticketp = NULL;
- }
- ucellp->flags &= ~CM_UCELLFLAG_RXKAD;
- ucellp->gen++;
- bExpired=TRUE;
- }
- }
- }
- lock_ReleaseMutex(&userp->mx);
- if(bExpired) {
- bExpired=FALSE;
- cm_ResetACLCache(userp);
- }
- }
- }
- lock_ReleaseWrite(&smb_rctLock);
+ extern smb_vc_t *smb_allVCsp; /* global vcp list */
+ smb_vc_t *vcp;
+ smb_user_t *usersp;
+ cm_user_t *userp = NULL;
+ cm_ucell_t *ucellp;
+ BOOL bExpired=FALSE;
+
+ /*
+ * For every vcp, get the user and check his tokens
+ */
+ lock_ObtainWrite(&smb_rctLock);
+ for (vcp=smb_allVCsp; vcp; vcp=vcp->nextp) {
+ for (usersp=vcp->usersp; usersp; usersp=usersp->nextp) {
+ if (usersp->unp) {
+ if ((userp=usersp->unp->userp)==0)
+ continue;
+ } else
+ continue;
+ lock_ObtainMutex(&userp->mx);
+ for (ucellp=userp->cellInfop; ucellp; ucellp=ucellp->nextp) {
+ if (ucellp->flags & CM_UCELLFLAG_RXKAD) {
+ if (ucellp->expirationTime < now) {
+ /* this guy's tokens have expired */
+ osi_Log3(afsd_logp, "cm_CheckTokens: Tokens for user:%s have expired expiration time:0x%x ucellp:%x",
+ ucellp->userName, ucellp->expirationTime, ucellp);
+ if (ucellp->ticketp) {
+ free(ucellp->ticketp);
+ ucellp->ticketp = NULL;
+ }
+ ucellp->flags &= ~CM_UCELLFLAG_RXKAD;
+ ucellp->gen++;
+ bExpired=TRUE;
+ }
+ }
+ }
+ lock_ReleaseMutex(&userp->mx);
+ if (bExpired) {
+ bExpired=FALSE;
+ cm_ResetACLCache(userp);
+ }
+ }
+ }
+ lock_ReleaseWrite(&smb_rctLock);
}
* corresponding userp's userp->mx mutex.
*/
typedef struct cm_ucell {
- struct cm_ucell *nextp; /* next cell in the list */
- struct cm_cell *cellp; /* the cell this applies to */
- char *ticketp; /* locked by mx */
- int ticketLen; /* by mx */
- struct ktc_encryptionKey sessionKey; /* by mx */
- long kvno; /* key version in ticket */
- long expirationTime; /* when tix expire */
- int gen; /* generation number */
- int iterator; /* for use as ListTokens cookie */
- long flags; /* flags */
- char userName[MAXKTCNAMELEN]; /* user name */
+ struct cm_ucell *nextp; /* next cell in the list */
+ struct cm_cell *cellp; /* the cell this applies to */
+ char *ticketp; /* locked by mx */
+ int ticketLen; /* by mx */
+ struct ktc_encryptionKey sessionKey;/* by mx */
+ long kvno; /* key version in ticket */
+ long expirationTime; /* when tix expire */
+ int gen; /* generation number */
+ int iterator; /* for use as ListTokens cookie */
+ long flags; /* flags */
+ char userName[MAXKTCNAMELEN]; /* user name */
} cm_ucell_t;
#define CM_UCELLFLAG_HASTIX 1 /* has Kerberos tickets */
#define CM_UCELLFLAG_RXKAD 2 /* an rxkad connection */
#define CM_UCELLFLAG_BADTIX 4 /* tickets are bad or expired */
+#define CM_UCELLFLAG_RXGK 8 /* an rxgk connection */
typedef struct cm_user {
- unsigned long refCount; /* ref count */
- cm_ucell_t *cellInfop; /* list of cell info */
- osi_mutex_t mx; /* mutex */
- int vcRefs; /* count of references from virtual circuits */
- long flags;
+ unsigned long refCount; /* ref count - cm_userLock */
+ cm_ucell_t *cellInfop; /* list of cell info */
+ osi_mutex_t mx; /* mutex */
+ int vcRefs; /* count of references from virtual circuits */
+ long flags;
} cm_user_t;
#define CM_USERFLAG_DELETE 1 /* delete on last reference */
lock_ObtainRead(&scp->bufCreateLock);
code = buf_Get(scp, &thyper, &bufferp);
lock_ReleaseRead(&scp->bufCreateLock);
+ if (code) {
+ /* if buf_Get() fails we do not have a buffer object to lock */
+ bufferp = NULL;
+ break;
+ }
lock_ObtainMutex(&bufferp->mx);
- if (code)
- break;
bufferOffset = thyper;
/* now get the data in the cache */
return CM_ERROR_NOSUCHFILE;
}
else { /* nonexistent dir on freelance root, so add it */
+ char fullname[200] = ".";
+ int found = 0;
+
osi_Log1(afsd_logp,"cm_Lookup adding mount for non-existent directory: %s",
osi_LogSaveString(afsd_logp,namep));
- code = cm_FreelanceAddMount(namep, namep, "root.cell.", namep[0] == '.', &rock.fid);
- if (code < 0) { /* add mount point failed, so give up */
+ if (namep[0] == '.') {
+ if (cm_GetCell_Gen(&namep[1], &fullname[1], CM_FLAG_CREATE)) {
+ found = 1;
+ if ( stricmp(&namep[1], &fullname[1]) )
+ code = cm_FreelanceAddSymlink(namep, fullname, &rock.fid);
+ else
+ code = cm_FreelanceAddMount(namep, &fullname[1], "root.cell.", 1, &rock.fid);
+ }
+ } else {
+ if (cm_GetCell_Gen(namep, fullname, CM_FLAG_CREATE)) {
+ found = 1;
+ if ( stricmp(namep, fullname) )
+ code = cm_FreelanceAddSymlink(namep, fullname, &rock.fid);
+ else
+ code = cm_FreelanceAddMount(namep, fullname, "root.cell.", 0, &rock.fid);
+ }
+ }
+ if (!found || code < 0) { /* add mount point failed, so give up */
if (flags & CM_FLAG_CHECKPATH)
return CM_ERROR_NOSUCHPATH;
else
/*
* Update a volume. Caller holds volume's lock (volp->mx).
+ *
+ *
+ * shadow / openafs / jhutz@CS.CMU.EDU {ANDREW.CMU.EDU} 01:38 (JHutz)
+ * Yes, we support multihomed fileservers.
+ * Since before we got the code from IBM.
+ * But to find out about multiple addresses on a multihomed server, you need
+ * to use VL_GetEntryByNameU and VL_GetAddrsU. If you use
+ * VL_GetEntryByNameO or VL_GetEntryByNameN, the vlserver just gives you one
+ * address per server.
+ * shadow / openafs / jhutz@CS.CMU.EDU {ANDREW.CMU.EDU} 01:39 (JHutz)
+ * see src/afs/afs_volume.c, paying particular attention to
+ * afs_NewVolumeByName, afs_SetupVolume, and InstallUVolumeEntry
+ * shadow / openafs / jaltman {ANDREW.CMU.EDU} 01:40 (Jeffrey Altman)
+ * thanks. The windows client calls the 0 versions.
+ * shadow / openafs / jhutz@CS.CMU.EDU {ANDREW.CMU.EDU} 01:51 (JHutz)
+ * Oh. Ew.
+ * By not using the N versions, you only get up to 8 sites instead of 13.
+ * By not using the U versions, you don't get to know about multihomed serve
+ * shadow / openafs / jhutz@CS.CMU.EDU {ANDREW.CMU.EDU} 01:52 (JHutz)
+ * Of course, you probably want to support the older versions for backward
+ * compatibility. If you do that, you need to call the newest interface
+ * first, and fall back to successively older versions if you get
+ * RXGEN_OPCODE.
*/
+#define MULTIHOMED 1
long cm_UpdateVolume(struct cm_cell *cellp, cm_user_t *userp, cm_req_t *reqp,
cm_volume_t *volp)
{
cm_conn_t *connp;
- int i;
- cm_serverRef_t *tsrp;
+ int i, j, k;
+ cm_serverRef_t *tsrp;
cm_server_t *tsp;
struct sockaddr_in tsockAddr;
long tflags;
u_long tempAddr;
- struct vldbentry vldbEntry; /* don't use NVLDB yet; they're not common */
- int ROcount = 0;
- long code;
+ struct vldbentry vldbEntry;
+ struct nvldbentry nvldbEntry;
+#ifdef MULTIHOMED
+ struct uvldbentry uvldbEntry;
+#endif
+ int type = -1;
+ int ROcount = 0;
+ long code;
- /* clear out old bindings */
+ /* clear out old bindings */
cm_FreeServerList(&volp->rwServersp);
cm_FreeServerList(&volp->roServersp);
cm_FreeServerList(&volp->bkServersp);
/* now we have volume structure locked and held; make RPC to fill it */
do {
- code = cm_ConnByMServers(cellp->vlServersp, userp, reqp,
- &connp);
- if (code) continue;
- osi_Log1(afsd_logp, "CALL VL_GetEntryByNameO name %s",
- volp->namep);
- code = VL_GetEntryByNameO(connp->callp, volp->namep, &vldbEntry);
- } while (cm_Analyze(connp, userp, reqp, NULL, NULL, cellp->vlServersp, NULL, code));
+ code = cm_ConnByMServers(cellp->vlServersp, userp, reqp, &connp);
+ if (code)
+ continue;
+ osi_Log1(afsd_logp, "CALL VL_GetEntryByName{UNO} name %s", volp->namep);
+#ifdef MULTIHOMED
+ code = VL_GetEntryByNameU(connp->callp, volp->namep, &uvldbEntry);
+ type = 2;
+ if ( code == RXGEN_OPCODE )
+#endif
+ {
+ code = VL_GetEntryByNameN(connp->callp, volp->namep, &nvldbEntry);
+ type = 1;
+ }
+ if ( code == RXGEN_OPCODE ) {
+ code = VL_GetEntryByNameO(connp->callp, volp->namep, &vldbEntry);
+ type = 0;
+ }
+ } while (cm_Analyze(connp, userp, reqp, NULL, NULL, cellp->vlServersp, NULL, code));
code = cm_MapVLRPCError(code, reqp);
if (code == 0) {
- /* decode the response */
- lock_ObtainWrite(&cm_volumeLock);
- if (vldbEntry.flags & VLF_RWEXISTS)
- volp->rwID = vldbEntry.volumeId[0];
- else
+ afs_int32 flags;
+ afs_int32 nServers;
+ afs_int32 rwID;
+ afs_int32 roID;
+ afs_int32 bkID;
+ afs_int32 serverNumber[NMAXNSERVERS];
+ afs_int32 serverFlags[NMAXNSERVERS];
+
+ switch ( type ) {
+ case 0:
+ flags = vldbEntry.flags;
+ nServers = vldbEntry.nServers;
+ rwID = vldbEntry.volumeId[0];
+ roID = vldbEntry.volumeId[1];
+ bkID = vldbEntry.volumeId[2];
+ for ( i=0; i<nServers; i++ ) {
+ serverFlags[i] = vldbEntry.serverFlags[i];
+ serverNumber[i] = vldbEntry.serverNumber[i];
+ }
+ break;
+ case 1:
+ flags = nvldbEntry.flags;
+ nServers = nvldbEntry.nServers;
+ rwID = nvldbEntry.volumeId[0];
+ roID = nvldbEntry.volumeId[1];
+ bkID = nvldbEntry.volumeId[2];
+ for ( i=0; i<nServers; i++ ) {
+ serverFlags[i] = nvldbEntry.serverFlags[i];
+ serverNumber[i] = nvldbEntry.serverNumber[i];
+ }
+ break;
+#ifdef MULTIHOMED
+ case 2:
+ flags = uvldbEntry.flags;
+ nServers = uvldbEntry.nServers;
+ rwID = uvldbEntry.volumeId[0];
+ roID = uvldbEntry.volumeId[1];
+ bkID = uvldbEntry.volumeId[2];
+ for ( i=0, j=0; i<nServers && j<NMAXNSERVERS; i++ ) {
+ if ( !(uvldbEntry.serverFlags[i] & VLSERVER_FLAG_UUID) ) {
+ serverFlags[j] = uvldbEntry.serverFlags[i];
+ serverNumber[j] = uvldbEntry.serverNumber[i].time_low;
+ j++;
+ } else {
+ afs_uint32 * addrp, nentries, code, unique;
+ bulkaddrs addrs;
+ ListAddrByAttributes attrs;
+ afsUUID uuid;
+
+ memset((char *)&attrs, 0, sizeof(attrs));
+ attrs.Mask = VLADDR_UUID;
+ attrs.uuid = uvldbEntry.serverNumber[i];
+ memset((char *)&uuid, 0, sizeof(uuid));
+ memset((char *)&addrs, 0, sizeof(addrs));
+
+ do {
+ code = cm_ConnByMServers(cellp->vlServersp, userp, reqp, &connp);
+ if (code)
+ continue;
+
+ code = VL_GetAddrsU(connp->callp, &attrs, &uuid, &unique, &nentries, &addrs);
+
+ if (code == 0 && nentries == 0)
+ code = VL_NOENT;
+ } while (cm_Analyze(connp, userp, reqp, NULL, NULL, cellp->vlServersp, NULL, code));
+ code = cm_MapVLRPCError(code, reqp);
+ if (code)
+ return code;
+
+ addrp = addrs.bulkaddrs_val;
+ for (k = 0; k < nentries && j < NMAXNSERVERS; j++, k++) {
+ serverFlags[j] = uvldbEntry.serverFlags[i];
+ serverNumber[j] = addrp[k];
+ }
+
+ free(addrs.bulkaddrs_val); /* This is wrong */
+ }
+ }
+ nServers = j; /* update the server count */
+ break;
+#endif
+ }
+
+ /* decode the response */
+ lock_ObtainWrite(&cm_volumeLock);
+ if (flags & VLF_RWEXISTS)
+ volp->rwID = rwID;
+ else
volp->rwID = 0;
- if (vldbEntry.flags & VLF_ROEXISTS)
- volp->roID = vldbEntry.volumeId[1];
+ if (flags & VLF_ROEXISTS)
+ volp->roID = roID;
else
volp->roID = 0;
- if (vldbEntry.flags & VLF_BACKEXISTS)
- volp->bkID = vldbEntry.volumeId[2];
- else
+ if (flags & VLF_BACKEXISTS)
+ volp->bkID = bkID;
+ else
volp->bkID = 0;
- lock_ReleaseWrite(&cm_volumeLock);
- for(i=0; i<vldbEntry.nServers; i++) {
- /* create a server entry */
- tflags = vldbEntry.serverFlags[i];
- if (tflags & VLSF_DONTUSE) continue;
- tsockAddr.sin_family = AF_INET;
- tempAddr = htonl(vldbEntry.serverNumber[i]);
- tsockAddr.sin_addr.s_addr = tempAddr;
- tsp = cm_FindServer(&tsockAddr, CM_SERVER_FILE);
- if (!tsp)
+ lock_ReleaseWrite(&cm_volumeLock);
+ for (i=0; i<nServers; i++) {
+ /* create a server entry */
+ tflags = serverFlags[i];
+ if (tflags & VLSF_DONTUSE)
+ continue;
+ tsockAddr.sin_family = AF_INET;
+ tempAddr = htonl(serverNumber[i]);
+ tsockAddr.sin_addr.s_addr = tempAddr;
+ tsp = cm_FindServer(&tsockAddr, CM_SERVER_FILE);
+ if (!tsp)
tsp = cm_NewServer(&tsockAddr, CM_SERVER_FILE,
cellp);
- /* if this server was created by fs setserverprefs */
- if ( !tsp->cellp )
- tsp->cellp = cellp;
+ /* if this server was created by fs setserverprefs */
+ if ( !tsp->cellp )
+ tsp->cellp = cellp;
osi_assert(tsp != NULL);
/* and add it to the list(s). */
- /*
+ /*
* Each call to cm_NewServerRef() increments the
* ref count of tsp. These reference will be dropped,
- * if and when the volume is reset; see reset code
- * earlier in this function.
- */
- if ((tflags & VLSF_RWVOL)
- && (vldbEntry.flags & VLF_RWEXISTS)) {
- tsrp = cm_NewServerRef(tsp);
+ * if and when the volume is reset; see reset code
+ * earlier in this function.
+ */
+ if ((tflags & VLSF_RWVOL) && (flags & VLF_RWEXISTS)) {
+ tsrp = cm_NewServerRef(tsp);
cm_InsertServerList(&volp->rwServersp, tsrp);
lock_ObtainWrite(&cm_serverLock);
tsrp->refCount--; /* drop allocation reference */
lock_ReleaseWrite(&cm_serverLock);
- }
- if ((tflags & VLSF_ROVOL)
- && (vldbEntry.flags & VLF_ROEXISTS)) {
- tsrp = cm_NewServerRef(tsp);
- cm_InsertServerList(&volp->roServersp, tsrp);
+ }
+ if ((tflags & VLSF_ROVOL) && (flags & VLF_ROEXISTS)) {
+ tsrp = cm_NewServerRef(tsp);
+ cm_InsertServerList(&volp->roServersp, tsrp);
lock_ObtainWrite(&cm_serverLock);
tsrp->refCount--; /* drop allocation reference */
lock_ReleaseWrite(&cm_serverLock);
- ROcount++;
+ ROcount++;
}
- /* We don't use VLSF_BACKVOL !?! */
- if ((tflags & VLSF_RWVOL)
- && (vldbEntry.flags & VLF_BACKEXISTS)) {
- tsrp = cm_NewServerRef(tsp);
+ /* We don't use VLSF_BACKVOL !?! */
+ if ((tflags & VLSF_RWVOL) && (flags & VLF_BACKEXISTS)) {
+ tsrp = cm_NewServerRef(tsp);
cm_InsertServerList(&volp->bkServersp, tsrp);
lock_ObtainWrite(&cm_serverLock);
tsrp->refCount--; /* drop allocation reference */
lock_ReleaseWrite(&cm_serverLock);
- }
- /* Drop the reference obtained by cm_FindServer() */
- cm_PutServer(tsp);
+ }
+ /* Drop the reference obtained by cm_FindServer() */
+ cm_PutServer(tsp);
+ }
+
+ /*
+ * Randomize RO list
+ *
+ * If the first n servers have the same ipRank, then we
+ * randomly pick one among them and move it to the beginning.
+ * We don't bother to re-order the whole list because
+ * the rest of the list is used only if the first server is
+ * down. We only do this for the RO list; we assume the other
+ * lists are length 1.
+ */
+ if (ROcount > 1) {
+ cm_RandomizeServer(&volp->roServersp);
}
-
- /*
- * Randomize RO list
- *
- * If the first n servers have the same ipRank, then we
- * randomly pick one among them and move it to the beginning.
- * We don't bother to re-order the whole list because
- * the rest of the list is used only if the first server is
- * down. We only do this for the RO list; we assume the other
- * lists are length 1.
- */
- if (ROcount > 1) {
- cm_RandomizeServer(&volp->roServersp);
- }
- }
- return code;
+ }
+ return code;
}
long cm_GetVolumeByID(cm_cell_t *cellp, long volumeID, cm_user_t *userp,
int smb_LogoffTokenTransfer;
time_t smb_LogoffTransferTimeout;
+int smb_StoreAnsiFilenames = 0;
+
DWORD last_msg_time = 0;
long ongoingOps = 0;
#define NCBmax MAXIMUM_WAIT_OBJECTS
EVENT_HANDLE NCBavails[NCBmax], NCBevents[NCBmax];
EVENT_HANDLE **NCBreturns;
+EVENT_HANDLE *smb_ServerShutdown;
DWORD NCBsessions[NCBmax];
NCB *NCBs[NCBmax];
struct smb_packet *bufs[NCBmax];
* Time in Unix format of midnight, 1/1/1970 local time.
* When added to dosUTime, gives Unix (AFS) time.
*/
-long smb_localZero = 0;
+time_t smb_localZero = 0;
/* Time difference for converting to kludge-GMT */
int smb_NowTZ;
return "S(0d)_ReceiveTran2CreateDirectory";
case 14:
return "S(0e)_ReceiveTran2SessionSetup";
+ case 16:
+ return "S(10)_ReceiveTran2GetDfsReferral";
+ case 17:
+ return "S(11)_ReceiveTran2ReportDfsInconsistency";
}
}
{
attrs = SMB_ATTR_DIRECTORY;
#ifdef SPECIAL_FOLDERS
-#ifdef AFS_FREELANCE_CLIENT
- if ( cm_freelanceEnabled &&
- scp->fid.cell==AFS_FAKE_ROOT_CELL_ID &&
- scp->fid.volume==AFS_FAKE_ROOT_VOL_ID &&
- scp->fid.vnode==0x1 && scp->fid.unique==0x1) {
- attrs |= SMB_ATTR_SYSTEM; /* FILE_ATTRIBUTE_SYSTEM */
- }
-#endif /* AFS_FREELANCE_CLIENT */
+ attrs |= SMB_ATTR_SYSTEM; /* FILE_ATTRIBUTE_SYSTEM */
#endif /* SPECIAL_FOLDERS */
} else
attrs = 0;
}
#endif /* !DJGPP */
-void smb_SearchTimeFromUnixTime(long *dosTimep, time_t unixTime)
+void smb_SearchTimeFromUnixTime(time_t *dosTimep, time_t unixTime)
{
struct tm *ltp;
int dosDate;
unsigned short dosTime;
struct tm localTm;
- dosDate = searchTime & 0xffff;
- dosTime = (searchTime >> 16) & 0xffff;
+ dosDate = (unsigned short) (searchTime & 0xffff);
+ dosTime = (unsigned short) ((searchTime >> 16) & 0xffff);
localTm.tm_year = 80 + ((dosDate>>9) & 0x3f);
localTm.tm_mon = ((dosDate >> 5) & 0xf) - 1; /* January is 0 in localTm */
int i;
victimCount = 0; /* how many have we got so far */
- for(tp = smb_lastDirSearchp; tp; tp=prevp) {
+ for (tp = smb_lastDirSearchp; tp; tp=prevp) {
/* we'll move tp from queue, so
* do this early.
*/
op->inCom = inSmbp->com;
}
outp->reb = 0x80; /* SERVER_RESP */
- outp->flg2 = 0x1; /* KNOWS_LONG_NAMES */
+ outp->flg2 = SMB_FLAGS2_KNOWS_LONG_NAMES;
/* copy fields in generic packet area */
op->wctp = &outp->wct;
* 32-bit error codes *
* and NT Find *
* and NT SMB's *
- * and raw mode */
+ * and raw mode
+ * and DFS */
caps = NTNEGOTIATE_CAPABILITY_NTSTATUS |
+#ifdef DFS_SUPPORT
+ NTNEGOTIATE_CAPABILITY_DFS |
+#endif
NTNEGOTIATE_CAPABILITY_NTFIND |
NTNEGOTIATE_CAPABILITY_RAWMODE |
NTNEGOTIATE_CAPABILITY_NTSMB;
{
afs_uint32 count = 0;
- while(1) {
+ while(smbShutdownFlag == 0) {
count++;
thrd_Sleep(10000);
+
+ if (smbShutdownFlag == 1)
+ break;
+
if ((count % 72) == 0) { /* every five minutes */
struct tm myTime;
- long old_localZero = smb_localZero;
+ time_t old_localZero = smb_localZero;
/* Initialize smb_localZero */
myTime.tm_isdst = -1; /* compute whether on DST or not */
/* parse input parameters */
tp = smb_GetSMBData(inp, NULL);
pathp = smb_ParseASCIIBlock(tp, &tp);
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
passwordp = smb_ParseASCIIBlock(tp, &tp);
tp = strrchr(pathp, '\\');
if (!tp)
tp = smb_GetSMBData(inp, NULL);
pathp = smb_ParseASCIIBlock(tp, (char **) &tp);
osi_assert(pathp != NULL);
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
statBlockp = smb_ParseVblBlock(tp, (char **) &tp, &statLen);
osi_assert(statBlockp != NULL);
if (statLen == 0) {
smb_SearchTimeFromUnixTime(&dosTime, scp->clientModTime);
/* copy out time */
- shortTemp = dosTime & 0xffff;
+ shortTemp = (unsigned short) (dosTime & 0xffff);
*((u_short *)dptr) = shortTemp;
dptr += 2;
/* and copy out date */
- shortTemp = (dosTime>>16) & 0xffff;
+ shortTemp = (unsigned short) ((dosTime>>16) & 0xffff);
*((u_short *)dptr) = shortTemp;
dptr += 2;
tp = smb_GetSMBData(inp, NULL);
pathp = smb_ParseASCIIBlock(tp, &tp);
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
inCookiep = smb_ParseVblBlock(tp, &tp, &dataLength);
/* bail out if request looks bad */
/* We can handle long names */
if (vcp->flags & SMB_VCFLAG_USENT)
- ((smb_t *)outp)->flg2 |= 0x40; /* IS_LONG_NAME */
+ ((smb_t *)outp)->flg2 |= SMB_FLAGS2_IS_LONG_NAME;
/* make sure we got a whole search status */
if (dataLength < 21) {
* attributes */
/* no hidden files */
- if(smb_hideDotFiles && !(dsp->attribute & SMB_ATTR_HIDDEN) && smb_IsDotFile(actualName))
+ if (smb_hideDotFiles && !(dsp->attribute & SMB_ATTR_HIDDEN) && smb_IsDotFile(actualName))
goto nextEntry;
if (!(dsp->attribute & SMB_ATTR_DIRECTORY)) /* no directories */
* never hurts to be sure.
*/
strncpy(op, actualName, 13);
+ if (smb_StoreAnsiFilenames)
+ CharToOem(op, op);
/* Uppercase if requested by client */
- if ((((smb_t *)inp)->flg2 & 1) == 0)
+ if ((((smb_t *)inp)->flg2 & SMB_FLAGS2_KNOWS_LONG_NAMES) == 0)
_strupr(op);
op += 13;
pathp = smb_GetSMBData(inp, NULL);
pathp = smb_ParseASCIIBlock(pathp, NULL);
+ if (!pathp)
+ return CM_ERROR_BADFD;
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
osi_Log1(smb_logp, "SMB receive check path %s",
osi_LogSaveString(smb_logp, pathp));
-
- if (!pathp) {
- return CM_ERROR_BADFD;
- }
rootScp = cm_rootSCachep;
pathp = smb_GetSMBData(inp, NULL);
pathp = smb_ParseASCIIBlock(pathp, NULL);
-
- if (!pathp) {
+ if (!pathp)
return CM_ERROR_BADSMB;
- }
-
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
+
osi_Log2(smb_logp, "SMB receive setfile attributes time %d, attr 0x%x",
dosTime, attribute);
pathp = smb_GetSMBData(inp, NULL);
pathp = smb_ParseASCIIBlock(pathp, NULL);
-
- if (!pathp) {
+ if (!pathp)
return CM_ERROR_BADSMB;
- }
if (*pathp == 0) /* null path */
pathp = "\\";
+ else
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
osi_Log1(smb_logp, "SMB receive getfile attributes path %s",
osi_LogSaveString(smb_logp, pathp));
*/
spacep = inp->spacep;
smb_StripLastComponent(spacep->data, &lastComp, pathp);
+#ifndef SPECIAL_FOLDERS
if (lastComp && stricmp(lastComp, "\\desktop.ini") == 0) {
code = cm_NameI(rootScp, spacep->data,
caseFold | CM_FLAG_DIRSEARCH | CM_FLAG_FOLLOW,
}
}
}
+#endif /* SPECIAL_FOLDERS */
code = cm_NameI(rootScp, pathp, caseFold | CM_FLAG_FOLLOW, userp,
tidPathp, &req, &newScp);
smb_SetSMBParm(outp, 0, attrs);
smb_DosUTimeFromUnixTime(&dosTime, newScp->clientModTime);
- smb_SetSMBParm(outp, 1, dosTime & 0xffff);
- smb_SetSMBParm(outp, 2, (dosTime>>16) & 0xffff);
+ smb_SetSMBParm(outp, 1, (unsigned int)(dosTime & 0xffff));
+ smb_SetSMBParm(outp, 2, (unsigned int)((dosTime>>16) & 0xffff));
smb_SetSMBParm(outp, 3, newScp->length.LowPart & 0xffff);
smb_SetSMBParm(outp, 4, (newScp->length.LowPart >> 16) & 0xffff);
smb_SetSMBParm(outp, 5, 0);
pathp = smb_GetSMBData(inp, NULL);
pathp = smb_ParseASCIIBlock(pathp, NULL);
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
osi_Log1(smb_logp, "SMB receive open file [%s]", osi_LogSaveString(smb_logp, pathp));
smb_SetSMBParm(outp, 0, fidp->fid);
smb_SetSMBParm(outp, 1, smb_Attributes(scp));
smb_DosUTimeFromUnixTime(&dosTime, scp->clientModTime);
- smb_SetSMBParm(outp, 2, dosTime & 0xffff);
- smb_SetSMBParm(outp, 3, (dosTime >> 16) & 0xffff);
+ smb_SetSMBParm(outp, 2, (unsigned int)(dosTime & 0xffff));
+ smb_SetSMBParm(outp, 3, (unsigned int)((dosTime >> 16) & 0xffff));
smb_SetSMBParm(outp, 4, scp->length.LowPart & 0xffff);
smb_SetSMBParm(outp, 5, (scp->length.LowPart >> 16) & 0xffff);
/* pass the open mode back; XXXX add access checks */
tp = smb_GetSMBData(inp, NULL);
pathp = smb_ParseASCIIBlock(tp, &tp);
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
osi_Log1(smb_logp, "SMB receive unlink %s",
osi_LogSaveString(smb_logp, pathp));
tp = smb_GetSMBData(inp, NULL);
oldPathp = smb_ParseASCIIBlock(tp, &tp);
+ if (smb_StoreAnsiFilenames)
+ OemToChar(oldPathp,oldPathp);
newPathp = smb_ParseASCIIBlock(tp, &tp);
+ if (smb_StoreAnsiFilenames)
+ OemToChar(newPathp,newPathp);
osi_Log2(smb_logp, "smb rename [%s] to [%s]",
osi_LogSaveString(smb_logp, oldPathp),
tp = smb_GetSMBData(inp, NULL);
pathp = smb_ParseASCIIBlock(tp, &tp);
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
spacep = inp->spacep;
smb_StripLastComponent(spacep->data, &lastNamep, pathp);
writeBackOffset.HighPart, cm_chunkSize, 0, userp);
}
- osi_Log2(smb_logp, "smb_WriteData fid %d returns %d written %d",
+ osi_Log3(smb_logp, "smb_WriteData fid %d returns %d written %d",
fidp->fid, code, *writtenp);
return code;
}
tp = smb_GetSMBData(inp, NULL);
pathp = smb_ParseASCIIBlock(tp, &tp);
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
if (strcmp(pathp, "\\") == 0)
return CM_ERROR_EXISTS;
tp = smb_GetSMBData(inp, NULL);
pathp = smb_ParseASCIIBlock(tp, &tp);
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
spacep = inp->spacep;
smb_StripLastComponent(spacep->data, &lastNamep, pathp);
/* otherwise, scp points to the parent directory. Do a lookup, and
* truncate the file if we find it, otherwise we create the file.
*/
- if (!lastNamep) lastNamep = pathp;
- else lastNamep++;
+ if (!lastNamep)
+ lastNamep = pathp;
+ else
+ lastNamep++;
if (!smb_IsLegalFilename(lastNamep))
return CM_ERROR_BADNTFILENAME;
smbp->reh = (unsigned char) ((NTStatus >> 8) & 0xff);
smbp->errLow = (unsigned char) ((NTStatus >> 16) & 0xff);
smbp->errHigh = (unsigned char) ((NTStatus >> 24) & 0xff);
- smbp->flg2 |= 0x4000;
+ smbp->flg2 |= SMB_FLAGS2_ERR_STATUS;
break;
}
else {
while (1) {
code = thrd_WaitForMultipleObjects_Event(numNCBs, NCBevents,
FALSE, INFINITE);
- if (code == WAIT_OBJECT_0)
- continue;
+ if (code == WAIT_OBJECT_0) {
+ if (smbShutdownFlag == 1)
+ break;
+ else
+ continue;
+ }
/* error checking */
if (code >= WAIT_ABANDONED_0 && code < (WAIT_ABANDONED_0 + numNCBs))
/* Get a session */
code = thrd_WaitForMultipleObjects_Event(numSessions, SessionEvents,
FALSE, INFINITE);
- if (code == WAIT_OBJECT_0)
- continue;
+ if (code == WAIT_OBJECT_0) {
+ if ( smbShutdownFlag == 1 )
+ break;
+ else
+ continue;
+ }
if (code >= WAIT_ABANDONED_0 && code < (WAIT_ABANDONED_0 + numSessions))
{
NCBretry:
code = thrd_WaitForMultipleObjects_Event(numNCBs, NCBavails,
FALSE, INFINITE);
- if (code == WAIT_OBJECT_0)
- goto NCBretry;
+ if (code == WAIT_OBJECT_0) {
+ if ( smbShutdownFlag == 1 )
+ break;
+ else
+ goto NCBretry;
+ }
/* error checking */
if (code >= WAIT_ABANDONED_0 && code < (WAIT_ABANDONED_0 + numNCBs))
/* Fire it up */
ncbp = NCBs[idx_NCB];
-#ifdef DJGPP
- dos_ncb = ((smb_ncb_t *)ncbp)->dos_ncb;
-#endif /* DJGPP */
ncbp->ncb_lsn = (unsigned char) LSNs[idx_session];
ncbp->ncb_command = NCBRECV | ASYNCH;
ncbp->ncb_lana_num = lanas[idx_session];
((smb_ncb_t*)ncbp)->orig_pkt = bufs[idx_NCB];
ncbp->ncb_event = NCBreturns[0][idx_NCB];
ncbp->ncb_length = SMB_PACKETSIZE;
+ dos_ncb = ((smb_ncb_t *)ncbp)->dos_ncb;
Netbios(ncbp, dos_ncb);
#endif /* !DJGPP */
}
while (1) {
code = thrd_WaitForMultipleObjects_Event(numNCBs, NCBreturns[myIdx],
FALSE, INFINITE);
+
+ /* terminate silently if shutdown flag is set */
if (code == WAIT_OBJECT_0) {
- continue;
+ if (smbShutdownFlag == 1) {
+ thrd_SetEvent(smb_ServerShutdown[myIdx]);
+ break;
+ } else
+ continue;
}
/* error checking */
* Either way, we can't do anything with this packet.
* Log, sleep and resume.
*/
- if(!vcp) {
+ if (!vcp) {
HANDLE h;
char buf[1000];
char *ptbuf[1];
ptbuf[0] = buf;
h = RegisterEventSource(NULL,AFS_DAEMON_EVENT_NAME);
- if(h) {
+ if (h) {
ReportEvent(h, EVENTLOG_ERROR_TYPE, 0, 1001, NULL,1,sizeof(*ncbp),ptbuf,(void*)ncbp);
DeregisterEventSource(h);
}
NCBreturns[i] = malloc(NCBmax * sizeof(EVENT_HANDLE));
NCBreturns[i][0] = retHandle;
}
+
+ smb_ServerShutdown = malloc(smb_NumServerThreads * sizeof(EVENT_HANDLE));
+ for (i = 0; i < smb_NumServerThreads; i++) {
+ sprintf(eventName, "smb_ServerShutdown[%d]", i);
+ smb_ServerShutdown[i] = thrd_CreateEvent(NULL, FALSE, FALSE, eventName);
+ if ( GetLastError() == ERROR_ALREADY_EXISTS )
+ afsi_log("Event Object Already Exists: %s", eventName);
+ }
+
for (i = 1; i <= nThreads; i++)
InitNCBslot(i);
numNCBs = nThreads + 1;
smb_tran2DispatchTable[12].procp = smb_ReceiveTran2FindNotifyNext;
smb_tran2DispatchTable[13].procp = smb_ReceiveTran2CreateDirectory;
smb_tran2DispatchTable[14].procp = smb_ReceiveTran2SessionSetup;
- smb_tran2DispatchTable[14].procp = smb_ReceiveTran2GetDFSReferral;
- smb_tran2DispatchTable[14].procp = smb_ReceiveTran2ReportDFSInconsistency;
+ smb_tran2DispatchTable[16].procp = smb_ReceiveTran2GetDFSReferral;
+ smb_tran2DispatchTable[17].procp = smb_ReceiveTran2ReportDFSInconsistency;
/* setup the rap dispatch table */
memset(smb_rapDispatchTable, 0, sizeof(smb_rapDispatchTable));
#ifndef DJGPP
code = Netbios(ncbp);
#else
- code = Netbios(ncbp, dos_ncb);
+ code = Netbios(ncbp, dos_ncb);
#endif
/*fprintf(stderr, "returned from NCBHANGUP session %d LSN %d\n", i, LSNs[i]);*/
if (code == 0) code = ncbp->ncb_retcode;
}
fflush(stderr);
}
+
+ /* Trigger the shutdown of all SMB threads */
+ for (i = 0; i < smb_NumServerThreads; i++)
+ thrd_SetEvent(NCBreturns[i][0]);
+
+ thrd_SetEvent(NCBevents[0]);
+ thrd_SetEvent(SessionEvents[0]);
+ thrd_SetEvent(NCBavails[0]);
+
+ for (i = 0;i < smb_NumServerThreads; i++) {
+ DWORD code = thrd_WaitForSingleObject_Event(smb_ServerShutdown[i], INFINITE);
+ if (code == WAIT_OBJECT_0) {
+ continue;
+ } else {
+ afsi_log("smb_Shutdown[%d] wait error",i);
+ }
+ }
}
/* Get the UNC \\<servername>\<sharename> prefix. */
/* basic core protocol SMB structure */
typedef struct smb {
- unsigned char id[4];
- unsigned char com;
- unsigned char rcls;
- unsigned char reh;
- unsigned char errLow;
- unsigned char errHigh;
- unsigned char reb;
- unsigned short flg2;
- unsigned short res[6];
- unsigned short tid;
- unsigned short pid;
- unsigned short uid;
- unsigned short mid;
- unsigned char wct;
- unsigned char vdata[1];
+ unsigned char id[4];
+ unsigned char com;
+ unsigned char rcls;
+ unsigned char reh;
+ unsigned char errLow;
+ unsigned char errHigh;
+ unsigned char reb;
+ unsigned short flg2;
+ unsigned short res[6];
+ unsigned short tid;
+ unsigned short pid;
+ unsigned short uid;
+ unsigned short mid;
+ unsigned char wct;
+ unsigned char vdata[1];
} smb_t;
+/* flg2 values */
+
+#define SMB_FLAGS2_KNOWS_LONG_NAMES 0x0001
+#define SMB_FLAGS2_KNOWS_EAS 0x0002
+#define SMB_FLAGS2_SECURITY_SIGNATURE 0x0004
+#define SMB_FLAGS2_RESERVED1 0x0008
+#define SMB_FLAGS2_IS_LONG_NAME 0x0040
+#define SMB_FLAGS2_EXT_SEC 0x0800
+#define SMB_FLAGS2_DFS 0x1000
+#define SMB_FLAGS2_PAGING_IO 0x2000
+#define SMB_FLAGS2_ERR_STATUS 0x4000
+#define SMB_FLAGS2_UNICODE 0x8000
+
+/* Information Levels */
+#define SMB_INFO_STANDARD 1
+#define SMB_INFO_QUERY_EA_SIZE 2
+#define SMB_INFO_QUERY_EAS_FROM_LIST 3
+#define SMB_INFO_QUERY_ALL_EAS 4
+#define SMB_INFO_IS_NAME_VALID 6
+
+#define SMB_QUERY_FILE_BASIC_INFO 0x101
+#define SMB_QUERY_FILE_STANDARD_INFO 0x102
+#define SMB_QUERY_FILE_EA_INFO 0x103
+#define SMB_QUERY_FILE_NAME_INFO 0x104
+#define SMB_QUERY_FILE_ALL_INFO 0x107
+#define SMB_QUERY_FILE_ALT_NAME_INFO 0x108
+#define SMB_QUERY_FILE_STREAM_INFO 0x109
+#define SMB_QUERY_FILE_COMPRESSION_INFO 0x10B
+#define SMB_QUERY_FILE_UNIX_BASIC 0x200
+#define SMB_QUERY_FILE_UNIX_LINK 0x201
+
+#define SMB_SET_FILE_UNIX_BASIC 0x200
+#define SMB_SET_FILE_UNIX_LINK 0x201
+#define SMB_SET_FILE_UNIX_HLINK 0x203
+
/* more defines */
#define SMB_NOPCODES 256 /* # of opcodes in the dispatch table */
#define NEGOTIATE_SECURITY_SIGNATURES_REQUIRED 0x08
/* Capabilities */
-#define NTNEGOTIATE_CAPABILITY_RAWMODE 0x00000001L
-#define NTNEGOTIATE_CAPABILITY_MPXMODE 0x00000002L
-#define NTNEGOTIATE_CAPABILITY_UNICODE 0x00000004L
-#define NTNEGOTIATE_CAPABILITY_LARGEFILES 0x00000008L
-#define NTNEGOTIATE_CAPABILITY_NTSMB 0x00000010L
-#define NTNEGOTIATE_CAPABILITY_RPCAPI 0x00000020L
-#define NTNEGOTIATE_CAPABILITY_NTSTATUS 0x00000040L
-#define NTNEGOTIATE_CAPABILITY_LEVEL_II_OPLOCKS 0x00000080L
+#define NTNEGOTIATE_CAPABILITY_RAWMODE 0x00000001L
+#define NTNEGOTIATE_CAPABILITY_MPXMODE 0x00000002L
+#define NTNEGOTIATE_CAPABILITY_UNICODE 0x00000004L
+#define NTNEGOTIATE_CAPABILITY_LARGEFILES 0x00000008L
+#define NTNEGOTIATE_CAPABILITY_NTSMB 0x00000010L
+#define NTNEGOTIATE_CAPABILITY_RPCAPI 0x00000020L
+#define NTNEGOTIATE_CAPABILITY_NTSTATUS 0x00000040L
+#define NTNEGOTIATE_CAPABILITY_LEVEL_II_OPLOCKS 0x00000080L
#define NTNEGOTIATE_CAPABILITY_LOCK_AND_READ 0x00000100L
-#define NTNEGOTIATE_CAPABILITY_NTFIND 0x00000200L
-#define NTNEGOTIATE_CAPABILITY_DFS 0x00001000L
+#define NTNEGOTIATE_CAPABILITY_NTFIND 0x00000200L
+#define NTNEGOTIATE_CAPABILITY_DFS 0x00001000L
#define NTNEGOTIATE_CAPABILITY_NT_INFO_PASSTHRU 0x00002000L
#define NTNEGOTIATE_CAPABILITY_BULK_TRANSFER 0x20000000L
-#define NTNEGOTIATE_CAPABILITY_COMPRESSED 0x40000000L
+#define NTNEGOTIATE_CAPABILITY_COMPRESSED 0x40000000L
#define NTNEGOTIATE_CAPABILITY_EXTENDED_SECURITY 0x80000000L
/* a packet structure for receiving SMB messages; locked by smb_globalLock.
*/
#define SMB_PACKETMAGIC 0x7436353 /* magic # for packets */
typedef struct smb_packet {
- char data[SMB_PACKETSIZE];
- struct smb_packet *nextp; /* in free list, or whatever */
- long magic;
- cm_space_t *spacep; /* use this for stripping last component */
- NCB *ncbp; /* use this for sending */
- struct smb_vc *vcp;
- unsigned long resumeCode;
- unsigned short inCount;
- unsigned short fid; /* for calls bundled with openAndX */
- unsigned char *wctp;
- unsigned char inCom;
- unsigned char oddByte;
- unsigned short ncb_length;
- unsigned char flags;
+ char data[SMB_PACKETSIZE];
+ struct smb_packet *nextp; /* in free list, or whatever */
+ long magic;
+ cm_space_t *spacep; /* use this for stripping last component */
+ NCB *ncbp; /* use this for sending */
+ struct smb_vc *vcp;
+ unsigned long resumeCode;
+ unsigned short inCount;
+ unsigned short fid; /* for calls bundled with openAndX */
+ unsigned char *wctp;
+ unsigned char inCom;
+ unsigned char oddByte;
+ unsigned short ncb_length;
+ unsigned char flags;
#ifdef DJGPP
- dos_ptr dos_pkt;
- unsigned int dos_pkt_sel;
+ dos_ptr dos_pkt;
+ unsigned int dos_pkt_sel;
#endif /* DJGPP */
} smb_packet_t;
/* a structure for making Netbios calls; locked by smb_globalLock */
#define SMB_NCBMAGIC 0x2334344
typedef struct myncb {
- NCB ncb; /* ncb to use */
- struct myncb *nextp; /* when on free list */
- long magic;
+ NCB ncb; /* ncb to use */
+ struct myncb *nextp; /* when on free list */
+ long magic;
#ifdef DJGPP
- dos_ptr dos_ncb;
- smb_packet_t *orig_pkt;
- unsigned int dos_ncb_sel;
+ dos_ptr dos_ncb;
+ smb_packet_t *orig_pkt;
+ unsigned int dos_ncb_sel;
#endif /* DJGPP */
} smb_ncb_t;
/* one per virtual circuit */
typedef struct smb_vc {
- struct smb_vc *nextp; /* not used */
- unsigned long refCount; /* the reference count */
- long flags; /* the flags, if any; locked by mx */
+ struct smb_vc *nextp; /* not used */
+ unsigned long refCount; /* the reference count */
+ long flags; /* the flags, if any; locked by mx */
osi_mutex_t mx; /* the mutex */
- long vcID; /* VC id */
- unsigned short lsn; /* the NCB LSN associated with this */
- unsigned short uidCounter; /* session ID counter */
- unsigned short tidCounter; /* tree ID counter */
- unsigned short fidCounter; /* file handle ID counter */
+ long vcID; /* VC id */
+ unsigned short lsn; /* the NCB LSN associated with this */
+ unsigned short uidCounter; /* session ID counter */
+ unsigned short tidCounter; /* tree ID counter */
+ unsigned short fidCounter; /* file handle ID counter */
struct smb_tid *tidsp; /* the first child in the tid list */
- struct smb_user *usersp; /* the first child in the user session list */
+ struct smb_user *usersp; /* the first child in the user session list */
struct smb_fid *fidsp; /* the first child in the open file list */
- struct smb_user *justLoggedOut; /* ready for profile upload? */
- time_t logoffTime; /* tick count when logged off */
- /*struct cm_user *logonDLLUser; /* integrated logon user */
- unsigned char errorCount;
+ struct smb_user *justLoggedOut; /* ready for profile upload? */
+ time_t logoffTime; /* tick count when logged off */
+ unsigned char errorCount;
char rname[17];
- int lana;
- char encKey[MSV1_0_CHALLENGE_LENGTH]; /* MSV1_0_CHALLENGE_LENGTH is 8 */
- void * secCtx; /* security context when negotiating SMB extended auth
- * valid when SMB_VCFLAG_AUTH_IN_PROGRESS is set
- */
+ int lana;
+ char encKey[MSV1_0_CHALLENGE_LENGTH]; /* MSV1_0_CHALLENGE_LENGTH is 8 */
+ void * secCtx; /* security context when negotiating SMB extended auth
+ * valid when SMB_VCFLAG_AUTH_IN_PROGRESS is set
+ */
} smb_vc_t;
/* have we negotiated ... */
/* one per user session */
typedef struct smb_user {
- struct smb_user *nextp; /* next sibling */
- unsigned long refCount; /* ref count */
- long flags; /* flags; locked by mx */
- osi_mutex_t mx;
- long userID; /* the session identifier */
- struct smb_vc *vcp; /* back ptr to virtual circuit */
- struct smb_username *unp; /* user name struct */
+ struct smb_user *nextp; /* next sibling */
+ unsigned long refCount; /* ref count */
+ long flags; /* flags; locked by mx */
+ osi_mutex_t mx;
+ long userID; /* the session identifier */
+ struct smb_vc *vcp; /* back ptr to virtual circuit */
+ struct smb_username *unp; /* user name struct */
} smb_user_t;
typedef struct smb_username {
- struct smb_username *nextp; /* next sibling */
- unsigned long refCount; /* ref count */
- long flags; /* flags; locked by mx */
- osi_mutex_t mx;
- struct cm_user *userp; /* CM user structure */
- char *name; /* user name */
- char *machine; /* machine name */
+ struct smb_username *nextp; /* next sibling */
+ unsigned long refCount; /* ref count */
+ long flags; /* flags; locked by mx */
+ osi_mutex_t mx;
+ struct cm_user *userp; /* CM user structure */
+ char *name; /* user name */
+ char *machine; /* machine name */
} smb_username_t;
#define SMB_USERFLAG_DELETE 1 /* delete struct when ref count zero */
/* one per tree-connect */
typedef struct smb_tid {
- struct smb_tid *nextp; /* next sibling */
- unsigned long refCount;
- long flags;
- osi_mutex_t mx; /* for non-tree-related stuff */
- unsigned short tid; /* the tid */
- struct smb_vc *vcp; /* back ptr */
- struct cm_user *userp; /* user logged in at the
+ struct smb_tid *nextp; /* next sibling */
+ unsigned long refCount;
+ long flags;
+ osi_mutex_t mx; /* for non-tree-related stuff */
+ unsigned short tid; /* the tid */
+ struct smb_vc *vcp; /* back ptr */
+ struct cm_user *userp; /* user logged in at the
* tree connect level (base) */
- char *pathname; /* pathname derived from sharename */
+ char *pathname; /* pathname derived from sharename */
} smb_tid_t;
#define SMB_TIDFLAG_DELETE 1 /* delete struct when ref count zero */
/* one per process ID */
typedef struct smb_pid {
- struct smb_pid *nextp; /* next sibling */
- unsigned long refCount;
- long flags;
- osi_mutex_t mx; /* for non-tree-related stuff */
- unsigned short pid; /* the pid */
- struct smb_tid *tidp; /* back ptr */
+ struct smb_pid *nextp; /* next sibling */
+ unsigned long refCount;
+ long flags;
+ osi_mutex_t mx; /* for non-tree-related stuff */
+ unsigned short pid; /* the pid */
+ struct smb_tid *tidp; /* back ptr */
} smb_pid_t;
/* ioctl parameter, while being assembled and/or processed */
typedef struct smb_ioctl {
- /* input side */
- char *inDatap; /* ioctl func's current position
+ /* input side */
+ char *inDatap; /* ioctl func's current position
* in input parameter block */
- char *inAllocp; /* allocated input parameter block */
- long inCopied; /* # of input bytes copied in so far
+ char *inAllocp; /* allocated input parameter block */
+ long inCopied; /* # of input bytes copied in so far
* by write calls */
- cm_space_t *prefix; /* prefix for subst drives */
- char *tidPathp; /* Pathname associated with Tree ID */
-
- /* output side */
- char *outDatap; /* output results assembled so far */
- char *outAllocp; /* output results assembled so far */
- long outCopied; /* # of output bytes copied back so far
- * by read calls */
+ cm_space_t *prefix; /* prefix for subst drives */
+ char *tidPathp; /* Pathname associated with Tree ID */
+
+ /* output side */
+ char *outDatap; /* output results assembled so far */
+ char *outAllocp; /* output results assembled so far */
+ long outCopied; /* # of output bytes copied back so far
+ * by read calls */
- /* flags */
- long flags;
-
- /* fid pointer */
- struct smb_fid *fidp;
+ /* flags */
+ long flags;
- /* uid pointer */
- smb_user_t *uidp;
+ /* fid pointer */
+ struct smb_fid *fidp;
+ /* uid pointer */
+ smb_user_t *uidp;
} smb_ioctl_t;
/* flags for smb_ioctl_t */
/* one per file ID; these are really file descriptors */
typedef struct smb_fid {
- osi_queue_t q;
- unsigned long refCount;
- unsigned long flags;
- osi_mutex_t mx; /* for non-tree-related stuff */
- unsigned short fid; /* the file ID */
- struct smb_vc *vcp; /* back ptr */
- struct cm_scache *scp; /* scache of open file */
- long offset; /* our file pointer */
- smb_ioctl_t *ioctlp; /* ptr to ioctl structure */
+ osi_queue_t q;
+ unsigned long refCount;
+ unsigned long flags;
+ osi_mutex_t mx; /* for non-tree-related stuff */
+ unsigned short fid; /* the file ID */
+ struct smb_vc *vcp; /* back ptr */
+ struct cm_scache *scp; /* scache of open file */
+ long offset; /* our file pointer */
+ smb_ioctl_t *ioctlp; /* ptr to ioctl structure */
/* Under NT, we may need to know the
* parent directory and pathname used
* to open the file, either to delete
* the file on close, or to do a
* change notification */
- struct cm_scache *NTopen_dscp; /* parent directory (NT) */
- char *NTopen_pathp; /* path used in open (NT) */
- char *NTopen_wholepathp; /* entire path, not just last name */
- int curr_chunk; /* chunk being read */
- int prev_chunk; /* previous chunk read */
- int raw_writers; /* pending async raw writes */
- EVENT_HANDLE raw_write_event; /* signal this when raw_writers zero */
+ struct cm_scache *NTopen_dscp; /* parent directory (NT) */
+ char *NTopen_pathp; /* path used in open (NT) */
+ char *NTopen_wholepathp; /* entire path, not just last name */
+ int curr_chunk; /* chunk being read */
+ int prev_chunk; /* previous chunk read */
+ int raw_writers; /* pending async raw writes */
+ EVENT_HANDLE raw_write_event; /* signal this when raw_writers zero */
} smb_fid_t;
#define SMB_FID_OPENREAD 1 /* open for reading */
#define SMB_FID_NTOPEN 0x100 /* have dscp and pathp */
/*
- * SMB file attributes
+ * SMB file attributes (32-bit)
*/
-#define SMB_ATTR_ARCHIVE 0x20
-#define SMB_ATTR_COMPRESSED 0x800 /* file or dir is compressed */
-#define SMB_ATTR_NORMAL 0x80 /* normal file. Only valid if used alone */
-#define SMB_ATTR_HIDDEN 0x2 /* hidden file for the purpose of dir listings */
-#define SMB_ATTR_READONLY 0x1
-#define SMB_ATTR_TEMPORARY 0x100
-#define SMB_ATTR_DIRECTORY 0x10
-#define SMB_ATTR_SYSTEM 0x4
+#define SMB_ATTR_READONLY 0x0001
+#define SMB_ATTR_HIDDEN 0x0002 /* hidden file for the purpose of dir listings */
+#define SMB_ATTR_SYSTEM 0x0004
+#define SMB_ATTR_VOLUMEID 0x0008 /* obsolete */
+#define SMB_ATTR_DIRECTORY 0x0010
+#define SMB_ATTR_ARCHIVE 0x0020
+#define SMB_ATTR_DEVICE 0x0040
+#define SMB_ATTR_NORMAL 0x0080 /* normal file. Only valid if used alone */
+#define SMB_ATTR_TEMPORARY 0x0100
+#define SMB_ATTR_SPARSE_FILE 0x0200
+#define SMB_ATTR_REPARSE_POINT 0x0400
+#define SMB_ATTR_COMPRESSED 0x0800 /* file or dir is compressed */
+#define SMB_ATTR_OFFLINE 0x1000
+#define SMB_ATTR_NOT_CONTENT_INDEXED 0x2000
+#define SMB_ATTR_ENCRYPTED 0x4000
/* for tracking in-progress directory searches */
typedef struct smb_dirSearch {
- osi_queue_t q; /* queue of all outstanding cookies */
- osi_mutex_t mx; /* just in case the caller screws up */
- unsigned long refCount; /* reference count */
- long cookie; /* value returned to the caller */
- struct cm_scache *scp; /* vnode of the dir we're searching */
- time_t lastTime; /* last time we used this */
- long flags; /* flags (see below);
+ osi_queue_t q; /* queue of all outstanding cookies */
+ osi_mutex_t mx; /* just in case the caller screws up */
+ unsigned long refCount; /* reference count */
+ long cookie; /* value returned to the caller */
+ struct cm_scache *scp; /* vnode of the dir we're searching */
+ time_t lastTime; /* last time we used this */
+ long flags; /* flags (see below);
* locked by smb_globalLock */
- unsigned short attribute; /* search attribute
+ unsigned short attribute; /* search attribute
* (used for extended protocol) */
- char mask[256]; /* search mask for V3 */
+ char mask[256]; /* search mask for V3 */
} smb_dirSearch_t;
#define SMB_DIRSEARCH_DELETE 1 /* delete struct when ref count zero */
/* type for patching directory listings */
typedef struct smb_dirListPatch {
- osi_queue_t q;
- char *dptr; /* ptr to attr, time, data, sizel, sizeh */
- long flags; /* flags. See below */
- cm_fid_t fid;
- cm_dirEntry_t *dep; /* temp */
+ osi_queue_t q;
+ char *dptr; /* ptr to attr, time, data, sizel, sizeh */
+ long flags; /* flags. See below */
+ cm_fid_t fid;
+ cm_dirEntry_t *dep; /* temp */
} smb_dirListPatch_t;
/* dirListPatch Flags */
/* waiting lock list elements */
typedef struct smb_waitingLock {
- osi_queue_t q;
- smb_vc_t *vcp;
- smb_packet_t *inp;
- smb_packet_t *outp;
- time_t timeRemaining;
- void *lockp;
+ osi_queue_t q;
+ smb_vc_t *vcp;
+ smb_packet_t *inp;
+ smb_packet_t *outp;
+ time_t timeRemaining;
+ void *lockp;
} smb_waitingLock_t;
extern smb_waitingLock_t *smb_allWaitingLocks;
typedef long (smb_proc_t)(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp);
typedef struct smb_dispatch {
- smb_proc_t *procp; /* proc to call */
- int flags; /* flags describing function */
+ smb_proc_t *procp; /* proc to call */
+ int flags; /* flags describing function */
} smb_dispatch_t;
#define SMB_DISPATCHFLAG_CHAINED 1 /* this is an _AND_X function */
extern int smb_maxVCPerServer; /* max # of VCs per server */
extern int smb_maxMpxRequests; /* max # of mpx requests */
+extern int smb_StoreAnsiFilenames;
extern int smb_hideDotFiles;
extern unsigned int smb_IsDotFile(char *lastComp);
/* used for getting a challenge for SMB auth */
typedef struct _MSV1_0_LM20_CHALLENGE_REQUEST {
- MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
+ MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
} MSV1_0_LM20_CHALLENGE_REQUEST, *PMSV1_0_LM20_CHALLENGE_REQUEST;
typedef struct _MSV1_0_LM20_CHALLENGE_RESPONSE {
- MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
- UCHAR ChallengeToClient[MSV1_0_CHALLENGE_LENGTH];
+ MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
+ UCHAR ChallengeToClient[MSV1_0_CHALLENGE_LENGTH];
} MSV1_0_LM20_CHALLENGE_RESPONSE, *PMSV1_0_LM20_CHALLENGE_RESPONSE;
/**/
extern char *smb_GetSharename(void);
+extern DWORD smb_ServerExceptionFilter(void);
+
/* include other include files */
#include "smb3.h"
#include "smb_ioctl.h"
#include <string.h>
#include <stdio.h>
#include <time.h>
-
#include <osi.h>
#include "afsd.h"
{
attrs = SMB_ATTR_DIRECTORY;
#ifdef SPECIAL_FOLDERS
-#ifdef AFS_FREELANCE_CLIENT
- if ( cm_freelanceEnabled &&
- scp->fid.cell==AFS_FAKE_ROOT_CELL_ID &&
- scp->fid.volume==AFS_FAKE_ROOT_VOL_ID &&
- scp->fid.vnode==0x1 && scp->fid.unique==0x1) {
- attrs |= SMB_ATTR_SYSTEM; /* FILE_ATTRIBUTE_SYSTEM */
- }
-#endif /* AFS_FREELANCE_CLIENT */
+ attrs |= SMB_ATTR_SYSTEM; /* FILE_ATTRIBUTE_SYSTEM */
#endif /* SPECIAL_FOLDERS */
} else
attrs = 0;
}
#define SMB_SUPPORT_SEARCH_BITS 0x0001
+#define SMB_SHARE_IS_IN_DFS 0x0002
long smb_ReceiveV3TreeConnectX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
{
tp = smb_GetSMBData(inp, NULL);
passwordp = smb_ParseString(tp, &tp);
pathp = smb_ParseString(tp, &tp);
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
servicep = smb_ParseString(tp, &tp);
tp = strrchr(pathp, '\\');
tidp = smb_FindTID(vcp, newTid, SMB_FLAG_CREATE);
- if(!ipc) {
+ if (!ipc) {
uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
shareFound = smb_FindShare(vcp, uidp, shareName, &sharePath);
if (uidp)
if (vcp->flags & SMB_VCFLAG_USENT)
{
int policy = smb_FindShareCSCPolicy(shareName);
- smb_SetSMBParm(outp, 2, SMB_SUPPORT_SEARCH_BITS | (policy << 2));
+ smb_SetSMBParm(outp, 2, SMB_SUPPORT_SEARCH_BITS |
+#ifdef DFS_SUPPORT
+ SMB_SHARE_IS_IN_DFS |
+#endif
+ (policy << 2));
}
} else {
smb_SetSMBParm(outp, 2, 0);
lock_ObtainMutex(&tidp->mx);
tidp->userp = userp;
tidp->pathname = sharePath;
- if(ipc) tidp->flags |= SMB_TIDFLAG_IPC;
+ if (ipc)
+ tidp->flags |= SMB_TIDFLAG_IPC;
lock_ReleaseMutex(&tidp->mx);
smb_ReleaseTID(tidp);
((smb_t *)inp)->tid = newTid;
tp = smb_GetSMBData(outp, NULL);
if (!ipc) {
+ /* XXX - why is this a drive letter? - jaltman */
*tp++ = 'A';
*tp++ = ':';
*tp++ = 0;
/* We can handle long names */
if (vcp->flags & SMB_VCFLAG_USENT)
- smbp->flg2 |= 0x40; /* IS_LONG_NAME */
+ smbp->flg2 |= SMB_FLAGS2_IS_LONG_NAME;
/* now copy important fields from the tran 2 packet */
smbp->com = t2p->com;
smbp->reh = (unsigned char) ((NTStatus >> 8) & 0xff);
smbp->errLow = (unsigned char) ((NTStatus >> 16) & 0xff);
smbp->errHigh = (unsigned char) ((NTStatus >> 24) & 0xff);
- smbp->flg2 |= 0x4000;
+ smbp->flg2 |= SMB_FLAGS2_ERR_STATUS;
}
else {
smbp->rcls = errClass;
/* We can handle long names */
if (vcp->flags & SMB_VCFLAG_USENT)
- smbp->flg2 |= 0x40; /* IS_LONG_NAME */
+ smbp->flg2 |= SMB_FLAGS2_IS_LONG_NAME;
/* now copy important fields from the tran 2 packet */
smbp->com = t2p->com;
smb_SetSMBParm(tp, 7, dataOffset); /* offset of data */
smb_SetSMBParm(tp, 8, 0); /* data displacement */
smb_SetSMBParm(tp, 9, 0); /* low: setup word count *
- * high: resvd */
+ * high: resvd */
datap = smb_GetSMBData(tp, NULL);
*datap++ = 0; /* we rounded to even */
if (infoLevel == 0)
totalData = sizeof(smb_rap_share_info_0_t);
- else if(infoLevel == 1)
+ else if(infoLevel == SMB_INFO_STANDARD)
totalData = sizeof(smb_rap_share_info_1_t) + 1; /* + empty string */
- else if(infoLevel == 2)
+ else if(infoLevel == SMB_INFO_QUERY_EA_SIZE)
totalData = sizeof(smb_rap_share_info_2_t) + 2; /* + two empty strings */
else
return CM_ERROR_INVAL;
smb_rap_share_info_0_t * info = (smb_rap_share_info_0_t *) outp->datap;
strncpy(info->shi0_netname, shareName, sizeof(info->shi0_netname)-1);
info->shi0_netname[sizeof(info->shi0_netname)-1] = 0;
- } else if(infoLevel == 1) {
+ } else if(infoLevel == SMB_INFO_STANDARD) {
smb_rap_share_info_1_t * info = (smb_rap_share_info_1_t *) outp->datap;
strncpy(info->shi1_netname, shareName, sizeof(info->shi1_netname)-1);
info->shi1_netname[sizeof(info->shi1_netname)-1] = 0;
info0 = (smb_rap_server_info_0_t *) outp->datap;
cstrp = (char *) (info0 + 1);
strcpy(info0->sv0_name, "AFS");
- } else { /* infoLevel == 1 */
+ } else { /* infoLevel == SMB_INFO_STANDARD */
info1 = (smb_rap_server_info_1_t *) outp->datap;
cstrp = (char *) (info1 + 1);
strcpy(info1->sv1_name, "AFS");
if (attributes & 1) initialModeBits &= ~0222;
pathp = (char *) (&p->parmsp[14]);
-
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
+
outp = smb_GetTran2ResponsePacket(vcp, p, op, 40, 0);
spacep = cm_GetSpace();
case 0x103: responseSize = sizeof(qi.u.FSsizeInfo); break;
case 0x104: responseSize = sizeof(qi.u.FSdeviceInfo); break;
case 0x105: responseSize = sizeof(qi.u.FSattributeInfo); break;
+ case 0x200: /* CIFS Unix Info */
+ case 0x301: /* Mac FS Info */
default: return CM_ERROR_INVAL;
}
cm_InitReq(&req);
infoLevel = p->parmsp[0];
- if (infoLevel == 6) nbytesRequired = 0;
- else if (infoLevel == 1) nbytesRequired = 22;
- else if (infoLevel == 2) nbytesRequired = 26;
- else if (infoLevel == 0x101) nbytesRequired = 40;
- else if (infoLevel == 0x102) nbytesRequired = 24;
- else if (infoLevel == 0x103) nbytesRequired = 4;
- else if (infoLevel == 0x108) nbytesRequired = 30;
+ if (infoLevel == SMB_INFO_IS_NAME_VALID)
+ nbytesRequired = 0;
+ else if (infoLevel == SMB_INFO_STANDARD)
+ nbytesRequired = 22;
+ else if (infoLevel == SMB_INFO_QUERY_EA_SIZE)
+ nbytesRequired = 26;
+ else if (infoLevel == SMB_QUERY_FILE_BASIC_INFO)
+ nbytesRequired = 40;
+ else if (infoLevel == SMB_QUERY_FILE_STANDARD_INFO)
+ nbytesRequired = 24;
+ else if (infoLevel == SMB_QUERY_FILE_EA_INFO)
+ nbytesRequired = 4;
+ else if (infoLevel == SMB_QUERY_FILE_ALT_NAME_INFO)
+ nbytesRequired = 30;
else {
osi_Log2(smb_logp, "Bad Tran2 op 0x%x infolevel 0x%x",
p->opcode, infoLevel);
* the syntax, so we just OK things now. In particular, we're *not*
* being asked to verify anything about the state of any parent dirs.
*/
- if (infoLevel == 6) {
+ if (infoLevel == SMB_INFO_IS_NAME_VALID) {
smb_SendTran2Packet(vcp, outp, opx);
smb_FreeTran2Packet(outp);
return 0;
* yet been evaluated and for directories that haven't yet been
* fetched.
*/
- if (infoLevel == 0x101) {
+ if (infoLevel == SMB_QUERY_FILE_BASIC_INFO) {
spacep = cm_GetSpace();
smb_StripLastComponent(spacep->data, &lastComp,
(char *)(&p->parmsp[3]));
+#ifndef SPECIAL_FOLDERS
/* Make sure that lastComp is not NULL */
if (lastComp) {
- if (strcmp(lastComp, "\\desktop.ini") == 0) {
+ if (stricmp(lastComp, "\\desktop.ini") == 0) {
code = cm_NameI(cm_rootSCachep, spacep->data,
CM_FLAG_CASEFOLD
| CM_FLAG_DIRSEARCH
}
}
}
+#endif /* SPECIAL_FOLDERS */
+
cm_FreeSpace(spacep);
}
goto done;
}
- if (infoLevel == 1 || infoLevel == 2) {
+ if (infoLevel == SMB_INFO_STANDARD || infoLevel == SMB_INFO_QUERY_EA_SIZE) {
smb_SearchTimeFromUnixTime(&dosTime, scp->clientModTime);
*((u_long *)op) = dosTime; op += 4; /* creation time */
*((u_long *)op) = dosTime; op += 4; /* access time */
attributes = smb_Attributes(scp);
*((u_short *)op) = attributes; op += 2; /* attributes */
}
- else if (infoLevel == 0x101) {
+ else if (infoLevel == SMB_QUERY_FILE_BASIC_INFO) {
smb_LargeSearchTimeFromUnixTime(&ft, scp->clientModTime);
*((FILETIME *)op) = ft; op += 8; /* creation time */
*((FILETIME *)op) = ft; op += 8; /* last access time */
*((u_long *)op) = extAttributes; op += 4; /* extended attribs */
*((u_long *)op) = 0; op += 4; /* don't know what this is */
}
- else if (infoLevel == 0x102) {
+ else if (infoLevel == SMB_QUERY_FILE_STANDARD_INFO) {
*((LARGE_INTEGER *)op) = scp->length; op += 8; /* alloc size */
*((LARGE_INTEGER *)op) = scp->length; op += 8; /* EOF */
*((u_long *)op) = scp->linkCount; op += 4;
*op++ = (scp->fileType == CM_SCACHETYPE_DIRECTORY ? 1 : 0);
*op++ = 0;
}
- else if (infoLevel == 0x103) {
+ else if (infoLevel == SMB_QUERY_FILE_EA_INFO) {
memset(op, 0, 4); op += 4; /* EA size */
}
/* now, if we are being asked about extended attrs, return a 0 size */
- if (infoLevel == 2) {
+ if (infoLevel == SMB_INFO_QUERY_EA_SIZE) {
*((u_long *)op) = 0; op += 4;
}
}
infoLevel = p->parmsp[1];
- if (infoLevel == 0x101) nbytesRequired = 40;
- else if (infoLevel == 0x102) nbytesRequired = 24;
- else if (infoLevel == 0x103) nbytesRequired = 4;
- else if (infoLevel == 0x104) nbytesRequired = 6;
+ if (infoLevel == SMB_QUERY_FILE_BASIC_INFO)
+ nbytesRequired = 40;
+ else if (infoLevel == SMB_QUERY_FILE_STANDARD_INFO)
+ nbytesRequired = 24;
+ else if (infoLevel == SMB_QUERY_FILE_EA_INFO)
+ nbytesRequired = 4;
+ else if (infoLevel == SMB_QUERY_FILE_NAME_INFO)
+ nbytesRequired = 6;
else {
osi_Log2(smb_logp, "Bad Tran2 op 0x%x infolevel 0x%x",
p->opcode, infoLevel);
* Marshall the output data.
*/
op = outp->datap;
- if (infoLevel == 0x101) {
+ if (infoLevel == SMB_QUERY_FILE_BASIC_INFO) {
smb_LargeSearchTimeFromUnixTime(&ft, scp->clientModTime);
*((FILETIME *)op) = ft; op += 8; /* creation time */
*((FILETIME *)op) = ft; op += 8; /* last access time */
*((u_long *)op) = attributes; op += 4;
*((u_long *)op) = 0; op += 4;
}
- else if (infoLevel == 0x102) {
+ else if (infoLevel == SMB_QUERY_FILE_STANDARD_INFO) {
*((LARGE_INTEGER *)op) = scp->length; op += 8; /* alloc size */
*((LARGE_INTEGER *)op) = scp->length; op += 8; /* EOF */
*((u_long *)op) = scp->linkCount; op += 4;
*op++ = 0;
*op++ = 0;
}
- else if (infoLevel == 0x103) {
+ else if (infoLevel == SMB_QUERY_FILE_EA_INFO) {
*((u_long *)op) = 0; op += 4;
}
- else if (infoLevel == 0x104) {
+ else if (infoLevel == SMB_QUERY_FILE_NAME_INFO) {
unsigned long len;
char *name;
return 0;
}
- if (infoLevel == 0x102 && !(fidp->flags & SMB_FID_OPENDELETE)) {
+ if (infoLevel == SMB_QUERY_FILE_STANDARD_INFO && !(fidp->flags & SMB_FID_OPENDELETE)) {
smb_SendTran2Error(vcp, p, op, CM_ERROR_NOACCESS);
smb_ReleaseFID(fidp);
return 0;
}
- if ((infoLevel == 0x103 || infoLevel == 0x104)
+ if ((infoLevel == SMB_QUERY_FILE_EA_INFO || infoLevel == SMB_QUERY_FILE_NAME_INFO)
&& !(fidp->flags & SMB_FID_OPENWRITE)) {
smb_SendTran2Error(vcp, p, op, CM_ERROR_NOACCESS);
smb_ReleaseFID(fidp);
scp = fidp->scp;
- if (infoLevel == 0x101) {
+ if (infoLevel == SMB_QUERY_FILE_BASIC_INFO) {
FILETIME lastMod;
unsigned int attribute;
cm_attr_t attr;
else
code = 0;
}
- else if (infoLevel == 0x103 || infoLevel == 0x104) {
+ else if (infoLevel == SMB_QUERY_FILE_EA_INFO || infoLevel == SMB_QUERY_FILE_NAME_INFO) {
LARGE_INTEGER size = *((LARGE_INTEGER *)(p->datap));
cm_attr_t attr;
attr.length.HighPart = size.HighPart;
code = cm_SetAttr(scp, &attr, userp, &req);
}
- else if (infoLevel == 0x102) {
+ else if (infoLevel == SMB_QUERY_FILE_STANDARD_INFO) {
if (*((char *)(p->datap))) {
code = cm_CheckNTDelete(fidp->NTopen_dscp, scp, userp,
&req);
long
smb_ReceiveTran2GetDFSReferral(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t *outp)
{
+ /* This is a UNICODE only request (bit15 of Flags2) */
+ /* The TID must be IPC$ */
+
+ /* The documentation for the Flags response field is contradictory */
+
+ /* Use Version 1 Referral Element Format */
+ /* ServerType = 0; indicates the next server should be queried for the file */
+ /* ReferralFlags = 0x01; PathConsumed characters should be stripped */
+ /* Node = UnicodeString of UNC path of the next share name */
+
osi_Log0(smb_logp,"ReceiveTran2GetDFSReferral - NOT_SUPPORTED");
return CM_ERROR_BADOP;
}
long
smb_ReceiveTran2ReportDFSInconsistency(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_t *outp)
{
+ /* This is a UNICODE only request (bit15 of Flags2) */
+
+ /* There is nothing we can do about this operation. The client is going to
+ * tell us that there is a Version 1 Referral Element for which there is a DFS Error.
+ * Unfortunately, there is really nothing we can do about it other then log it
+ * somewhere. Even then I don't think there is anything for us to do.
+ * So let's return an error value.
+ */
+
osi_Log0(smb_logp,"ReceiveTran2ReportDFSInconsistency - NOT_SUPPORTED");
return CM_ERROR_BADOP;
}
dsp = smb_NewDirSearch(1);
dsp->attribute = attribute;
pathp = ((char *) p->parmsp) + 12; /* points to path */
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
nextCookie = 0;
maskp = strrchr(pathp, '\\');
if (maskp == NULL)
/* Need 8.3 name? */
NeedShortName = 0;
- if (infoLevel == 0x104
+ if (infoLevel == SMB_QUERY_FILE_NAME_INFO
&& dep->fid.vnode != 0
&& !cm_Is8Dot3(dep->name)) {
cm_Gen8Dot3Name(dep, shortName, &shortNameEnd);
/* standard dir entry stuff */
if (infoLevel < 0x101)
ohbytes = 23; /* pre-NT */
- else if (infoLevel == 0x103)
+ else if (infoLevel == SMB_QUERY_FILE_EA_INFO)
ohbytes = 12; /* NT names only */
else
ohbytes = 64; /* NT */
- if (infoLevel == 0x104)
+ if (infoLevel == SMB_QUERY_FILE_NAME_INFO)
ohbytes += 26; /* Short name & length */
if (searchFlags & 4) {
if (infoLevel <= 0x101)
*(origOp + ohbytes - 1) = (unsigned char) onbytes;
- else if (infoLevel == 0x103)
+ else if (infoLevel == SMB_QUERY_FILE_EA_INFO)
*((u_long *)(op + 8)) = onbytes;
else
*((u_long *)(op + 60)) = onbytes;
strcpy(origOp+ohbytes, dep->name);
+ if (smb_StoreAnsiFilenames)
+ CharToOem(origOp+ohbytes, origOp+ohbytes);
/* Short name if requested and needed */
- if (infoLevel == 0x104) {
+ if (infoLevel == SMB_QUERY_FILE_NAME_INFO) {
if (NeedShortName) {
strcpy(op + 70, shortName);
+ if (smb_StoreAnsiFilenames)
+ CharToOem(op + 70, op + 70);
*(op + 68) = shortNameEnd - shortName;
}
}
/* now we emit the attribute. This is tricky, since
* we need to really stat the file to find out what
* type of entry we've got. Right now, we're copying
- * out data from * a buffer, while holding the scp
+ * out data from a buffer, while holding the scp
* locked, so it isn't really convenient to stat
* something now. We'll put in a place holder
* now, and make a second pass before returning this
if (attributes & 1) initialModeBits &= ~0222;
pathp = smb_GetSMBData(inp, NULL);
+ if (smb_StoreAnsiFilenames)
+ OemToChar(pathp,pathp);
spacep = inp->spacep;
smb_StripLastComponent(spacep->data, &lastNamep, pathp);
realPathp = malloc(nameLength+1);
memcpy(realPathp, pathp, nameLength);
realPathp[nameLength] = 0;
+ if (smb_StoreAnsiFilenames)
+ OemToChar(realPathp,realPathp);
spacep = inp->spacep;
smb_StripLastComponent(spacep->data, &lastNamep, realPathp);
realPathp = malloc(nameLength+1);
memcpy(realPathp, pathp, nameLength);
realPathp[nameLength] = 0;
+ if (smb_StoreAnsiFilenames)
+ OemToChar(realPathp,realPathp);
spacep = cm_GetSpace();
smb_StripLastComponent(spacep->data, &lastNamep, realPathp);
unsigned char nullSecurityDesc[36] = {
0x01, /* security descriptor revision */
0x00, /* reserved, should be zero */
- 0x00, 0x80, /* security descriptor control;
- * 0x8000 : self-relative format */
+ 0x00, 0x80, /* security descriptor control;
+ * 0x8000 : self-relative format */
0x14, 0x00, 0x00, 0x00, /* offset of owner SID */
0x1c, 0x00, 0x00, 0x00, /* offset of group SID */
0x00, 0x00, 0x00, 0x00, /* offset of DACL would go here */
0x00, 0x00, 0x00, 0x00, /* offset of SACL would go here */
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- /* "null SID" owner SID */
+ /* "null SID" owner SID */
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
- /* "null SID" group SID */
+ /* "null SID" group SID */
};
long smb_ReceiveNTTranQuerySecurityDesc(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
/* We can handle long names */
if (vcp->flags & SMB_VCFLAG_USENT)
- ((smb_t *)outp)->flg2 |= 0x40; /* IS_LONG_NAME */
+ ((smb_t *)outp)->flg2 |= SMB_FLAGS2_IS_LONG_NAME;
switch (function) {
case 6:
smb_SetSMBDataLength(watch, parmCount + 1);
if (parmCount != 0) {
+ char * p;
outData = smb_GetSMBData(watch, NULL);
outData++; /* round to get to parmOffset */
oldOutData = outData;
/* Action */
*((DWORD *)outData) = nameLen*2; outData += 4;
/* File Name Length */
- mbstowcs((WCHAR *)outData, filename, nameLen);
+ p = strdup(filename);
+ if (smb_StoreAnsiFilenames)
+ CharToOem(p,p);
+ mbstowcs((WCHAR *)outData, p, nameLen);
+ free(p);
/* File Name */
if (twoEntries) {
outData = oldOutData + oldParmCount;
/* Action */
*((DWORD *)outData) = otherNameLen*2;
outData += 4; /* File Name Length */
- mbstowcs((WCHAR *)outData, otherFilename,
- otherNameLen); /* File Name */
+ p = strdup(otherFilename);
+ if (smb_StoreAnsiFilenames)
+ CharToOem(p,p);
+ mbstowcs((WCHAR *)outData, p, otherNameLen); /* File Name */
+ free(p);
}
}
((smb_t *) watch)->errLow = 0;
((smb_t *) watch)->errHigh = 0;
/* Set NT Status codes flag */
- ((smb_t *) watch)->flg2 |= 0x4000;
+ ((smb_t *) watch)->flg2 |= SMB_FLAGS2_ERR_STATUS;
}
smb_SendPacket(vcp, watch);
((smb_t *)watch)->reh = 0x1;
((smb_t *)watch)->errLow = 0;
((smb_t *)watch)->errHigh = 0xC0;
- ((smb_t *)watch)->flg2 |= 0x4000;
+ ((smb_t *)watch)->flg2 |= SMB_FLAGS2_ERR_STATUS;
smb_SendPacket(vcp, watch);
if (watch->vcp)
smb_ReleaseVC(watch->vcp);
long smb_ReceiveNTRename(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
{
- char *oldname, *newname;
+ char *oldPathp, *newPathp;
long code = 0;
cm_user_t *userp;
char * tp;
}
tp = smb_GetSMBData(inp, NULL);
- oldname = smb_ParseASCIIBlock(tp, &tp);
- newname = smb_ParseASCIIBlock(tp, &tp);
+ oldPathp = smb_ParseASCIIBlock(tp, &tp);
+ if (smb_StoreAnsiFilenames)
+ OemToChar(oldPathp,oldPathp);
+ newPathp = smb_ParseASCIIBlock(tp, &tp);
+ if (smb_StoreAnsiFilenames)
+ OemToChar(newPathp,newPathp);
osi_Log3(smb_logp, "NTRename for [%s]->[%s] type [%s]",
- osi_LogSaveString(smb_logp, oldname),
- osi_LogSaveString(smb_logp, newname),
+ osi_LogSaveString(smb_logp, oldPathp),
+ osi_LogSaveString(smb_logp, newPathp),
((rename_type==RENAME_FLAG_RENAME)?"rename":"hardlink"));
if (rename_type == RENAME_FLAG_RENAME) {
- code = smb_Rename(vcp,inp,oldname,newname,attrs);
+ code = smb_Rename(vcp,inp,oldPathp,newPathp,attrs);
} else { /* RENAME_FLAG_HARD_LINK */
- code = smb_Link(vcp,inp,oldname,newname);
+ code = smb_Link(vcp,inp,oldPathp,newPathp);
}
return code;
}
} smb_tran2Dispatch_t;
typedef struct smb_tran2QFSInfo {
- union {
+ union {
#pragma pack(push, 2)
- struct {
- long FSID; /* file system ID */
- long sectorsPerAllocUnit;
- long totalAllocUnits; /* on the disk */
- long availAllocUnits; /* free blocks */
- unsigned short bytesPerSector; /* bytes per sector */
- } allocInfo;
+ struct {
+ long FSID; /* file system ID */
+ long sectorsPerAllocUnit;
+ long totalAllocUnits; /* on the disk */
+ long availAllocUnits; /* free blocks */
+ unsigned short bytesPerSector; /* bytes per sector */
+ } allocInfo;
#pragma pack(pop)
- struct {
- long vsn; /* volume serial number */
- char vnCount; /* count of chars in label, incl null */
- char label[12]; /* pad out with nulls */
- } volumeInfo;
- struct {
- FILETIME vct; /* volume creation time */
- long vsn; /* volume serial number */
- long vnCount; /* length of volume label in bytes */
- char res[2]; /* reserved */
- char label[10]; /* volume label */
- } FSvolumeInfo;
- struct {
- osi_hyper_t totalAllocUnits; /* on the disk */
- osi_hyper_t availAllocUnits; /* free blocks */
- long sectorsPerAllocUnit;
- long bytesPerSector; /* bytes per sector */
- } FSsizeInfo;
- struct {
- long devType; /* device type */
- long characteristics;
- } FSdeviceInfo;
- struct {
- long attributes;
- long maxCompLength; /* max path component length */
- long FSnameLength; /* length of file system name */
- char FSname[12];
- } FSattributeInfo;
- } u;
+ struct {
+ long vsn; /* volume serial number */
+ char vnCount; /* count of chars in label, incl null */
+ char label[12]; /* pad out with nulls */
+ } volumeInfo;
+ struct {
+ FILETIME vct; /* volume creation time */
+ long vsn; /* volume serial number */
+ long vnCount; /* length of volume label in bytes */
+ char res[2]; /* reserved */
+ char label[10]; /* volume label */
+ } FSvolumeInfo;
+ struct {
+ osi_hyper_t totalAllocUnits; /* on the disk */
+ osi_hyper_t availAllocUnits; /* free blocks */
+ long sectorsPerAllocUnit;
+ long bytesPerSector; /* bytes per sector */
+ } FSsizeInfo;
+ struct {
+ long devType; /* device type */
+ long characteristics;
+ } FSdeviceInfo;
+ struct {
+ long attributes;
+ long maxCompLength; /* max path component length */
+ long FSnameLength; /* length of file system name */
+ char FSname[12];
+ } FSattributeInfo;
+ } u;
} smb_tran2QFSInfo_t;
/* more than enough opcodes for today, anyway */
clean::
$(CD) lang
- for /f %l in ('dir /B ??_??') do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean
+ for /f %l in ('dir /B ??_??') do ( if exist @$(NTLANG) do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean )
$(CD) ..
mkdir:
cd lang
nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir
cd ..
-
+
clean::
$(CD) lang
- for /f %l in ('dir /B ??_??') do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean
+ for /f %l in ('dir /B ??_??') do ( if exist @$(NTLANG) do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean )
$(CD) ..
mkdir:
clean::
$(CD) lang
- for /f %l in ('dir /B ??_??') do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean
+ for /f %l in ('dir /B ??_??') do ( if exist @$(NTLANG) do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean )
$(CD) ..
mkdir:
clean::
$(CD) lang
- for /f %l in ('dir /B ??_??') do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean
+ for /f %l in ('dir /B ??_??') do ( if exist @$(NTLANG) do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean )
$(CD) ..
mkdir:
cd lang
nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir
cd ..
-
+
0,
NULL,
REG_OPTION_NON_VOLATILE,
- KEY_READ,
+ KEY_WRITE,
NULL,
&hkSub,
NULL);
// Action - On Add or On Edit a submount item
void Submounts_EditSubmount (HWND hDlg, PSUBMOUNT pSubmount)
{
- HWND hList = GetDlgItem (hDlg, IDC_LIST);
+ TCHAR szOrigSubmount[MAX_PATH];
+ _tcscpy(szOrigSubmount, pSubmount->szSubmount);
- if (ModalDialogParam (IDD_SUBMOUNT_EDIT, GetParent(hDlg), (DLGPROC)SubEdit_DlgProc, (LPARAM)pSubmount) == IDOK)
- {
- TCHAR szMapping[ MAX_PATH ];
- AdjustAfsPath (szMapping, pSubmount->szMapping, TRUE, FALSE);
+ HWND hList = GetDlgItem (hDlg, IDC_LIST);
- HLISTITEM hItem;
- for (hItem = FastList_FindFirst (hList); hItem; hItem = FastList_FindNext (hList, hItem))
- {
- LPCTSTR pszSubmount;
- if ((pszSubmount = FastList_GetItemText (hList, hItem, 0)) == NULL)
- continue;
+ if (ModalDialogParam (IDD_SUBMOUNT_EDIT, GetParent(hDlg), (DLGPROC)SubEdit_DlgProc, (LPARAM)pSubmount) == IDOK)
+ {
+ TCHAR szMapping[ MAX_PATH ];
+ BOOL bNameChange = (szOrigSubmount[0] && _tcsicmp(szOrigSubmount, pSubmount->szSubmount));
- if (!lstrcmpi (pszSubmount, pSubmount->szSubmount))
- break;
- }
+ AdjustAfsPath (szMapping, pSubmount->szMapping, TRUE, FALSE);
- if (!hItem)
- {
- FASTLISTADDITEM ai;
- memset (&ai, 0x00, sizeof(FASTLISTADDITEM));
- ai.iFirstImage = IMAGE_NOIMAGE;
- ai.iSecondImage = IMAGE_NOIMAGE;
- ai.pszText = pSubmount->szSubmount;
- ai.lParam = 0;
- hItem = FastList_AddItem (hList, &ai);
- }
+ HLISTITEM hItem;
- FastList_SetItemText (hList, hItem, 1, szMapping);
- }
+ if ( bNameChange ) {
+ for (hItem = FastList_FindFirst (hList); hItem; hItem = FastList_FindNext (hList, hItem))
+ {
+ LPCTSTR pszSubmount;
+ if ((pszSubmount = FastList_GetItemText (hList, hItem, 0)) == NULL)
+ continue;
+
+ if (!_tcsicmp(szOrigSubmount, pszSubmount) ) {
+ FastList_RemoveItem (hList, hItem);
+ break;
+ }
+ }
+ }
+
+ for (hItem = FastList_FindFirst (hList); hItem; hItem = FastList_FindNext (hList, hItem))
+ {
+ LPCTSTR pszSubmount;
+ if ((pszSubmount = FastList_GetItemText (hList, hItem, 0)) == NULL)
+ continue;
+
+ if (!_tcsicmp(pszSubmount, pSubmount->szSubmount))
+ break;
+ }
+
+ if (!hItem)
+ {
+ FASTLISTADDITEM ai;
+ memset (&ai, 0x00, sizeof(FASTLISTADDITEM));
+ ai.iFirstImage = IMAGE_NOIMAGE;
+ ai.iSecondImage = IMAGE_NOIMAGE;
+ ai.pszText = pSubmount->szSubmount;
+ ai.lParam = 0;
+ hItem = FastList_AddItem (hList, &ai);
+ }
+
+ FastList_SetItemText (hList, hItem, 1, szMapping);
+ }
}
clean::
$(CD) lang
- for /f %l in ('dir /B ??_??') do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean
+ for /f %l in ('dir /B ??_??') do ( if exist @$(NTLANG) do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean )
$(CD) ..
mkdir:
}
else if (IsServiceRunning())
{
- char szCellA[ 256 ] = "";
+ char szCellA[ cchRESOURCE ] = "";
int rc;
HKEY hk;
} else {
rc = 0;
}
- if (rc == 0)
- CopyAnsiToString(pszCell, szCellA);
+ if (rc == 0)
+ CopyAnsiToString(pszCell, szCellA);
}
return rc;
}
pszCell = (LPTSTR)GetWindowLong (hDlg, DWL_USER);
if (pszCell)
{
+ HWND hTab = GetDlgItem (g.hMain, IDC_TABS);
+ LPTSTR pszTab = (LPTSTR)GetTabParam (hTab, TabCtrl_GetCurSel(hTab));
+ HWND hChildDlg = NULL;
+
lock_ObtainMutex(&g.credsLock);
for (size_t iCreds = 0; iCreds < g.cCreds; ++iCreds)
{
// Check the active tab, and fix its checkbox if necessary
//
- HWND hTab = GetDlgItem (g.hMain, IDC_TABS);
- LPTSTR pszTab = (LPTSTR)GetTabParam (hTab, TabCtrl_GetCurSel(hTab));
if (pszTab && HIWORD(pszTab) && (!lstrcmpi (pszTab, pszCell)))
{
- HWND hDlg = GetTabChild (hTab);
- if (hDlg)
- CheckDlgButton (hDlg, IDC_CREDS_REMIND, FALSE);
+ hChildDlg = GetTabChild (hTab);
}
}
}
lock_ReleaseMutex(&g.credsLock);
- }
+
+ if (hChildDlg)
+ CheckDlgButton (hChildDlg, IDC_CREDS_REMIND, FALSE);
+ }
}
DLLLIBS =\
rpcndr.lib \
rpcrt4.lib \
- rpcns4.lib \
- largeint.lib
+ rpcns4.lib
+# largeint.lib
$(DLLFILE): $(DLLOBJS)
$(DLLGUILINK) $(DLLLIBS) -def:libosi.def
WriteRegStr HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "AFS Client Shell Extension"
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cpls" "afs_cpa" "$INSTDIR\Client\Program\afs_cpa.cpl"
+
+ ; Support for apps that wrote submount data directly to afsdsbmt.ini
+ WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\afsdsbmt.ini" "AFS Mappings" "USR:Software\OpenAFS\Client\mappings"
+ WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\afsdsbmt.ini" "AFS Submounts" "SYS:OpenAFS\Client\Submounts"
; AFS Reg entries
DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
DeleteRegKey /ifempty HKLM "${AFS_REGKEY_ROOT}"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS"
DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled"
-
+
+ ; Support for apps that wrote submount data directly to afsdsbmt.ini
+ DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\afsdsbmt.ini"
+
RMDir "$INSTDIR"
SectionEnd
StrCmp $R0 "0" good
startOver:
+ ; We want to read in the existing parameters and make them the defaults
+
+ ;AFS Crypt security
+ ReadRegDWORD $R1 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "SecurityLevel"
+ StrCmp $R1 "" +3
+ WriteINIStr $1 "Field 3" "State" $R1
+ goto +2
+ WriteINIStr $1 "Field 3" "State" "1"
+
+ ;Use DNS
+ ReadRegDWORD $R1 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "UseDNS"
+ StrCmp $R1 "" +3
+ WriteINIStr $1 "Field 9" "State" $R1
+ goto +2
+ WriteINIStr $1 "Field 9" "State" "1"
+
+ ; Use integrated logon
+ ReadRegDWORD $R1 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "LogonOptions"
+ StrCmp $R1 "" +3
+ WriteINIStr $1 "Field 7" "State" $R1
+ goto +2
+ WriteINIStr $1 "Field 7" "State" "0"
+
; If this is a server install, we do NOT want to recommend the Freelance client
; And we do not need to ask for the cell name.
SectionGetFlags ${secServer} $R1
IntOp $R1 $R1 & ${SF_SELECTED}
StrCmp $R1 "1" +1 NotServer
WriteINIStr $1 "Field 6" "Text" "Enable AFS Freelance client (Not Recommended for servers)"
+ ReadRegDWORD $R1 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "FreelanceClient"
+ StrCmp $R1 "" +3
+ WriteINIStr $1 "Field 5" "State" $R1
+ goto +2
WriteINIStr $1 "Field 5" "State" "0"
WriteINIStr $1 "Field 1" "Flags" "DISABLED"
WriteINIStr $1 "Field 2" "Flags" "DISABLED"
goto SkipServerTest
NotServer:
WriteINIStr $1 "Field 6" "Text" "Enable AFS Freelance client (Recommended)"
+ ReadRegDWORD $R1 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "FreelanceClient"
+ StrCmp $R1 "" +3
+ WriteINIStr $1 "Field 5" "State" $R1
+ goto +2
WriteINIStr $1 "Field 5" "State" "1"
WriteINIStr $1 "Field 1" "Flags" ""
WriteINIStr $1 "Field 2" "Flags" ""
<ComponentRef Id="rcm_Client" />
<ComponentRef Id="rcm_ClientCacheSize" />
<ComponentRef Id="rcm_ClientCachePath" />
+ <ComponentRef Id="rcm_StoreAnsiFilenames" />
<ComponentRef Id="cmp_CommonDir" />
<!-- empty property
<Property Id="AFSCACHESIZE"></Property>
-->
+ <!-- empty property
+ <Property Id="STOREANSIFILENAMES"></Property>
+ -->
<!-- Add/remove programs -->
<Property Id="ARPCOMMENTS">$(var.ProductComments)</Property>
<Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" Name="UseDNS" Type="integer" Value="[USEDNS]" Id="reg_Full_Client10" />
<Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" Name="SecurityLevel" Type="integer" Value="[SECURITYLEVEL]" Id="reg_Full_Client12" />
<Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" Name="SMBAuthType" Type="integer" Value="[SMBAUTHTYPE]" Id="reg_Full_Client13" />
+ <Registry Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\afsdsbmt.ini" Name="AFS Mappings" Type="string" Value="USR:Software\OpenAFS\Client\mappings" Id="reg_Full_Client14" />
+ <Registry Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\afsdsbmt.ini" Name="AFS Submounts" Type="string" Value="SYS:OpenAFS\Client\Submounts" Id="reg_Full_Client15" />
</Component>
<Component Id="rcm_ClientCachePath" Guid="4080E08D-6649-4A06-B286-F5E737DF4D8A" Transitive="yes">
- <Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" Name="CachePath" Type="expandable" Value="[AFSCACHEPATH]" Id="reg_Full_Client14" KeyPath="yes" />
+ <Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" Name="CachePath" Type="expandable" Value="[AFSCACHEPATH]" Id="reg_Full_Client16" KeyPath="yes" />
<Condition>AFSCACHEPATH <> ""</Condition>
</Component>
<Component Id="rcm_ClientCacheSize" Guid="F3A12290-920B-42E9-8E49-4958D7C0B6E2" Transitive="yes">
- <Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" Name="CacheSize" Type="integer" Value="[AFSCACHESIZE]" Id="reg_Full_Client15" KeyPath="yes" />
+ <Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" Name="CacheSize" Type="integer" Value="[AFSCACHESIZE]" Id="reg_Full_Client17" KeyPath="yes" />
<Condition>AFSCACHESIZE <> ""</Condition>
</Component>
+ <Component Id="rcm_StoreAnsiFilenames" Guid="EAC84AD6-CF90-4b28-AF32-6F96DF55C3C4" Transitive="yes">
+ <Registry Root="HKLM" Key="SOFTWARE\OpenAFS\Client" Name="StoreAnsiFilenames" Type="integer" Value="[STOREANSIFILENAMES]" Id="reg_Full_Client18" KeyPath="yes" />
+ <Condition>STOREANSIFILENAMES <> ""</Condition>
+ </Component>
<Component Id="rcm_Documentation" Guid="97493526-4A5C-4C55-A1D6-EA38841B1B85">
<Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Supplemental Documentation" KeyPath="yes" Id="reg_Docs2" />
<Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Supplemental Documentation" Action="createKeyAndRemoveKeyOnUninstall" Id="reg_Docs" />
PTHR_DLLFILE = $(DESTDIR)\lib\afspthread.dll
+$(OUT)\pthread.res: pthread.rc AFS_component_version_number.h
+ $(RC) /fo$*.res $(*F).rc
+
PTHR_DLLOBJS = \
$(OUT)\pthread.obj \
$(OUT)\pthread.res
(pthread_cache_done || pthread_once(&pthread_cache_once, create_once));
if (terminate_thread_handle == INVALID_HANDLE_VALUE) {
- terminate_thread_wakeup_event = CreateEvent((LPSECURITY_ATTRIBUTES) 0,
- TRUE, FALSE, (LPCTSTR) 0);
- terminate_thread_handle = CreateThread((LPSECURITY_ATTRIBUTES) 0, 0,
- terminate_thread_routine, (LPVOID) 0, 0,
- &terminate_thread_id);
+ CHAR eventName[MAX_PATH];
+ static eventCount = 0;
+ sprintf(eventName, "terminate_thread_wakeup_event %d::%d", _getpid(), eventCount++);
+ terminate_thread_wakeup_event = CreateEvent((LPSECURITY_ATTRIBUTES) 0,
+ TRUE, FALSE, (LPCTSTR) eventName);
+ terminate_thread_handle = CreateThread((LPSECURITY_ATTRIBUTES) 0, 0,
+ terminate_thread_routine, (LPVOID) 0, 0,
+ &terminate_thread_id);
} else {
SetEvent (terminate_thread_wakeup_event);
}
if (queue_IsEmpty(&waiter_cache)) {
new = (cond_waiters_t *) malloc(sizeof(cond_waiters_t));
if (new != NULL) {
- new->event = CreateEvent((LPSECURITY_ATTRIBUTES) 0, FALSE,
- FALSE, (LPCTSTR) 0);
+ CHAR eventName[MAX_PATH];
+ static eventCount = 0;
+ sprintf(eventName, "cond_waiters_t %d::%d", _getpid(), eventCount++);
+ new->event = CreateEvent((LPSECURITY_ATTRIBUTES) 0, FALSE,
+ FALSE, (LPCTSTR) eventName);
if (new->event == NULL) {
free(new);
new = NULL;
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/LINUX/osi_alloc.c,v 1.22 2004/07/14 04:14:31 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/LINUX/osi_alloc.c,v 1.22.2.1 2004/12/07 06:12:12 shadow Exp $");
#include "afs/sysincludes.h"
#include "afsincludes.h"
#endif
);
if (new) /* piggy back alloc type */
- (unsigned long)new |= KM_TYPE;
+ new = (void *)(KM_TYPE | (unsigned long)new);
} else {
new = (void *)vmalloc(asize);
if (new) /* piggy back alloc type */
- (unsigned long)new |= VM_TYPE;
+ new = (void *)(VM_TYPE | (unsigned long)new);
}
if (!new) {
vfree(MEMADDR(p));
break;
default:
- printf("afs_osi_Free: Asked to free unknown type %d at 0x%x\n",
- MEMTYPE(p), MEMADDR(p));
+ printf("afs_osi_Free: Asked to free unknown type %d at 0x%lx\n",
+ (int)MEMTYPE(p), (unsigned long)MEMADDR(p));
break;
}
memtype = MEMTYPE(lmp->chunk);
if (memtype != KM_TYPE && memtype != VM_TYPE) {
printf
- ("osi_linux_verify_alloced_memory: unknown type %d at 0x%x, index=%d\n",
- memtype, lmp->chunk, index);
+ ("osi_linux_verify_alloced_memory: unknown type %d at 0x%lx, index=%lu\n",
+ (int)memtype, (unsigned long)lmp->chunk, (unsigned long)index);
}
afs_linux_hash_verify_count++;
}
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/LINUX/osi_file.c,v 1.19 2004/04/12 16:04:32 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/LINUX/osi_file.c,v 1.19.2.3 2004/12/08 17:21:46 shadow Exp $");
+#include "h/module.h" /* early to avoid printf->printk mapping */
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
#include "afs/afs_stats.h" /* afs statistics */
#include "h/smp_lock.h"
-#include "h/module.h"
int afs_osicred_initialized = 0;
void *
osi_UFSOpen(afs_int32 ainode)
{
- struct inode *ip;
register struct osi_file *afile = NULL;
extern int cacheDiskType;
afs_int32 code = 0;
- int dummy;
struct inode *tip = NULL;
struct file *filp = NULL;
AFS_STATCNT(osi_UFSOpen);
int
osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
{
- struct AFS_UCRED *oldCred;
register afs_int32 code;
struct osi_stat tstat;
struct iattr newattrs;
down_write(&inode->i_alloc_sem);
#endif
down(&inode->i_sem);
- inode->i_size = newattrs.ia_size = asize;
+ newattrs.ia_size = asize;
newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
#if defined(AFS_LINUX24_ENV)
newattrs.ia_ctime = CURRENT_TIME;
if (!code)
truncate_inode_pages(&inode->i_data, asize);
#else
+ inode->i_size = asize;
if (inode->i_sb->s_op && inode->i_sb->s_op->notify_change) {
code = inode->i_sb->s_op->notify_change(&afile->dentry, &newattrs);
}
afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
- struct AFS_UCRED *oldCred;
size_t resid;
register afs_int32 code;
- register afs_int32 cnt1 = 0;
AFS_STATCNT(osi_Read);
/**
afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
- struct AFS_UCRED *oldCred;
size_t resid;
register afs_int32 code;
AFS_STATCNT(osi_Write);
#define afs_hz HZ
#include "h/sched.h"
#define osi_Time() (xtime.tv_sec)
+#ifdef AFS_LINUX_64BIT_KERNEL
+#define osi_GetTime(V) \
+ do { \
+ struct timeval tv; \
+ do_gettimeofday(&tv); \
+ (V)->tv_sec = (afs_int32)tv.tv_sec; \
+ (V)->tv_usec = (afs_int32)tv.tv_usec; \
+ } while (0)
+#else
#define osi_GetTime(V) do_gettimeofday((V))
+#endif
#undef gop_lookupname
#define gop_lookupname osi_lookupname
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/LINUX/osi_misc.c,v 1.34 2004/05/15 06:43:12 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/LINUX/osi_misc.c,v 1.34.2.1 2004/12/07 06:12:12 shadow Exp $");
#include "afs/sysincludes.h"
#include "afsincludes.h"
osi_file_uio_rdwr(struct osi_file *osifile, uio_t * uiop, int rw)
{
struct file *filp = &osifile->file;
- struct inode *ip = FILE_INODE(&osifile->file);
KERNEL_SPACE_DECL;
int code = 0;
struct iovec *iov;
* Setup a uio struct.
*/
void
-setup_uio(uio_t * uiop, struct iovec *iovecp, char *buf, afs_offs_t pos,
+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)
{
- iovecp->iov_base = buf;
+ iovecp->iov_base = (char *)buf;
iovecp->iov_len = count;
uiop->uio_iov = iovecp;
uiop->uio_iovcnt = 1;
int
uiomove(char *dp, int length, uio_flag_t rw, uio_t * uiop)
{
- int count, n;
+ int count;
struct iovec *iov;
int code;
#else
if (ip->i_nrpages) {
#endif
- printf("Failed to invalidate all pages on inode 0x%x\n",
- ip);
+ printf("Failed to invalidate all pages on inode 0x%lx\n",
+ (unsigned long)ip);
}
}
}
#if defined(AFS_LINUX24_ENV)
if (atomic_read(&ip->i_count) > 1)
+ printf("afs_put_inode: ino %ld (0x%lx) has count %ld\n",
+ (long)ip->i_ino, (unsigned long)ip,
+ (long)atomic_read(&ip->i_count));
#else
if (ip->i_count > 1)
+ printf("afs_put_inode: ino %ld (0x%lx) has count %ld\n",
+ (long)ip->i_ino, (unsigned long)ip, (long)ip->i_count);
#endif
- printf("afs_put_inode: ino %d (0x%x) has count %d\n", ip->i_ino, ip,
- ip->i_count);
afs_InactiveVCache(vcp, credp);
ObtainWriteLock(&vcp->lock, 504);
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.2 2004/10/18 17:43:51 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.5 2004/12/17 15:29:30 shadow Exp $");
+#include <linux/module.h> /* early to avoid printf->printk mapping */
#include "afs/sysincludes.h"
#include "afsincludes.h"
#include "h/unistd.h" /* For syscall numbers. */
#include "../asm/ia32_unistd.h"
#endif
-#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/slab.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
extern struct file_system_type afs_fs_type;
+#if !defined(AFS_LINUX24_ENV)
static long get_page_offset(void);
+#endif
#if defined(AFS_LINUX24_ENV)
DECLARE_MUTEX(afs_global_lock);
.ioctl = afs_ioctl,
};
+int
+csdbproc_read(char *buffer, char **start, off_t offset, int count,
+ int *eof, void *data)
+{
+ int len, j;
+ struct afs_q *cq, *tq;
+ struct cell *tc;
+ char tbuffer[16];
+ afs_uint32 addr;
+
+ len = 0;
+ ObtainReadLock(&afs_xcell);
+ for (cq = CellLRU.next; cq != &CellLRU; cq = tq) {
+ tc = QTOC(cq); tq = QNext(cq);
+ len += sprintf(buffer + len, ">%s #(%d/%d)\n", tc->cellName,
+ tc->cellNum, tc->cellIndex);
+ for (j = 0; j < MAXCELLHOSTS; j++) {
+ if (!tc->cellHosts[j]) break;
+ addr = ntohl(tc->cellHosts[j]->addr->sa_ip);
+ sprintf(tbuffer, "%d.%d.%d.%d",
+ (int)((addr>>24) & 0xff), (int)((addr>>16) & 0xff),
+ (int)((addr>>8) & 0xff), (int)( addr & 0xff));
+ len += sprintf(buffer + len, "%s #%s\n", tbuffer, tbuffer);
+ }
+ }
+ ReleaseReadLock(&afs_xcell);
+
+ if (offset >= len) {
+ *start = buffer;
+ *eof = 1;
+ return 0;
+ }
+ *start = buffer + offset;
+ if ((len -= offset) > count)
+ return count;
+ *eof = 1;
+ return len;
+}
+
static struct proc_dir_entry *openafs_procfs;
static int
-afsproc_init()
+afsproc_init(void)
{
struct proc_dir_entry *entry1;
+ struct proc_dir_entry *entry2;
openafs_procfs = proc_mkdir(PROC_FSDIRNAME, proc_root_fs);
entry1 = create_proc_entry(PROC_SYSCALL_NAME, 0666, openafs_procfs);
entry1->owner = THIS_MODULE;
+ entry2 = create_proc_read_entry(PROC_CELLSERVDB_NAME, (S_IFREG|S_IRUGO), openafs_procfs, csdbproc_read, NULL);
+
return 0;
}
static void
-afsproc_exit()
+afsproc_exit(void)
{
+ remove_proc_entry(PROC_CELLSERVDB_NAME, openafs_procfs);
remove_proc_entry(PROC_SYSCALL_NAME, openafs_procfs);
remove_proc_entry(PROC_FSDIRNAME, proc_root_fs);
}
{
__asm__ __volatile__("alloc r42 = ar.pfs, 8, 3, 6, 0\n\t" "mov r41 = b0\n\t" /* save rp */
"mov out0 = in0\n\t" "mov out1 = in1\n\t" "mov out2 = in2\n\t" "mov out3 = in3\n\t" "mov out4 = in4\n\t" "mov out5 = gp\n\t" /* save gp */
- ";;\n" ".L1: mov r3 = ip\n\t" ";;\n\t" "addl r15=.fptr_afs_syscall-.L1,r3\n\t" ";;\n\t" "ld8 r15=[r15]\n\t" ";;\n\t" "ld8 r16=[r15],8\n\t" ";;\n\t" "ld8 gp=[r15]\n\t" "mov b6=r16\n\t" "br.call.sptk.many b0 = b6\n\t" ";;\n\t" "mov ar.pfs = r42\n\t" "mov b0 = r41\n\t" "mov gp = r48\n\t" /* restore gp */
+ ";;\n" ".L1:\n\t" "mov r3 = ip\n\t" ";;\n\t" "addl r15=.fptr_afs_syscall-.L1,r3\n\t" ";;\n\t" "ld8 r15=[r15]\n\t" ";;\n\t" "ld8 r16=[r15],8\n\t" ";;\n\t" "ld8 gp=[r15]\n\t" "mov b6=r16\n\t" "br.call.sptk.many b0 = b6\n\t" ";;\n\t" "mov ar.pfs = r42\n\t" "mov b0 = r41\n\t" "mov gp = r48\n\t" /* restore gp */
"br.ret.sptk.many b0\n" ".fptr_afs_syscall:\n\t"
- "data8 @fptr(afs_syscall)");
+ "data8 @fptr(afs_syscall)\n\t" ".skip 8");
}
asmlinkage long
{
__asm__ __volatile__("alloc r42 = ar.pfs, 8, 3, 6, 0\n\t" "mov r41 = b0\n\t" /* save rp */
"mov out0 = in0\n\t" "mov out1 = in1\n\t" "mov out2 = in2\n\t" "mov out3 = in3\n\t" "mov out4 = in4\n\t" "mov out5 = gp\n\t" /* save gp */
- ";;\n" ".L2: mov r3 = ip\n\t" ";;\n\t" "addl r15=.fptr_afs_xsetgroups - .L2,r3\n\t" ";;\n\t" "ld8 r15=[r15]\n\t" ";;\n\t" "ld8 r16=[r15],8\n\t" ";;\n\t" "ld8 gp=[r15]\n\t" "mov b6=r16\n\t" "br.call.sptk.many b0 = b6\n\t" ";;\n\t" "mov ar.pfs = r42\n\t" "mov b0 = r41\n\t" "mov gp = r48\n\t" /* restore gp */
+ ";;\n" ".L2:\n\t" "mov r3 = ip\n\t" ";;\n\t" "addl r15=.fptr_afs_xsetgroups - .L2,r3\n\t" ";;\n\t" "ld8 r15=[r15]\n\t" ";;\n\t" "ld8 r16=[r15],8\n\t" ";;\n\t" "ld8 gp=[r15]\n\t" "mov b6=r16\n\t" "br.call.sptk.many b0 = b6\n\t" ";;\n\t" "mov ar.pfs = r42\n\t" "mov b0 = r41\n\t" "mov gp = r48\n\t" /* restore gp */
"br.ret.sptk.many b0\n" ".fptr_afs_xsetgroups:\n\t"
- "data8 @fptr(afs_xsetgroups)");
+ "data8 @fptr(afs_xsetgroups)\n\t" ".skip 8");
}
struct fptr {
unsigned long *ptr;
unsigned long offset=0;
unsigned long datalen=0;
- int ret;
+#if defined(EXPORTED_KALLSYMS_SYMBOL)
unsigned long token=0;
+#endif
+#if defined(EXPORTED_KALLSYMS_SYMBOL) || defined(EXPORTED_KALLSYMS_ADDRESS)
+ int ret;
char *mod_name;
unsigned long mod_start=0;
unsigned long mod_end=0;
char *sym_name;
unsigned long sym_start=0;
unsigned long sym_end=0;
+#endif
#endif /* EXPORTED_SYS_CALL_TABLE */
RWLOCK_INIT(&afs_xosi, "afs_xosi");
if (!sys_call_table) {
printf("Failed to find address of sys_call_table\n");
} else {
- printf("Found sys_call_table at %x\n", sys_call_table);
+ printf("Found sys_call_table at %lx\n", (unsigned long)sys_call_table);
#if defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_S390X_LINUX24_ENV)
error cant support this yet.;
#endif /* AFS_SPARC64_LINUX20_ENV */
if (!ia32_sys_call_table) {
printf("Warning: Failed to find address of ia32_sys_call_table\n");
} else {
- printf("Found ia32_sys_call_table at %x\n", ia32_sys_call_table);
+ printf("Found ia32_sys_call_table at %lx\n", (unsigned long)ia32_sys_call_table);
}
#else
- printf("Found ia32_sys_call_table at %x\n", ia32_sys_call_table);
+ printf("Found ia32_sys_call_table at %lx\n", (unsigned long)ia32_sys_call_table);
#endif /* IA32_SYS_CALL_TABLE */
#endif
cleanup_module(void)
#endif
{
- struct task_struct *t;
-
osi_sysctl_clean();
if (sys_call_table) {
#if defined(AFS_IA64_LINUX20_ENV)
extern void osi_linux_free_inode_pages(void);
extern void check_bad_parent(struct dentry *dp);
+/* osi_sysctl.c */
+extern int osi_sysctl_init(void);
+extern void osi_sysctl_clean(void);
+
/* osi_vm.c */
extern int osi_VM_FlushVCache(struct vcache *avc, int *slept);
extern void osi_VM_TryToSmush(struct vcache *avc, struct AFS_UCRED *acred,
/* osi_vfsops.c */
extern void set_inode_cache(struct inode *ip, struct vattr *vp);
+extern void put_inode_on_dummy_list(struct inode *ip);
+extern void vattr2inode(struct inode *ip, struct vattr *vp);
+/* osi_vnodeops.c */
+extern int afs_linux_writepage_sync(struct inode *ip, struct page *pp,
+ unsigned long offset, unsigned int count);
#endif /* _OSI_PROTO_H_ */
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/LINUX/osi_sleep.c,v 1.22 2004/06/21 19:30:21 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/LINUX/osi_sleep.c,v 1.22.2.1 2004/12/07 06:12:13 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
afs_osi_Wait(afs_int32 ams, struct afs_osi_WaitHandle *ahandle, int aintok)
{
afs_int32 endTime;
- struct timer_list *timer = NULL;
int code;
AFS_STATCNT(osi_Wait);
#define VATTR_NULL(A) memset(A, 0, sizeof(struct vattr))
-/* va_masks - these should match their respective ATTR_xxx #defines in fs.h.
- * afs_notify_change has to use the attr bits in both the Linux and AFS
- * meanings. The glue layer code uses the ATTR_xxx style names.
- */
-#define AT_SIZE ATTR_SIZE
-#define AT_MODE ATTR_MODE
-#undef AT_UID
-#define AT_UID ATTR_UID
-#undef AT_GID
-#define AT_GID ATTR_GID
-#define AT_MTIME ATTR_MTIME
-
-
#define vnodeops inode_operations
#endif /* OSI_VFS_H_ */
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/LINUX/osi_vfsops.c,v 1.29 2004/07/29 03:08:48 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/LINUX/osi_vfsops.c,v 1.29.2.1 2004/12/07 06:12:13 shadow Exp $");
+#define __NO_VERSION__ /* don't define kernel_version in module.h */
+#include <linux/module.h> /* early to avoid printf->printk mapping */
#include "afs/sysincludes.h"
#include "afsincludes.h"
#include "afs/afs_stats.h"
#include "h/smp_lock.h"
#endif
-#define __NO_VERSION__ /* don't define kernel_version in module.h */
-#include <linux/module.h>
-
struct vcache *afs_globalVp = 0;
struct vfs *afs_globalVFS = 0;
struct super_block *afs_read_super(struct super_block *sb, void *data, int silent);
int afs_fill_super(struct super_block *sb, void *data, int silent);
static struct super_block *afs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data);
-void put_inode_on_dummy_list(struct inode *ip);
/* afs_file_system
* VFS entry for Linux - installed in init_module
* has synced some pages of a file to disk.
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+#ifdef WRITE_INODE_NOT_VOID
+static int
+#else
static void
+#endif
afs_write_inode(struct inode *ip, int unused)
#else
static void
/* for now we don't actually update the metadata during msync. This
* is just to keep linux happy. */
+#ifdef WRITE_INODE_NOT_VOID
+ return 0;
+#endif
}
static void
afs_delete_inode(struct inode *ip)
{
- struct vcache *vp = ITOAFS(ip);
-
#ifdef AFS_LINUX26_ENV
put_inode_on_dummy_list(ip);
#endif
static void
afs_put_super(struct super_block *sbp)
{
- extern int afs_afs_cold_shutdown;
int code = 0;
- int fv_slept;
AFS_GLOCK();
AFS_STATCNT(afs_unmount);
#endif
osi_linux_verify_alloced_memory();
- done:
AFS_GUNLOCK();
if (!code) {
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.81.2.4 2004/11/09 17:15:02 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.81.2.8 2004/12/17 14:43:23 shadow Exp $");
#include "afs/sysincludes.h"
#include "afsincludes.h"
#if defined(AFS_LINUX24_ENV)
#include "h/smp_lock.h"
#endif
+#if defined(AFS_LINUX26_ENV)
+#include "h/writeback.h"
+#endif
#ifdef pgoff2loff
#define pageoff(pp) pgoff2loff((pp)->index)
if (*offp + count > afs_vmMappingEnd) {
uio_t tuio;
struct iovec iov;
- afs_size_t oldOffset = *offp;
afs_int32 xfered = 0;
if (*offp < afs_vmMappingEnd) {
afs_linux_write(struct file *fp, const char *buf, size_t count, loff_t * offp)
{
ssize_t code = 0;
- int code2;
+ int code2 = 0;
struct vcache *vcp = ITOAFS(fp->f_dentry->d_inode);
struct vrequest treq;
cred_t *credp = crref();
return code;
}
+extern int BlobScan(struct dcache * afile, afs_int32 ablob);
+
/* This is a complete rewrite of afs_readdir, since we can make use of
* filldir instead of afs_readdir_move. Note that changes to vcache/dcache
* handling and use of bulkstats will need to be reflected here as well.
if (de->name)
len = strlen(de->name);
else {
- printf("afs_linux_readdir: afs_dir_GetBlob failed, null name (inode %x, dirpos %d)\n",
- &tdc->f.inode, dirpos);
+ printf("afs_linux_readdir: afs_dir_GetBlob failed, null name (inode %lx, dirpos %d)\n",
+ (unsigned long)&tdc->f.inode, dirpos);
DRelease((struct buffer *) de, 0);
afs_PutDCache(tdc);
ReleaseReadLock(&avc->lock);
ReleaseWriteLock(&vcp->lock);
}
- unlock_exit:
AFS_GUNLOCK();
}
.mmap = afs_linux_mmap,
.open = afs_linux_open,
.flush = afs_linux_flush,
+#ifdef AFS_LINUX26_ENV
+ .sendfile = generic_file_sendfile,
+#endif
.release = afs_linux_release,
.fsync = afs_linux_fsync,
.lock = afs_linux_lock,
* later on, we shouldn't have to do it until later. Perhaps in the future..
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,10)
+#ifdef DOP_REVALIDATE_TAKES_NAMEIDATA
+static int
+afs_linux_dentry_revalidate(struct dentry *dp, struct nameidata *nd)
+#else
static int
afs_linux_dentry_revalidate(struct dentry *dp, int flags)
+#endif
#else
static int
afs_linux_dentry_revalidate(struct dentry *dp)
#endif
{
- char *name;
+ char *name = NULL;
cred_t *credp = crref();
struct vrequest treq;
struct vcache *lookupvcp = NULL;
*
* name is in kernel space at this point.
*/
+#ifdef IOP_CREATE_TAKES_NAMEIDATA
+int
+afs_linux_create(struct inode *dip, struct dentry *dp, int mode,
+ struct nameidata *nd)
+#else
int
afs_linux_create(struct inode *dip, struct dentry *dp, int mode)
+#endif
{
int code;
cred_t *credp = crref();
struct vattr vattr;
- enum vcexcl excl;
const char *name = dp->d_name.name;
struct inode *ip;
#endif
AFS_GLOCK();
code =
- afs_create(ITOAFS(dip), name, &vattr, NONEXCL, mode,
+ afs_create(ITOAFS(dip), (char *)name, &vattr, NONEXCL, mode,
(struct vcache **)&ip, credp);
if (!code) {
/* afs_linux_lookup */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,10)
+#ifdef IOP_LOOKUP_TAKES_NAMEIDATA
+struct dentry *
+afs_linux_lookup(struct inode *dip, struct dentry *dp,
+ struct nameidata *nd)
+#else
struct dentry *
afs_linux_lookup(struct inode *dip, struct dentry *dp)
+#endif
#else
int
afs_linux_lookup(struct inode *dip, struct dentry *dp)
int
afs_linux_unlink(struct inode *dip, struct dentry *dp)
{
- int code;
+ int code = EBUSY;
cred_t *credp = crref();
const char *name = dp->d_name.name;
+ struct vcache *tvc = ITOAFS(dp->d_inode);
#if defined(AFS_LINUX26_ENV)
lock_kernel();
#endif
+ if (((VREFCOUNT(tvc) > 0) && tvc->opens > 0)
+ && !(tvc->states & CUnlinked)) {
+ struct dentry *__dp;
+ char *__name;
+ extern char *afs_newname();
+
+ __dp = NULL;
+ __name = NULL;
+ do {
+ dput(__dp);
+
+ AFS_GLOCK();
+ if (__name)
+ osi_FreeSmallSpace(__name);
+ __name = afs_newname();
+ AFS_GUNLOCK();
+
+ __dp = lookup_one_len(__name, dp->d_parent, strlen(__name));
+
+ if (IS_ERR(__dp))
+ goto out;
+ } while (__dp->d_inode != NULL);
+
+ AFS_GLOCK();
+ code = afs_rename(ITOAFS(dip), dp->d_name.name, ITOAFS(dip), __dp->d_name.name, credp);
+ if (!code) {
+ tvc->mvid = __name;
+ crhold(credp);
+ if (tvc->uncred) {
+ crfree(tvc->uncred);
+ }
+ tvc->uncred = credp;
+ tvc->states |= CUnlinked;
+ }
+ AFS_GUNLOCK();
+
+ if (!code)
+ d_move(dp, __dp);
+ dput(__dp);
+
+ goto out;
+ }
+
AFS_GLOCK();
code = afs_remove(ITOAFS(dip), name, credp);
AFS_GUNLOCK();
if (!code)
d_drop(dp);
+out:
#if defined(AFS_LINUX26_ENV)
unlock_kernel();
#endif
}
#if defined(AFS_LINUX24_ENV)
+#ifdef AOP_WRITEPAGE_TAKES_WRITEBACK_CONTROL
+int
+afs_linux_writepage(struct page *pp, struct writeback_control *wbc)
+#else
int
afs_linux_writepage(struct page *pp)
+#endif
{
struct address_space *mapping = pp->mapping;
struct inode *inode;
unsigned offset = PAGE_CACHE_SIZE;
long status;
-#ifdef PageLaunder
+#if defined(AFS_LINUX26_ENV)
+ if (PageReclaim(pp)) {
+ return WRITEPAGE_ACTIVATE;
+ }
+#else
if (PageLaunder(pp)) {
return(fail_writepage(pp));
}
/* afs_linux_permission
* Check access rights - returns error if can't check or permission denied.
*/
+#ifdef IOP_PERMISSION_TAKES_NAMEIDATA
+int
+afs_linux_permission(struct inode *ip, int mode, struct nameidata *nd)
+#else
int
afs_linux_permission(struct inode *ip, int mode)
+#endif
{
int code;
cred_t *credp = crref();
struct inode_operations afs_symlink_iops = {
#if defined(AFS_LINUX24_ENV)
.readlink = page_readlink,
+#if defined(HAVE_KERNEL_PAGE_FOLLOW_LINK)
.follow_link = page_follow_link,
+#else
+ .follow_link = page_follow_link_light,
+#endif
.setattr = afs_notify_change,
#else
.readlink = afs_linux_readlink,
* Original NetBSD version for Transarc afs by John Kohl <jtk@MIT.EDU>
* OpenBSD version by Jim Rees <rees@umich.edu>
*
- * $Id: osi_vfsops.c,v 1.18 2004/03/25 17:04:44 rees Exp $
+ * $Id: osi_vfsops.c,v 1.18.2.1 2004/12/07 06:19:16 shadow Exp $
*/
/*
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/OBSD/osi_vfsops.c,v 1.18 2004/03/25 17:04:44 rees Exp $");
+ ("$Header: /cvs/openafs/src/afs/OBSD/osi_vfsops.c,v 1.18.2.1 2004/12/07 06:19:16 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afs/afsincludes.h" /* Afs-based standard headers */
static int afs_badcall(struct proc *p, void *xx, register_t * yy);
static struct sysent old_sysent;
-char afs_NetBSD_osname[] = "OpenBSD";
struct osi_vfs *afs_globalVFS;
struct vcache *afs_globalVp;
if (memname[M_AFSBUFFER] == NULL)
memname[M_AFSBUFFER] = afsbfrmem;
lkmid = lkmtp->id;
- printf("OpenAFS ($Revision: 1.18 $) lkm loaded\n");
+ printf("OpenAFS ($Revision: 1.18.2.1 $) lkm loaded\n");
return 0;
}
libafs_lkmentry(struct lkm_table *lkmtp, int cmd, int ver)
{
if (cmd == LKM_E_LOAD) {
- if (strcmp(ostype, afs_NetBSD_osname)) {
- printf("This is %s version %s\n", ostype, osrelease);
- printf("This version of AFS is only for %s\n", afs_NetBSD_osname);
- return EPROGMISMATCH;
- }
if (sysent[AFS_SYSCALL].sy_call == afs3_syscall
|| sysent[AFS_SYSCALL].sy_call == afs_badcall) {
printf("AFS already loaded\n");
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_attrs.c,v 1.27.2.2 2004/11/09 17:17:25 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_attrs.c,v 1.27.2.3 2004/12/07 06:12:13 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
/* Boy, was this machine dependent bogosity hard to swallow????.... */
if (av->va_mode != -1) {
#else
-#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX22_ENV)
+#if defined(AFS_LINUX22_ENV)
+ if (av->va_mask & ATTR_MODE) {
+#else
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (av->va_mask & AT_MODE) {
#else
if (av->va_mode != ((unsigned short)-1)) {
#endif
+#endif
#endif
mask |= AFS_SETMODE;
as->UnixModeBits = av->va_mode & 0xffff;
ReleaseWriteLock(&avc->lock);
}
}
-#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX22_ENV)
+#if defined(AFS_LINUX22_ENV)
+ if (av->va_mask & ATTR_GID) {
+#else
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (av->va_mask & AT_GID) {
#else
#if (defined(AFS_HPUX_ENV) || defined(AFS_SUN_ENV))
if (av->va_gid != -1) {
#endif
#endif /* AFS_SUN5_ENV */
+#endif /* AFS_LINUX22_ENV */
mask |= AFS_SETGROUP;
as->Group = av->va_gid;
}
-#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX22_ENV)
+#if defined(AFS_LINUX22_ENV)
+ if (av->va_mask & ATTR_UID) {
+#else
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (av->va_mask & AT_UID) {
#else
#if (defined(AFS_HPUX_ENV) || defined(AFS_SUN_ENV))
if (av->va_uid != -1) {
#endif
#endif /* AFS_SUN5_ENV */
+#endif /* AFS_LINUX22_ENV */
mask |= AFS_SETOWNER;
as->Owner = av->va_uid;
}
-#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX22_ENV)
+#if defined(AFS_LINUX22_ENV)
+ if (av->va_mask & ATTR_MTIME) {
+#else
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (av->va_mask & AT_MTIME) {
#else
if (av->va_mtime.tv_sec != -1) {
+#endif
#endif
mask |= AFS_SETMODTIME;
#ifndef AFS_SGI_ENV
* path (unlike BSD or SUNOS), so we skip this check for Ultrix.
*
*/
-#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX22_ENV)
+#if defined(AFS_LINUX22_ENV)
+ if (attrs->va_mask & ATTR_SIZE) {
+#else
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (attrs->va_mask & AT_SIZE) {
#else
#ifdef AFS_OSF_ENV
if (attrs->va_size != ~0) {
#endif
#endif
+#endif
#endif
if (!afs_AccessOK(avc, PRSFS_WRITE, &treq, DONT_CHECK_MODE_BITS)) {
code = EACCES;
#if defined(AFS_SGI_ENV)
AFS_RWLOCK((vnode_t *) avc, VRWLOCK_WRITE);
#endif
-#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX22_ENV)
+#if defined(AFS_LINUX22_ENV)
+ if (attrs->va_mask & ATTR_SIZE) {
+#else
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (attrs->va_mask & AT_SIZE) {
#else
#if defined(AFS_OSF_ENV)
#else /* AFS_OSF_ENV */
if (attrs->va_size != -1) {
#endif
+#endif
#endif
afs_size_t tsize = attrs->va_size;
ObtainWriteLock(&avc->lock, 128);
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_flock.c,v 1.24.2.1 2004/08/25 07:09:35 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_flock.c,v 1.24.2.2 2004/12/07 06:12:13 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
#ifdef AFS_OSF_ENV
-afs_lockctl(struct vcache * avc, struct eflock * af, int flag,
- struct AFS_UCRED * acred, pid_t clid, off_t offset)
+int afs_lockctl(struct vcache * avc, struct eflock * af, int flag,
+ struct AFS_UCRED * acred, pid_t clid, off_t offset)
#elif defined(AFS_SGI_ENV) || (defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV)) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd,
- struct AFS_UCRED * acred, pid_t clid)
+int afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd,
+ struct AFS_UCRED * acred, pid_t clid)
#else
u_int clid = 0;
-afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd,
- struct AFS_UCRED * acred)
+int afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd,
+ struct AFS_UCRED * acred)
#endif
{
struct vrequest treq;
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_lookup.c,v 1.50.2.4 2004/11/09 17:15:04 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_lookup.c,v 1.50.2.5 2004/12/07 06:12:13 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
char *cpos, *volnamep;
char type, *buf;
afs_int32 prefetch; /* 1=>None 2=>RO 3=>BK */
- afs_int32 mtptCell, assocCell, hac = 0;
+ afs_int32 mtptCell, assocCell = 0, hac = 0;
afs_int32 samecell, roname, len;
AFS_STATCNT(EvalMountPoint);
}
void
-Check_AtSys(register struct vcache *avc, char *aname,
+Check_AtSys(register struct vcache *avc, const char *aname,
struct sysname_info *state, struct vrequest *areq)
{
int num = 0;
state->offset = -1;
state->allocked = 0;
state->index = 0;
- state->name = aname;
+ state->name = (char *)aname;
}
}
}
afs_PutUser(au, 0);
}
- if (++(state->index) >= num || !(*sysnamelist)[state->index])
+ if (++(state->index) >= num || !(*sysnamelist)[(unsigned int)state->index])
return 0; /* end of list */
}
- strcpy(state->name + state->offset, (*sysnamelist)[state->index]);
+ strcpy(state->name + state->offset, (*sysnamelist)[(unsigned int)state->index]);
return 1;
}
struct afs_q *tq; /* temp queue variable */
AFSCBFids fidParm; /* file ID parm for bulk stat */
AFSBulkStats statParm; /* stat info parm for bulk stat */
- int fidIndex; /* which file were stating */
- struct conn *tcp; /* conn for call */
+ int fidIndex = 0; /* which file were stating */
+ struct conn *tcp = 0; /* conn for call */
AFSCBs cbParm; /* callback parm for bulk stat */
struct server *hostp = 0; /* host we got callback from */
long startTime; /* time we started the call,
* for callback expiration base
*/
- afs_size_t statSeqNo; /* Valued of file size to detect races */
+ afs_size_t statSeqNo = 0; /* Valued of file size to detect races */
int code; /* error code */
long newIndex; /* new index in the dir */
struct DirEntry *dirEntryp; /* dir entry we are examining */
long volStates; /* flags from vol structure */
struct volume *volp = 0; /* volume ptr */
struct VenusFid dotdot;
- int flagIndex; /* First file with bulk fetch flag set */
+ int flagIndex = 0; /* First file with bulk fetch flag set */
int inlinebulk = 0; /* Did we use InlineBulk RPC or not? */
XSTATS_DECLS;
/* first compute some basic parameters. We dont want to prefetch more
tagain:
code = afs_VerifyVCache(adp, areqp);
if (code)
- goto done;
+ goto done2;
dcp = afs_GetDCache(adp, (afs_size_t) 0, areqp, &temp, &temp, 1);
if (!dcp) {
code = ENOENT;
- goto done;
+ goto done2;
}
/* lock the directory cache entry */
} else {
code = 0;
}
+ done2:
osi_FreeLargeSpace(statMemp);
osi_FreeLargeSpace(cbfMemp);
return code;
* afs_IsWired (DUX)
* afsremove
* afs_remove
- *
- * Local:
- * newname
+ * afs_newname
*
*/
#include <afsconfig.h>
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_remove.c,v 1.31.2.3 2004/11/09 17:15:04 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_remove.c,v 1.31.2.5 2004/12/13 19:35:05 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
return (0);
}
-static char *
-newname(void)
+char *
+afs_newname(void)
{
char *name, *sp, *p = ".__afs";
afs_int32 rd = afs_random() & 0xffff;
#endif
#endif
{
- char *unlname = newname();
+ char *unlname = afs_newname();
ReleaseWriteLock(&adp->lock);
if (tdc)
struct VenusFid dirFid;
register struct dcache *tdc;
afs_int32 code = 0;
+#ifdef AFS_DARWIN14_ENV
int oldref;
+#endif
if (NBObtainWriteLock(&avc->lock, 423))
return 0;
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_write.c,v 1.36.2.1 2004/08/25 07:09:35 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_write.c,v 1.36.2.2 2004/12/07 06:12:14 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
* high-level write op.
*/
if (avc->execsOrWriters <= 0) {
- printf("WARNING: afs_ufswr vp=%x, exOrW=%d\n", avc,
+ printf("WARNING: afs_ufswr vp=%lx, exOrW=%d\n", (unsigned long)avc,
avc->execsOrWriters);
}
#else
* high-level write op.
*/
if (avc->execsOrWriters <= 0) {
- printf("WARNING: afs_ufswr vcp=%x, exOrW=%d\n", avc,
+ printf("WARNING: afs_ufswr vcp=%lx, exOrW=%d\n", (unsigned long)avc,
avc->execsOrWriters);
}
#else
#if defined(AFS_HPUX102_ENV)
#define AFS_FLOCK k_flock
#else
-#if defined(AFS_SUN56_ENV) || (defined(AFS_LINUX24_ENV) && !defined(AFS_PPC64_LINUX26_ENV) && !defined(AFS_AMD64_LINUX26_ENV))
+#if defined(AFS_SUN56_ENV) || (defined(AFS_LINUX24_ENV) && !defined(AFS_PPC64_LINUX26_ENV) && !defined(AFS_AMD64_LINUX26_ENV) && !defined(AFS_IA64_LINUX26_ENV))
#define AFS_FLOCK flock64
#else
#define AFS_FLOCK flock
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.74.2.2 2004/08/25 07:16:11 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.74.2.3 2004/12/07 06:12:11 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
complete_and_exit(0, 0);
break;
default:
- printf("Unknown op %d in StartDaemon()\n", parm);
+ printf("Unknown op %ld in StartDaemon()\n", (long)parm);
break;
}
return 0;
};
+#if defined(AFS_HPUX_64BIT_ENV) || defined(AFS_SUN57_64BIT_ENV) || (defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV) && !defined(AFS_AMD64_LINUX20_ENV))
static void
iparam32_to_iparam(const struct iparam32 *src, struct iparam *dst)
{
dst->param3 = src->param3;
dst->param4 = src->param4;
}
+#endif
/*
* If you need to change copyin_iparam(), you may also need to change
for (tp = afs_icl_allSets; tp; tp = np) {
tp->refCount++; /* hold this guy */
ReleaseWriteLock(&afs_icl_lock);
- code = (*aproc) (tp->name, arock, tp);
+ code = (*aproc) (tp->name, arock, (struct afs_icl_log *)tp);
ObtainWriteLock(&afs_icl_lock, 206);
np = tp->nextp; /* tp may disappear next, but not np */
if (--tp->refCount == 0 && (tp->states & ICL_SETF_DELETED))
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_conn.c,v 1.13 2003/07/15 23:14:11 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_conn.c,v 1.13.2.1 2004/12/07 06:12:11 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
}
isec = 2;
/* kerberos tickets on channel 2 */
- csec = rxkad_NewClientSecurityObject(level, tu->ct.HandShakeKey,
+ csec = rxkad_NewClientSecurityObject(level,
+ (struct ktc_encryptionKey *)tu->ct.HandShakeKey,
/* kvno */
tu->ct.AuthHandle, tu->stLen,
tu->stp);
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_daemons.c,v 1.28.2.1 2004/08/25 07:16:11 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_daemons.c,v 1.28.2.2 2004/12/07 06:12:11 shadow Exp $");
#ifdef AFS_AIX51_ENV
#define __FULL_PROTO
strcpy(rootVolName, afs_rootVolumeName);
}
- if (!usingDynroot) {
+ if (usingDynroot) {
+ afs_GetDynrootFid(&afs_rootFid);
+ tvp = afs_GetVolume(&afs_rootFid, NULL, READ_LOCK);
+ } else {
struct cell *lc = afs_GetPrimaryCell(READ_LOCK);
if (!lc)
return ENOENT;
localcell = lc->cellNum;
afs_PutCell(lc, READ_LOCK);
- }
-
- if (usingDynroot) {
- afs_GetDynrootFid(&afs_rootFid);
- tvp = afs_GetVolume(&afs_rootFid, NULL, READ_LOCK);
- } else {
tvp = afs_GetVolumeByName(rootVolName, localcell, 1, NULL, READ_LOCK);
- }
- if (!tvp && !usingDynroot) {
- char buf[128];
- int len = strlen(rootVolName);
-
- if ((len < 9) || strcmp(&rootVolName[len - 9], ".readonly")) {
- strcpy(buf, rootVolName);
- afs_strcat(buf, ".readonly");
- tvp = afs_GetVolumeByName(buf, localcell, 1, NULL, READ_LOCK);
+ if (!tvp) {
+ char buf[128];
+ int len = strlen(rootVolName);
+
+ if ((len < 9) || strcmp(&rootVolName[len - 9], ".readonly")) {
+ strcpy(buf, rootVolName);
+ afs_strcat(buf, ".readonly");
+ tvp = afs_GetVolumeByName(buf, localcell, 1, NULL, READ_LOCK);
+ }
}
- }
- if (tvp) {
- if (!usingDynroot) {
+ if (tvp) {
int volid = (tvp->roVol ? tvp->roVol : tvp->volume);
afs_rootFid.Cell = localcell;
if (afs_rootFid.Fid.Volume && afs_rootFid.Fid.Volume != volid
afs_rootFid.Fid.Vnode = 1;
afs_rootFid.Fid.Unique = 1;
}
+ }
+ if (tvp) {
afs_initState = 300; /* won */
afs_osi_Wakeup(&afs_initState);
afs_PutVolume(tvp, READ_LOCK);
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_dcache.c,v 1.42.2.3 2004/11/09 17:14:57 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_dcache.c,v 1.42.2.4 2004/12/07 06:12:11 shadow Exp $");
#include "afs/sysincludes.h" /*Standard vendor system headers */
#include "afsincludes.h" /*AFS-based standard headers */
{
afs_int32 chunk;
register afs_int32 i, index;
- register struct dcache *tdc;
+ register struct dcache *tdc = NULL;
AFS_STATCNT(afs_FindDCache);
chunk = AFS_CHUNK(abyte);
register struct osi_file *file;
register struct conn *tc;
int downDCount = 0;
- struct server *newCallback;
+ struct server *newCallback = NULL;
char setNewCallback;
char setVcacheStatus;
char doVcacheUpdate;
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_init.c,v 1.28 2004/05/08 04:23:56 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_init.c,v 1.28.2.1 2004/12/07 06:12:11 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
struct osi_stat tstat;
register struct osi_file *tfile;
struct afs_fheader theader;
+#ifndef AFS_LINUX22_ENV
struct vnode *filevp;
+#endif
int goodFile;
AFS_STATCNT(afs_InitCacheInfo);
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_memcache.c,v 1.15 2003/07/15 23:14:12 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_memcache.c,v 1.15.2.1 2004/12/07 06:12:11 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#ifndef AFS_LINUX22_ENV
}
int
-afs_MemCacheClose(char *file)
+afs_MemCacheClose(struct osi_file *file)
{
return 0;
}
+#if defined(AFS_SUN57_64BIT_ENV) || defined(AFS_SGI62_ENV)
void *
afs_MemCacheOpen(ino_t blkno)
+#else
+void *
+afs_MemCacheOpen(afs_int32 blkno)
+#endif
{
struct memCacheEntry *mep;
* this routine simulates a read in the Memory Cache
*/
int
-afs_MemReadBlk(register struct memCacheEntry *mceP, int offset, char *dest,
+afs_MemReadBlk(register struct osi_file *fP, int offset, void *dest,
int size)
{
+ register struct memCacheEntry *mceP = (struct memCacheEntry *)fP;
int bytesRead;
MObtainReadLock(&mceP->afs_memLock);
/*XXX: this extends a block arbitrarily to support big directories */
int
-afs_MemWriteBlk(register struct memCacheEntry *mceP, int offset, char *src,
+afs_MemWriteBlk(register struct osi_file *fP, int offset, void *src,
int size)
{
+ register struct memCacheEntry *mceP = (struct memCacheEntry *)fP;
AFS_STATCNT(afs_MemWriteBlk);
MObtainWriteLock(&mceP->afs_memLock, 560);
if (size + offset > mceP->dataSize) {
}
int
-afs_MemCacheTruncate(register struct memCacheEntry *mceP, int size)
+afs_MemCacheTruncate(register struct osi_file *fP, int size)
{
+ register struct memCacheEntry *mceP = (struct memCacheEntry *)fP;
AFS_STATCNT(afs_MemCacheTruncate);
MObtainWriteLock(&mceP->afs_memLock, 313);
int
afs_MemCacheStoreProc(register struct rx_call *acall,
- register struct memCacheEntry *mceP,
+ register struct osi_file *fP,
register afs_int32 alen, struct vcache *avc,
int *shouldWake, afs_size_t * abytesToXferP,
- afs_size_t * abytesXferredP, afs_int32 length)
+ afs_size_t * abytesXferredP)
{
+ register struct memCacheEntry *mceP = (struct memCacheEntry *)fP;
register afs_int32 code;
register int tlen;
int
afs_MemCacheFetchProc(register struct rx_call *acall,
- register struct memCacheEntry *mceP, afs_size_t abase,
+ register struct osi_file *fP, afs_size_t abase,
struct dcache *adc, struct vcache *avc,
afs_size_t * abytesToXferP, afs_size_t * abytesXferredP,
afs_int32 lengthFound)
{
+ register struct memCacheEntry *mceP = (struct memCacheEntry *)fP;
register afs_int32 code;
afs_int32 length;
int moredata = 0;
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_osi.c,v 1.48 2004/08/09 00:17:33 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_osi.c,v 1.48.2.1 2004/12/07 06:12:11 shadow Exp $");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
void *
afs_osi_Alloc(size_t x)
{
+#if !defined(AFS_LINUX20_ENV) && !defined(AFS_FBSD_ENV)
register struct osimem *tm = NULL;
register int size;
+#endif
AFS_STATCNT(osi_Alloc);
/* 0-length allocs may return NULL ptr from AFS_KALLOC, so we special-case
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.81.2.3 2004/11/09 17:14:57 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.81.2.4 2004/12/07 06:12:11 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) && !defined(AFS_AMD64_LINUX20_ENV))
static void
afs_ioctl32_to_afs_ioctl(const struct afs_ioctl32 *src, struct afs_ioctl *dst)
{
dst->in_size = src->in_size;
dst->out_size = src->out_size;
}
+#endif
/*
* If you need to change copyin_afs_ioctl(), you may also need to change
int follow;
{
struct afs_ioctl data;
- struct AFS_UCRED *tmpcred, *foreigncreds = NULL;
+#ifdef AFS_NEED_CLIENTCONTEXT
+ struct AFS_UCRED *tmpcred;
+#endif
+ struct AFS_UCRED *foreigncreds = NULL;
register afs_int32 code = 0;
- struct vnode *vp;
+ struct vnode *vp = NULL;
#ifdef AFS_DEC_ENV
struct vnode *gp;
#endif
char *motd = afs_osi_Alloc(256);
register struct conn *tc;
register afs_int32 code = 0;
- struct VolumeStatus volstat;
+ struct AFSFetchVolumeStatus volstat;
register char *cp;
char *Name, *OfflineMsg, *MOTD;
XSTATS_DECLS;
/* for the reader. */
DECL_PIOCTL(PSetSysName)
{
- char *cp, *cp2, inname[MAXSYSNAME], outname[MAXSYSNAME];
+ char *cp, *cp2 = NULL, inname[MAXSYSNAME], outname[MAXSYSNAME];
int setsysname, foundname = 0;
register struct afs_exporter *exporter;
register struct unixuser *au;
/* afs_cell.c */
extern afs_rwlock_t afs_xcell;
+extern struct afs_q CellLRU;
+
extern void afs_CellInit(void);
extern void shutdown_cell(void);
extern int afs_cellname_init(ino_t inode, int lookupcode);
/* afs_memcache.c */
extern int afs_InitMemCache(int blkCount, int blkSize, int flags);
-extern int afs_MemCacheClose(char *file);
+extern int afs_MemCacheClose(struct osi_file *file);
+#if defined(AFS_SUN57_64BIT_ENV) || defined(AFS_SGI62_ENV)
extern void *afs_MemCacheOpen(ino_t blkno);
-extern int afs_MemReadBlk(register struct memCacheEntry *mceP, int offset,
- char *dest, int size);
+#else
+extern void *afs_MemCacheOpen(afs_int32 blkno);
+#endif
+extern int afs_MemReadBlk(register struct osi_file *fP, int offset,
+ void *dest, int size);
extern int afs_MemReadvBlk(register struct memCacheEntry *mceP, int offset,
struct iovec *iov, int nio, int size);
extern int afs_MemReadUIO(ino_t blkno, struct uio *uioP);
-extern int afs_MemWriteBlk(register struct memCacheEntry *mceP, int offset,
- char *src, int size);
+extern int afs_MemWriteBlk(register struct osi_file *fP, int offset,
+ void *src, int size);
extern int afs_MemWritevBlk(register struct memCacheEntry *mceP, int offset,
struct iovec *iov, int nio, int size);
extern int afs_MemWriteUIO(ino_t blkno, struct uio *uioP);
-extern int afs_MemCacheTruncate(register struct memCacheEntry *mceP,
+extern int afs_MemCacheTruncate(register struct osi_file *fP,
int size);
extern int afs_MemCacheStoreProc(register struct rx_call *acall,
- register struct memCacheEntry *mceP,
+ register struct osi_file *fP,
register afs_int32 alen, struct vcache *avc,
int *shouldWake, afs_size_t * abytesToXferP,
- afs_size_t * abytesXferredP,
- afs_int32 length);
+ afs_size_t * abytesXferredP);
extern int afs_MemCacheFetchProc(register struct rx_call *acall,
- register struct memCacheEntry *mceP,
+ register struct osi_file *fP,
afs_size_t abase, struct dcache *adc,
struct vcache *avc,
afs_size_t * abytesToXferP,
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 void setup_uio(uio_t * uiop, struct iovec *iovecp, char *buf,
+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);
extern int uiomove(char *dp, int length, uio_flag_t rw, uio_t * uiop);
extern struct vcache *afs_globalVp;
#ifdef AFS_LINUX20_ENV
extern void vcache2inode(struct vcache *avc);
+extern void vcache2fakeinode(struct vcache *rootvp, struct vcache *mpvp);
#endif
/* afs_pioctl.c */
extern void afs_RemoveSrvAddr(struct srvAddr *sap);
extern void afs_ActivateServer(struct srvAddr *sap);
#ifdef AFS_USERSPACE_IP_ADDR
-extern int afsi_SetServerIPRank(struct srvAddr *sa, afs_int32 addr,
+extern void afsi_SetServerIPRank(struct srvAddr *sa, afs_int32 addr,
afs_uint32 subnetmask);
#else
#if (!defined(AFS_SUN5_ENV)) && defined(USEIFADDR)
#endif
#endif
extern int afs_HaveCallBacksFrom(struct server *aserver);
+extern void shutdown_server(void);
struct vrequest *areq);
extern void afs_PutFakeStat(struct afs_fakestat_state *state);
extern int afs_ENameOK(register char *aname);
-extern void Check_AtSys(register struct vcache *avc, char *aname,
+extern void Check_AtSys(register struct vcache *avc, const char *aname,
struct sysname_info *state, struct vrequest *areq);
extern int Next_AtSys(register struct vcache *avc, struct vrequest *areq,
struct sysname_info *state);
extern int afs_UFSRead(register struct vcache *avc, struct uio *auio,
struct AFS_UCRED *acred, daddr_t albn,
struct buf **abpp, int noLock);
+extern void afs_PrefetchChunk(struct vcache *avc, struct dcache *adc,
+ struct AFS_UCRED *acred, struct vrequest *areq);
/* VNOPS/afs_vnop_readdir.c */
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_segments.c,v 1.16.2.3 2004/11/09 17:14:57 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_segments.c,v 1.16.2.4 2004/12/07 06:12:12 shadow Exp $");
#include "afs/sysincludes.h" /*Standard vendor system headers */
#include "afsincludes.h" /*AFS-based standard headers */
*/
origCBs = afs_allCBs;
- retry:
maxStoredLength = 0;
tlen = avc->m.Length;
minj = 0;
afs_size_t base, bytes;
afs_uint32 nchunks;
int nomore;
- unsigned int first;
+ unsigned int first = 0;
int *shouldwake;
struct conn *tc;
struct osi_file *tfile;
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_server.c,v 1.33.2.1 2004/08/25 07:07:53 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_server.c,v 1.33.2.3 2004/12/07 06:12:40 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
struct conn *tc;
afs_int32 i, j;
afs_int32 code;
- afs_int32 start, end, delta;
+ afs_int32 start, end = 0, delta;
+ afs_int32 m_error;
osi_timeval_t tv;
- int setTimer;
struct unixuser *tu;
char tbuffer[CVBS];
int srvAddrCount;
struct conn **conns;
int nconns;
struct rx_connection **rxconns;
- int nrxconns;
afs_int32 *conntimer, *deltas;
- XSTATS_DECLS;
AFS_STATCNT(afs_CheckServers);
start = osi_Time(); /* time the gettimeofday call */
AFS_GUNLOCK();
multi_Rx(rxconns,nconns)
- {
- tv.tv_sec = tv.tv_usec = 0;
- multi_RXAFS_GetTime(&tv.tv_sec, &tv.tv_usec);
- tc = conns[multi_i];
- sa = tc->srvr;
- if (conntimer[multi_i] == 0)
- rx_SetConnDeadTime(tc->id, AFS_RXDEADTIME);
- end = osi_Time();
- if ((start == end) && !multi_error)
- deltas[multi_i] = end - tv.tv_sec;
- if (( multi_error >= 0 ) && (sa->sa_flags & SRVADDR_ISDOWN) && (tc->srvr == sa)) {
- /* server back up */
- print_internet_address("afs: file server ", sa, " is back up", 2);
-
- ObtainWriteLock(&afs_xserver, 244);
- ObtainWriteLock(&afs_xsrvAddr, 245);
- afs_MarkServerUpOrDown(sa, 0);
- ReleaseWriteLock(&afs_xsrvAddr);
- ReleaseWriteLock(&afs_xserver);
-
- if (afs_waitForeverCount) {
- afs_osi_Wakeup(&afs_waitForever);
- }
- } else {
- if (multi_error < 0) {
- /* server crashed */
- afs_ServerDown(sa);
- ForceNewConnections(sa); /* multi homed clients */
- }
- }
-
- } multi_End;
+ {
+ tv.tv_sec = tv.tv_usec = 0;
+ multi_RXAFS_GetTime(&tv.tv_sec, &tv.tv_usec);
+ tc = conns[multi_i];
+ sa = tc->srvr;
+ if (conntimer[multi_i] == 0)
+ rx_SetConnDeadTime(tc->id, AFS_RXDEADTIME);
+ end = osi_Time();
+ m_error=multi_error;
+ if ((start == end) && !multi_error)
+ deltas[multi_i] = end - tv.tv_sec;
+
+ } multi_End;
AFS_GLOCK();
-
+
+ for(i=0;i<nconns;i++){
+ tc = conns[i];
+ sa = tc->srvr;
+
+ if (( m_error >= 0 ) && (sa->sa_flags & SRVADDR_ISDOWN) && (tc->srvr == sa)) {
+ /* server back up */
+ print_internet_address("afs: file server ", sa, " is back up", 2);
+
+ ObtainWriteLock(&afs_xserver, 244);
+ ObtainWriteLock(&afs_xsrvAddr, 245);
+ afs_MarkServerUpOrDown(sa, 0);
+ ReleaseWriteLock(&afs_xsrvAddr);
+ ReleaseWriteLock(&afs_xserver);
+
+ if (afs_waitForeverCount) {
+ afs_osi_Wakeup(&afs_waitForever);
+ }
+ } else {
+ if (m_error < 0) {
+ /* server crashed */
+ afs_ServerDown(sa);
+ ForceNewConnections(sa); /* multi homed clients */
+ }
+ }
+ }
+
/*
* If we're supposed to set the time, and the call worked
* quickly (same second response) and this is the host we
* afs_uint32 subnetmask; subnet mask of local addr in net order
*
*/
-int
+void
afsi_SetServerIPRank(struct srvAddr *sa, afs_int32 addr,
afs_uint32 subnetmask)
{
typedef struct timeval osi_timeval_t;
#endif /* !KERNEL */
-#define XSTATS_DECLS struct afs_stats_opTimingData *opP; \
+#define XSTATS_DECLS struct afs_stats_opTimingData *opP = NULL; \
osi_timeval_t opStartTime, opStopTime, elapsedTime
#define XSTATS_START_TIME(arg) \
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_util.c,v 1.17 2003/07/15 23:14:13 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_util.c,v 1.17.2.1 2004/12/07 06:12:12 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
for (i = 0; i < NSERVERS; i++) {
for (ts = afs_servers[i]; ts; ts = ts->next) {
if (ts->flags & SRVR_ISDOWN)
- printf("Server entry %x is marked down\n", ts);
+ printf("Server entry %lx is marked down\n", (unsigned long)ts);
for (sa = ts->addr; sa; sa = sa->next_sa) {
for (tc = sa->conns; tc; tc = tc->next) {
if (tc->refCount)
for (i = 0; i < NUSERS; i++) {
for (tu = afs_users[i]; tu; tu = tu->next) {
if (tu->refCount)
- printf("user at %x is held\n", tu);
+ printf("user at %lx is held\n", (unsigned long)tu);
}
}
}
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/afs/afs_volume.c,v 1.26 2003/08/27 21:43:16 rees Exp $");
+ ("$Header: /cvs/openafs/src/afs/afs_volume.c,v 1.26.2.1 2004/12/07 06:12:12 shadow Exp $");
#include "afs/stds.h"
#include "afs/sysincludes.h" /* Standard vendor system headers */
static struct volume *
-afs_SetupVolume(afs_int32 volid, char *aname, char *ve, struct cell *tcell,
+afs_SetupVolume(afs_int32 volid, char *aname, void *ve, struct cell *tcell,
afs_int32 agood, afs_int32 type, struct vrequest *areq)
{
struct volume *tv;
/* Avoid conflicts with coda overloading AFS type namespace. Must precede
* inclusion of uaccess.h.
*/
+#ifndef _LINUX_CODA_FS_I
#define _LINUX_CODA_FS_I
+#endif
#define _CFS_HEADER_
struct coda_inode_info {
};
#include "sys/cmn_err.h"
#ifdef AFS_SGI64_ENV
#include <ksys/behavior.h>
+/* in 6.5.20f, ksys/behavior.h doesn't bother to define BHV_IS_BHVL,
+ * but sys/vnode.h uses it in VNODE_TO_FIRST_BHV. It looks like from
+ * older headers like we want the old behavior, so we fake it. */
+#if defined(BHV_PREPARE) && !defined(CELL_CAPABLE)
+#define BHV_IS_BHVL(bhp) (0)
+#endif
#endif /* AFS_SGI64_ENV */
#include "fs/efs_inode.h"
#ifdef AFS_SGI_EFS_IOPS_ENV
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
+############################################################################
+# On most linuces copy this file to
+# /etc/sysconfig/afs
+# so afs.rc can use it as config file.
+############################################################################
+
# Configuration information for AFS client
# AFS_CLIENT and AFS_SERVER determine if we should start the client and or
# Dynroot support (dynamically generated /afs), respectively, should be
# enabled in the AFS client.
ENABLE_AFSDB=on
-ENABLE_DYNROOT=off
+ENABLE_DYNROOT=on
# AFS client configuration options:
-XXLARGE="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
-XLARGE="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
-LARGE="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
-MEDIUM="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
-SMALL="-stat 300 -dcache 100 -daemons 2 -volumes 50"
+# ---------------------------------------------------------------------------
+# possible AFS client afsd configuration options (from 1.3.74) are
+# -blocks The number of blocks available in the workstation cache.
+# -files The target number of files in the workstation cache (Default:
+# 1000).
+# -rootvol The name of the root volume to use.
+# -stat The number of stat cache entries.
+# -hosts List of servers to check for volume location info FOR THE
+# HOME CELL.
+# -memcache Use an in-memory cache rather than disk.
+# -cachedir The base directory for the workstation cache.
+# -mountdir The directory on which the AFS is to be mounted.
+# -confdir The configuration directory .
+# -nosettime Don't keep checking the time to avoid drift.
+# -verbose Be chatty.
+# -debug Print out additional debugging info.
+# -kerndev [OBSOLETE] The kernel device for AFS.
+# -dontfork [OBSOLETE] Don't fork off as a new process.
+# -daemons The number of background daemons to start (Default: 2).
+# -rmtsys Also fires up an afs remote sys call (e.g. pioctl, setpag)
+# support daemon
+# -chunksize [n] 2^n is the chunksize to be used. 0 is default.
+# -dcache The number of data cache entries.
+# -biods Number of bkg I/O daemons (AIX3.1 only)
+# -prealloc Number of preallocated "small" memory blocks
+# -pininodes Number of inodes which can be spared from inode[] for
+# pointing at Vfiles. If this is set too high, you may have
+# system problems, which can only be ameliorated by changing
+# NINODE (or equivalent) and rebuilding the kernel.
+# This option is now disabled.
+# -logfile Place where to put the logfile (default in <cache>/etc/AFSLog.
+# -waitclose make close calls always synchronous (slows em down, tho)
+# -files_per_subdir [n] number of files per cache subdir. (def=2048)
+# -shutdown Shutdown afs daemons
+# ---------------------------------------------------------------------------
+XXLARGE="-fakestat -stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
+XLARGE="-fakestat -stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
+LARGE="-fakestat -stat 2800 -dcache 2400 -daemons 5 -volumes 128"
+MEDIUM="-fakestat -stat 2000 -dcache 800 -daemons 3 -volumes 70"
+SMALL="-fakestat -stat 300 -dcache 100 -daemons 2 -volumes 50"
# cachesize and according options are set by /afs/rc.d/init.d/afs
# * if you set CACHESIZE to "AUTOMATIC", it will automatically be chosen
# of options based on the cache size
# otherwise the values specified here will be used. So be careful!
# Note: if you leave these as-is, no changes are made.
-CACHESIZE=
-OPTIONS=$MEDIUM
+CACHESIZE=AUTOMATIC
+#CACHESIZE=50000
+OPTIONS=AUTOMATIC
+#OPTIONS=$SMALL
# you should never need to change these settings
AFSDIR=/afs
}
SYSCNF=/etc/sysconfig/afs
+KERNEL_VERSION=`uname -r`
# Gather up options and post startup script name, if present
if [ -f $SYSCNF ] ; then
esac
# For now, just use uname -r to get the module version.
- VERSION=`uname -r`
-
- LIBAFS=libafs-$VERSION$MP.o
+ case $KERNEL_VERSION in
+ [1-2].[0-5].*)
+ LIBAFS=libafs-$KERNEL_VERSION$MP.o
+ ;;
+ *)
+ LIBAFS=libafs-$KERNEL_VERSION$MP.ko
+ ;;
+ esac
}
#
# unregister_filesystem_Rsmp_b240cad8 is a typcial SMP version string from
# a kernel built from ftp.kernel.org
#
-
-KSYMS_FILE=/proc/ksyms
+case $KERNEL_VERSION in
+ [1-2].[0-5].*)
+ KSYMS_FILE=/proc/ksyms
+ ;;
+ *)
+ KSYMS_FILE=/proc/kallsyms
+ ;;
+esac
SEARCH_STR="unregister_filesystem"
DEFAULT_SMP_PREFIX="smp_" # Redhat kernels need "smp" instead
PREFIX="" # none needed for UP with <= 1Gig memory
h8="$h$h$h$h$h$h$h$h"
prefix_set=0
- set X `fgrep $SEARCH_STR $KSYMS_FILE 2> /dev/null`; shift
- str=$2
+ set X `egrep "\<$SEARCH_STR" $KSYMS_FILE 2> /dev/null`; shift
+
+ case $KERNEL_VERSION in
+ [1-2].[0-5].*)
+ str=$2
+ ;;
+ *)
+ str=$3
+ ;;
+ esac
case $str in
${SEARCH_STR}_R$h8)
# No prefix required
if [ -f $KSYMS_FILE ]; then
# use the prefix command if required
- set_prefix
- /sbin/insmod ${PREFIX:+-P $PREFIX} -f -m $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
+ case $KERNEL_VERSION in
+ [1-2].[0-5].*)
+ set_prefix
+ /sbin/insmod ${PREFIX:+-P $PREFIX} -f -m $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
+ ;;
+ *)
+ /sbin/insmod $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
+ ;;
+ esac
else
/sbin/insmod $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
fi
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.43 2004/07/28 22:47:58 shadow Exp $");
+ ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.43.2.1 2004/12/07 18:25:08 shadow Exp $");
#define VFS 1
/* -chunksize */
chunkSize = atoi(as->parms[12].items->data);
if (chunkSize < 0 || chunkSize > 30) {
- printf("afsd:invalid chunk size spec'd, using default\n");
+ printf("afsd:invalid chunk size (not in range 0-30), using default\n");
chunkSize = 0;
}
}
--- /dev/null
+.\"
+.\" $Id: aklog.1,v 1.1.2.1 2004/12/17 15:39:45 shadow Exp $
+.\"
+.\" Copyright 1990,1991 by the Massachusetts Institute of Technology
+.\" For distribution and copying rights, see the file "mit-copyright.h"
+.\"
+.TH AKLOG 1 "August 1, 1990"
+.UC 4
+.SH NAME
+aklog \- Obtain tokens for authentication to AFS
+
+.SH SYNOPSIS
+.B aklog
+[
+.B \-d
+] [
+.B \-hosts
+] [
+.B \-zsubs
+] [
+.B \-noprdb
+] [ [
+.B \-cell | \-c
+] cell [
+.B \-k
+kerberos-realm
+] ] [ [
+.B \-path | \-p
+] pathname ]
+
+.SH DESCRIPTION
+The
+.I aklog
+program is used to authenticate to a cell or directory in
+.I AFS,
+the Andrew Filesystem, by obtaining AFS
+.I tokens.
+Ordinarily, aklog is not used directly but called by
+.IR attach (1).
+
+If
+.I aklog
+is invoked with no command line arguments, it will obtain tokens
+for the workstation's local cell. It is possible to invoke
+.I aklog
+with arbitrarily many cells and pathnames
+specified on the command line.
+.I aklog
+knows how to expand cell name abbreviations, so short
+forms of cell names can be use used. In addition,
+.I aklog
+understands the following command line options:
+
+.TP 4
+.B \-cell | \-c \fRcell
+This flag is not ordinarily necessary since
+.I aklog
+can usually figure out when an argument is a cell. It can be
+used to introduce a cell name that would ordinarily be mistaken
+for a path name if this should be required. If this flag is
+omitted, an argument will be treated as a cell name if it
+contains no slashes (/) and is neither "." nor ".." .
+
+.TP
+.B \-k \fRkerberos-realm
+This flag is valid only when immediately following the name of a
+cell. It is used to tell
+.I aklog
+what kerberos realm should be used while authenticating to the
+preceding cell. This argument is unnecessary except when the
+workstation is not properly configured. Ordinarily,
+.I aklog
+can determine this information on its own.
+
+.TP
+.B \-path | \-p \fRpathname
+Like the \-cell flag, this flag is usually unnecessary. When it
+appears, the next command line argument is always treated as a
+path name. Ordinarily, an argument is treated as a path name
+if it is "." or ".." or if it contains a slash (/).
+
+.TP
+.B \-hosts
+Prints all the server addresses which may act as a single point of
+failure in accessing the specified directory path. Each element of the
+path is examined, and as new volumes are traversed, if they are not
+replicated, the server's IP address containing the volume will be
+displayed.
+.IR Attach (1)
+invokes
+.I aklog
+with this option. The output is of the form
+
+host:
+.I IP address
+
+.TP
+.B \-zsubs
+Causes the printing of the zephyr subscription information that a
+person using a given path or cell would want.
+.IR Attach (1)
+invokes
+.I aklog
+with this option. The output is of the form
+
+zsub:
+.I instance
+
+where
+.I instance
+is the instance of a class filsrv zephyr subscription.
+
+.TP
+.B \-noprdb
+Ordinarily, aklog looks up the AFS ID corresponding to the name
+of the person invoking the command. Specifying this flag turns
+off this functionality. This may be desirable if the protection
+database is unavailable for some reason and tokens are desired
+anyway.
+
+.TP
+.B \-d
+Turns on printing of debugging information. This option is not
+intended for general users.
+
+.SH EXIT CODES
+The exit status of
+.I aklog
+will be one of the following:
+.TP 5
+0
+Success -- No error occurred.
+.TP 5
+1
+Usage -- Bad command syntax; accompanied by a usage message.
+.TP 5
+2
+Something failed -- More than one cell or pathname was given on
+the command line and at least one failure occurred.
+A more specific error status is returned when only one directive
+is given.
+.TP 5
+3
+AFS -- Unable to get AFS configuration or unable to get
+information about a specific cell.
+.TP 5
+4
+Kerberos -- Unable to get tickets for authentication.
+.TP 5
+5
+Token -- Unable to get tokens.
+.TP 5
+6
+Bad pathname -- The path given was not a directory or
+.I lstat(2)
+failed on some component of the pathname.
+.TP 5
+7
+Miscellaneous -- An internal failure occurred. For example,
+.I aklog
+returns this if it runs out of memory.
+
+.SH EXAMPLES
+.br
+To get tokens for the local cell:
+.br
+% aklog
+
+To get tokens for the athena.mit.edu cell:
+.br
+% aklog athena.mit.edu
+.br
+or
+.br
+% aklog athena
+
+To get tokens adequate to read /afs/athena.mit.edu/user/p/potato:
+.br
+% aklog /afs/athena.mit.edu/user/p/potato
+
+To get tokens for a test cell that is in a test Kerberos realm:
+.br
+% aklog testcell.mit.edu -k TESTREALM.MIT.EDU
+
+.SH SEE ALSO
+attach(1), tokens(1), unlog(1)
+
+.SH AUTHOR
+Emanuel Jay Berkenbilt (MIT-Project Athena)
--- /dev/null
+/*
+ * $Id: aklog.c,v 1.1.2.1 2004/12/07 05:51:24 shadow Exp $
+ *
+ * Copyright 1990,1991 by the Massachusetts Institute of Technology
+ * For distribution and copying rights, see the file "mit-copyright.h"
+ */
+
+#if !defined(lint) && !defined(SABER)
+static char *rcsid = "$Id: aklog.c,v 1.1.2.1 2004/12/07 05:51:24 shadow Exp $";
+#endif /* lint || SABER */
+
+#include "aklog.h"
+
+#ifndef WINDOWS
+
+#ifdef __STDC__
+main(int argc, char *argv[])
+#else
+main(argc, argv)
+ int argc;
+ char *argv[];
+#endif /* __STDC__ */
+{
+ aklog_params params;
+
+ aklog_init_params(¶ms);
+ aklog(argc, argv, ¶ms);
+}
+
+#else /* WINDOWS */
+
+#include <windows.h>
+#include <windowsx.h>
+
+static void parse_cmdline();
+
+
+int PASCAL
+WinMain(HINSTANCE hinst, HINSTANCE hprevinstance, LPSTR cmdline, int noshow)
+{
+ int argc = 0;
+ char **argv;
+
+ aklog_params params;
+
+ parse_cmdline(cmdline, &argv, &argc);
+
+ aklog_init_params(¶ms);
+ aklog(argc, argv, ¶ms);
+
+ return 0;
+}
+
+/*
+ * Generate agrv/argc here from command line.
+ * Note that windows doesn't pass us the executible name, so
+ * we need to fill that in manually.
+ */
+
+static void
+parse_cmdline(char *cmdline, char ***pargv, int *pargc)
+{
+ char **argv;
+ int argc = 0;
+ char *arg, *sep = " \t";
+ int argv_size = 10; /* to start with */
+
+
+ argv = malloc(argv_size * sizeof(char *));
+
+ if (!argv) {
+ MessageBox(NULL, "Fatal Error: Out of memory", AKLOG_DIALOG_NAME,
+ MB_OK | MB_ICONSTOP);
+ exit(1);
+ }
+
+ argv[argc++] = "aklog";
+
+ arg = strtok(cmdline, sep);
+
+ while(arg) {
+ argv[argc] = strdup(arg);
+
+ if (!argv[argc]) {
+ MessageBox(NULL, "Fatal Error: Out of memory", AKLOG_DIALOG_NAME,
+ MB_OK | MB_ICONSTOP);
+ exit(1);
+ }
+
+ argc++;
+
+ if (argc == argv_size) {
+ argv_size += 10;
+ argv = realloc(argv, argv_size * sizeof(char *));
+
+ if (!argv) {
+ MessageBox(NULL, "Fatal Error: Out of memory",
+ AKLOG_DIALOG_NAME,
+ MB_OK | MB_ICONSTOP);
+ exit(1);
+ }
+ }
+
+ arg = strtok(NULL, sep);
+ }
+
+ argv[argc] = NULL;
+
+ *pargv = argv;
+ *pargc = argc;
+}
+
+#endif /* WINDOWS */
+
--- /dev/null
+/*
+ * $Id: aklog.h,v 1.1.2.1 2004/12/07 05:51:24 shadow Exp $
+ *
+ * Copyright 1990,1991 by the Massachusetts Institute of Technology
+ * For distribution and copying rights, see the file "mit-copyright.h"
+ */
+
+#ifndef __AKLOG_H__
+#define __AKLOG_H__
+
+#if !defined(lint) && !defined(SABER)
+static char *rcsid_aklog_h = "$Id: aklog.h,v 1.1.2.1 2004/12/07 05:51:24 shadow Exp $";
+#endif /* lint || SABER */
+
+#include <krb5.h>
+#include <kerberosIV/krb.h>
+#include "linked_list.h"
+
+#ifdef __STDC__
+#define ARGS(x) x
+#else
+#define ARGS(x) ()
+#endif /* __STDC__ */
+
+typedef struct {
+ int (*readlink)ARGS((char *, char *, size_t));
+ int (*isdir)ARGS((char *, unsigned char *));
+ char *(*getwd)ARGS((char *));
+ int (*get_cred)ARGS((krb5_context, char *, char *, char *, CREDENTIALS *,
+ krb5_creds **));
+ int (*get_user_realm)ARGS((krb5_context, char *));
+ void (*pstderr)ARGS((char *));
+ void (*pstdout)ARGS((char *));
+ void (*exitprog)ARGS((char));
+} aklog_params;
+
+void aklog ARGS((int, char *[], aklog_params *));
+void aklog_init_params ARGS((aklog_params *));
+
+#ifdef WINDOWS
+/*
+ * Complete server info for one cell.
+ *
+ * Normally this is defined in afs/cellconfig.h, but the Windows header
+ * files and API don't use this structure. So, I'll include it here so
+ * I don't have to rewrite large chunks of code.
+ */
+#define MAXCELLCHARS 64
+#define MAXHOSTCHARS 64
+#define MAXHOSTSPERCELL 8
+
+struct afsconf_cell {
+ char name[MAXCELLCHARS]; /* Cell name */
+ short numServers; /* Num active servers for the cell*/
+ short flags; /* useful flags */
+ struct sockaddr_in hostAddr[MAXHOSTSPERCELL];
+ /* IP addresses for cell's servers*/
+ char hostName[MAXHOSTSPERCELL][MAXHOSTCHARS];
+ /* Names for cell's servers */
+ char *linkedCell; /* Linked cell name, if any */
+};
+
+/* Windows krb5 libraries don't seem to have this call */
+#define krb5_xfree(p) free(p)
+
+/* Title for dialog boxes */
+#define AKLOG_DIALOG_NAME "aklog"
+
+#endif /* WINDOWS */
+
+#endif /* __AKLOG_H__ */
--- /dev/null
+/*
+ * $Id: aklog_main.c,v 1.1.2.1 2004/12/07 05:51:24 shadow Exp $
+ *
+ * Copyright 1990,1991 by the Massachusetts Institute of Technology
+ * For distribution and copying rights, see the file "mit-copyright.h"
+ */
+
+#if !defined(lint) && !defined(SABER)
+static char *rcsid =
+ "$Id: aklog_main.c,v 1.1.2.1 2004/12/07 05:51:24 shadow Exp $";
+#endif /* lint || SABER */
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_MEMORY_H
+#include <memory.h>
+#endif
+#include <errno.h>
+
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#ifndef WINDOWS
+#include <sys/param.h>
+#include <sys/errno.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <pwd.h>
+#endif /* WINDOWS */
+
+/* on AIX AFS has an unresolved reference to osi_audit. We will define
+ * it here as extern. It also trys to call the ntohl and htonl routines
+ * as routines rather then macros. We need a real routine here.
+ * We do this before the ntohl and htonl macros are defined in net/in.h
+ */
+int osi_audit()
+ { return(0);}
+
+#if 0
+#ifdef _AIX
+u_long htonl(u_long x)
+ { return(x);}
+
+u_long ntohl(u_long x)
+ { return(x);}
+#endif
+
+#include <netinet/in.h>
+/* #include <krb.h> */
+#endif /* 0 */
+
+#include <krb5.h>
+
+#ifdef WINDOWS
+
+#ifdef PRE_AFS35
+#include "afs_tokens.h"
+#include "rxkad.h"
+#else /* !PRE_AFS35 */
+#include <afs/stds.h>
+#include <afs/auth.h>
+#include <rx/rxkad.h>
+#include <afs/dirpath.h>
+#endif /* PRE_AFS35 */
+
+#else /* !WINDOWS */
+#include <afs/stds.h>
+#include <afs/com_err.h>
+
+#include <afs/param.h>
+#ifdef AFS_SUN5_ENV
+#include <sys/ioccom.h>
+#endif
+#include <afs/auth.h>
+#include <afs/cellconfig.h>
+#include <afs/vice.h>
+#include <afs/venus.h>
+#include <afs/ptserver.h>
+#include <afs/dirpath.h>
+#endif /* WINDOWS */
+
+#include "aklog.h"
+#include "linked_list.h"
+
+#define AFSKEY "afs"
+#define AFSINST ""
+
+#ifndef AFS_TRY_FULL_PRINC
+#define AFS_TRY_FULL_PRINC 0
+#endif /* AFS_TRY_FULL_PRINC */
+
+#define AKLOG_SUCCESS 0
+#define AKLOG_USAGE 1
+#define AKLOG_SOMETHINGSWRONG 2
+#define AKLOG_AFS 3
+#define AKLOG_KERBEROS 4
+#define AKLOG_TOKEN 5
+#define AKLOG_BADPATH 6
+#define AKLOG_MISC 7
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifndef MAXSYMLINKS
+/* RedHat 4.x doesn't seem to define this */
+#define MAXSYMLINKS 5
+#endif
+
+#define DIR '/' /* Character that divides directories */
+#define DIRSTRING "/" /* String form of above */
+#define VOLMARKER ':' /* Character separating cellname from mntpt */
+#define VOLMARKERSTRING ":" /* String form of above */
+
+typedef struct {
+ char cell[BUFSIZ];
+ char realm[REALM_SZ];
+} cellinfo_t;
+
+struct afsconf_cell ak_cellconfig; /* General information about the cell */
+static char linkedcell[MAXCELLCHARS+1];
+static char linkedcell2[MAXCELLCHARS+1];
+
+#ifdef WINDOWS
+
+/* libafsconf.dll */
+extern long cm_GetRootCellName();
+extern long cm_SearchCellFile();
+
+static long cm_SearchCellFile_CallBack();
+
+#else /* !WINDOWS */
+
+/*
+ * Why doesn't AFS provide these prototypes?
+ */
+
+#ifdef AFS_INT32
+typedef afs_int32 int32 ;
+#endif
+
+extern int afsconf_GetLocalCell(struct afsconf_dir *, char *, afs_int32);
+extern int afsconf_GetCellInfo(struct afsconf_dir *, char *, char *,
+ struct afsconf_cell *);
+extern int afsconf_Close(struct afsconf_dir *);
+extern int ktc_GetToken(struct ktc_principal *, struct ktc_token *, int,
+ struct ktc_principal *);
+extern int ktc_SetToken(struct ktc_principal *, struct ktc_token *,
+ struct ktc_principal *, int);
+extern afs_int32 pr_Initialize(afs_int32, char *, char *, afs_int32);
+extern int pr_SNameToId(char *, afs_int32 *);
+extern int pr_CreateUser(char *, afs_int32 *);
+extern int pr_End();
+extern int pioctl(char *, afs_int32, struct ViceIoctl *, afs_int32);
+
+/*
+ * Other prototypes
+ */
+
+extern char *afs_realm_of_cell(krb5_context, struct afsconf_cell *);
+
+#endif /* WINDOWS */
+
+/*
+ * Provide a replacement for strerror if we don't have it
+ */
+
+#ifndef HAVE_STRERROR
+extern char *sys_errlist[];
+#define strerror(x) sys_errlist[x]
+#endif /* HAVE_STRERROR */
+
+static aklog_params params; /* Various aklog functions */
+static char msgbuf[BUFSIZ]; /* String for constructing error messages */
+static char *progname = NULL; /* Name of this program */
+static int dflag = FALSE; /* Give debugging information */
+static int noauth = FALSE; /* If true, don't try to get tokens */
+static int zsubs = FALSE; /* Are we keeping track of zephyr subs? */
+static int hosts = FALSE; /* Are we keeping track of hosts? */
+static int noprdb = FALSE; /* Skip resolving name to id? */
+static int linked = FALSE; /* try for both AFS nodes */
+static int afssetpag = FALSE; /* setpag for AFS */
+static int force = FALSE; /* Bash identical tokens? */
+static linked_list zsublist; /* List of zephyr subscriptions */
+static linked_list hostlist; /* List of host addresses */
+static linked_list authedcells; /* List of cells already logged to */
+
+/* ANL - CMU lifetime convert routine */
+/* for K5.4.1 don't use this for now. Need to see if it is needed */
+/* maybe needed in the krb524d module as well */
+/* extern unsigned long krb_life_to_time(); */
+
+#ifdef __STDC__
+static char *copy_cellinfo(cellinfo_t *cellinfo)
+#else
+static char *copy_cellinfo(cellinfo)
+ cellinfo_t *cellinfo;
+#endif /* __STDC__ */
+{
+ cellinfo_t *new_cellinfo;
+
+ if ((new_cellinfo = (cellinfo_t *)malloc(sizeof(cellinfo_t))))
+ memcpy(new_cellinfo, cellinfo, sizeof(cellinfo_t));
+
+ return ((char *)new_cellinfo);
+}
+
+
+#ifdef __STDC__
+static char *copy_string(char *string)
+#else
+static char *copy_string(string)
+ char *string;
+#endif /* __STDC__ */
+{
+ char *new_string;
+
+ if ((new_string = (char *)calloc(strlen(string) + 1, sizeof(char))))
+ (void) strcpy(new_string, string);
+
+ return (new_string);
+}
+
+
+#ifdef __STDC__
+static int get_cellconfig(char *cell, struct afsconf_cell *cellconfig, char *local_cell, char *linkedcell)
+#else
+static int get_cellconfig(cell, cellconfig, local_cell, linkedcell)
+ char *cell;
+ struct afsconf_cell *cellconfig;
+ char *local_cell;
+ char *linkedcell;
+#endif /* __STDC__ */
+{
+ int status = AKLOG_SUCCESS;
+ struct afsconf_dir *configdir;
+#ifndef PRE_AFS35
+ char *dirpath;
+#endif /* ! PRE_AFS35 */
+
+ memset(local_cell, 0, sizeof(local_cell));
+ memset((char *)cellconfig, 0, sizeof(*cellconfig));
+
+#ifndef WINDOWS
+
+ if (!(configdir = afsconf_Open(AFSDIR_CLIENT_ETC_DIRPATH))) {
+ sprintf(msgbuf,
+ "%s: can't get afs configuration (afsconf_Open(%s))\n",
+ progname, AFSDIR_CLIENT_ETC_DIRPATH);
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_AFS);
+ }
+
+ if (afsconf_GetLocalCell(configdir, local_cell, MAXCELLCHARS)) {
+ sprintf(msgbuf, "%s: can't determine local cell.\n", progname);
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_AFS);
+ }
+
+ if ((cell == NULL) || (cell[0] == 0))
+ cell = local_cell;
+
+ linkedcell[0] = '\0';
+ if (afsconf_GetCellInfo(configdir, cell, NULL, cellconfig)) {
+ sprintf(msgbuf, "%s: Can't get information about cell %s.\n",
+ progname, cell);
+ params.pstderr(msgbuf);
+ status = AKLOG_AFS;
+ }
+ if (cellconfig->linkedCell)
+ strncpy(linkedcell,cellconfig->linkedCell,MAXCELLCHARS);
+
+ (void) afsconf_Close(configdir);
+
+#else /* WINDOWS */
+ /*
+ * We'll try to mimic the GetCellInfo call here and fill in as much
+ * of the afsconf_cell structure as we can.
+ */
+ if (cm_GetRootCellName(local_cell)) {
+ sprintf(msgbuf, "%s: can't get local cellname\n", progname);
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_AFS);
+ }
+
+ if ((cell == NULL) || (cell[0] == 0))
+ cell = local_cell;
+
+ strcpy(cellconfig->name, cell);
+
+ /* No way of figuring this out as far as I can tell */
+ linkedcell[0] = '\0';
+
+ /* Initialize server info */
+ cellconfig->numServers = 0;
+ cellconfig->hostName[0][0] = "\0";
+
+ /*
+ * Get servers of cell. cm_SearchCellFile_CallBack() gets call with
+ * each server.
+ */
+#ifdef PRE_AFS35
+ status = (int) cm_SearchCellFile(cell, &cm_SearchCellFile_CallBack,
+#else
+ status = (int) cm_SearchCellFile(cell, NULL, &cm_SearchCellFile_CallBack,
+#endif
+ cellconfig /* rock */);
+
+ switch(status) {
+ case 0:
+ break;
+
+ case -1:
+ sprintf(msgbuf, "%s: GetWindowsDirectory() failed.\n", progname);
+ break;
+
+ case -2:
+ sprintf(msgbuf, "%s: Couldn't open afsdcells.ini for reading\n",
+ progname);
+ break;
+
+ case -3:
+ sprintf(msgbuf, "%s: Couldn't find any servers for cell %s\n",
+ progname, cell);
+ break;
+
+ case -4:
+ sprintf(msgbuf, "%s: Badly formatted line in afsdcells.ini (does not begin with a \">\" or contain \"#\"\n",
+ progname);
+ break;
+
+ default:
+ sprintf(msgbuf, "%s cm_SearchCellFile returned unknown error %d\n",
+ status);
+ }
+
+ if (status) {
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_AFS);
+ }
+
+ status = AKLOG_SUCCESS;
+
+
+#endif /* WINDOWS */
+
+ return(status);
+}
+
+
+#ifdef WINDOWS
+/*
+ * Callback function for cm_SearchCellFile() in get_cellconfig() above.
+ * This function gets called once for each server that is found for the cell.
+ */
+static long
+cm_SearchCellFile_CallBack(void *rock /* cellconfig */,
+ struct sockaddr_in *addr, /* Not used */
+ char *server)
+{
+ struct afsconf_cell *cellconfig = rock;
+
+
+ /*
+ * Save server name and increment count of servers
+ */
+ strcpy(cellconfig->hostName[cellconfig->numServers++], server);
+
+ return (long) 0;
+}
+
+
+#endif /* WINDOWS */
+
+
+/*
+ * Log to a cell. If the cell has already been logged to, return without
+ * doing anything. Otherwise, log to it and mark that it has been logged
+ * to.
+ */
+#ifdef __STDC__
+static int auth_to_cell(krb5_context context, char *cell, char *realm)
+#else
+static int auth_to_cell(context, cell, realm)
+
+ krb5_context context;
+ char *cell;
+ char *realm;
+#endif /* __STDC__ */
+{
+ int status = AKLOG_SUCCESS;
+ char username[BUFSIZ]; /* To hold client username structure */
+ long viceId; /* AFS uid of user */
+
+ char name[ANAME_SZ]; /* Name of afs key */
+ char primary_instance[INST_SZ]; /* Instance of afs key */
+ char secondary_instance[INST_SZ]; /* Backup instance to try */
+ int try_secondary = 0; /* Flag to indicate if we try second */
+ char realm_of_user[REALM_SZ]; /* Kerberos realm of user */
+ char realm_of_cell[REALM_SZ]; /* Kerberos realm of cell */
+ char local_cell[MAXCELLCHARS+1];
+ char cell_to_use[MAXCELLCHARS+1]; /* Cell to authenticate to */
+ static char lastcell[MAXCELLCHARS+1] = { 0 };
+#ifndef WINDOWS
+ static char confname[512] = { 0 };
+#endif
+ krb5_creds *v5cred = NULL;
+ CREDENTIALS c;
+ struct ktc_principal aserver;
+ struct ktc_principal aclient;
+ struct ktc_token atoken, btoken;
+
+#ifdef ALLOW_REGISTER
+ afs_int32 id;
+#endif /* ALLOW_REGISTER */
+
+ memset(name, 0, sizeof(name));
+ memset(primary_instance, 0, sizeof(primary_instance));
+ memset(secondary_instance, 0, sizeof(secondary_instance));
+ memset(realm_of_user, 0, sizeof(realm_of_user));
+ memset(realm_of_cell, 0, sizeof(realm_of_cell));
+
+#ifndef WINDOWS
+ if (confname[0] == '\0') {
+ strncpy(confname, AFSDIR_CLIENT_ETC_DIRPATH, sizeof(confname));
+ confname[sizeof(confname) - 2] = '\0';
+ }
+#endif /* WINDOWS */
+
+ /* NULL or empty cell returns information on local cell */
+ if ((status = get_cellconfig(cell, &ak_cellconfig,
+ local_cell, linkedcell)))
+ return(status);
+
+ strncpy(cell_to_use, ak_cellconfig.name, MAXCELLCHARS);
+ cell_to_use[MAXCELLCHARS] = 0;
+
+ if (ll_string(&authedcells, ll_s_check, cell_to_use)) {
+ if (dflag) {
+ sprintf(msgbuf, "Already authenticated to %s (or tried to)\n",
+ cell_to_use);
+ params.pstdout(msgbuf);
+ }
+ return(AKLOG_SUCCESS);
+ }
+
+ /*
+ * Record that we have attempted to log to this cell. We do this
+ * before we try rather than after so that we will not try
+ * and fail repeatedly for one cell.
+ */
+ (void)ll_string(&authedcells, ll_s_add, cell_to_use);
+
+ /*
+ * Record this cell in the list of zephyr subscriptions. We may
+ * want zephyr subscriptions even if authentication fails.
+ * If this is done after we attempt to get tokens, aklog -zsubs
+ * can return something different depending on whether or not we
+ * are in -noauth mode.
+ */
+ if (ll_string(&zsublist, ll_s_add, cell_to_use) == LL_FAILURE) {
+ sprintf(msgbuf,
+ "%s: failure adding cell %s to zephyr subscriptions list.\n",
+ progname, cell_to_use);
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_MISC);
+ }
+ if (ll_string(&zsublist, ll_s_add, local_cell) == LL_FAILURE) {
+ sprintf(msgbuf,
+ "%s: failure adding cell %s to zephyr subscriptions list.\n",
+ progname, local_cell);
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_MISC);
+ }
+
+ if (!noauth) {
+ if (dflag) {
+ sprintf(msgbuf, "Authenticating to cell %s (server %s).\n",
+ cell_to_use, ak_cellconfig.hostName[0]);
+ params.pstdout(msgbuf);
+ }
+
+ /*
+ * Find out which realm we're supposed to authenticate to. If one
+ * is not included, use the kerberos realm found in the credentials
+ * cache.
+ */
+
+ if (realm && realm[0]) {
+ strcpy(realm_of_cell, realm);
+ if (dflag) {
+ sprintf(msgbuf, "We were told to authenticate to realm %s.\n",
+ realm);
+ params.pstdout(msgbuf);
+ }
+ }
+ else {
+ char *realm = afs_realm_of_cell(context, &ak_cellconfig);
+
+ if (!realm) {
+ sprintf(msgbuf,
+ "%s: Couldn't figure out realm for cell %s.\n",
+ progname, cell_to_use);
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_MISC);
+ }
+
+ strcpy(realm_of_cell, realm);
+
+ if (dflag) {
+ sprintf(msgbuf, "We've deduced that we need to authenticate to"
+ " realm %s.\n", realm_of_cell);
+ params.pstdout(msgbuf);
+ }
+ }
+
+ /* We use the afs.<cellname> convention here...
+ *
+ * Doug Engert's original code had principals of the form:
+ *
+ * "afsx/cell@realm"
+ *
+ * in the KDC, so the name wouldn't conflict with DFS. Since we're
+ * not using DFS, I changed it just to look for the following
+ * principals:
+ *
+ * afs/<cell>@<realm>
+ * afs@<realm>
+ *
+ * Because people are transitioning from afs@realm to afs/cell,
+ * we configure things so that if the first one isn't found, we
+ * try the second one. You can select which one you prefer with
+ * a configure option.
+ */
+
+ strcpy(name, AFSKEY);
+
+ if (AFS_TRY_FULL_PRINC || strcasecmp(cell_to_use, realm_of_cell) != 0) {
+ strncpy(primary_instance, cell_to_use, sizeof(primary_instance));
+ primary_instance[sizeof(primary_instance)-1] = '\0';
+ if (strcasecmp(cell_to_use, realm_of_cell) == 0) {
+ try_secondary = 1;
+ secondary_instance[0] = '\0';
+ }
+ } else {
+ primary_instance[0] = '\0';
+ try_secondary = 1;
+ strncpy(secondary_instance, cell_to_use,
+ sizeof(secondary_instance));
+ secondary_instance[sizeof(secondary_instance)-1] = '\0';
+ }
+
+ /*
+ * Extract the session key from the ticket file and hand-frob an
+ * afs style authenticator.
+ */
+
+ /*
+ * Try to obtain AFS tickets. Because there are two valid service
+ * names, we will try both, but trying the more specific first.
+ *
+ * afs/<cell>@<realm> i.e. allow for single name with "."
+ * afs@<realm>
+ */
+#if 0
+ if (dflag) {
+ dee_gettokens(); /* DEBUG */
+ }
+#endif
+
+ if (dflag) {
+ sprintf(msgbuf, "Getting tickets: %s/%s@%s\n", name,
+ primary_instance, realm_of_cell);
+ params.pstdout(msgbuf);
+ }
+
+ status = params.get_cred(context, name, primary_instance, realm_of_cell,
+ &c, &v5cred);
+
+ if (status == KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN) {
+ if (try_secondary) {
+ if (dflag) {
+ sprintf(msgbuf, "Principal not found, trying alternate "
+ "service name: %s/%s@%s\n", name,
+ secondary_instance, realm_of_cell);
+ params.pstdout(msgbuf);
+ }
+ status = params.get_cred(context, name, secondary_instance,
+ realm_of_cell, &c, &v5cred);
+ }
+ }
+
+ if (status != KSUCCESS) {
+ if (dflag) {
+ sprintf(msgbuf,
+ "Kerberos error code returned by get_cred: %d\n",
+ status);
+ params.pstdout(msgbuf);
+ }
+ sprintf(msgbuf, "%s: Couldn't get %s AFS tickets:\n",
+ progname, cell_to_use);
+ params.pstderr(msgbuf);
+ com_err(progname, status, "while getting AFS tickets");
+ return(AKLOG_KERBEROS);
+ }
+
+ strncpy(aserver.name, AFSKEY, MAXKTCNAMELEN - 1);
+ strncpy(aserver.instance, AFSINST, MAXKTCNAMELEN - 1);
+ strncpy(aserver.cell, cell_to_use, MAXKTCREALMLEN - 1);
+
+ strcpy (username, c.pname);
+ if (c.pinst[0]) {
+ strcat (username, ".");
+ strcat (username, c.pinst);
+ }
+
+ atoken.kvno = c.kvno;
+ atoken.startTime = c.issue_date;
+ /*
+ * It seems silly to go through a bunch of contortions to
+ * extract the expiration time, when the v5 credentials already
+ * has the exact time! Let's use that instead.
+ *
+ * Note that this isn't a security hole, as the expiration time
+ * is also contained in the encrypted token
+ */
+ atoken.endTime = v5cred->times.endtime;
+ memcpy(&atoken.sessionKey, c.session, 8);
+ atoken.ticketLen = c.ticket_st.length;
+ memcpy(atoken.ticket, c.ticket_st.dat, atoken.ticketLen);
+
+ if (!force &&
+ !ktc_GetToken(&aserver, &btoken, sizeof(btoken), &aclient) &&
+ atoken.kvno == btoken.kvno &&
+ atoken.ticketLen == btoken.ticketLen &&
+ !memcmp(&atoken.sessionKey, &btoken.sessionKey, sizeof(atoken.sessionKey)) &&
+ !memcmp(atoken.ticket, btoken.ticket, atoken.ticketLen)) {
+
+ if (dflag) {
+ sprintf(msgbuf, "Identical tokens already exist; skipping.\n");
+ params.pstdout(msgbuf);
+ }
+ return 0;
+ }
+
+#ifdef FORCE_NOPRDB
+ noprdb = 1;
+#endif
+
+#ifndef WINDOWS
+ if (noprdb) {
+#endif
+ if (dflag) {
+ sprintf(msgbuf, "Not resolving name %s to id (-noprdb set)\n",
+ username);
+ params.pstdout(msgbuf);
+ }
+#ifndef WINDOWS
+ }
+ else {
+ if ((status = params.get_user_realm(context, realm_of_user)) != KSUCCESS) {
+ sprintf(msgbuf, "%s: Couldn't determine realm of user:)",
+ progname);
+ params.pstderr(msgbuf);
+ com_err(progname, status, " while getting realm");
+ return(AKLOG_KERBEROS);
+ }
+ if (strcmp(realm_of_user, realm_of_cell)) {
+ strcat(username, "@");
+ strcat(username, realm_of_user);
+ }
+
+ if (dflag) {
+ sprintf(msgbuf, "About to resolve name %s to id in cell %s.\n",
+ username, aserver.cell);
+ params.pstdout(msgbuf);
+ }
+
+ /*
+ * Talk about DUMB! It turns out that there is a bug in
+ * pr_Initialize -- even if you give a different cell name
+ * to it, it still uses a connection to a previous AFS server
+ * if one exists. The way to fix this is to change the
+ * _filename_ argument to pr_Initialize - that forces it to
+ * re-initialize the connection. We do this by adding and
+ * removing a "/" on the end of the configuration directory name.
+ */
+
+ if (lastcell[0] != '\0' && (strcmp(lastcell, aserver.cell) != 0)) {
+ int i = strlen(confname);
+ if (confname[i - 1] == '/') {
+ confname[i - 1] = '\0';
+ } else {
+ confname[i] = '/';
+ confname[i + 1] = '\0';
+ }
+ }
+
+ strcpy(lastcell, aserver.cell);
+
+ if (!pr_Initialize (0, confname, aserver.cell, 0))
+ status = pr_SNameToId (username, &viceId);
+
+ if (dflag) {
+ if (status)
+ sprintf(msgbuf, "Error %d\n", status);
+ else
+ sprintf(msgbuf, "Id %d\n", (int) viceId);
+ params.pstdout(msgbuf);
+ }
+
+ /*
+ * This is a crock, but it is Transarc's crock, so
+ * we have to play along in order to get the
+ * functionality. The way the afs id is stored is
+ * as a string in the username field of the token.
+ * Contrary to what you may think by looking at
+ * the code for tokens, this hack (AFS ID %d) will
+ * not work if you change %d to something else.
+ */
+
+ /*
+ * This code is taken from cklog -- it lets people
+ * automatically register with the ptserver in foreign cells
+ */
+
+#ifdef ALLOW_REGISTER
+ if (status == 0) {
+ if (viceId != ANONYMOUSID) {
+#else /* ALLOW_REGISTER */
+ if ((status == 0) && (viceId != ANONYMOUSID))
+#endif /* ALLOW_REGISTER */
+ sprintf (username, "AFS ID %d", (int) viceId);
+#ifdef ALLOW_REGISTER
+ } else if (strcmp(realm_of_user, realm_of_cell) != 0) {
+ if (dflag) {
+ sprintf(msgbuf, "doing first-time registration of %s "
+ "at %s\n", username, cell_to_use);
+ params.pstdout(msgbuf);
+ }
+ id = 0;
+ strncpy(aclient.name, username, MAXKTCNAMELEN - 1);
+ strcpy(aclient.instance, "");
+ strncpy(aclient.cell, c.realm, MAXKTCREALMLEN - 1);
+ if ((status = ktc_SetToken(&aserver, &atoken, &aclient, 0))) {
+ sprintf(msgbuf, "%s: unable to obtain tokens for cell %s "
+ "(status: %d).\n", progname, cell_to_use, status);
+ params.pstderr(msgbuf);
+ status = AKLOG_TOKEN;
+ }
+
+ /*
+ * In case you're wondering, we don't need to change the
+ * filename here because we're still connecting to the
+ * same cell -- we're just using a different authentication
+ * level
+ */
+
+ if ((status = pr_Initialize(1L, confname, aserver.cell, 0))) {
+ sprintf(msgbuf, "Error %d\n", status);
+ params.pstdout(msgbuf);
+ }
+
+ if ((status = pr_CreateUser(username, &id))) {
+ sprintf(msgbuf, "%s: %s so unable to create remote PTS "
+ "user %s in cell %s (status: %d).\n", progname,
+ error_message(status), username, cell_to_use,
+ status);
+ params.pstdout(msgbuf);
+ } else {
+ sprintf(msgbuf, "created cross-cell entry for %s at %s\n",
+ username, cell_to_use);
+ params.pstdout(msgbuf);
+ sprintf(username, "AFS ID %d", (int) id);
+ }
+ }
+ }
+#endif /* ALLOW_REGISTER */
+
+ }
+#endif /* !WINDOWS */
+
+ if (dflag) {
+ sprintf(msgbuf, "Set username to %s\n", username);
+ params.pstdout(msgbuf);
+ }
+
+ /* Reset the "aclient" structure before we call ktc_SetToken.
+ * This structure was first set by the ktc_GetToken call when
+ * we were comparing whether identical tokens already existed.
+ */
+ strncpy(aclient.name, username, MAXKTCNAMELEN - 1);
+ strcpy(aclient.instance, "");
+ strncpy(aclient.cell, c.realm, MAXKTCREALMLEN - 1);
+
+ if (dflag) {
+ sprintf(msgbuf, "Setting tokens. %s / %s @ %s \n",
+ aclient.name, aclient.instance, aclient.cell );
+ params.pstdout(msgbuf);
+ }
+ /* on AIX 4.1.4 with AFS 3.4a+ if a write is not done before
+ * this routine, it will not add the token. It is not clear what
+ * is going on here! So we will do the following operation
+ */
+ write(2,"",0); /* dummy write */
+#ifndef WINDOWS
+ if ((status = ktc_SetToken(&aserver, &atoken, &aclient, afssetpag))) {
+ sprintf(msgbuf,
+ "%s: unable to obtain tokens for cell %s (status: %d).\n",
+ progname, cell_to_use, status);
+ params.pstderr(msgbuf);
+ status = AKLOG_TOKEN;
+ }
+#else /* WINDOWS */
+ /* Note switched 2nd and 3rd args */
+#ifdef PRE_AFS35
+ if ((status = ktc_SetToken(&aserver, &aclient, &atoken, afssetpag))) {
+#else
+ if ((status = ktc_SetToken(&aserver, &atoken, &aclient, afssetpag))) {
+#endif
+ switch(status) {
+ case KTC_INVAL:
+ sprintf(msgbuf, "%s: Bad ticket length", progname);
+ break;
+ case KTC_PIOCTLFAIL:
+ sprintf(msgbuf, "%s: Unknown error contacting AFS service",
+ progname);
+ break;
+ case KTC_NOCELL:
+ sprintf(msgbuf, "%s: Cell name (%s) not recognized by AFS service",
+ progname, realm_of_cell);
+ break;
+ case KTC_NOCM:
+ sprintf(msgbuf, "%s: AFS service is unavailable", progname);
+ break;
+ default:
+ sprintf(msgbuf, "%s: Undocumented error (%d) contacting AFS service", progname, status);
+ break;
+ }
+ params.pstderr(msgbuf);
+ status = AKLOG_TOKEN;
+ }
+#endif /* !WINDOWS */
+ }
+ else
+ if (dflag) {
+ sprintf(msgbuf, "Noauth mode; not authenticating.\n");
+ params.pstdout(msgbuf);
+ }
+
+ return(status);
+}
+
+#ifndef WINDOWS /* struct ViceIoctl missing */
+
+#ifdef __STDC__
+static int get_afs_mountpoint(char *file, char *mountpoint, int size)
+#else
+static int get_afs_mountpoint(file, mountpoint, size)
+ char *file;
+ char *mountpoint;
+ int size;
+#endif /* __STDC__ */
+{
+#ifdef AFS_SUN_ENV
+ char V ='V'; /* AFS has problem on Sun with pioctl */
+#endif
+ char our_file[MAXPATHLEN + 1];
+ char *parent_dir;
+ char *last_component;
+ struct ViceIoctl vio;
+ char cellname[BUFSIZ];
+
+ memset(our_file, 0, sizeof(our_file));
+ strcpy(our_file, file);
+
+ if ((last_component = strrchr(our_file, DIR))) {
+ *last_component++ = 0;
+ parent_dir = our_file;
+ }
+ else {
+ last_component = our_file;
+ parent_dir = ".";
+ }
+
+ memset(cellname, 0, sizeof(cellname));
+
+ vio.in = last_component;
+ vio.in_size = strlen(last_component)+1;
+ vio.out_size = size;
+ vio.out = mountpoint;
+
+ if (!pioctl(parent_dir, VIOC_AFS_STAT_MT_PT, &vio, 0)) {
+ if (strchr(mountpoint, VOLMARKER) == NULL) {
+ vio.in = file;
+ vio.in_size = strlen(file) + 1;
+ vio.out_size = sizeof(cellname);
+ vio.out = cellname;
+
+ if (!pioctl(file, VIOC_FILE_CELL_NAME, &vio, 1)) {
+ strcat(cellname, VOLMARKERSTRING);
+ strcat(cellname, mountpoint + 1);
+ memset(mountpoint + 1, 0, size - 1);
+ strcpy(mountpoint + 1, cellname);
+ }
+ }
+ return(TRUE);
+ }
+ else
+ return(FALSE);
+}
+
+/*
+ * This routine each time it is called returns the next directory
+ * down a pathname. It resolves all symbolic links. The first time
+ * it is called, it should be called with the name of the path
+ * to be descended. After that, it should be called with the arguemnt
+ * NULL.
+ */
+#ifdef __STDC__
+static char *next_path(char *origpath)
+#else
+static char *next_path(origpath)
+ char *origpath;
+#endif /* __STDC__ */
+{
+ static char path[MAXPATHLEN + 1];
+ static char pathtocheck[MAXPATHLEN + 1];
+
+ int link = FALSE; /* Is this a symbolic link? */
+ char linkbuf[MAXPATHLEN + 1];
+ char tmpbuf[MAXPATHLEN + 1];
+
+ static char *last_comp; /* last component of directory name */
+ static char *elast_comp; /* End of last component */
+ char *t;
+ int len;
+
+ static int symlinkcount = 0; /* We can't exceed MAXSYMLINKS */
+
+ /* If we are given something for origpath, we are initializing only. */
+ if (origpath) {
+ memset(path, 0, sizeof(path));
+ memset(pathtocheck, 0, sizeof(pathtocheck));
+ strcpy(path, origpath);
+ last_comp = path;
+ symlinkcount = 0;
+ return(NULL);
+ }
+
+ /* We were not given origpath; find then next path to check */
+
+ /* If we've gotten all the way through already, return NULL */
+ if (last_comp == NULL)
+ return(NULL);
+
+ do {
+ while (*last_comp == DIR)
+ strncat(pathtocheck, last_comp++, 1);
+ len = (elast_comp = strchr(last_comp, DIR))
+ ? elast_comp - last_comp : strlen(last_comp);
+ strncat(pathtocheck, last_comp, len);
+ memset(linkbuf, 0, sizeof(linkbuf));
+ if ((link = (params.readlink(pathtocheck, linkbuf,
+ sizeof(linkbuf)) > 0))) {
+ if (++symlinkcount > MAXSYMLINKS) {
+ sprintf(msgbuf, "%s: %s\n", progname, strerror(ELOOP));
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_BADPATH);
+ }
+ memset(tmpbuf, 0, sizeof(tmpbuf));
+ if (elast_comp)
+ strcpy(tmpbuf, elast_comp);
+ if (linkbuf[0] == DIR) {
+ /*
+ * If this is a symbolic link to an absolute path,
+ * replace what we have by the absolute path.
+ */
+ memset(path, 0, strlen(path));
+ memcpy(path, linkbuf, sizeof(linkbuf));
+ strcat(path, tmpbuf);
+ last_comp = path;
+ elast_comp = NULL;
+ memset(pathtocheck, 0, sizeof(pathtocheck));
+ }
+ else {
+ /*
+ * If this is a symbolic link to a relative path,
+ * replace only the last component with the link name.
+ */
+ strncpy(last_comp, linkbuf, strlen(linkbuf) + 1);
+ strcat(path, tmpbuf);
+ elast_comp = NULL;
+ if ((t = strrchr(pathtocheck, DIR))) {
+ t++;
+ memset(t, 0, strlen(t));
+ }
+ else
+ memset(pathtocheck, 0, sizeof(pathtocheck));
+ }
+ }
+ else
+ last_comp = elast_comp;
+ }
+ while(link);
+
+ return(pathtocheck);
+}
+
+#endif /* WINDOWS */
+
+#if 0
+/*****************************************/
+int dee_gettokens()
+{
+#ifdef AFS_SUN_ENV
+ char V = 'V'; /* AFS has problem on SunOS */
+#endif
+ struct ViceIoctl vio;
+ char outbuf[BUFSIZ];
+ long ind;
+ int fd;
+
+ memset(outbuf, 0, sizeof(outbuf));
+
+ vio.out_size = sizeof(outbuf);
+ vio.in_size = sizeof(ind);
+ vio.out = outbuf;
+ vio.in = &ind;
+
+ ind = 0;
+ fd = open("dee.tok",O_WRONLY);
+ while(!pioctl(0,VIOCGETTOK,&vio,0)) {
+ write(fd,&outbuf,sizeof(outbuf));
+ ind++;
+ }
+ close(fd);
+}
+/*****************************************/
+#endif
+
+#ifndef WINDOWS /* struct ViceIoctl missing */
+
+#ifdef __STDC__
+static void add_hosts(char *file)
+#else
+static void add_hosts(file)
+ char *file;
+#endif /* __STDC__ */
+{
+#ifdef AFS_SUN_ENV
+ char V = 'V'; /* AFS has problem on SunOS */
+#endif
+ struct ViceIoctl vio;
+ char outbuf[BUFSIZ];
+ long *phosts;
+ int i;
+ struct hostent *hp;
+ struct in_addr in;
+
+ memset(outbuf, 0, sizeof(outbuf));
+
+ vio.out_size = sizeof(outbuf);
+ vio.in_size = 0;
+ vio.out = outbuf;
+
+ if (dflag) {
+ sprintf(msgbuf, "Getting list of hosts for %s\n", file);
+ params.pstdout(msgbuf);
+ }
+ /* Don't worry about errors. */
+ if (!pioctl(file, VIOCWHEREIS, &vio, 1)) {
+ phosts = (long *) outbuf;
+
+ /*
+ * Lists hosts that we care about. If ALLHOSTS is defined,
+ * then all hosts that you ever may possible go through are
+ * included in this list. If not, then only hosts that are
+ * the only ones appear. That is, if a volume you must use
+ * is replaced on only one server, that server is included.
+ * If it is replicated on many servers, then none are included.
+ * This is not perfect, but the result is that people don't
+ * get subscribed to a lot of instances of FILSRV that they
+ * probably won't need which reduces the instances of
+ * people getting messages that don't apply to them.
+ */
+#ifndef ALLHOSTS
+ if (phosts[1] != '\0')
+ return;
+#endif
+ for (i = 0; phosts[i]; i++) {
+ if (hosts) {
+ in.s_addr = phosts[i];
+ if (dflag) {
+ sprintf(msgbuf, "Got host %s\n", inet_ntoa(in));
+ params.pstdout(msgbuf);
+ }
+ ll_string(&hostlist, ll_s_add, (char *)inet_ntoa(in));
+ }
+ if (zsubs && (hp=gethostbyaddr((char *) &phosts[i],sizeof(long),AF_INET))) {
+ if (dflag) {
+ sprintf(msgbuf, "Got host %s\n", hp->h_name);
+ params.pstdout(msgbuf);
+ }
+ ll_string(&zsublist, ll_s_add, hp->h_name);
+ }
+ }
+ }
+}
+
+#endif /* WINDOWS */
+
+#ifndef WINDOWS /* next_path(), get_afs_mountpoint() */
+
+/*
+ * This routine descends through a path to a directory, logging to
+ * every cell it encounters along the way.
+ */
+#ifdef __STDC__
+static int auth_to_path(krb5_context context, char *path)
+#else
+static int auth_to_path(context, path)
+ krb5_context context;
+ char *path; /* The path to which we try to authenticate */
+#endif /* __STDC__ */
+{
+ int status = AKLOG_SUCCESS;
+ int auth_to_cell_status = AKLOG_SUCCESS;
+
+ char *nextpath;
+ char pathtocheck[MAXPATHLEN + 1];
+ char mountpoint[MAXPATHLEN + 1];
+
+ char *cell;
+ char *endofcell;
+
+ u_char isdir;
+
+ /* Initialize */
+ if (path[0] == DIR)
+ strcpy(pathtocheck, path);
+ else {
+ if (params.getwd(pathtocheck) == NULL) {
+ sprintf(msgbuf, "Unable to find current working directory:\n");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, "%s\n", pathtocheck);
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, "Try an absolute pathname.\n");
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_BADPATH);
+ }
+ else {
+ strcat(pathtocheck, DIRSTRING);
+ strcat(pathtocheck, path);
+ }
+ }
+ next_path(pathtocheck);
+
+ /* Go on to the next level down the path */
+ while ((nextpath = next_path(NULL))) {
+ strcpy(pathtocheck, nextpath);
+ if (dflag) {
+ sprintf(msgbuf, "Checking directory %s\n", pathtocheck);
+ params.pstdout(msgbuf);
+ }
+ /*
+ * If this is an afs mountpoint, determine what cell from
+ * the mountpoint name which is of the form
+ * #cellname:volumename or %cellname:volumename.
+ */
+ if (get_afs_mountpoint(pathtocheck, mountpoint, sizeof(mountpoint))) {
+ /* skip over the '#' or '%' */
+ cell = mountpoint + 1;
+ /* Add this (cell:volumename) to the list of zsubs */
+ if (zsubs)
+ ll_string(&zsublist, ll_s_add, cell);
+ if (zsubs || hosts)
+ add_hosts(pathtocheck);
+ if ((endofcell = strchr(mountpoint, VOLMARKER))) {
+ *endofcell = '\0';
+ if ((auth_to_cell_status = auth_to_cell(context, cell, NULL))) {
+ if (status == AKLOG_SUCCESS)
+ status = auth_to_cell_status;
+ else if (status != auth_to_cell_status)
+ status = AKLOG_SOMETHINGSWRONG;
+ }
+ }
+ }
+ else {
+ if (params.isdir(pathtocheck, &isdir) < 0) {
+ /*
+ * If we've logged and still can't stat, there's
+ * a problem...
+ */
+ sprintf(msgbuf, "%s: stat(%s): %s\n", progname,
+ pathtocheck, strerror(errno));
+ params.pstderr(msgbuf);
+ return(AKLOG_BADPATH);
+ }
+ else if (! isdir) {
+ /* Allow only directories */
+ sprintf(msgbuf, "%s: %s: %s\n", progname, pathtocheck,
+ strerror(ENOTDIR));
+ params.pstderr(msgbuf);
+ return(AKLOG_BADPATH);
+ }
+ }
+ }
+
+
+ return(status);
+}
+
+#endif /* WINDOWS */
+
+
+/* Print usage message and exit */
+#ifdef __STDC__
+static void usage(void)
+#else
+static void usage()
+#endif /* __STDC__ */
+{
+ sprintf(msgbuf, "\nUsage: %s %s%s%s\n", progname,
+ "[-d] [[-cell | -c] cell [-k krb_realm]] ",
+ "[[-p | -path] pathname]\n",
+ " [-zsubs] [-hosts] [-noauth] [-noprdb] [-force] [-setpag] [-linked]\n");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, " -d gives debugging information.\n");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, " krb_realm is the kerberos realm of a cell.\n");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, " pathname is the name of a directory to which ");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, "you wish to authenticate.\n");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, " -zsubs gives zephyr subscription information.\n");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, " -hosts gives host address information.\n");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, " -noauth does not attempt to get tokens.\n");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, " -noprdb means don't try to determine AFS ID.\n");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, " -force means replace identical tickets. \n");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, " -linked means if AFS node is linked, try both. \n");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, " -setpag set the AFS process authentication group.\n");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, " No commandline arguments means ");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, "authenticate to the local cell.\n");
+ params.pstderr(msgbuf);
+ sprintf(msgbuf, "\n");
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_USAGE);
+}
+
+#ifdef __STDC__
+void aklog(int argc, char *argv[], aklog_params *a_params)
+#else
+void aklog(argc, argv, a_params)
+ int argc;
+ char *argv[];
+ aklog_params *a_params;
+#endif /* __STDC__ */
+{
+ krb5_context context;
+ int status = AKLOG_SUCCESS;
+ int i;
+ int somethingswrong = FALSE;
+
+ cellinfo_t cellinfo;
+
+ extern char *progname; /* Name of this program */
+
+ extern int dflag; /* Debug mode */
+
+ int cmode = FALSE; /* Cellname mode */
+ int pmode = FALSE; /* Path name mode */
+
+ char realm[REALM_SZ]; /* Kerberos realm of afs server */
+ char cell[BUFSIZ]; /* Cell to which we are authenticating */
+ char path[MAXPATHLEN + 1]; /* Path length for path mode */
+
+ linked_list cells; /* List of cells to log to */
+ linked_list paths; /* List of paths to log to */
+ ll_node *cur_node;
+
+ memset(&cellinfo, 0, sizeof(cellinfo));
+
+ memset(realm, 0, sizeof(realm));
+ memset(cell, 0, sizeof(cell));
+ memset(path, 0, sizeof(path));
+
+ ll_init(&cells);
+ ll_init(&paths);
+
+ ll_init(&zsublist);
+ ll_init(&hostlist);
+
+ /* Store the program name here for error messages */
+ if ((progname = strrchr(argv[0], DIR)))
+ progname++;
+ else
+ progname = argv[0];
+
+ krb5_init_context(&context);
+#ifndef WINDOWS
+ initialize_ktc_error_table ();
+#endif
+
+ memcpy((char *)¶ms, (char *)a_params, sizeof(aklog_params));
+
+ /* Initialize list of cells to which we have authenticated */
+ (void)ll_init(&authedcells);
+
+ /* Parse commandline arguments and make list of what to do. */
+ for (i = 1; i < argc; i++) {
+ if (strcmp(argv[i], "-d") == 0)
+ dflag++;
+ else if (strcmp(argv[i], "-noauth") == 0)
+ noauth++;
+ else if (strcmp(argv[i], "-zsubs") == 0)
+ zsubs++;
+ else if (strcmp(argv[i], "-hosts") == 0)
+ hosts++;
+ else if (strcmp(argv[i], "-noprdb") == 0)
+ noprdb++;
+ else if (strcmp(argv[i], "-linked") == 0)
+ linked++;
+ else if (strcmp(argv[i], "-force") == 0)
+ force++;
+ else if (strcmp(argv[i], "-setpag") == 0)
+ afssetpag++;
+ else if (((strcmp(argv[i], "-cell") == 0) ||
+ (strcmp(argv[i], "-c") == 0)) && !pmode)
+ if (++i < argc) {
+ cmode++;
+ strcpy(cell, argv[i]);
+ }
+ else
+ usage();
+ else if (((strcmp(argv[i], "-path") == 0) ||
+ (strcmp(argv[i], "-p") == 0)) && !cmode)
+#ifndef WINDOWS
+ if (++i < argc) {
+ pmode++;
+ strcpy(path, argv[i]);
+ }
+ else
+ usage();
+#else /* WINDOWS */
+ {
+ sprintf(msgbuf, "%s: path mode not supported.\n", progname);
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_MISC);
+ }
+#endif /* WINDOWS */
+
+ else if (argv[i][0] == '-')
+ usage();
+ else if (!pmode && !cmode) {
+ if (strchr(argv[i], DIR) || (strcmp(argv[i], ".") == 0) ||
+ (strcmp(argv[i], "..") == 0)) {
+#ifndef WINDOWS
+ pmode++;
+ strcpy(path, argv[i]);
+#else /* WINDOWS */
+ sprintf(msgbuf, "%s: path mode not supported.\n", progname);
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_MISC);
+#endif /* WINDOWS */
+ }
+ else {
+ cmode++;
+ strcpy(cell, argv[i]);
+ }
+ }
+ else
+ usage();
+
+ if (cmode) {
+ if (((i + 1) < argc) && (strcmp(argv[i + 1], "-k") == 0)) {
+ i+=2;
+ if (i < argc)
+ strcpy(realm, argv[i]);
+ else
+ usage();
+ }
+ /* Add this cell to list of cells */
+ strcpy(cellinfo.cell, cell);
+ strcpy(cellinfo.realm, realm);
+ if ((cur_node = ll_add_node(&cells, ll_tail))) {
+ char *new_cellinfo;
+ if ((new_cellinfo = copy_cellinfo(&cellinfo)))
+ ll_add_data(cur_node, new_cellinfo);
+ else {
+ sprintf(msgbuf,
+ "%s: failure copying cellinfo.\n", progname);
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_MISC);
+ }
+ }
+ else {
+ sprintf(msgbuf, "%s: failure adding cell to cells list.\n",
+ progname);
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_MISC);
+ }
+ memset(&cellinfo, 0, sizeof(cellinfo));
+ cmode = FALSE;
+ memset(cell, 0, sizeof(cell));
+ memset(realm, 0, sizeof(realm));
+ }
+#ifndef WINDOWS
+ else if (pmode) {
+ /* Add this path to list of paths */
+ if ((cur_node = ll_add_node(&paths, ll_tail))) {
+ char *new_path;
+ if ((new_path = copy_string(path)))
+ ll_add_data(cur_node, new_path);
+ else {
+ sprintf(msgbuf, "%s: failure copying path name.\n",
+ progname);
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_MISC);
+ }
+ }
+ else {
+ sprintf(msgbuf, "%s: failure adding path to paths list.\n",
+ progname);
+ params.pstderr(msgbuf);
+ params.exitprog(AKLOG_MISC);
+ }
+ pmode = FALSE;
+ memset(path, 0, sizeof(path));
+ }
+#endif /* WINDOWS */
+ }
+
+ /*
+ * The code that _used_ to be here called setpag(). When you think
+ * about this, doing this makes no sense! setpag() allocates a PAG
+ * only for the current process, so the token installed would have
+ * not be usable in the parent! Since ktc_SetToken() now takes a
+ * 4th argument to control whether or not we're going to allocate
+ * a PAG (and since when you do it _that_ way, it modifies the cred
+ * structure of your parent)), why don't we use that instead?
+ */
+
+#if 0
+ if (afssetpag) {
+ status = setpag();
+ if (dflag) {
+ int i,j;
+ int gidsetlen = 50;
+ int gidset[50];
+
+ printf("setpag %d\n",status);
+ j = getgroups(gidsetlen,gidset);
+ printf("Groups(%d):",j);
+ for (i = 0; i<j; i++) {
+ printf("%d",gidset[i]);
+ if((i+1)<j) printf(",");
+ }
+ printf("\n");
+ }
+ }
+#endif
+ /* If nothing was given, log to the local cell. */
+ if ((cells.nelements + paths.nelements) == 0) {
+ struct passwd *pwd;
+
+ status = auth_to_cell(context, NULL, NULL);
+
+ /* If this cell is linked to a DCE cell, and user
+ * requested -linked, get tokens for both
+ * This is very usefull when the AFS cell is linked to a DFS
+ * cell and this system does not also have DFS.
+ */
+
+ if (!status && linked && linkedcell[0]) {
+ strncpy(linkedcell2,linkedcell,MAXCELLCHARS);
+ if (dflag) {
+ sprintf(msgbuf, "Linked cell: %s\n",
+ linkedcell);
+ params.pstdout(msgbuf);
+ }
+ status = auth_to_cell(context, linkedcell2, NULL);
+ }
+
+#ifndef WINDOWS
+ /*
+ * Local hack - if the person has a file in their home
+ * directory called ".xlog", read that for a list of
+ * extra cells to authenticate to
+ */
+
+ if ((pwd = getpwuid(getuid())) != NULL) {
+ struct stat sbuf;
+ FILE *f;
+ char fcell[100], xlog_path[512];
+
+ strcpy(xlog_path, pwd->pw_dir);
+ strcat(xlog_path, "/.xlog");
+
+ if ((stat(xlog_path, &sbuf) == 0) &&
+ ((f = fopen(xlog_path, "r")) != NULL)) {
+
+ if (dflag) {
+ sprintf(msgbuf, "Reading %s for cells to "
+ "authenticate to.\n", xlog_path);
+ params.pstdout(msgbuf);
+ }
+
+ while (fgets(fcell, 100, f) != NULL) {
+ int auth_status;
+
+ fcell[strlen(fcell) - 1] = '\0';
+
+ if (dflag) {
+ sprintf(msgbuf, "Found cell %s in %s.\n",
+ fcell, xlog_path);
+ params.pstdout(msgbuf);
+ }
+
+ auth_status = auth_to_cell(context, fcell, NULL);
+ if (status == AKLOG_SUCCESS)
+ status = auth_status;
+ else
+ status = AKLOG_SOMETHINGSWRONG;
+ }
+ }
+ }
+#endif /* WINDOWS */
+ }
+ else {
+ /* Log to all cells in the cells list first */
+ for (cur_node = cells.first; cur_node; cur_node = cur_node->next) {
+ memcpy((char *)&cellinfo, cur_node->data, sizeof(cellinfo));
+ if ((status = auth_to_cell(context, cellinfo.cell, cellinfo.realm)))
+ somethingswrong++;
+ else {
+ if (linked && linkedcell[0]) {
+ strncpy(linkedcell2,linkedcell,MAXCELLCHARS);
+ if (dflag) {
+ sprintf(msgbuf, "Linked cell: %s\n",
+ linkedcell);
+ params.pstdout(msgbuf);
+ }
+ if ((status = auth_to_cell(context,linkedcell2,
+ cellinfo.realm)))
+ somethingswrong++;
+ }
+ }
+ }
+
+#ifndef WINDOWS
+ /* Then, log to all paths in the paths list */
+ for (cur_node = paths.first; cur_node; cur_node = cur_node->next) {
+ if ((status = auth_to_path(context, cur_node->data)))
+ somethingswrong++;
+ }
+#endif /* WINDOWS */
+
+ /*
+ * If only one thing was logged to, we'll return the status
+ * of the single call. Otherwise, we'll return a generic
+ * something failed status.
+ */
+ if (somethingswrong && ((cells.nelements + paths.nelements) > 1))
+ status = AKLOG_SOMETHINGSWRONG;
+ }
+
+ /* If we are keeping track of zephyr subscriptions, print them. */
+ if (zsubs)
+ for (cur_node = zsublist.first; cur_node; cur_node = cur_node->next) {
+ sprintf(msgbuf, "zsub: %s\n", cur_node->data);
+ params.pstdout(msgbuf);
+ }
+
+ /* If we are keeping track of host information, print it. */
+ if (hosts)
+ for (cur_node = hostlist.first; cur_node; cur_node = cur_node->next) {
+ sprintf(msgbuf, "host: %s\n", cur_node->data);
+ params.pstdout(msgbuf);
+ }
+
+ params.exitprog(status);
+}
--- /dev/null
+/*
+ * $Id: aklog_param.c,v 1.1.2.1 2004/12/07 05:51:24 shadow Exp $
+ *
+ * Copyright 1990,1991 by the Massachusetts Institute of Technology
+ * For distribution and copying rights, see the file "mit-copyright.h"
+ */
+
+#if !defined(lint) && !defined(SABER)
+static char *rcsid = "$Id: aklog_param.c,v 1.1.2.1 2004/12/07 05:51:24 shadow Exp $";
+#endif /* lint || SABER */
+
+#include "aklog.h"
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_MEMORY_H
+#include <memory.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#include <kerberosIV/krb.h>
+#include <krb5.h>
+
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifndef WINDOWS
+#if !defined(HAVE_UNISTD_H) || (defined(__sun__) && ! defined(__svr4__))
+extern int readlink ARGS((char *, char *, size_t));
+#endif
+/* extern int lstat ARGS((char *, struct stat *)); */
+extern char *getwd ARGS((char *));
+#endif /* WINDOWS */
+
+static krb5_ccache _krb425_ccache = 0;
+
+#ifndef WINDOWS /* Don't have lstat() */
+#ifdef __STDC__
+static int isdir(char *path, unsigned char *val)
+#else
+static int isdir(path, val)
+ char *path;
+ unsigned char *val;
+#endif /* __STDC__ */
+{
+ struct stat statbuf;
+
+ if (lstat(path, &statbuf) < 0)
+ return (-1);
+ else {
+ if ((statbuf.st_mode & S_IFMT) == S_IFDIR)
+ *val = TRUE;
+ else
+ *val = FALSE;
+ return (0);
+ }
+}
+#endif /* WINDOWS */
+
+#ifdef __STDC__
+static int get_cred(krb5_context context,
+ char *name, char *inst, char *realm, CREDENTIALS *c,
+ krb5_creds **creds)
+#else
+static int get_cred(context, name, inst, realm, c, creds)
+ krb5_context context;
+ char *name;
+ char *inst;
+ char *realm;
+ CREDENTIALS *c;
+ krb5_creds **creds;
+#endif /* __STDC__ */
+{
+ krb5_creds increds;
+ krb5_error_code r;
+ static krb5_principal client_principal = 0;
+
+ memset((char *)&increds, 0, sizeof(increds));
+/* ANL - instance may be ptr to a null string. Pass null then */
+ if ((r = krb5_build_principal(context, &increds.server,
+ strlen(realm), realm,
+ name,
+ (inst && strlen(inst)) ? inst : (void *) NULL,
+ (void *) NULL))) {
+ return((int)r);
+ }
+
+ if (!_krb425_ccache)
+ krb5_cc_default(context, &_krb425_ccache);
+ if (!client_principal)
+ krb5_cc_get_principal(context, _krb425_ccache, &client_principal);
+
+ increds.client = client_principal;
+ increds.times.endtime = 0;
+ /* Ask for DES since that is what V4 understands */
+ /* increds.keyblock.enctype = ENCTYPE_DES_CBC_CRC; */
+
+ r = krb5_get_credentials(context, 0, _krb425_ccache, &increds, creds);
+ if (r)
+ return((int)r);
+
+/* This requires krb524d to be running with the KDC */
+ r = krb5_524_convert_creds(context, *creds, c);
+ return((int)r);
+}
+
+
+#ifdef __STDC__
+static int get_user_realm(krb5_context context,char *realm)
+#else
+static int get_user_realm(context, realm)
+ krb5_context context;
+ char *realm;
+
+#endif /* __STDC__ */
+{
+ static krb5_principal client_principal = 0;
+ int i;
+
+ if (!_krb425_ccache)
+ krb5_cc_default(context, &_krb425_ccache);
+ if (!client_principal)
+ krb5_cc_get_principal(context, _krb425_ccache, &client_principal);
+
+ i = krb5_princ_realm(context, client_principal)->length;
+ if (i > REALM_SZ-1) i = REALM_SZ-1;
+ strncpy(realm,krb5_princ_realm(context, client_principal)->data,i);
+ realm[i] = 0;
+ return(KSUCCESS);
+}
+
+
+#ifndef WINDOWS
+
+#ifdef __STDC__
+static void pstderr(char *string)
+#else
+static void pstderr(string)
+ char *string;
+#endif /* __STDC__ */
+{
+ write(2, string, strlen(string));
+}
+
+
+#ifdef __STDC__
+static void pstdout(char *string)
+#else
+static void pstdout(string)
+ char *string;
+#endif /* __STDC__ */
+{
+ write(1, string, strlen(string));
+}
+
+#else /* WINDOWS */
+
+static void pstderr(char *string)
+{
+ if (_isatty(_fileno(stderr)))
+ fprintf(stderr, "%s\r\n", string);
+ else
+ MessageBox(NULL, string, AKLOG_DIALOG_NAME, MB_OK | MB_ICONSTOP);
+}
+
+static void pstdout(char *string)
+{
+ if (_isatty(_fileno(stdout)))
+ fprintf(stdout, "%s\r\n", string);
+ else
+ MessageBox(NULL, string, AKLOG_DIALOG_NAME, MB_OK);
+}
+
+#endif /* WINDOWS */
+
+#ifdef __STDC__
+static void exitprog(char status)
+#else
+static void exitprog(status)
+ char status;
+#endif /* __STDC__ */
+{
+ exit(status);
+}
+
+
+#ifdef __STDC__
+void aklog_init_params(aklog_params *params)
+#else
+void aklog_init_params(params)
+ aklog_params *params;
+#endif /* __STDC__ */
+{
+#ifndef WINDOWS
+ params->readlink = readlink;
+ params->isdir = isdir;
+ params->getwd = getwd;
+#endif
+ params->get_cred = get_cred;
+ params->get_user_realm = get_user_realm;
+ params->pstderr = pstderr;
+ params->pstdout = pstdout;
+ params->exitprog = exitprog;
+}
--- /dev/null
+/*
+ * This file replaces some of the routines in the Kerberos utilities.
+ * It is based on the Kerberos library modules:
+ * send_to_kdc.c
+ *
+ * Copyright 1987, 1988, 1992 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
+ */
+
+#ifndef lint
+static char rcsid_send_to_kdc_c[] =
+"$Id: krb_util.c,v 1.1.2.1 2004/12/07 05:51:24 shadow Exp $";
+#endif /* lint */
+
+#if 0
+#include <kerberosIV/mit-copyright.h>
+#endif
+#include <krb5.h>
+#include <kerberosIV/krb.h>
+
+#ifndef MAX_HSTNM
+#define MAX_HSTNM 100
+#endif
+
+#ifdef WINDOWS
+
+#include "aklog.h" /* for struct afsconf_cell */
+
+#else /* !WINDOWS */
+
+#include <afs/param.h>
+#include <afs/cellconfig.h>
+
+#endif /* WINDOWS */
+
+#define S_AD_SZ sizeof(struct sockaddr_in)
+
+char *afs_realm_of_cell(context, cellconfig)
+ krb5_context context;
+ struct afsconf_cell *cellconfig;
+{
+ char krbhst[MAX_HSTNM];
+ static char krbrlm[REALM_SZ+1];
+ char **hrealms = 0;
+ krb5_error_code retval;
+
+ if (!cellconfig)
+ return 0;
+ if (retval = krb5_get_host_realm(context,
+ cellconfig->hostName[0], &hrealms))
+ return 0;
+ if(!hrealms[0]) return 0;
+ strcpy(krbrlm, hrealms[0]);
+
+ if (hrealms) krb5_free_host_realm(context, hrealms);
+
+ return krbrlm;
+}
--- /dev/null
+/*
+ * $Id: linked_list.c,v 1.1.2.1 2004/12/07 05:51:24 shadow Exp $
+ *
+ * This file contains general linked list routines.
+ *
+ * Copyright 1990,1991 by the Massachusetts Institute of Technology
+ * For distribution and copying rights, see the file "mit-copyright.h"
+ */
+
+#if !defined(lint) && !defined(SABER)
+static char *rcsid_list_c = "$Id: linked_list.c,v 1.1.2.1 2004/12/07 05:51:24 shadow Exp $";
+#endif /* lint || SABER */
+
+#include <stdio.h>
+#include "linked_list.h"
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+char *calloc();
+
+#ifdef __STDC__
+void ll_init(linked_list *list)
+ /*
+ * Requires:
+ * List must point to a linked list structure. It is not acceptable
+ * to pass a null pointer to this routine.
+ * Modifies:
+ * list
+ * Effects:
+ * Initializes the list to be one with no elements. If list is
+ * NULL, prints an error message and causes the program to crash.
+ */
+#else
+void ll_init(list)
+ linked_list *list;
+#endif /* __STDC__ */
+{
+ if (list == NULL) {
+ fprintf(stderr, "Error: calling ll_init with null pointer.\n");
+ abort();
+ }
+
+ /* This sets everything to zero, which is what we want. */
+#ifdef WINDOWS
+ memset(list, 0, sizeof(linked_list));
+#else
+ bzero((char *)list, sizeof(linked_list));
+#endif /* WINDOWS */
+}
+
+#ifdef __STDC__
+ll_node *ll_add_node(linked_list *list, ll_end which_end)
+ /*
+ * Modifies:
+ * list
+ * Effects:
+ * Adds a node to one end of the list (as specified by which_end)
+ * and returns a pointer to the node added. which_end is of type
+ * ll_end and should be either ll_head or ll_tail as specified in
+ * list.h. If there is not enough memory to allocate a node,
+ * the program returns NULL.
+ */
+#else
+ll_node *ll_add_node(list, which_end)
+ linked_list *list;
+ ll_end which_end;
+#endif /* __STDC__ */
+{
+ ll_node *node = NULL;
+
+ if ((node = (ll_node *)calloc(1, sizeof(ll_node))) != NULL) {
+ if (list->nelements == 0) {
+ list->first = node;
+ list->last = node;
+ list->nelements = 1;
+ }
+ else {
+ switch (which_end) {
+ case ll_head:
+ list->first->prev = node;
+ node->next = list->first;
+ list->first = node;
+ break;
+ case ll_tail:
+ list->last->next = node;
+ node->prev = list->last;
+ list->last = node;
+ break;
+ default:
+ fprintf(stderr, "%s%s",
+ "ll_add_node got a which_end parameter that ",
+ "it can't handle.\n");
+ abort();
+ }
+ list->nelements++;
+ }
+ }
+
+ return(node);
+}
+
+
+#ifdef __STDC__
+int ll_delete_node(linked_list *list, ll_node *node)
+ /*
+ * Modifies:
+ * list
+ * Effects:
+ * If node is in list, deletes node and returns LL_SUCCESS.
+ * Otherwise, returns LL_FAILURE. If node contains other data,
+ * it is the responsibility of the caller to free it. Also, since
+ * this routine frees node, after the routine is called, "node"
+ * won't point to valid data.
+ */
+#else
+int ll_delete_node(list, node)
+ linked_list *list;
+ ll_node *node;
+#endif /* __STDC__ */
+{
+ int status = LL_SUCCESS;
+ ll_node *cur_node = NULL;
+ int found = FALSE;
+
+ if (list->nelements == 0)
+ status = LL_FAILURE;
+ else {
+ for (cur_node = list->first; (cur_node != NULL) && !found;
+ cur_node = cur_node->next) {
+ if (cur_node == node) {
+
+ if (cur_node->prev)
+ cur_node->prev->next = cur_node->next;
+ else
+ list->first = cur_node->next;
+
+ if (cur_node->next)
+ cur_node->next->prev = cur_node->prev;
+ else
+ list->last = cur_node->prev;
+
+ free(cur_node);
+ list->nelements--;
+ found = TRUE;
+ }
+ }
+ }
+
+ if (!found)
+ status = LL_FAILURE;
+
+ return(status);
+}
+
+
+/* ll_add_data is a macro defined in linked_list.h */
+
+/* This routine maintains a list of strings preventing duplication. */
+#ifdef __STDC__
+int ll_string(linked_list *list, ll_s_action action, char *string)
+#else
+int ll_string(list, action, string)
+ linked_list *list;
+ ll_s_action action;
+ char *string;
+#endif /* __STDC__ */
+{
+ int status = LL_SUCCESS;
+ ll_node *cur_node;
+
+ switch(action) {
+ case ll_s_check:
+ /* Scan the list until we find the string in question */
+ for (cur_node = list->first; cur_node && (status == FALSE);
+ cur_node = cur_node->next)
+ status = (strcmp(string, cur_node->data) == 0);
+ break;
+ case ll_s_add:
+ /* Add a string to the list. */
+ if (!ll_string(list, ll_s_check, string)) {
+ if (cur_node = ll_add_node(list, ll_tail)) {
+ char *new_string;
+ if (new_string = (char *)calloc(strlen(string) + 1,
+ sizeof(char))) {
+ strcpy(new_string, string);
+ ll_add_data(cur_node, new_string);
+ }
+ else
+ status = LL_FAILURE;
+ }
+ else
+ status = LL_FAILURE;
+ }
+ break;
+ default:
+ /* This should never happen */
+ status = LL_FAILURE;
+ break;
+ }
+
+ return(status);
+}
--- /dev/null
+/*
+ * $Id: linked_list.h,v 1.1.2.1 2004/12/07 05:51:24 shadow Exp $
+ *
+ * This is the header file for a general list linked package.
+ *
+ * Copyright 1990,1991 by the Massachusetts Institute of Technology
+ * For distribution and copying rights, see the file "mit-copyright.h"
+ */
+
+#ifndef __LINKED_LIST_H__
+#define __LINKED_LIST_H__
+
+#if !defined(lint) && !defined(SABER)
+static char *rcsid_linked_list_h = "$Id: linked_list.h,v 1.1.2.1 2004/12/07 05:51:24 shadow Exp $";
+#endif /* lint || SABER */
+
+#define LL_SUCCESS 0
+#define LL_FAILURE -1
+
+typedef struct _ll_node {
+ struct _ll_node *prev;
+ struct _ll_node *next;
+ char *data;
+} ll_node;
+
+typedef struct {
+ ll_node *first;
+ ll_node *last;
+ int nelements;
+} linked_list;
+
+typedef enum {ll_head, ll_tail} ll_end;
+typedef enum {ll_s_add, ll_s_check} ll_s_action;
+
+
+/*
+ * ll_add_data just assigns the data field of node to be d.
+ * If this were c++, this would be an inline function and d
+ * would be a void *, but we'll take what we can get...
+ */
+#define ll_add_data(n,d) (((n)->data)=(char*)(d))
+
+#ifdef __STDC__
+
+void ll_init(linked_list *list);
+ll_node *ll_add_node(linked_list *list, ll_end which_end);
+int ll_delete_node(linked_list *list, ll_node *node);
+int ll_string(linked_list *, ll_s_action, char *);
+
+#else /* __STDC__ */
+
+void ll_init();
+ll_node *ll_add_node();
+int ll_delete_node();
+int ll_string();
+
+#endif /* __STDC__ */
+
+#endif /* __LINKED_LIST_H__ */
ac_cv_linux_func_inode_setattr_returns_int=no)])
AC_MSG_RESULT($ac_cv_linux_func_inode_setattr_returns_int)
CPPFLAGS="$save_CPPFLAGS"])
+
+AC_DEFUN([LINUX_WRITE_INODE_RETURN_TYPE],[
+AC_MSG_CHECKING(for write_inode return type)
+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_func_write_inode_returns_int,
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>],
+[struct inode _inode;
+struct super_operations _sops;
+int i;
+i = _sops.write_inode(&_inode, 0);],
+ac_cv_linux_func_write_inode_returns_int=yes,
+ac_cv_linux_func_write_inode_returns_int=no)])
+AC_MSG_RESULT($ac_cv_linux_func_write_inode_returns_int)
+CPPFLAGS="$save_CPPFLAGS"])
+
+AC_DEFUN([LINUX_IOP_NAMEIDATA],[
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+AC_MSG_CHECKING(whether inode_operations.create takes a nameidata)
+AC_CACHE_VAL(ac_cv_linux_func_i_create_takes_nameidata,
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>
+#include <linux/namei.h>],
+[struct inode _inode;
+struct dentry _dentry;
+struct nameidata _nameidata;
+(void)_inode.i_op->create(&_inode, &_dentry, 0, &_nameidata);],
+ac_cv_linux_func_i_create_takes_nameidata=yes,
+ac_cv_linux_func_i_create_takes_nameidata=no)])
+AC_MSG_RESULT($ac_cv_linux_func_i_create_takes_nameidata)
+if test "x$ac_cv_linux_func_i_create_takes_nameidata" = "xyes" ; then
+AC_DEFINE(IOP_CREATE_TAKES_NAMEIDATA, 1, [define if your iops.create takes a nameidata argument])
+fi
+AC_MSG_CHECKING(whether inode_operations.lookup takes a nameidata)
+AC_CACHE_VAL(ac_cv_linux_func_i_lookup_takes_nameidata,
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>
+#include <linux/namei.h>],
+[struct inode _inode;
+struct dentry _dentry;
+struct nameidata _nameidata;
+(void)_inode.i_op->lookup(&_inode, &_dentry, &_nameidata);],
+ac_cv_linux_func_i_lookup_takes_nameidata=yes,
+ac_cv_linux_func_i_lookup_takes_nameidata=no)])
+AC_MSG_RESULT($ac_cv_linux_func_i_lookup_takes_nameidata)
+if test "x$ac_cv_linux_func_i_lookup_takes_nameidata" = "xyes" ; then
+AC_DEFINE(IOP_LOOKUP_TAKES_NAMEIDATA, 1, [define if your iops.lookup takes a nameidata argument])
+fi
+AC_MSG_CHECKING(whether inode_operations.permission takes a nameidata)
+AC_CACHE_VAL(ac_cv_linux_func_i_permission_takes_nameidata,
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>
+#include <linux/namei.h>],
+[struct inode _inode;
+struct nameidata _nameidata;
+(void)_inode.i_op->permission(&_inode, 0, &_nameidata);],
+ac_cv_linux_func_i_permission_takes_nameidata=yes,
+ac_cv_linux_func_i_permission_takes_nameidata=no)])
+AC_MSG_RESULT($ac_cv_linux_func_i_permission_takes_nameidata)
+if test "x$ac_cv_linux_func_i_permission_takes_nameidata" = "xyes" ; then
+AC_DEFINE(IOP_PERMISSION_TAKES_NAMEIDATA, 1, [define if your iops.permission takes a nameidata argument])
+fi
+AC_MSG_CHECKING(whether dentry_operations.d_revalidate takes a nameidata)
+CPPFLAGS="$CPPFLAGS -Werror"
+AC_CACHE_VAL(ac_cv_linux_func_d_revalidate_takes_nameidata,
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>
+#include <linux/namei.h>],
+[struct dentry _dentry;
+struct nameidata _nameidata;
+(void)_dentry.d_op->d_revalidate(&_dentry, &_nameidata);],
+ac_cv_linux_func_d_revalidate_takes_nameidata=yes,
+ac_cv_linux_func_d_revalidate_takes_nameidata=no)])
+AC_MSG_RESULT($ac_cv_linux_func_d_revalidate_takes_nameidata)
+if test "x$ac_cv_linux_func_d_revalidate_takes_nameidata" = "xyes" ; then
+ AC_DEFINE(DOP_REVALIDATE_TAKES_NAMEIDATA, 1, [define if your dops.d_revalidate takes a nameidata argument])
+fi
+CPPFLAGS="$save_CPPFLAGS"])
+
+AC_DEFUN([LINUX_AOP_WRITEBACK_CONTROL],[
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+AC_MSG_CHECKING(whether address_space_operations.writepage takes a writeback_control)
+AC_CACHE_VAL(ac_cv_linux_func_a_writepage_takes_writeback_control,
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/writeback.h>],
+[struct address_space_operations _aops;
+struct page _page;
+struct writeback_control _writeback_control;
+(void)_aops.writepage(&_page, &_writeback_control);],
+ac_cv_linux_func_a_writepage_takes_writeback_control=yes,
+ac_cv_linux_func_a_writepage_takes_writeback_control=no)])
+AC_MSG_RESULT($ac_cv_linux_func_a_writepage_takes_writeback_control)
+if test "x$ac_cv_linux_func_a_writepage_takes_writeback_control" = "xyes" ; then
+AC_DEFINE(AOP_WRITEPAGE_TAKES_WRITEBACK_CONTROL, 1, [define if your aops.writepage takes a struct writeback_control argument])
+fi
+CPPFLAGS="$save_CPPFLAGS"])
[#include <linux/version.h>
#include <linux/config.h>
],
-[#if !defined(CONFIG_MODVERSIONS) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+[#if !defined(CONFIG_MODVERSIONS)
lose;
#endif
],
ac_cv_linux_config_modversions=no)])
AC_MSG_RESULT($ac_cv_linux_config_modversions)
AC_MSG_CHECKING(which kernel modules to build)
- if test "x$ac_linux_rhconfig" = "xyes" -o "x$ac_cv_linux_config_modversions" = "xno"; then
+ 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
MPS="MP SP"
else
AC_CACHE_VAL(ac_cv_linux_config_smp, [
AC_MSG_RESULT($ac_cv_linux_kernel_sock_create_v)
CPPFLAGS="$save_CPPFLAGS"])
+AC_DEFUN([LINUX_KERNEL_PAGE_FOLLOW_LINK],[
+AC_MSG_CHECKING(for page_follow_link_light vs page_follow_link)
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+AC_CACHE_VAL(ac_cv_linux_kernel_page_follow_link,
+[
+AC_TRY_COMPILE(
+ [#include <linux/fs.h>],
+ [
+ page_follow_link(0,0)
+ ],
+ ac_cv_linux_kernel_page_follow_link=yes,
+ ac_cv_linux_kernel_page_follow_link=no)])
+AC_MSG_RESULT($ac_cv_linux_kernel_page_follow_page)
+CPPFLAGS="$save_CPPFLAGS"])
YACC="byacc"
;;
- *nbsd20)
+ *nbsd2*)
LEX="flex -l"
MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -D_REENTRANT '
MT_LIBS="-lpthread" # XXX -pthread soon
YACC="bison -y"
;;
- ia64_linux24)
+ ia64_linux24|ia64_linux26)
KERN_OPTMZ=-O2
LEX="flex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
SHLIB_LINKER="${MT_CC} -shared"
;;
+ i386_umlinux26)
+ CC="gcc -pipe"
+ CCOBJ="gcc -pipe"
+ MT_CC="gcc -pipe"
+ KERN_OPTMZ=-O2
+ LEX="flex -l"
+ MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+ MT_LIBS="-lpthread"
+ DBG=-g
+ KERN_DBG=-g
+ LWP_DBG=-g
+ LWP_OPTMZ=-O2
+ OPTMZ=-O2
+ PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
+ SHLIB_LDFLAGS="-shared -Xlinker -x"
+ TXLIBS="-lncurses"
+ XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
+ SHLIB_LINKER="${MT_CC} -shared"
+ ;;
+
*_obsd*)
LEX="flex -l"
MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
compile_et: compile_et.o error_table.o
case $(SYS_NAME) in \
- *_linux* ) \
+ *_linux* | *_umlinux* ) \
${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil;; \
* ) \
${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil -ll;; \
#define used in WinNT/2000 installation and program version display
AFSPRODUCT_VER_MAJOR=1
AFSPRODUCT_VER_MINOR=3
-AFSPRODUCT_VER_PATCH=7400
+AFSPRODUCT_VER_PATCH=7700
AFSPRODUCT_VER_BUILD=0
# For MSI installer, each major release should have a different GUID
/* Internalname and originalfilename must be specified or explorer won't
show version and description */
BEGIN
- BLOCK "040904E4"
+ BLOCK "000004E4"
BEGIN
VALUE "CompanyName", "OpenAFS Project", "\0"
VALUE "LegalCopyright", "Copyright \251 IBM Corporation and others, 1998, 1999, 2000, 2001, 2002, 2003.", "\0"
#define PROC_SYSCALL_NAME "afs_ioctl"
#define PROC_SYSCALL_FNAME "/proc/fs/openafs/afs_ioctl"
#define PROC_SYSCALL_ARLA_FNAME "/proc/fs/nnpfs/afs_ioctl"
+#define PROC_CELLSERVDB_NAME "CellServDB"
#define VIOC_SYSCALL_TYPE 'C'
#define VIOC_SYSCALL _IOW(VIOC_SYSCALL_TYPE,1,void *)
#define SYS_NAME_ID_ia64_linux2 2200
#define SYS_NAME_ID_ia64_linux22 2201
#define SYS_NAME_ID_ia64_linux24 2202
+#define SYS_NAME_ID_ia64_linux26 2203
#define SYS_NAME_ID_m68k_linux22 2301
#define SYS_NAME_ID_m68k_linux24 2302
#define SYS_NAME_ID_sparc_nbsd20 2522
#define SYS_NAME_ID_sparc64_nbsd20 2523
#define SYS_NAME_ID_macppc_nbsd20 2524
+#define SYS_NAME_ID_i386_nbsd21 2525
#define SYS_NAME_ID_i386_obsd31 2600
#define SYS_NAME_ID_i386_obsd32 2601
#define SYS_NAME_ID_i386_umlinux2 2800
#define SYS_NAME_ID_i386_umlinux22 2801
#define SYS_NAME_ID_i386_umlinux24 2802
+#define SYS_NAME_ID_i386_umlinux26 2803
#define SYS_NAME_ID_ppc64_linux2 2900
#define SYS_NAME_ID_ppc64_linux22 2901
/* define if you have redhat buildsystem */
#undef ENABLE_REDHAT_BUILDSYS
+/* define if struct ufsvfs has vfs_dqrwlock */
+#undef HAVE_VFS_DQRWLOCK
+
+/* define if struct proc has p_corefile */
+#undef HAVE_P_COREFILE
+
+/* define if struct fs has fs_rolled */
+#undef STRUCT_FS_HAS_FS_ROLLED
+
+/* define if your iops.create takes a nameidata argument */
+#undef IOP_CREATE_TAKES_NAMEIDATA
+
+/* define if your iops.lookup takes a nameidata argument */
+#undef IOP_LOOKUP_TAKES_NAMEIDATA
+
+/* define if your iops.permission takes a nameidata argument */
+#undef IOP_PERMISSION_TAKES_NAMEIDATA
+
+/* define if your dops.d_revalidate takes a nameidata argument */
+#undef DOP_REVALIDATE_TAKES_NAMEIDATA
+
+/* define if your aops.writepage takes a struct writeback_control argument */
+#undef AOP_WRITEPAGE_TAKES_WRITEBACK_CONTROL
+
/* define if you have in_systm.h header file */
#undef HAVE_IN_SYSTM_H
/* define if your setattr return return non-void */
#undef INODE_SETATTR_NOT_VOID
+/* define if your sops.write_inode returns non-void */
+#undef WRITE_INODE_NOT_VOID
+
/* define if your struct address_space has page_lock */
#undef STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
/* define if your linux kernel uses 5 arguments for sock_create */
#undef LINUX_KERNEL_SOCK_CREATE_V
+/* define if your linux kernel provides page_follow_link */
+#undef HAVE_KERNEL_PAGE_FOLLOW_LINK
+
/* define if your linux kernel has linux/syscall.h */
#undef HAVE_KERNEL_LINUX_SYSCALL_H
/* define if your struct task_struct has sig */
#undef STRUCT_TASK_STRUCT_HAS_SIG
-/* define if struct ufsvfs has vfs_dqrwlock */
-#undef HAVE_VFS_DQRWLOCK
-
-/* define if struct proc has p_corefile */
-#undef HAVE_P_COREFILE
-
-/* define if struct fs has fs_rolled */
-#undef STRUCT_FS_HAS_FS_ROLLED
-
/* define if you have a struct buf */
#undef HAVE_STRUCT_BUF
#define AFS_AMD64_LINUX22_ENV 1
#define AFS_AMD64_LINUX24_ENV 1
#define AFS_AMD64_LINUX26_ENV 1
+#define AFS_LINUX_64BIT_KERNEL 1
#define AFS_NONFSTRANS 1
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
--- /dev/null
+#ifndef AFS_I386_PARAM_H
+#define AFS_I386_PARAM_H
+
+#define AFS_X86_XBSD_ENV 1
+#define AFS_X86_ENV 1
+#define AFSLITTLE_ENDIAN 1
+
+#define SYS_NAME "i386_nbsd21"
+#define SYS_NAME_ID SYS_NAME_ID_i386_nbsd21
+
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#endif /* !defined(UKERNEL) */
+
+#endif /* AFS_I386_PARAM_H */
+
--- /dev/null
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously i386 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define AFS_LINUX20_ENV 1
+#define AFS_LINUX22_ENV 1
+#define AFS_LINUX24_ENV 1
+#define AFS_LINUX26_ENV 1
+#define AFS_I386_LINUX20_ENV 1
+#define AFS_I386_LINUX22_ENV 1
+#define AFS_I386_LINUX24_ENV 1
+#define AFS_I386_LINUX26_ENV 1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_IOPS_ENV 1
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_ENV 1
+#define AFS_64BIT_CLIENT 1
+
+#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+#include <linux/threads.h>
+
+#include <linux/config.h>
+#ifdef CONFIG_SMP
+#ifndef AFS_SMP
+#define AFS_SMP 1
+#endif
+#endif
+/* Using "AFS_SMP" to map to however many #define's are required to get
+ * MP to compile for Linux
+ */
+#ifdef AFS_SMP
+#ifndef CONFIG_SMP
+#define CONFIG_SMP 1
+#endif
+#ifndef CONFIG_X86_LOCAL_APIC
+#define CONFIG_X86_LOCAL_APIC 1
+#endif
+#ifndef __SMP__
+#define __SMP__
+#endif
+#define AFS_GLOBAL_SUNLOCK
+#endif
+
+#endif /* __KERNEL__ && !DUMP_KERNEL */
+
+#include <afs/afs_sysnames.h>
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
+
+#define AFSLITTLE_ENDIAN 1
+#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 */
+
+#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 */
+
+#ifndef KERNEL
+#define __USE_LARGEFILE64 1
+#if !defined off64_t
+#define off64_t __off64_t
+#endif
+#endif
+
+/* Machine / Operating system information */
+#define SYS_NAME "i386_umlinux26"
+#define SYS_NAME_ID SYS_NAME_ID_i386_umlinux26
+
+#endif /* AFS_PARAM_H */
+
+
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously i386 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define UKERNEL 1 /* user space kernel */
+#define AFS_ENV 1
+#define AFS_USR_LINUX20_ENV 1
+#define AFS_USR_LINUX22_ENV 1
+#define AFS_USR_LINUX24_ENV 1
+#define AFS_USR_LINUX26_ENV 1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_IOPS_ENV 1
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+
+/* Machine / Operating system information */
+#define SYS_NAME "i386_umlinux26"
+#define SYS_NAME_ID SYS_NAME_ID_i386_umlinux26
+#define AFSLITTLE_ENDIAN 1
+#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 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
+
+#endif /* AFS_PARAM_H */
+
+#endif /* !defined(UKERNEL) */
--- /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
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously ia64 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define AFS_LINUX20_ENV 1
+#define AFS_LINUX22_ENV 1
+#define AFS_LINUX24_ENV 1
+#define AFS_LINUX26_ENV 1
+#define AFS_IA64_LINUX20_ENV 1
+#define AFS_IA64_LINUX22_ENV 1
+#define AFS_IA64_LINUX24_ENV 1
+#define AFS_IA64_LINUX26_ENV 1
+#define AFS_LINUX_64BIT_KERNEL 1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 1141
+#define AFS_64BIT_IOPS_ENV 1
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+#define AFS_64BIT_CLIENT 1
+
+#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
+
+#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/threads.h>
+
+#include <linux/config.h>
+#ifdef CONFIG_SMP
+#undef CONFIG_SMP
+#endif
+/* Using "AFS_SMP" to map to however many #define's are required to get
+ * MP to compile for Linux
+ */
+#ifdef AFS_SMP
+#define CONFIG_SMP 1
+#ifndef __SMP__
+#define __SMP__
+#endif
+#define AFS_GLOBAL_SUNLOCK
+#endif
+
+#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
+#define MODVERSIONS
+/* #include <config/modversions.h> */
+#endif
+
+#endif /* __KERNEL__ && !DUMP_KERNEL */
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 2 /* Set to Userdisabled, allow sysctl to override */
+
+/* Machine / Operating system information */
+#define SYS_NAME "ia64_linux26"
+#define SYS_NAME_ID SYS_NAME_ID_ia64_linux26
+#define AFSLITTLE_ENDIAN 1
+#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 */
+
+#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 */
+
+#define USE_UCONTEXT /* should be in afsconfig.h */
+
+#endif /* _PARAM_IA64_LINUX20_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
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously i386 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define UKERNEL 1 /* user space kernel */
+#define AFS_ENV 1
+#define AFS_USR_LINUX20_ENV 1
+#define AFS_USR_LINUX22_ENV 1
+#define AFS_USR_LINUX24_ENV 1
+#define AFS_USR_LINUX26_ENV 1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 1141
+#define AFS_64BIT_IOPS_ENV 1
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+
+/* Machine / Operating system information */
+#define SYS_NAME "ia64_linux26"
+#define SYS_NAME_ID SYS_NAME_ID_ia64_linux26
+#define AFSLITTLE_ENDIAN 1
+#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 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
+
+#define USE_UCONTEXT /* should be in afsconfig.h */
+
+#endif /* AFS_PARAM_H */
+
+#endif /* !defined(UKERNEL) */
--- /dev/null
+/* NetBSD shared section */
+
+#ifndef AFS_PARAM_COMMON_H
+#define AFS_PARAM_COMMON_H 1
+
+#define AFS_64BIT_ENV 1
+#define AFS_NAMEI_ENV 1 /* User space interface to file system */
+#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */
+#define AFS_64BIT_CLIENT 1
+
+#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
+#define AFS_SYSCALL 210
+
+#ifndef MOUNT_AFS
+#define MOUNT_AFS AFS_MOUNT_AFS
+#endif
+
+#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */
+
+#define AFS_NBSD_ENV 1
+#define AFS_NBSD15_ENV 1
+#define AFS_NBSD16_ENV 1
+#define AFS_NBSD20_ENV 1
+#define AFS_NONFSTRANS 1
+#define AFS_KERBEROS_ENV 1
+
+#define AFS_VFSINCL_ENV 1
+
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+
+#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) && !defined(IGNORE_STDS_H)
+#if __NetBSD_Version__ >= 200040000
+#define AFS_HAVE_STATVFS 1 /* System supports statvfs */
+#else
+#define AFS_HAVE_STATVFS 0 /* System doesn't supports statvfs */
+#endif
+#endif
+
+#ifndef UKERNEL
+
+#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) && !defined(IGNORE_STDS_H)
+#include <sys/param.h>
+#endif
+
+#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_GREEDY43_ENV 1
+
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef _KERNEL
+#define AFS_GLOBAL_SUNLOCK 1
+#define AFS_VFS34 1 /* What is VFS34??? */
+#define AFS_SHORTGID 1 /* 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) 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
+
+#ifndef MUTEX_DEFAULT
+#define MUTEX_DEFAULT 0
+#endif /* MUTEX_DEFAULT */
+
+#ifndef SSYS
+#define SSYS 0x00002
+#endif /* SSYS */
+
+#define p_rcred p_ucred
+
+#define VN_RELE(vp) vrele(((struct vnode *)(vp)))
+#define VN_HOLD(vp) VREF(((struct vnode *)(vp)))
+
+#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) && !defined(IGNORE_STDS_H)
+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__ && !defined(IGNORE_STDS_H) */
+#endif /* _KERNEL */
+
+#else /* !defined(UKERNEL) */
+
+
+/* This section for user space compiles only */
+
+#define UKERNEL 1 /* user space kernel */
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+#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 MCLBYTES
+#define AFS_MINCHANGE 2
+#define VATTR_NULL usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) && !defined(IGNORE_STDS_H)
+#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
+
+#endif /* !defined(UKERNEL) */
+
+#endif /* AFS_PARAM_COMMON_H */
#define AFS_SUN510_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+/*
+ * Only define on 64 bit kernel, until problems with 32 bit
+ * and large file support are resolved
+ */
+#if defined(__sparcv9)
#define AFS_64BIT_CLIENT 1
+#endif
#define AFS_HAVE_FLOCK_SYSID 1
#define AFS_SUN58_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+/*
+ * Only define on 64 bit kernel, until problems with 32 bit
+ * and large file support are resolved
+ */
+#if defined(__sparcv9)
#define AFS_64BIT_CLIENT 1
+#endif
#define AFS_HAVE_FLOCK_SYSID 1
#define AFS_SUN59_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+/*
+ * Only define on 64 bit kernel, until problems with 32 bit
+ * and large file support are resolved
+ */
+#if defined(__sparcv9)
#define AFS_64BIT_CLIENT 1
+#endif
#define AFS_HAVE_FLOCK_SYSID 1
make_s: make_s.o misc.o main.o
${CC} make_s.o misc.o main.o ${LDFLAGS} -o make_s
-crypt.o: crypt.c
+crypt.o: ${srcdir}/crypt.c
case ${SYS_NAME} in \
rs_aix*)\
- ${CCOBJ} -c ${COMMON_INCL} -o crypt.o crypt.c ;;\
+ ${CCOBJ} -c ${COMMON_INCL} -o crypt.o ${srcdir}/crypt.c ;;\
*)\
- ${CCOBJ} -c ${CFLAGS} -o crypt.o crypt.c ;;\
+ ${CCOBJ} -c ${CFLAGS} -o crypt.o ${srcdir}/crypt.c ;;\
esac
#
# Table/code generation targets
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/export/cfgexport.c,v 1.11 2003/09/03 16:47:16 rees Exp $");
+ ("$Header: /cvs/openafs/src/export/cfgexport.c,v 1.11.2.1 2004/12/07 16:48:42 shadow Exp $");
#include <errno.h>
#include <stdio.h>
FILE *fp;
int xsym_compar();
- fp = fopen(syms, "r");
+ if (syms == NULL)
+ sys_error("syms is NULL");
+ fp = fopen(syms, "r");
if (fp == NULL)
sys_error(syms);
* strp - ^ to ^ to EXPORT string table
* szp - ^ to EXPORT string table size
*/
+#define SYMBUFSIZE 262144
xlate_xtok(xp, kp, strp, szp)
register struct syment *xp;
register sym_t *kp;
static left, offset, sz;
if (!export_strings) {
- export_strings = malloc(sz = 1024);
+ export_strings = malloc(sz = SYMBUFSIZE);
if (!export_strings)
error("no memory for EXPORT string table");
*strp = export_strings;
*szp = offset = sizeof(uint);
- left = 1024 - offset;
+ left = SYMBUFSIZE - offset;
export_strings += offset;
*/
len = strlen(xstrings + xp->n_offset) + 1;
while (len >= left) {
- export_strings = (char *)realloc(*strp, sz += 1024);
+ export_strings = (char *)realloc(*strp, sz += SYMBUFSIZE);
if (!export_strings)
error("no memory for EXPORT string table");
*strp = export_strings;
- left += 1024;
+ left += SYMBUFSIZE;
prev = ""; /* lazy */
}
*/
len = strlen(xp->n_nptr) + 1;
while (len >= left) {
- export_strings = (char *)realloc(*strp, sz += 1024);
+ export_strings = (char *)realloc(*strp, sz += SYMBUFSIZE);
if (!export_strings)
error("no memory for EXPORT string table");
*strp = export_strings;
- left += 1024;
+ left += SYMBUFSIZE;
prev = ""; /* lazy */
}
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/kauth/admin_tools.c,v 1.16.2.1 2004/08/25 07:03:39 shadow Exp $");
+ ("$Header: /cvs/openafs/src/kauth/admin_tools.c,v 1.16.2.3 2004/12/13 19:38:51 shadow Exp $");
#include <afs/stds.h>
#include <afs/debug.h>
do {
tempwhen = 0;
code =
- ubik_CallIter(KAM_LockStatus, conn, UPUBIKONLY, &count, name,
- instance, &tempwhen, /*spares */ 0, 0, 0,
- 0);
+ ubik_CallIter(KAM_LockStatus, conn, UPUBIKONLY, &count, (long) name,
+ (long) instance, (long) &tempwhen, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
if (code) {
if (seriouserror(code))
com_err(whoami, code, "");
count = 0;
do {
- code = ubik_CallIter(KAM_Unlock, conn, 0, &count, name, instance,
- /*spares */ 0, 0, 0, 0);
+ code = ubik_CallIter(KAM_Unlock, conn, 0, &count, (long) name, (long) instance,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
if (code && (code != UNOSERVERS)) {
server = 0;
if (conn && conn->conns[count - 1]
#endif
RCSID
- ("$Header: /cvs/openafs/src/kauth/authclient.c,v 1.14.2.2 2004/08/25 07:09:38 shadow Exp $");
+ ("$Header: /cvs/openafs/src/kauth/authclient.c,v 1.14.2.4 2004/12/13 19:38:51 shadow Exp $");
#if defined(UKERNEL)
#include "afs/sysincludes.h"
do { /* Cycle through the servers */
lcode = code;
code =
- ubik_CallIter(aproc, aclient, aflags, &count, p1, p2, p3, p4,
- p5, p6, p7, p8);
+ ubik_CallIter(aproc, aclient, aflags, &count, (long) p1,
+ (long) p2, (long) p3, (long) p4,
+ (long) p5, (long) p6, (long) p7,
+ (long) p8, 0, 0, 0, 0, 0, 0, 0, 0);
} while ((code == UNOQUORUM) || (code == UNOTSYNC)
|| (code == KALOCKED) || (code == -1));
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/libadmin/kas/afs_kasAdmin.c,v 1.9 2003/12/07 22:49:30 jaltman Exp $");
+ ("$Header: /cvs/openafs/src/libadmin/kas/afs_kasAdmin.c,v 1.9.2.2 2004/12/13 19:39:18 shadow Exp $");
#include <stdio.h>
#undef ENCRYPT
extern int ubik_Call();
-extern int ubik_CallIter();
typedef struct {
int begin_magic;
tst =
ubik_CallIter(KAM_LockStatus, kaserver->servers, UPUBIKONLY,
&count, who->principal, who->instance, &locked, 0,
- 0, 0, 0);
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
if (tst == 0) {
if (locked) {
if ((locked < *lockedUntil) || !once) {
do {
tst =
ubik_CallIter(KAM_Unlock, kaserver.servers, 0, &count,
- who->principal, who->instance, 0, 0, 0, 0);
+ who->principal, who->instance, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0);
if (tst && (tst != UNOSERVERS)) {
if (save_tst == 0) {
save_tst = tst; /* save the first failure */
CCFLAGS = $(COMMON_KERN_CFLAGS) -mcmodel=kernel
DEFINES = $(COMMON_DEFINES)
-<i386_umlinux22 i386_umlinux24>
-CCFLAGS = $(COMMON_KERN_CFLAGS) @P5PLUS_KOPTS@ -I$(LINUX_KERNEL_PATH)/arch/um/include -I$(LINUX_KERNEL_PATH)/arch/um/kernel/tt/include -I$(LINUX_KERNEL_PATH)/arch/um/kernel/skas/include
+<i386_umlinux22 i386_umlinux24 i386_umlinux26>
+CCFLAGS = $(COMMON_KERN_CFLAGS) @P5PLUS_KOPTS@ -Wno-strict-prototypes -I$(LINUX_KERNEL_PATH)/arch/um/include -I$(LINUX_KERNEL_PATH)/arch/um/kernel/tt/include -I$(LINUX_KERNEL_PATH)/arch/um/kernel/skas/include
DEFINES = $(COMMON_DEFINES) -DCPU=586
+<i386_umlinux26>
+EXTRA_CFLAGS = -I$(LINUX_KERNEL_PATH)/arch/um/include -I$(LINUX_KERNEL_PATH)/arch/um/kernel/tt/include -I$(LINUX_KERNEL_PATH)/arch/um/kernel/skas/include
+
<alpha_linux_22 alpha_linux_24>
CCFLAGS = $(COMMON_KERN_CFLAGS) -mno-fp-regs -ffixed-8
DEFINES = $(COMMON_DEFINES)
include Makefile.common
-<linux26>
+<linux26 umlinux26>
LINUX_MODULE_EXT=ko
-<all -linux26>
+<all -linux26 -umlinux26>
LINUX_MODULE_EXT=o
<all>
ln -fs ${LINUX_KERNEL_PATH}/include/asm-i386 asm
<i386_umlinux22 i386_umlinux24 i386_umlinux26>
ln -fs ${LINUX_KERNEL_PATH}/include/asm-um asm
+ ln -fs ${LINUX_KERNEL_PATH}/arch/um/include/sysdep
<amd64_linux24 amd64_linux26>
ln -fs ${LINUX_KERNEL_PATH}/include/asm-x86_64 asm
<s390_linux22 s390_linux24 s390_linux26>
libafs.bm: $(LIBAFS_BM)
echo BM Build Complete
-<linux26>
+<linux26 umlinux26>
${LIBAFS} ${LIBAFS_MP} ${LIBAFS_EP} ${LIBAFS_BM}: libafs.ko
cp libafs.ko $@
.FORCE:
libafs.ko: .FORCE
- ../$(srcdir)/make_kbuild_makefile.pl ${KDIR} $@ \
- @TOP_OBJDIR@/src/config/Makefile.config Makefile.afs Makefile.common
- $(MAKE) -C ${LINUX_KERNEL_PATH} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules
+ env EXTRA_CFLAGS="${EXTRA_CFLAGS}" ../$(srcdir)/make_kbuild_makefile.pl ${KDIR} $@ @TOP_OBJDIR@/src/config/Makefile.config Makefile.afs Makefile.common
+ env EXTRA_CFLAGS="${EXTRA_CFLAGS}" $(MAKE) -C ${LINUX_KERNEL_PATH} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules
-<all -linux26>
+<all -linux26 -umlinux26>
${LIBAFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
$(RM) -f $@
$(LD) -r -o $@ $(AFSAOBJS) $(AFSNONFSOBJS)
pthread_glock.o \
get_krbrlm.o \
dirpath.o \
- fileutil.o \
- casestrcpy.o
+ fileutil.o
RXKADOBJS = \
rxkad_errs.o
fileutil.o: ${UTIL}/fileutil.c
${CCRULE}
-casestrcpy.o: ${UTIL}/casestrcpy.c
- ${CCRULE}
-
pthread_glock.o: ${UTIL}/pthread_glock.c
${CCRULE}
$(DESTDIR)\lib\lanahelper.lib
$(LIBFILE): $(DLLOBJS) $(DLLLIBS) $(RXOBJS)
- $(DLLCONLINK) /DEF:afsauthent.def rpcrt4.lib dnsapi.lib mpr.lib
+ $(DLLCONLINK) /DEF:afsauthent.def rpcrt4.lib dnsapi.lib mpr.lib secur32.lib
$(DLLPREP)
# Definitions for generating versioninfo resources
syscall.o
UTILOBJS =\
+ assert.o \
casestrcpy.o \
base64.o
md5.o: ${RXKAD}/md5.c
${CCRULE} ${RXKAD}/md5.c
-fcrypt.o: ${TOP_OBJDIR}/src/rxkad/domestic/fcrypt.c
- ${CCRULE} ${TOP_OBJDIR}/src/rxkad/domestic/fcrypt.c
+fcrypt.o: ${RXKAD}/domestic/fcrypt.c
+ ${CCRULE} ${RXKAD}/domestic/fcrypt.c
-crypt_conn.o: ${TOP_OBJDIR}/src/rxkad/domestic/crypt_conn.c
- ${CCRULE} ${TOP_OBJDIR}/src/rxkad/domestic/crypt_conn.c
+crypt_conn.o: ${RXKAD}/domestic/crypt_conn.c
+ ${CCRULE} ${RXKAD}/domestic/crypt_conn.c
AFS_component_version_number.o: ${TOP_OBJDIR}/src/rx/AFS_component_version_number.c
${CCRULE} ${TOP_OBJDIR}/src/rx/AFS_component_version_number.c
#
# $ what /opt/langtools/bin/pxdb32
# /opt/langtools/bin/pxdb32:
-# HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.29.2.1 $
+# HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.29.2.5 $
#
# The problem occurs when -g and -O are both used when compiling des.c.
# The simplest way to work around the problem is to leave out either -g or -O.
casestrcpy.o: ${UTIL}/casestrcpy.c
${CCRULE} ${UTIL}/casestrcpy.c
+assert.o: ${UTIL}/assert.c
+ ${CCRULE} ${UTIL}/assert.c
+
base64.o: ${UTIL}/base64.c
${CCRULE} ${UTIL}/base64.c
LIBAFSWEB = nsafs.a
LIBAFSWEBKRB = nsafs.krb.a
-OPTF=-O
+# To get __file__ (afs_osi_pag.c) you need to specify language level
+# C99 to xlc_r like this:
+OPTF=-O -qlanglvl=stdc99
WEBOPTS = -I../nsapi -qarch=com -DNETSCAPE_NSAPI -DAIX -DNET_SSL -DXP_UNIX -DMCC_HTTPD
include Makefile.common
${AS} process.ss -o process.o ; \
$(RM) -f process.S ;;\
ncrx86_* | sunx86_*) \
- /usr/ccs/lib/cpp -P -D__i386 -DIGNORE_STDS_H -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s process.ss; \
+ /usr/ccs/lib/cpp -P -D__sun -D__i386 -DIGNORE_STDS_H -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s process.ss; \
${AS} -o process.o process.ss; \
$(RM) process.ss ;; \
alpha_nbsd* ) \
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /cvs/openafs/src/lwp/lwp.c,v 1.27.2.1 2004/08/25 07:03:40 shadow Exp $");
+RCSID("$Header: /cvs/openafs/src/lwp/lwp.c,v 1.27.2.2 2004/12/13 19:40:19 shadow Exp $");
#include <stdlib.h>
#include <stdio.h>
struct QUEUE {
PROCESS head;
int count;
-} runnable[MAX_PRIORITIES], blocked, qwaiting;
+} runnable[MAX_PRIORITIES], blocked;
/* Invariant for runnable queues: The head of each queue points to the currently running process if it is in that queue, or it points to the next process in that queue that should run. */
/* Offset of stack field within pcb -- used by stack checking stuff */
{
register PROCESS tp;
(tp = lwp_cpptr)->status = QWAITING;
- move(tp, &runnable[tp->priority], &qwaiting);
+ lwp_remove(tp, &runnable[tp->priority]);
Set_LWP_RC();
return LWP_SUCCESS;
}
{
if (pid->status == QWAITING) {
pid->status = READY;
- move(pid, &qwaiting, &runnable[pid->priority]);
+ insert(pid, &runnable[pid->priority]);
return LWP_SUCCESS;
} else
return LWP_ENOWAIT;
for_all_elts(x, blocked, {
Dump_One_Process(x);}
)
- for_all_elts(x, qwaiting, {
- Dump_One_Process(x);}
- )
} else
printf("***LWP: LWP support not initialized\n");
return 0;
}
blocked.head = NULL;
blocked.count = 0;
- qwaiting.head = NULL;
- qwaiting.count = 0;
lwp_init = (struct lwp_ctl *)malloc(sizeof(struct lwp_ctl));
temp = (PROCESS) malloc(sizeof(struct lwp_pcb));
if (lwp_init == NULL || temp == NULL)
)
for_all_elts(cur, blocked, {
Free_PCB(cur);}
- )
- for_all_elts(cur, qwaiting, {
- Free_PCB(cur);}
)
free(lwp_init);
lwp_init = NULL;
lwp_remove(pid,
(pid->blockflag || pid->status == WAITING
|| pid->status ==
- DESTROYED ? &blocked :
- (pid->status == QWAITING) ? &qwaiting :
- &runnable[pid->priority]));
+ DESTROYED ? &blocked : &runnable[pid->priority]));
LWPANCHOR.processcnt--;
return 0;
}
case DESTROYED:
printf("DESTROYED");
break;
- case QWAITING:
- printf("QWAITING");
- break;
default:
printf("unknown");
}
printf(" \"%s\"", p->name);
}
)
- puts("]");
- printf("[Qwaiting (%d):", qwaiting.count);
- for_all_elts(p, qwaiting, {
- printf(" \"%s\"", p->name);
- }
- )
- puts("]");
+ puts("]");
}
#endif
#if defined(AFS_LINUX22_ENV)
#define AFS_LWP_MINSTACKSIZE (192 * 1024)
#else
+#if defined(AFS_AIX52_ENV)
+#define AFS_LWP_MINSTACKSIZE (128 * 1024)
+#else
#define AFS_LWP_MINSTACKSIZE (48 * 1024)
#endif
#endif
+#endif
/* Action to take on stack overflow. */
#define LWP_SOQUIET 1 /* do nothing */
* This file is mis-named. It is used by both a.out and elf platforms.
* It either adds the leading underscore or not as needed.
*
- * $Id: lwp_elf.h,v 1.3 2004/08/03 14:45:49 rees Exp $
+ * $Id: lwp_elf.h,v 1.3.2.2 2004/12/07 22:27:16 shadow Exp $
*/
#ifndef _C_LABEL
-#if !defined(SYSV) && !defined(__ELF__) && !defined(AFS_SUN5_ENV)
+#if defined(SYSV) || defined(__ELF__) || defined(__sun)
+#define _C_LABEL(name) name
+#else /* SYSV || __ELF__ || __sun */
#ifdef __STDC__
#define _C_LABEL(name) _##name
#else
#define _C_LABEL(name) _/**/name
#endif
-#else /* SYSV || __ELF__ || AFS_SUN5_ENV */
-#define _C_LABEL(name) name
#endif
#endif /* _C_LABEL */
#ifndef ENTRY
-#if !defined(SYSV) && !defined(__ELF__) && !defined(AFS_SUN5_ENV)
+#if defined(SYSV) || defined(__ELF__) || defined(__sun)
+#define ENTRY(name) name:
+#else
#ifdef __STDC__
#define ENTRY(name) _##name##:
#else
#define ENTRY(name) _/**/name/**/:
#endif
-#else /* SYSV || __ELF__ || AFS_SUN5_ENV */
-#define ENTRY(name) name:
#endif
#endif /* _C_LABEL */
<plist version="1.0">
<dict>
<key>CFBundleGetInfoString</key>
- <string>OpenAFS 1.3.74</string>
+ <string>OpenAFS 1.3.77</string>
<key>CFBundleIdentifier</key>
<string>org.openafs.OpenAFS.pkg</string>
<key>CFBundleName</key>
<string>OpenAFS</string>
<key>CFBundleShortVersionString</key>
- <string>1.3.74</string>
+ <string>1.3.77</string>
<key>IFMajorVersion</key>
<integer>1</integer>
<key>IFMinorVersion</key>
Title OpenAFS
-Version 1.3.74
+Version 1.3.77
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)
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/rx/LINUX/rx_knet.c,v 1.23.2.3 2004/10/18 17:43:59 shadow Exp $");
+ ("$Header: /cvs/openafs/src/rx/LINUX/rx_knet.c,v 1.23.2.4 2004/12/07 06:10:11 shadow Exp $");
#include <linux/version.h>
#ifdef AFS_LINUX22_ENV
}
TO_USER_SPACE();
- sockp->ops->setsockopt(sockp, SOL_IP, IP_MTU_DISCOVER, &pmtu, sizeof(pmtu));
+ sockp->ops->setsockopt(sockp, SOL_IP, IP_MTU_DISCOVER, (char *)&pmtu,
+ sizeof(pmtu));
TO_KERNEL_SPACE();
return (struct osi_socket *)sockp;
}
read_unlock(&tasklist_lock);
#endif
while (rxk_ListenerPid) {
- struct task_struct *p;
-
flush_signals(listener);
force_sig(SIGKILL, listener);
afs_osi_Sleep(&rxk_ListenerPid);
#endif
RCSID
- ("$Header: /cvs/openafs/src/rx/rx.c,v 1.58.2.3 2004/10/18 17:43:57 shadow Exp $");
+ ("$Header: /cvs/openafs/src/rx/rx.c,v 1.58.2.4 2004/12/07 06:10:05 shadow Exp $");
#ifdef KERNEL
#include "afs/sysincludes.h"
*/
void
rx_SetArrivalProc(register struct rx_call *call,
- register VOID(*proc) (register struct rx_call * call,
- register struct multi_handle * mh,
+ register void (*proc) (register struct rx_call * call,
+ register VOID * mh,
register int index),
- register VOID * handle, register VOID * arg)
+ register VOID * handle, register int arg)
{
call->arrivalProc = proc;
call->arrivalProcHandle = handle;
call->abortCount = 0;
}
- call->arrivalProc = (VOID(*)())0;
+ call->arrivalProc = (void (*)())0;
if (rc && call->error == 0) {
rxi_CallError(call, rc);
/* Send an abort message to the peer if this error code has
* (e.g. multi rx) */
if (call->arrivalProc) {
(*call->arrivalProc) (call, call->arrivalProcHandle,
- (int)call->arrivalProcArg);
- call->arrivalProc = (VOID(*)())0;
+ call->arrivalProcArg);
+ call->arrivalProc = (void (*)())0;
}
/* Update last packet received */
call->state = RX_STATE_DALLY;
rxi_ClearTransmitQueue(call, 0);
} else if (!queue_IsEmpty(&call->tq)) {
- rxi_Start(0, call, istack);
+ rxi_Start(0, call, 0, istack);
}
return np;
}
/* Notify anyone who is waiting for asynchronous packet arrival */
if (call->arrivalProc) {
(*call->arrivalProc) (call, call->arrivalProcHandle,
- (int)call->arrivalProcArg);
- call->arrivalProc = (VOID(*)())0;
+ call->arrivalProcArg);
+ call->arrivalProc = (void (*)())0;
}
if (call->delayedAbortEvent) {
/* Call rxi_Start, below, but with the call lock held. */
void
rxi_StartUnlocked(struct rxevent *event, register struct rx_call *call,
- int istack)
+ void *arg1, int istack)
{
MUTEX_ENTER(&call->lock);
- rxi_Start(event, call, istack);
+ rxi_Start(event, call, arg1, istack);
MUTEX_EXIT(&call->lock);
}
#endif /* RX_ENABLE_LOCKS */
* better optimized for new packets, the usual case, now that we've
* got rid of queues of send packets. XXXXXXXXXXX */
void
-rxi_Start(struct rxevent *event, register struct rx_call *call, int istack)
+rxi_Start(struct rxevent *event, register struct rx_call *call,
+ void *arg1, int istack)
{
struct rx_packet *p;
register struct rx_packet *nxp; /* Next pointer for queue_Scan */
#ifdef RX_ENABLE_LOCKS
CALL_HOLD(call, RX_CALL_REFCOUNT_RESEND);
call->resendEvent =
- rxevent_Post(&retryTime, rxi_StartUnlocked,
- (void *)call, (void *)istack);
+ rxevent_Post2(&retryTime, rxi_StartUnlocked,
+ (void *)call, 0, istack);
#else /* RX_ENABLE_LOCKS */
call->resendEvent =
- rxevent_Post(&retryTime, rxi_Start, (void *)call,
- (void *)istack);
+ rxevent_Post2(&retryTime, rxi_Start, (void *)call,
+ 0, istack);
#endif /* RX_ENABLE_LOCKS */
}
}
* security object associated with the connection */
void
rxi_ChallengeEvent(struct rxevent *event, register struct rx_connection *conn,
- void *atries)
+ void *arg1, int tries)
{
- int tries = (int)atries;
conn->challengeEvent = NULL;
if (RXS_CheckAuthentication(conn->securityObject, conn) != 0) {
register struct rx_packet *packet;
clock_GetTime(&when);
when.sec += RX_CHALLENGE_TIMEOUT;
conn->challengeEvent =
- rxevent_Post(&when, rxi_ChallengeEvent, conn,
- (void *)(tries - 1));
+ rxevent_Post2(&when, rxi_ChallengeEvent, conn, 0,
+ (tries - 1));
}
}
{
if (!conn->challengeEvent) {
RXS_CreateChallenge(conn->securityObject, conn);
- rxi_ChallengeEvent(NULL, conn, (void *)RX_CHALLENGE_MAXTRIES);
+ rxi_ChallengeEvent(NULL, conn, 0, RX_CHALLENGE_MAXTRIES);
};
}
int abortCount; /* number of times last error was sent */
u_int lastSendTime; /* Last time a packet was sent on this call */
u_int lastReceiveTime; /* Last time a packet was received for this call */
- VOID(*arrivalProc) (register struct rx_call * call, register struct multi_handle * mh, register int index); /* Procedure to call when reply is received */
+ void (*arrivalProc) (register struct rx_call * call, register VOID * mh, register int index); /* Procedure to call when reply is received */
VOID *arrivalProcHandle; /* Handle to pass to replyFunc */
- VOID *arrivalProcArg; /* Additional arg to pass to reply Proc */
+ int arrivalProcArg; /* Additional arg to pass to reply Proc */
afs_uint32 lastAcked; /* last packet "hard" acked by receiver */
afs_uint32 startWait; /* time server began waiting for input data/send quota */
struct clock traceWait; /* time server began waiting for input data/send quota */
#endif
RCSID
- ("$Header: /cvs/openafs/src/rx/rx_event.c,v 1.14.2.1 2004/08/25 07:09:41 shadow Exp $");
+ ("$Header: /cvs/openafs/src/rx/rx_event.c,v 1.14.2.2 2004/12/07 06:10:06 shadow Exp $");
#ifdef KERNEL
#ifndef UKERNEL
struct rx_connection * conn,
struct rx_call * acall), void *arg, void *arg1)
#else
-struct rxevent *
-rxevent_Post(struct clock *when, void (*func) (), void *arg, void *arg1)
+static struct rxevent *
+_rxevent_Post(struct clock *when, void (*func) (), void *arg, void *arg1,
+ int arg2, int newargs)
#endif
{
register struct rxevent *ev, *evqe, *evqpr;
if (rx_Log_event) {
struct clock now;
clock_GetTime(&now);
- fprintf(rx_Log_event, "%d.%d: rxevent_Post(%d.%d, %x, %x)\n",
+ fprintf(rx_Log_event, "%d.%d: rxevent_Post(%d.%d, %lx, %lx, %lx, %d)\n",
(int)now.sec, (int)now.usec, (int)when->sec, (int)when->usec,
- (unsigned int)func, (unsigned int)arg);
+ (unsigned long)func, (unsigned long)arg,
+ (unsigned long)arg1, arg2);
}
#endif
ev->func = func;
ev->arg = arg;
ev->arg1 = arg1;
+ ev->arg2 = arg2;
+ ev->newargs = newargs;
rxevent_nPosted += 1; /* Rather than ++, to shut high-C up
* regarding never-set variables
*/
return ev;
}
+struct rxevent *
+rxevent_Post(struct clock *when, void (*func) (), void *arg, void *arg1)
+{
+ return _rxevent_Post(when, func, arg, arg1, 0, 0);
+}
+
+struct rxevent *
+rxevent_Post2(struct clock *when, void (*func) (), void *arg, void *arg1,
+ int arg2)
+{
+ return _rxevent_Post(when, func, arg, arg1, arg2, 1);
+}
+
/* Cancel an event by moving it from the event queue to the free list.
* Warning, the event must be on the event queue! If not, this should core
* dump (reference through 0). This routine should be called using the macro
if (rx_Log_event) {
struct clock now;
clock_GetTime(&now);
- fprintf(rx_Log_event, "%d.%d: rxevent_Cancel_1(%d.%d, %x, %x)\n",
+ fprintf(rx_Log_event, "%d.%d: rxevent_Cancel_1(%d.%d, %lx, %lx)\n",
(int)now.sec, (int)now.usec, (int)ev->eventTime.sec,
- (int)ev->eventTime.usec, (unsigned int)ev->func,
- (unsigned int)ev->arg);
+ (int)ev->eventTime.usec, (unsigned long)ev->func,
+ (unsigned long)ev->arg);
}
#endif
/* Append it to the free list (rather than prepending) to keep the free
queue_Remove(ev);
rxevent_nPosted--;
MUTEX_EXIT(&rxevent_lock);
- ev->func(ev, ev->arg, ev->arg1);
+ if (ev->newargs) {
+ ev->func(ev, ev->arg, ev->arg1, ev->arg2);
+ } else {
+ ev->func(ev, ev->arg, ev->arg1);
+ }
MUTEX_ENTER(&rxevent_lock);
queue_Append(&rxevent_free, ev);
rxevent_nFree++;
void (*func) (); /* Function to call when this expires */
char *arg; /* Argument to the function */
char *arg1; /* Another argument */
+ int arg2; /* An integer argument */
+ int newargs; /* Nonzero if new-form arguments should be used */
};
/* We used to maintain a sorted list of events, but the amount of CPU
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/rx/rx_getaddr.c,v 1.15.2.2 2004/11/09 17:16:12 shadow Exp $");
+ ("$Header: /cvs/openafs/src/rx/rx_getaddr.c,v 1.15.2.3 2004/12/07 05:48:55 shadow Exp $");
#ifndef AFS_DJGPP_ENV
#ifndef KERNEL
continue; /* ignore this address */
}
+ if (a->sin_addr.s_addr == htonl(0x7f000001) )
+ continue; /* skip loopback address as well. */
+
if (count >= maxSize) { /* no more space */
printf("Too many interfaces..ignoring 0x%x\n",
a->sin_addr.s_addr);
* Its value should be as large as the maximum file descriptor limit we
* are likely to run into on any platform. Right now, that is 65536
* which is the default hard fd limit on Solaris 9 */
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(KERNEL)
#define FD_SETSIZE 65536
#endif
#endif
RCSID
- ("$Header: /cvs/openafs/src/rx/rx_globals.c,v 1.8 2004/07/19 14:39:42 jaltman Exp $");
+ ("$Header: /cvs/openafs/src/rx/rx_globals.c,v 1.8.2.1 2004/12/07 06:10:06 shadow Exp $");
/* Enable data initialization when the header file is included */
#define INIT(stuff) = stuff
#define _RX_KCOMMON_H_
#ifdef AFS_LINUX22_ENV
+#ifndef _LINUX_CODA_FS_I
#define _LINUX_CODA_FS_I 1
+#endif
#define _CODA_HEADER_ 1
struct coda_inode_info {
};
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/rx/rx_lwp.c,v 1.17 2004/07/19 14:39:42 jaltman Exp $");
+ ("$Header: /cvs/openafs/src/rx/rx_lwp.c,v 1.17.2.1 2004/12/07 06:10:06 shadow Exp $");
# include <sys/types.h> /* fd_set on older platforms */
# include <errno.h>
}
PROCESS rx_listenerPid = 0; /* LWP process id of socket listener process */
-static void rx_ListenerProc(void *dummy);
+static int rx_ListenerProc(void *dummy);
/*
* Delay the current thread the specified number of seconds.
char name[32];
sprintf(name, "srv_%d", ++number);
- LWP_CreateProcess(proc, stacksize, RX_PROCESS_PRIORITY, (void *)0,
+ LWP_CreateProcess((int (*)(void *))proc, stacksize, RX_PROCESS_PRIORITY, (void *)0,
"rx_ServerProc", &scratchPid);
if (registerProgram)
(*registerProgram) (scratchPid, name);
/* This is the listener process request loop. The listener process loop
* becomes a server thread when rxi_ListenerProc returns, and stays
* server thread until rxi_ServerProc returns. */
-static void
+static int
rx_ListenerProc(void *dummy)
{
int threadID;
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/rx/rx_multi.c,v 1.8 2003/11/11 19:03:09 rees Exp $");
+ ("$Header: /cvs/openafs/src/rx/rx_multi.c,v 1.8.2.1 2004/12/07 06:10:06 shadow Exp $");
#ifdef KERNEL
#include "afs/sysincludes.h"
for (i = 0; i < nConns; i++) {
register struct rx_call *call;
call = mh->calls[i] = rx_NewCall(conns[i]);
- rx_SetArrivalProc(call, multi_Ready, (VOID *) mh, (VOID *) i);
+ rx_SetArrivalProc(call, multi_Ready, (VOID *) mh, i);
}
return mh;
}
/* Called by Rx when the first reply packet of a call is received, or the call is aborted. */
void
-multi_Ready(register struct rx_call *call, register struct multi_handle *mh,
+multi_Ready(register struct rx_call *call, register VOID *amh,
register int index)
{
+ register struct multi_handle *mh = (struct multi_handle *)amh;
#ifdef RX_ENABLE_LOCKS
MUTEX_ENTER(&mh->lock);
#endif /* RX_ENABLE_LOCKS */
#endif
RCSID
- ("$Header: /cvs/openafs/src/rx/rx_packet.c,v 1.35.2.2 2004/10/18 17:43:58 shadow Exp $");
+ ("$Header: /cvs/openafs/src/rx/rx_packet.c,v 1.35.2.3 2004/12/07 06:10:06 shadow Exp $");
#ifdef KERNEL
#if defined(UKERNEL)
void
rxi_FreePacketNoLock(struct rx_packet *p)
{
- dpf(("Free %x\n", (int)p));
+ dpf(("Free %lx\n", (unsigned long)p));
if (p->flags & RX_PKTFLAG_FREE)
osi_Panic("rxi_FreePacketNoLock: packet already free\n");
if (!(p->flags & RX_PKTFLAG_FREE))
osi_Panic("rxi_AllocPacket: packet not free\n");
- dpf(("Alloc %x, class %d\n", (int)p, class));
+ dpf(("Alloc %lx, class %d\n", (unsigned long)p, class));
queue_Remove(p);
p->flags = 0; /* clear RX_PKTFLAG_FREE, initialize the rest */
AFS_RXGLOCK();
#ifdef RXDEBUG
}
- dpf(("%c %d %s: %x.%u.%u.%u.%u.%u.%u flags %d, packet %x 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, (int)p, p->retryTime.sec, p->retryTime.usec / 1000, p->length));
+ 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));
#endif
MUTEX_ENTER(&rx_stats_mutex);
rx_stats.packetsSent[p->header.type - 1]++;
assert(p != NULL);
- dpf(("%c %d %s: %x.%u.%u.%u.%u.%u.%u flags %d, packet %x 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, (int)p, p->retryTime.sec, p->retryTime.usec / 1000, p->length));
+ 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));
#endif
MUTEX_ENTER(&rx_stats_mutex);
/* rx.c */
extern void rx_SetEpoch(afs_uint32 epoch);
extern int rx_Init(u_int port);
+extern int rx_InitHost(u_int host, u_int port);
#ifndef KERNEL
extern void rxi_StartServerProcs(int nExistingProcs);
#endif
extern struct rx_call *rx_GetCall(int tno, struct rx_service *cur_service,
osi_socket * socketp);
extern void rx_SetArrivalProc(register struct rx_call *call,
- register VOID(*proc) (register struct rx_call *
+ register void (*proc) (register struct rx_call *
call,
- register struct
- multi_handle * mh,
+ register VOID * mh,
register int index),
- register VOID * handle, register VOID * arg);
+ register VOID * handle, register int arg);
extern afs_int32 rx_EndCall(register struct rx_call *call, afs_int32 rc);
extern void rx_Finalize(void);
extern void rxi_PacketsUnWait(void);
*optionalPacket, int serial, int reason,
int istack);
extern void rxi_StartUnlocked(struct rxevent *event,
- register struct rx_call *call, int istack);
+ register struct rx_call *call,
+ void *arg1, int istack);
extern void rxi_Start(struct rxevent *event, register struct rx_call *call,
- int istack);
+ void *arg1, int istack);
extern void rxi_Send(register struct rx_call *call,
register struct rx_packet *p, int istack);
#ifdef RX_ENABLE_LOCKS
char *dummy);
extern void rxi_ChallengeEvent(struct rxevent *event,
register struct rx_connection *conn,
- void *atries);
+ void *arg1, int atries);
extern void rxi_ChallengeOn(register struct rx_connection *conn);
extern void rxi_ComputeRoundTripTime(register struct rx_packet *p,
register struct clock *sentp,
#else
extern struct rxevent *rxevent_Post(struct clock *when, void (*func) (),
void *arg, void *arg1);
+extern struct rxevent *rxevent_Post2(struct clock *when, void (*func) (),
+ void *arg, void *arg1, int arg2);
#endif
extern void shutdown_rxevent(void);
extern struct rxepoch *rxepoch_Allocate(struct clock *when);
register int nConns);
extern int multi_Select(register struct multi_handle *mh);
extern void multi_Ready(register struct rx_call *call,
- register struct multi_handle *mh, register int index);
+ register VOID *mh, register int index);
extern void multi_Finalize(register struct multi_handle *mh);
extern void multi_Finalize_Ignore(register struct multi_handle *mh);
#endif
RCSID
- ("$Header: /cvs/openafs/src/rx/rx_rdwr.c,v 1.21.2.1 2004/10/18 07:12:06 shadow Exp $");
+ ("$Header: /cvs/openafs/src/rx/rx_rdwr.c,v 1.21.2.2 2004/12/07 06:10:06 shadow Exp $");
#ifdef KERNEL
#ifndef UKERNEL
(call->
flags & (RX_CALL_FAST_RECOVER |
RX_CALL_FAST_RECOVER_WAIT))) {
- rxi_Start(0, call, 0);
+ rxi_Start(0, call, 0, 0);
}
}
/* Wait for transmit window to open up */
}
if (!(call->flags & (RX_CALL_FAST_RECOVER | RX_CALL_FAST_RECOVER_WAIT))) {
- rxi_Start(0, call, 0);
+ rxi_Start(0, call, 0, 0);
}
/* Wait for the length of the transmit queue to fall below call->twind */
if (!
(call->
flags & (RX_CALL_FAST_RECOVER | RX_CALL_FAST_RECOVER_WAIT))) {
- rxi_Start(0, call, 0);
+ rxi_Start(0, call, 0, 0);
}
}
}
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/rx/rxdebug.c,v 1.15.2.2 2004/10/18 17:43:59 shadow Exp $");
+ ("$Header: /cvs/openafs/src/rx/rxdebug.c,v 1.15.2.3 2004/12/07 06:06:50 shadow Exp $");
#include <sys/types.h>
#include <errno.h>
int withPeers;
struct rx_debugStats tstats;
char *portName, *hostName;
+ char hoststr[20];
struct rx_debugConn tconn;
short noConns;
short showPeers;
dallyCounter = 0;
hostAddr.s_addr = host;
- printf("Trying %s (port %d):\n", inet_ntoa(hostAddr), ntohs(port));
+ afs_inet_ntoa_r(hostAddr.s_addr, hoststr);
+ printf("Trying %s (port %d):\n", hoststr, ntohs(port));
s = socket(AF_INET, SOCK_DGRAM, 0);
taddr.sin_family = AF_INET;
taddr.sin_port = 0;
}
if (onlyHost != -1) {
hostAddr.s_addr = onlyHost;
+ afs_inet_ntoa_r(hostAddr.s_addr, hoststr);
printf("Showing only connections from host %s\n",
- inet_ntoa(hostAddr));
+ hoststr);
}
if (onlyPort != -1)
printf("Showing only connections on port %u\n", ntohs(onlyPort));
/* now display the connection */
hostAddr.s_addr = tconn.host;
- printf("Connection from host %s, port %hu, ", inet_ntoa(hostAddr),
+ afs_inet_ntoa_r(hostAddr.s_addr, hoststr);
+ printf("Connection from host %s, port %hu, ", hoststr,
ntohs(tconn.port));
if (tconn.epoch)
printf("Cuid %x/%x", tconn.epoch, tconn.cid);
/* now display the peer */
hostAddr.s_addr = tpeer.host;
- printf("Peer at host %s, port %hu\n", inet_ntoa(hostAddr),
+ afs_inet_ntoa_r(hostAddr.s_addr, hoststr);
+ printf("Peer at host %s, port %hu\n", hoststr,
ntohs(tpeer.port));
printf("\tifMTU %hu\tnatMTU %hu\tmaxMTU %hu\n", tpeer.ifMTU,
tpeer.natMTU, tpeer.maxMTU);
#endif
RCSID
- ("$Header: /cvs/openafs/src/rx/xdr.c,v 1.9 2003/11/29 22:08:16 jaltman Exp $");
+ ("$Header: /cvs/openafs/src/rx/xdr.c,v 1.9.2.1 2004/12/07 06:10:06 shadow Exp $");
/*
* xdr.c, Generic XDR routines implementation.
return (TRUE);
}
-#if !defined(AFS_OSF20_ENV) && !defined(AFS_SGI61_ENV)
/*
- * XDR afs_int32 integers
- * same as xdr_u_long - open coded to save a proc call!
+ * XDR integers
*/
bool_t
xdr_int(register XDR * xdrs, int *ip)
{
+ afs_int32 l;
- if (xdrs->x_op == XDR_ENCODE)
- return (XDR_PUTINT32(xdrs, (long *)ip));
+ switch (xdrs->x_op) {
- if (xdrs->x_op == XDR_DECODE)
- return (XDR_GETINT32(xdrs, (long *)ip));
+ case XDR_ENCODE:
+ l = (afs_int32) * ip;
+ return (XDR_PUTINT32(xdrs, &l));
- if (xdrs->x_op == XDR_FREE)
+ case XDR_DECODE:
+ if (!XDR_GETINT32(xdrs, &l)) {
+ return (FALSE);
+ }
+ *ip = (int)l;
return (TRUE);
- return (FALSE);
-}
-
-/*
- * XDR unsigned afs_int32 integers
- * same as xdr_long - open coded to save a proc call!
- */
-bool_t
-xdr_u_int(register XDR * xdrs, u_int * up)
-{
-
- if (xdrs->x_op == XDR_DECODE)
- return (XDR_GETINT32(xdrs, (long *)up));
-
- if (xdrs->x_op == XDR_ENCODE)
- return (XDR_PUTINT32(xdrs, (long *)up));
-
- if (xdrs->x_op == XDR_FREE)
+ case XDR_FREE:
return (TRUE);
-
+ }
return (FALSE);
}
-#else
/*
- * XDR afs_int32 integers
- * same as xdr_u_long - open coded to save a proc call!
+ * XDR unsigned integers
*/
bool_t
-xdr_int(register XDR * xdrs, int *lp)
+xdr_u_int(register XDR * xdrs, u_int * uip)
{
+ afs_uint32 l;
- if (xdrs->x_op == XDR_ENCODE)
- return (XDR_PUTINT32(xdrs, (long *)lp));
+ switch (xdrs->x_op) {
- if (xdrs->x_op == XDR_DECODE)
- return (XDR_GETINT32(xdrs, (long *)lp));
+ case XDR_ENCODE:
+ l = (afs_uint32) * uip;
+ return (XDR_PUTINT32(xdrs, &l));
- if (xdrs->x_op == XDR_FREE)
+ case XDR_DECODE:
+ if (!XDR_GETINT32(xdrs, &l)) {
+ return (FALSE);
+ }
+ *uip = (u_int) l;
return (TRUE);
+ case XDR_FREE:
+ return (TRUE);
+ }
return (FALSE);
}
+
/*
- * XDR unsigned afs_int32 integers
- * same as xdr_long - open coded to save a proc call!
+ * XDR long integers
*/
bool_t
-xdr_u_int(register XDR * xdrs, u_int * ulp)
+xdr_long(register XDR * xdrs, long *lp)
{
+ afs_int32 l;
- if (xdrs->x_op == XDR_DECODE)
- return (XDR_GETINT32(xdrs, (long *)ulp));
+ switch (xdrs->x_op) {
- if (xdrs->x_op == XDR_ENCODE)
- return (XDR_PUTINT32(xdrs, (long *)ulp));
+ case XDR_ENCODE:
+ l = (afs_int32) * lp;
+ return (XDR_PUTINT32(xdrs, &l));
- if (xdrs->x_op == XDR_FREE)
+ case XDR_DECODE:
+ if (!XDR_GETINT32(xdrs, &l)) {
+ return (FALSE);
+ }
+ *lp = (long)l;
return (TRUE);
+ case XDR_FREE:
+ return (TRUE);
+ }
return (FALSE);
}
-#endif
/*
- * XDR afs_int32 integers
- * same as xdr_u_long - open coded to save a proc call!
+ * XDR unsigned long integers
*/
bool_t
-xdr_long(register XDR * xdrs, long *lp)
+xdr_u_long(register XDR * xdrs, u_long * ulp)
{
+ afs_uint32 l;
- if (xdrs->x_op == XDR_ENCODE)
- return (XDR_PUTINT32(xdrs, lp));
+ switch (xdrs->x_op) {
- if (xdrs->x_op == XDR_DECODE)
- return (XDR_GETINT32(xdrs, lp));
+ case XDR_ENCODE:
+ l = (afs_uint32) * ulp;
+ return (XDR_PUTINT32(xdrs, &l));
- if (xdrs->x_op == XDR_FREE)
+ case XDR_DECODE:
+ if (!XDR_GETINT32(xdrs, &l)) {
+ return (FALSE);
+ }
+ *ulp = (u_long) l;
return (TRUE);
- return (FALSE);
-}
-
-/*
- * XDR unsigned afs_int32 integers
- * same as xdr_long - open coded to save a proc call!
- */
-bool_t
-xdr_u_long(register XDR * xdrs, u_long * ulp)
-{
-
- if (xdrs->x_op == XDR_DECODE)
- return (XDR_GETINT32(xdrs, ulp));
- if (xdrs->x_op == XDR_ENCODE)
- return (XDR_PUTINT32(xdrs, ulp));
- if (xdrs->x_op == XDR_FREE)
+ case XDR_FREE:
return (TRUE);
+ }
return (FALSE);
}
+
/*
* XDR chars
*/
}
if (rndup == 0)
return (TRUE);
- return (XDR_GETBYTES(xdrs, crud, rndup));
+ return (XDR_GETBYTES(xdrs, (caddr_t)crud, rndup));
}
if (xdrs->x_op == XDR_ENCODE) {
case XDR_ENCODE:
size = strlen(sp);
break;
+ case XDR_DECODE:
+ break;
}
if (!xdr_u_int(xdrs, &size)) {
#include "afs/param.h"
RCSID
- ("$Header: /cvs/openafs/src/rx/xdr_afsuuid.c,v 1.8 2004/05/15 04:53:30 shadow Exp $");
+ ("$Header: /cvs/openafs/src/rx/xdr_afsuuid.c,v 1.8.2.1 2004/12/07 06:10:06 shadow Exp $");
#if defined(KERNEL) && !defined(UKERNEL)
#ifdef AFS_LINUX20_ENV
if (!xdr_char(xdrs, &objp->clock_seq_low)) {
return (FALSE);
}
- if (!xdr_vector(xdrs, (char *)objp->node, 6, sizeof(char), xdr_char)) {
+ /* Cast needed here because xdrproc_t officially takes 3 args :-( */
+ if (!xdr_vector(xdrs, (char *)objp->node, 6, sizeof(char), (xdrproc_t)xdr_char)) {
return (FALSE);
}
return (TRUE);
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/rx/xdr_array.c,v 1.9 2003/11/29 22:08:16 jaltman Exp $");
+ ("$Header: /cvs/openafs/src/rx/xdr_array.c,v 1.9.2.1 2004/12/07 06:10:06 shadow Exp $");
#ifndef NeXT
case XDR_FREE:
return (TRUE);
+
+ case XDR_ENCODE:
+ break;
}
/*
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/rx/xdr_arrayn.c,v 1.8 2003/07/15 23:16:12 shadow Exp $");
+ ("$Header: /cvs/openafs/src/rx/xdr_arrayn.c,v 1.8.2.1 2004/12/07 06:10:06 shadow Exp $");
#if !defined(NeXT)
case XDR_FREE:
return (TRUE);
+
+ case XDR_ENCODE:
+ break;
}
/*
#endif
RCSID
- ("$Header: /cvs/openafs/src/rx/xdr_int32.c,v 1.5 2003/07/15 23:16:12 shadow Exp $");
+ ("$Header: /cvs/openafs/src/rx/xdr_int32.c,v 1.5.2.1 2004/12/07 06:10:07 shadow Exp $");
#ifndef NeXT
{
if (xdrs->x_op == XDR_ENCODE)
- return (XDR_PUTINT32(xdrs, (long *)lp));
+ return (XDR_PUTINT32(xdrs, lp));
if (xdrs->x_op == XDR_DECODE)
- return (XDR_GETINT32(xdrs, (long *)lp));
+ return (XDR_GETINT32(xdrs, lp));
if (xdrs->x_op == XDR_FREE)
return (TRUE);
{
if (xdrs->x_op == XDR_DECODE)
- return (XDR_GETINT32(xdrs, (long *)ulp));
+ return (XDR_GETINT32(xdrs, (afs_int32 *)ulp));
if (xdrs->x_op == XDR_ENCODE)
- return (XDR_PUTINT32(xdrs, (long *)ulp));
+ return (XDR_PUTINT32(xdrs, (afs_int32 *)ulp));
if (xdrs->x_op == XDR_FREE)
return (TRUE);
return (FALSE);
#endif
RCSID
- ("$Header: /cvs/openafs/src/rx/xdr_rx.c,v 1.10 2004/05/15 04:53:30 shadow Exp $");
+ ("$Header: /cvs/openafs/src/rx/xdr_rx.c,v 1.10.2.1 2004/12/07 06:10:07 shadow Exp $");
#ifdef KERNEL
#ifndef UKERNEL
#if defined(KERNEL)
/*
* kernel version needs to agree with <rpc/xdr.h>
+ * except on Linux which does XDR differently from everyone else
*/
+# if defined(AFS_LINUX20_ENV) && !defined(UKERNEL)
+# define AFS_XDRS_T void *
+# else
+# define AFS_XDRS_T XDR *
+# endif
# if defined(AFS_SUN57_ENV)
# define AFS_RPC_INLINE_T rpc_inline_t
# elif defined(AFS_DUX40_ENV)
# define AFS_RPC_INLINE_T int
+# elif defined(AFS_LINUX20_ENV) && !defined(UKERNEL)
+# define AFS_RPC_INLINE_T afs_int32
+# elif defined(AFS_LINUX20_ENV)
+# define AFS_RPC_INLINE_T int32_t *
# else
# define AFS_RPC_INLINE_T long
# endif
/*
* user version needs to agree with "xdr.h", i.e. <rx/xdr.h>
*/
+# define AFS_XDRS_T void *
# define AFS_RPC_INLINE_T afs_int32
#endif /* KERNEL */
/* Static prototypes */
#if (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG != _MIPS_SZINT)) || defined(AFS_HPUX_64BIT_ENV)
-static bool_t xdrrx_getint64(XDR * xdrs, long *lp);
-static bool_t xdrrx_putint64(XDR * xdrs, long *lp);
+static bool_t xdrrx_getint64(AFS_XDRS_T axdrs, long *lp);
+static bool_t xdrrx_putint64(AFS_XDRS_T axdrs, long *lp);
#endif /* (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG != _MIPS_SZINT)) || defined(AFS_HPUX_64BIT_ENV) */
-static bool_t xdrrx_getint32(XDR * xdrs, afs_int32 * lp);
-static bool_t xdrrx_putint32(register XDR * xdrs, register afs_int32 * lp);
-static bool_t xdrrx_getbytes(register XDR * xdrs, register caddr_t addr,
+static bool_t xdrrx_getint32(AFS_XDRS_T axdrs, afs_int32 * lp);
+static bool_t xdrrx_putint32(AFS_XDRS_T axdrs, register afs_int32 * lp);
+static bool_t xdrrx_getbytes(AFS_XDRS_T axdrs, register caddr_t addr,
register u_int len);
-static bool_t xdrrx_putbytes(register XDR * xdrs, register caddr_t addr,
+static bool_t xdrrx_putbytes(AFS_XDRS_T axdrs, register caddr_t addr,
register u_int len);
-static AFS_RPC_INLINE_T *xdrrx_inline(register XDR * xdrs,
- register u_int len);
+static AFS_RPC_INLINE_T *xdrrx_inline(AFS_XDRS_T axdrs, register u_int len);
/*
#if (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG != _MIPS_SZINT)) || defined(AFS_HPUX_64BIT_ENV)
static bool_t
-xdrrx_getint64(XDR * xdrs, long *lp)
+xdrrx_getint64(AFS_XDRS_T axdrs, long *lp)
{
+ XDR * xdrs = (XDR *)axdrs;
register struct rx_call *call = ((struct rx_call *)(xdrs)->x_private);
afs_int32 i;
}
static bool_t
-xdrrx_putint64(XDR * xdrs, long *lp)
+xdrrx_putint64(AFS_XDRS_T axdrs, long *lp)
{
+ XDR * xdrs = (XDR *)axdrs;
afs_int32 code, i = htonl(*lp);
register struct rx_call *call = ((struct rx_call *)(xdrs)->x_private);
#endif /* (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG != _MIPS_SZINT)) || defined(AFS_HPUX_64BIT_ENV) */
static bool_t
-xdrrx_getint32(XDR * xdrs, afs_int32 * lp)
+xdrrx_getint32(AFS_XDRS_T axdrs, afs_int32 * lp)
{
afs_int32 l;
+ XDR * xdrs = (XDR *)axdrs;
register struct rx_call *call = ((struct rx_call *)(xdrs)->x_private);
#if defined(KERNEL) && defined(AFS_AIX32_ENV)
char *saddr = (char *)&l;
}
static bool_t
-xdrrx_putint32(register XDR * xdrs, register afs_int32 * lp)
+xdrrx_putint32(register AFS_XDRS_T axdrs, register afs_int32 * lp)
{
afs_int32 code, l = htonl(*lp);
+ XDR * xdrs = (XDR *)axdrs;
register struct rx_call *call = ((struct rx_call *)(xdrs)->x_private);
#if defined(KERNEL) && defined(AFS_AIX32_ENV)
char *saddr = (char *)&code;
}
static bool_t
-xdrrx_getbytes(register XDR * xdrs, register caddr_t addr, register u_int len)
+xdrrx_getbytes(register AFS_XDRS_T axdrs, register caddr_t addr, register u_int len)
{
afs_int32 code;
+ XDR * xdrs = (XDR *)axdrs;
register struct rx_call *call = ((struct rx_call *)(xdrs)->x_private);
#if defined(KERNEL) && defined(AFS_AIX32_ENV)
char *saddr = (char *)&code;
}
static bool_t
-xdrrx_putbytes(register XDR * xdrs, register caddr_t addr, register u_int len)
+xdrrx_putbytes(register AFS_XDRS_T axdrs, register caddr_t addr, register u_int len)
{
afs_int32 code;
+ XDR * xdrs = (XDR *)axdrs;
register struct rx_call *call = ((struct rx_call *)(xdrs)->x_private);
#if defined(KERNEL) && defined(AFS_AIX32_ENV)
char *saddr = (char *)&code;
#endif
static AFS_RPC_INLINE_T *
-xdrrx_inline(register XDR * xdrs, register u_int len)
+xdrrx_inline(AFS_XDRS_T axdrs, register u_int len)
{
/* I don't know what this routine is supposed to do, but the stdio module returns null, so we will, too */
return (0);
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/rxdebug/rxdebug.c,v 1.5 2003/07/15 23:16:38 shadow Exp $");
+ ("$Header: /cvs/openafs/src/rxdebug/rxdebug.c,v 1.5.2.1 2004/12/07 06:17:15 shadow Exp $");
#include <sys/types.h>
#include <errno.h>
#include <sys/socket.h>
#include <sys/file.h>
#include <netdb.h>
+#include <arpa/inet.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
md5.o: md5.c ${INCLS}
-fcrypt.o: domestic/fcrypt.c fcrypt.h sboxes.h rxkad.h rxkad_prototypes.h
- ${CCOBJ} ${CFLAGS} -c domestic/fcrypt.c
+fcrypt.o: ${srcdir}/domestic/fcrypt.c fcrypt.h sboxes.h rxkad.h rxkad_prototypes.h
+ ${CCOBJ} ${CFLAGS} -c ${srcdir}/domestic/fcrypt.c
-crypt_conn.o: domestic/crypt_conn.c fcrypt.h private_data.h ${INCLS}
- ${CCOBJ} ${CFLAGS} -c domestic/crypt_conn.c
+crypt_conn.o: ${srcdir}/domestic/crypt_conn.c fcrypt.h private_data.h ${INCLS}
+ ${CCOBJ} ${CFLAGS} -c ${srcdir}/domestic/crypt_conn.c
-tcrypt.o: domestic/tcrypt.c AFS_component_version_number.o
- ${CCOBJ} ${CFLAGS} -c domestic/fcrypt.c
+tcrypt.o: ${srcdir}/domestic/tcrypt.c AFS_component_version_number.o
+ ${CCOBJ} ${CFLAGS} -c ${srcdir}/domestic/fcrypt.c
tcrypt: tcrypt.o librxkad.a
${CC} -o tcrypt tcrypt.o librxkad.a
/* no ticket good for longer than 30 days */
#define MAXKTCTICKETLIFETIME (30*24*3600)
#define MINKTCTICKETLEN 32
+
+#if defined(AFS_AIX52_ENV)
+#ifdef __XCOFF64__
#define MAXKTCTICKETLEN 12000 /* was 344 */
+#else
+#define MAXKTCTICKETLEN 344
+#endif
+#else
+#define MAXKTCTICKETLEN 12000 /* was 344 */
+#endif
+
#define MAXKTCNAMELEN 64 /* name & inst should be 256 */
#define MAXKTCREALMLEN 64 /* should be 256 */
#define KTC_TIME_UNCERTAINTY (15*60) /* max skew bet. machines' clocks */
#define INCLUDE_RXKAD_PRIVATE_DECLS
RCSID
- ("$Header: /cvs/openafs/src/rxkad/rxkad_common.c,v 1.20.2.1 2004/08/25 07:09:42 shadow Exp $");
+ ("$Header: /cvs/openafs/src/rxkad/rxkad_common.c,v 1.20.2.2 2004/12/07 06:10:16 shadow Exp $");
#ifdef KERNEL
#ifndef UKERNEL
#endif
/* variable initialization for the benefit of darwin compiler; if it causes
problems elsewhere, conditionalize for darwin or fc_test compile breaks */
-struct rxkad_stats rxkad_stats = { 0 };
+struct rxkad_stats rxkad_stats = { { 0 } };
/* static prototypes */
static afs_int32 ComputeSum(struct rx_packet *apacket,
fc_KeySchedule *schedule;
fc_InitializationVector *ivec;
int len;
- int nlen;
+ int nlen = 0;
int word;
afs_int32 code;
afs_int32 *preSeq;
extern void rxkad_ResetState(void);
/* rxkad_common.c */
-#if 0
-/* can't prototype these due to types */
+struct rxkad_endpoint;
extern int rxkad_SetupEndpoint(struct rx_connection *aconnp,
struct rxkad_endpoint *aendpointp);
+struct rxkad_v2ChallengeResponse;
extern afs_uint32 rxkad_CksumChallengeResponse(struct
rxkad_v2ChallengeResponse
*v2r);
-#endif
extern int rxkad_DeriveXORInfo(struct rx_connection *aconnp,
fc_KeySchedule * aschedule, char *aivec,
char *aresult);
pthread_glock.o \
get_krbrlm.o \
dirpath.o \
- fileutil.o \
- casestrcpy.o
+ fileutil.o
RXKADOBJS = \
rxkad_errs.o
fileutil.o: ${UTIL}/fileutil.c
${CCRULE}
-casestrcpy.o: ${UTIL}/casestrcpy.c
- ${CCRULE}
-
pthread_glock.o: ${UTIL}/pthread_glock.c
${CCRULE}
syscall.o
UTILOBJS =\
+ assert.o \
casestrcpy.o \
base64.o
#
# $ what /opt/langtools/bin/pxdb32
# /opt/langtools/bin/pxdb32:
-# HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.15.2.1 $
+# HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.15.2.3 $
#
# The problem occurs when -g and -O are both used when compiling des.c.
# The simplest way to work around the problem is to leave out either -g or -O.
casestrcpy.o: ${UTIL}/casestrcpy.c
${CCRULE}
+assert.o: ${UTIL}/assert.c
+ ${CCRULE}
+
base64.o: ${UTIL}/base64.c
${CCRULE}
${KERNELDIR}/afs/xfsattrs.h: xfsattrs.h
${INSTALL} $? $@
+depinstall: \
+ ${TOP_INCDIR}/afs/afssyscalls.h \
+ ${TOP_INCDIR}/afs/afs.exp \
+ ${TOP_INCDIR}/afs/xfsattrs.h \
+ ${KERNELDIR}/afs/xfsattrs.h \
+ ${UKERNELDIR}/afs/afsl.exp
+
install: \
${DESTDIR}${libdir}/afs/libsys.a \
${DESTDIR}${sbindir}/rmtsysd \
$(OUT)\pioctl_nt.obj
$(LIBFILE): $(LIBOBJS) $(DESTDIR)\lib\lanahelper.lib
- $(LIBARCH) $(DESTDIR)\lib\lanahelper.lib
+ $(LIBARCH) $(DESTDIR)\lib\lanahelper.lib secur32.lib
############################################################################
# Install target; primary makefile target
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/sys/pioctl_nt.c,v 1.18.2.3 2004/11/05 19:21:58 jaltman Exp $");
+ ("$Header: /cvs/openafs/src/sys/pioctl_nt.c,v 1.18.2.5 2004/12/07 06:15:58 shadow Exp $");
#include <afs/stds.h>
#include <windows.h>
#include <string.h>
#include <winioctl.h>
#include <winsock2.h>
+#define SECURITY_WIN32
+#include <security.h>
#include <nb30.h>
#include <osi.h>
char netbiosName[MAX_NB_NAME_LENGTH];
char tbuffer[256]="";
HANDLE fh;
+ HKEY hk;
+ char szUser[128] = "";
+ char szClient[MAX_PATH] = "";
+ char szPath[MAX_PATH] = "";
+ NETRESOURCE nr;
+ DWORD res;
+ DWORD ioctlDebug = IoctlDebug();
+ DWORD gle;
+ DWORD dwSize = sizeof(szUser);
if (fileNamep) {
drivep = strchr(fileNamep, ':');
FILE_FLAG_WRITE_THROUGH, NULL);
fflush(stdout);
if (fh == INVALID_HANDLE_VALUE) {
- HKEY hk;
- char szUser[64] = "";
- char szClient[MAX_PATH] = "";
- char szPath[MAX_PATH] = "";
- NETRESOURCE nr;
- DWORD res;
- DWORD ioctlDebug = IoctlDebug();
- DWORD gle;
-
gle = GetLastError();
if (gle && ioctlDebug ) {
char buf[4096];
(va_list *) NULL
) )
{
- fprintf(stderr,"pioctl CreateFile(%s) failed: [%s]\r\n",tbuffer,buf);
+ fprintf(stderr,"pioctl CreateFile(%s) failed: 0x%8X\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);
- sprintf(szPath, "\\\\%s", szClient);
- /* We should probably be using GetUserNameEx() for this */
if (RegOpenKey (HKEY_CURRENT_USER,
- TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"), &hk) == 0)
+ TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"), &hk) == 0)
{
- DWORD dwSize = sizeof(szUser);
DWORD dwType = REG_SZ;
RegQueryValueEx (hk, TEXT("Logon User Name"), NULL, &dwType, (PBYTE)szUser, &dwSize);
RegCloseKey (hk);
}
- if ( ioctlDebug )
- fprintf(stderr, "pioctl logon user: [%s]\r\n",szUser);
-
- 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);
+
+ if ( szUser[0] ) {
+ if ( ioctlDebug )
+ fprintf(stderr, "pioctl 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);
+ }
+
+ 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);
+ }
+ goto next_attempt;
+ }
+ }
+
+ 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%8X\r\n\t[%s]\r\n",
+ tbuffer,gle,buf);
+ }
+ }
}
- return -1;
}
+ }
+
+ next_attempt:
+ if ( fh == INVALID_HANDLE_VALUE ) {
+ if (GetUserNameEx(NameSamCompatible, szUser, &dwSize)) {
+ if ( ioctlDebug )
+ fprintf(stderr, "pioctl 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);
+ }
+
+ 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);
+ }
+ return -1;
+ }
+ }
- 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: [%s]\r\n",tbuffer,buf);
+ 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%8X\r\n\t[%s]\r\n",
+ tbuffer,gle,buf);
+ }
}
+ return -1;
}
- return -1;
}
}
/*
- * $Id: dumptool.c,v 1.3 2004/02/03 05:31:52 shadow Exp $
+ * $Id: dumptool.c,v 1.3.2.1 2004/12/17 14:39:31 shadow Exp $
*
* dumptool - A tool to manage MR-AFS dump files
*
struct vnodeData {
struct VnodeDiskObject *vnode; /* A pointer to the disk vnode */
int vnodeNumber; /* The vnode number */
- long dumpdata; /* File offset of dump data (if
+ off64_t dumpdata; /* File offset of dump data (if
* available */
unsigned char *filedata; /* A pointer to the actual file
* data itself (if available) */
unsigned int magic;
struct DumpHeader dheader;
VolumeDiskData vol;
- long offset;
+ off64_t offset;
int Res, Arg1, Arg2, Arg3, i;
char *p;
struct winsize win;
* vnodes, the other to actually build the index.
*/
- offset = ftell(f);
+ offset = ftello64(f);
if (ScanVnodes(f, &vol, 1)) {
fprintf(stderr, "First vnode scan failed, aborting\n");
exit(1);
}
- fseek(f, offset, SEEK_SET);
+ fseeko64(f, offset, SEEK_SET);
if (ScanVnodes(f, &vol, 0)) {
fprintf(stderr, "Second vnode scan failed, aborting\n");
int numDirVnodes = 0;
unsigned char buf[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
- long offset, oldoffset;
+ off64_t offset, oldoffset;
struct vnodeData *vdata;
unsigned int length;
return -1;
}
vnode->length = length;
- offset = ftell(f);
- fseek(f, length, SEEK_CUR);
+ offset = ftello64(f);
+ fseeko64(f, length, SEEK_CUR);
break;
default:
if (verbose)
return -1;
}
- oldoffset = ftell(f);
- fseek(f, offset, SEEK_SET);
+ oldoffset = ftello64(f);
+ fseeko64(f, offset, SEEK_SET);
if (fread(vdata->filedata, length, 1, f) != 1) {
if (verbose)
return -1;
}
- fseek(f, oldoffset, SEEK_SET);
+ fseeko64(f, oldoffset, SEEK_SET);
} else if (vnode->type == vDirectory)
/*
* Warn the user we may not have all directory
* Parsing the directory information is a pain, but other than that
* we just use the other tools we already have in here.
*/
-
+#define CMDBUFSIZE (AFSPATHMAX * 2)
static void
InteractiveRestore(FILE * f, VolumeDiskData * vol)
{
struct vnodeData *vdatacwd; /* Vnode data for our current dir */
- char cmdbuf[256];
+ char cmdbuf[CMDBUFSIZE];
int argc;
char **argv;
numNoDirData);
printf("> ");
- while (fgets(cmdbuf, 256, stdin)) {
+ while (fgets(cmdbuf, CMDBUFSIZE, stdin)) {
cmdbuf[strlen(cmdbuf) - 1] = '\0';
{
struct vnodeData *vdata;
FILE *out;
- long cur = 0;
+ off64_t cur = 0;
int bytes, ret;
char buffer[COPYBUFSIZE];
return;
}
- if (fseek(f, vdata->dumpdata, SEEK_SET)) {
+ if (fseeko64(f, vdata->dumpdata, SEEK_SET)) {
fprintf(stderr, "Seek failed: %s\n", strerror(errno));
fclose(out);
return;
{
struct vnodeData *vdata;
FILE *out;
- long cur = 0;
+ off64_t cur = 0;
int bytes, ret;
char buffer[COPYBUFSIZE];
unsigned int vnode, uniquifier = 0;
return;
}
- if (fseek(f, vdata->dumpdata, SEEK_SET)) {
+ if (fseeko64(f, vdata->dumpdata, SEEK_SET)) {
fprintf(stderr, "Seek failed: %s\n", strerror(errno));
fclose(out);
return;
static char *largv[64];
char **la = largv;
char *s = string;
- static char argbuf[256];
+ static char argbuf[CMDBUFSIZE];
char *ap = argbuf;
*argc = 0;
extern afs_int32 ubik_ClientDestroy(struct ubik_client *aclient);
+extern afs_int32 ubik_CallIter(int (*aproc) (), struct ubik_client *aclient,
+ afs_int32 aflags, int *apos, long p1, long p2,
+ long p3, long p4, long p5, long p6, long p7,
+ long p8, long p9, long p10, long p11, long p12,
+ long p13, long p14, long p15, long p16);
+
/* ubik.c */
extern int ubik_BeginTrans(register struct ubik_dbase *dbase,
afs_int32 transMode, struct ubik_trans **transPtr);
#endif
RCSID
- ("$Header: /cvs/openafs/src/ubik/ubikclient.c,v 1.8.2.1 2004/08/25 07:09:43 shadow Exp $");
+ ("$Header: /cvs/openafs/src/ubik/ubikclient.c,v 1.8.2.2 2004/12/13 19:38:53 shadow Exp $");
#if defined(UKERNEL)
#include "afs/sysincludes.h"
#endif /* defined(UKERNEL) */
-afs_int32 ubik_CallIter();
short ubik_initializationState; /* initial state is zero */
* This is part of an iterator. It doesn't handle finding sync sites
*/
afs_int32
-ubik_CallIter(aproc, aclient, aflags, apos, p1, p2, p3, p4, p5, p6, p7, p8,
- p9, p10, p11, p12, p13, p14, p15, p16)
- int (*aproc) ();
- register struct ubik_client *aclient;
- afs_int32 aflags;
- int *apos;
- long p1;
- long p2;
- long p3;
- long p4;
- long p5;
- long p6;
- long p7;
- long p8;
- long p9;
- long p10;
- long p11;
- long p12;
- long p13;
- long p14;
- long p15;
- long p16;
+ubik_CallIter(int (*aproc) (), struct ubik_client *aclient,
+ afs_int32 aflags, int *apos, long p1, long p2,
+ long p3, long p4, long p5, long p6, long p7,
+ long p8, long p9, long p10, long p11, long p12,
+ long p13, long p14, long p15, long p16)
{
return CallIter(aproc, aclient, aflags, apos, p1, p2, p3, p4, p5, p6, p7,
p8, p9, p10, p11, p12, p13, p14, p15, p16, NEED_LOCK);
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/util/afs_lhash.c,v 1.9 2003/07/15 23:17:15 shadow Exp $");
+ ("$Header: /cvs/openafs/src/util/afs_lhash.c,v 1.9.2.1 2004/12/17 15:29:31 shadow Exp $");
#include "afs_atomlist.h"
#include "afs_lhash.h"
size_t old_address; /* index of bucket to split */
size_t new_address; /* index of new bucket */
- struct bucket *current; /* for scanning down old chain */
+ struct bucket *current_b; /* for scanning down old chain */
struct bucket *previous;
struct bucket *last_of_new; /* last element in new chain */
/* relocate records to the new bucket */
- current = lh->table[old_address];
+ current_b = lh->table[old_address];
previous = 0;
last_of_new = 0;
lh->table[new_address] = 0;
- while (current) {
+ while (current_b) {
size_t addr;
- addr = afs_lhash_address(lh, current->key);
+ addr = afs_lhash_address(lh, current_b->key);
if (addr == new_address) {
/* attach it to the end of the new chain */
if (last_of_new) {
- last_of_new->next = current;
+ last_of_new->next = current_b;
} else {
- lh->table[new_address] = current;
+ lh->table[new_address] = current_b;
}
if (previous) {
- previous->next = current->next;
+ previous->next = current_b->next;
} else {
- lh->table[old_address] = current->next;
+ lh->table[old_address] = current_b->next;
}
- last_of_new = current;
- current = current->next;
+ last_of_new = current_b;
+ current_b = current_b->next;
last_of_new->next = 0;
} else {
#ifdef CHECK_INVARIANTS
assert(addr == old_address);
#endif /* CHECK_INVARIANTS */
/* leave it on the old chain */
- previous = current;
- current = current->next;
+ previous = current_b;
+ current_b = current_b->next;
}
}
}
#endif /* CHECK_INVARIANTS */
for (i = 0; i < lh->ltable; i++) {
- struct bucket *current;
+ struct bucket *current_b;
- for (current = lh->table[i]; current; current = current->next) {
- f(i, current->key, current->data);
+ for (current_b = lh->table[i]; current_b; current_b = current_b->next) {
+ f(i, current_b->key, current_b->data);
}
}
}
{
size_t k;
struct bucket *previous;
- struct bucket *current;
+ struct bucket *current_b;
lh->search_calls++;
k = afs_lhash_address(lh, key);
- for (previous = 0, current = lh->table[k]; current;
- previous = current, current = current->next) {
+ for (previous = 0, current_b = lh->table[k]; current_b;
+ previous = current_b, current_b = current_b->next) {
lh->search_tests++;
- if (lh->equal(data, current->data)) {
+ if (lh->equal(data, current_b->data)) {
/*
* Since we found what we were looking for, move
*/
if (previous) {
- previous->next = current->next;
- current->next = lh->table[k];
- lh->table[k] = current;
+ previous->next = current_b->next;
+ current_b->next = lh->table[k];
+ lh->table[k] = current_b;
}
- return current->data;
+ return current_b->data;
}
}
afs_lhash_rosearch(const afs_lhash * lh, unsigned key, const void *data)
{
size_t k;
- struct bucket *current;
+ struct bucket *current_b;
k = afs_lhash_address(lh, key);
- for (current = lh->table[k]; current; current = current->next) {
- if (lh->equal(data, current->data)) {
- return current->data;
+ for (current_b = lh->table[k]; current_b; current_b = current_b->next) {
+ if (lh->equal(data, current_b->data)) {
+ return current_b->data;
}
}
${INSTALL} -s kdump-alpha_linux-${LINUX_VERSION} $@ ;; \
*linux* ) \
${INSTALLex} -f ${srcdir}/kdump.sh.linux ${DEST}/etc/kdump; \
- ${INSTALL} -s kdump-linux-${LINUX_VERSION} $@ ;; \
+ ${INSTALL} -s kdump-linux-${LINUX_VERSION} $@-${LINUX_VERSION} ;; \
hp_ux11* ) \
${INSTALLex} -f ${srcdir}/kdump.sh.hp_ux11 ${DEST}/etc/kdump; \
${INSTALL} -s -f $? $@;; \
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/venus/kdump.c,v 1.33 2004/07/13 05:49:54 shadow Exp $");
+ ("$Header: /cvs/openafs/src/venus/kdump.c,v 1.33.2.1 2004/12/17 15:31:26 shadow Exp $");
#include <stdio.h>
#include <errno.h>
#else
#include "sys/vfs.h"
#ifdef AFS_LINUX20_ENV
+#ifndef UIO_MAXIOV
#define UIO_MAXIOV 1 /* don't care */
+#endif
#if __GLIBC_MINOR__ == 0
#include <iovec.h>
#endif
#undef ULONG_MAX
#define _LINUX_TIME_H
#define _LINUX_FCNTL_H
+#ifdef AFS_IA64_LINUX24_ENV
+#define flock64 flock
+#endif /* AFS_IA64_LINUX24_ENV */
#ifdef AFS_S390_LINUX20_ENV
#define _S390_STATFS_H
#else
#define timer_t ktimer_t
#define timer_t_redefined
#endif
+#ifdef AFS_LINUX26_ENV
+/* For some reason, this doesn't get defined in linux/types.h
+ if __KERNEL_STRICT_NAMES is defined. But the definition of
+ struct inode uses it.
+*/
+#ifndef HAVE_SECTOR_T
+/* got it from linux/types.h */
+typedef unsigned long sector_t;
+#endif /* HAVE_SECTOR_T */
+#endif /* AFS_LINUX26_ENV */
#include <linux/version.h>
#include <linux/fs.h>
#include <osi_vfs.h>
#define MAXNAMELEN 64
typedef struct symlist {
char s_name[MAXNAMELEN];
+#ifdef AFS_LINUX_64BIT_KERNEL
+ unsigned long s_value;
+#else
int s_value;
+#endif /* AFS_LINUX_64BIT_KERNEL */
} symlist_t;
#define KSYM_ALLOC_STEP 128
exit(1);
}
}
+#ifdef AFS_LINUX_64BIT_KERNEL
+ ksyms[nksyms].s_value = (unsigned long)strtoul(line, &p, 16);
+#else
ksyms[nksyms].s_value = (int)strtoul(line, &p, 16);
+#endif /* AFS_LINUX_64BIT_KERNEL */
p++;
#ifdef AFS_LINUX26_ENV
/* Linux 2.6 /proc/kallsyms has a one-char symbol type
/* find_symbol returns 0 if not found, otherwise value for symbol */
+#ifdef AFS_LINUX_64BIT_KERNEL
+unsigned long
+#else
int
+#endif /* AFS_LINUX_64BIT_KERNEL */
find_symbol(char *name)
{
symlist_t *tmp;
findsym("afs_linux_memlist", &symoff);
kread(kmem, symoff, (char *)&memp, sizeof memp);
if (memp) {
+#ifdef AFS_LINUX_64BIT_KERNEL
+ kread(kmem, (unsigned long)memp, (char *)&next, sizeof next);
+#else
kread(kmem, (int)memp, (char *)&next, sizeof next);
+#endif /* AFS_LINUX_64BIT_KERNEL */
} else {
memset(&next, 0, sizeof next);
}
clone.o nuke.o devname.o listinodes.o common.o ihandle.o \
namei_ops.o fstab.o
-OBJECTS=${VLIBOBJS} physio.o vol-salvage.o vol-info.o vol-dump.o
+OBJECTS=${VLIBOBJS} physio.o vol-salvage.o vol-info.o vol-dump.o vol-bless.o
all: gi \
${TOP_LIBDIR}/vlib.a \
${CC} ${CFLAGS} -o volinfo vol-info.o physio.o \
ihandle.o fstab.o ${LIBS} ${XLIBS}
+vol-bless: vol-bless.o physio.o ihandle.o ${LIBS}
+ ${CC} ${CFLAGS} -o vol-bless vol-bless.o physio.o ${LIBS} ${XLIBS}
+
fs_conv_dux40D: fs_conv_411.o
${CC} ${CFLAGS} ${TOP_LIBDIR}/libcmd.a -o fs_conv_dux40D fs_conv_411.o ${LIBS} ${XLIBS}
vnode.c volume.c vutil.c partition.c fssync.c purge.c \
clone.c nuke.c devname.c listinodes.c common.c ihandle.c \
namei_ops.c \
- physio.c vol-salvage.c vol-info.c
+ physio.c vol-salvage.c vol-info.c vol-bless.c
$(EXECONLINK)
$(EXEPREP)
+############################################################################
+# build volinfo
+VOLBLESS = $(DESTDIR)\root.server\usr\afs\bin\vol-bless.exe
+
+$(VOLBLESS): $(OUT)\vol-bless.obj $(OUT)\physio.obj $(OUT)\vol-bless.res $(EXEC_LIBS)
+ $(EXECONLINK)
+ $(EXEPREP)
+
############################################################################
# generate versioninfo resources
$(OUT)\salvager.res: salvager.rc AFS_component_version_number.h
--- /dev/null
+/*
+ * Copyright 2004, 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
+ */
+
+#include <afsconfig.h>
+#include <afs/param.h>
+
+RCSID
+ ("$Header: /cvs/openafs/src/vol/vol-bless.c,v 1.1.2.1 2004/12/07 06:06:17 shadow Exp $");
+
+#include <stdio.h>
+
+#include <afs/cmd.h>
+
+#include <rx/xdr.h>
+#include <afs/afsint.h>
+#include "nfs.h"
+#include "lock.h"
+#include "ihandle.h"
+#include "vnode.h"
+#include "volume.h"
+
+int VolumeChanged; /* to keep physio happy */
+
+static int
+handleit(struct cmd_syndesc *as, char *arock)
+{
+ Volume *vp;
+ Error ec;
+ int bless, unbless, nofssync;
+ int volumeId;
+
+ volumeId = atoi(as->parms[0].items->data);
+ bless = !!(as->parms[1].items);
+ unbless = !!(as->parms[2].items);
+ nofssync = !!(as->parms[3].items);
+
+ if (bless && unbless) {
+ fprintf(stderr,"Cannot use both -bless and -unbless\n");
+ exit(1);
+ }
+
+ if (VInitVolumePackage(nofssync ? salvager : volumeUtility, 5, 5, 1, 0)) {
+ fprintf(stderr,"Unable to initialize volume package\n");
+ exit(1);
+ }
+
+ vp = VAttachVolume(&ec, volumeId, V_VOLUPD);
+ if (ec) {
+ fprintf(stderr,"VAttachVolume failed: %d\n", ec);
+ exit(1);
+ }
+ if (bless) V_blessed(vp) = 1;
+ if (unbless) V_blessed(vp) = 0;
+ VUpdateVolume(&ec, vp);
+ if (ec) {
+ fprintf(stderr,"VUpdateVolume failed: %d\n", ec);
+ VPutVolume(vp);
+ exit(1);
+ }
+ VPutVolume(vp);
+ return 0;
+}
+
+int
+main(int argc, char **argv)
+{
+ register struct cmd_syndesc *ts;
+ afs_int32 code;
+
+ ts = cmd_CreateSyntax(NULL, handleit, 0, "Manipulate volume blessed bit");
+ cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_REQUIRED, "Volume id");
+ cmd_AddParm(ts, "-bless", CMD_FLAG, CMD_OPTIONAL, "Set blessed bit");
+ cmd_AddParm(ts, "-unbless", CMD_FLAG, CMD_OPTIONAL, "Clear blessed bit");
+ cmd_AddParm(ts, "-nofssync", CMD_FLAG, CMD_OPTIONAL,
+ "Don't communicate with running fileserver");
+ code = cmd_Dispatch(argc, argv);
+ return code;
+}
+
+
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/vol/volume.c,v 1.35.2.1 2004/08/25 07:14:19 shadow Exp $");
+ ("$Header: /cvs/openafs/src/vol/volume.c,v 1.35.2.2 2004/12/13 19:41:10 shadow Exp $");
#include <rx/xdr.h>
#include <afs/afsint.h>
}
DiskToVolumeHeader(&iheader, &diskHeader);
- if (programType == volumeUtility && mode != V_SECRETLY) {
+ if (programType == volumeUtility && mode != V_SECRETLY && mode != V_PEEK) {
if (FSYNC_askfs(iheader.id, partition, FSYNC_NEEDVOLUME, mode)
== FSYNC_DENIED) {
Log("VAttachVolume: attach of volume %u apparently denied by file server\n", iheader.id);
* takes the volume offline or not. If the volume isn't
* offline, we must not return it when we detach the volume,
* or the server will abort */
- if (mode == V_READONLY
+ if (mode == V_READONLY || mode == V_PEEK
|| (!VolumeWriteable(vp) && (mode == V_CLONE || mode == V_DUMP)))
vp->needsPutBack = 0;
else
* for all of that to happen, but if it does, probably the right
* fix is for the server to allow the return of readonly volumes
* that it doesn't think are really checked out. */
- if (programType == volumeUtility && vp == NULL && mode != V_SECRETLY) {
+ if (programType == volumeUtility && vp == NULL &&
+ mode != V_SECRETLY && mode != V_PEEK) {
FSYNC_askfs(iheader.id, partition, FSYNC_ON, 0);
} else if (programType == fileServer && vp) {
V_needsCallback(vp) = 0;
* never knows about more than one copy of the same volume--when
* a volume is moved from one partition to another on a single
* server */
+#define V_PEEK 6 /* "Peek" at the volume without telling the fileserver. This is
+ * similar to V_SECRETLY, but read-only. It is used in cases where
+ * not impacting fileserver performance is more important than
+ * getting the most recent data. */
+
#if defined(NEARINODE_HINT)
#define V_pref(vp,nearInode) nearInodeHash(V_id(vp),(nearInode)); (nearInode) %= V_partition(vp)->f_files
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/volser/volprocs.c,v 1.34.2.2 2004/11/09 17:13:45 shadow Exp $");
+ ("$Header: /cvs/openafs/src/volser/volprocs.c,v 1.34.2.3 2004/12/13 19:41:13 shadow Exp $");
#include <stdio.h>
#include <sys/types.h>
pntr->volid = volid;
goto drop;
}
- tv = VAttachVolumeByName(&error, pname, volname, V_READONLY);
+ tv = VAttachVolumeByName(&error, pname, volname, V_PEEK);
if (error) {
pntr->status = 0; /*things are messed up */
strcpy(pntr->name, volname);
/*
* Attach the volume, give up on the volume if we can't.
*/
- tv = VAttachVolumeByName(&error, pname, volname, V_READONLY);
+ tv = VAttachVolumeByName(&error, pname, volname, V_PEEK);
if (error) {
xInfoP->status = 0; /*things are messed up */
strcpy(xInfoP->name, volname);
pntr->volid = volid;
goto drop;
}
- tv = VAttachVolumeByName(&error, pname, volname, V_READONLY);
+ tv = VAttachVolumeByName(&error, pname, volname, V_PEEK);
if (error) {
pntr->status = 0; /*things are messed up */
strcpy(pntr->name, volname);
/*
* Attach the volume, give up on this volume if we can't.
*/
- tv = VAttachVolumeByName(&error, pname, volname, V_READONLY);
+ tv = VAttachVolumeByName(&error, pname, volname, V_PEEK);
if (error) {
xInfoP->status = 0; /*things are messed up */
strcpy(xInfoP->name, volname);
#include <afs/param.h>
RCSID
- ("$Header: /cvs/openafs/src/volser/vsutils.c,v 1.16.2.1 2004/10/18 07:12:29 shadow Exp $");
+ ("$Header: /cvs/openafs/src/volser/vsutils.c,v 1.16.2.2 2004/12/07 16:37:09 shadow Exp $");
#include <afs/stds.h>
#ifdef AFS_NT40_ENV
afs_int32 *errp;
char *astring;
{
- afs_uint32 tc, value;
-
- char *str, *ptr, volname[VOLSER_OLDMAXVOLNAME + 1];
- int tryname, curval;
+ afs_uint32 value;
+ char volname[VOLSER_OLDMAXVOLNAME + 1];
struct nvldbentry entry;
afs_int32 vcode = 0;
int total;
*errp = 0;
- total = strlen(astring);
- str = astring;
- ptr = astring;
- tryname = 0;
- while ((curval = *str++)) {
- if (curval < '0' || curval > '9')
- tryname = 1;
- }
- if (tryname) {
- vsu_ExtractName(volname, astring);
- vcode = VLDB_GetEntryByName(volname, &entry);
- if (!vcode) {
- if (!strcmp(&astring[total - 9], ".readonly"))
- return entry.volumeId[ROVOL];
- else if ((!strcmp(&astring[total - 7], ".backup")))
- return entry.volumeId[BACKVOL];
- else
- return (entry.volumeId[RWVOL]);
- } else {
- *errp = vcode;
- return 0; /* can't find volume */
- }
+ if (isdigit(astring[0])) {
+ char *end;
+ afs_uint32 result;
+ result = strtoul(astring, &end, 10);
+ if (result != ULONG_MAX && *end == '\0')
+ return result;
}
- value = 0;
- while ((tc = *astring++)) {
- if (tc & 0x80) {
- if (!tryname)
- fprintf(STDERR, "goofed in volid \n");
- else {
- fprintf(STDERR, "Could not get entry from vldb for %s\n",
- ptr);
- PrintError("", vcode);
- }
- *errp = EINVAL;
- return 0;
- }
- if (tc < '0' || tc > '9') {
- if (!tryname)
- fprintf(STDERR,
- "internal error: out of range char in vol ID\n");
- else {
- fprintf(STDERR, "Could not get entry from vldb for %s\n",
- ptr);
- PrintError("", vcode);
- }
- *errp = ERANGE;
- return 0;
- }
- value *= 10;
- value += (tc - '0');
+ /* It was not a volume number but something else */
+ total = strlen(astring);
+ vsu_ExtractName(volname, astring);
+ vcode = VLDB_GetEntryByName(volname, &entry);
+ if (!vcode) {
+ if (!strcmp(&astring[total - 9], ".readonly"))
+ return entry.volumeId[ROVOL];
+ else if ((!strcmp(&astring[total - 7], ".backup")))
+ return entry.volumeId[BACKVOL];
+ else
+ return (entry.volumeId[RWVOL]);
}
- return value;
+ *errp = vcode;
+ return 0; /* can't find volume */
}