]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
* Switch to quilt for managing patches to the upstream source.
authorRuss Allbery <rra@debian.org>
Mon, 20 Aug 2007 05:25:23 +0000 (05:25 +0000)
committerRuss Allbery <rra@debian.org>
Mon, 20 Aug 2007 05:25:23 +0000 (05:25 +0000)
68 files changed:
Makefile.in
acinclude.m4
debian/changelog
debian/patches/README [deleted file]
debian/patches/amd64-syscall-probe [new file with mode: 0644]
debian/patches/bos-permissions
debian/patches/compiler-flags [new file with mode: 0644]
debian/patches/des-alignment [new file with mode: 0644]
debian/patches/dfsg [new file with mode: 0644]
debian/patches/fstrace-paths [new file with mode: 0644]
debian/patches/glibc-ucontext [deleted file]
debian/patches/hpux-smp [deleted file]
debian/patches/ka-forwarder [new file with mode: 0644]
debian/patches/kbuild-assembly [new file with mode: 0644]
debian/patches/linux-2.6.22 [new file with mode: 0644]
debian/patches/linux-2.6.22.1-proc [new file with mode: 0644]
debian/patches/module-name
debian/patches/null-uuid-client [new file with mode: 0644]
debian/patches/null-uuid-server [new file with mode: 0644]
debian/patches/os-config [deleted file]
debian/patches/pag-cleanup-lock [new file with mode: 0644]
debian/patches/pam [deleted file]
debian/patches/pam-build [new file with mode: 0644]
debian/patches/paravirt-workaround
debian/patches/paths [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]
debian/patches/ucontext-everywhere [new file with mode: 0644]
doc/man-pages/pod8/ka-forwarder.pod [deleted file]
src/afs/LINUX/osi_groups.c
src/afs/LINUX/osi_machdep.h
src/afs/LINUX/osi_misc.c
src/afs/LINUX/osi_probe.c
src/afs/LINUX/osi_sleep.c
src/afs/LINUX/osi_sysctl.c
src/afs/LINUX/osi_vfsops.c
src/afs/LINUX/osi_vnodeops.c
src/afs/Makefile.in
src/afs/afs_call.c
src/aklog/Makefile.in
src/aklog/ka-forwarder.c [deleted file]
src/bozo/bosoprocs.c
src/cf/linux-test4.m4
src/cf/osconf.m4
src/config/linux-version
src/config/param.alpha_linux_26.h
src/config/param.ia64_linux24.h
src/config/param.ia64_linux26.h
src/config/param.parisc_linux24.h
src/config/param.ppc64_linux26.h
src/config/param.ppc_linux26.h
src/config/param.s390_linux26.h
src/config/param.s390x_linux26.h
src/config/param.sparc64_linux26.h
src/config/param.sparc_linux24.h
src/des/des.h
src/des/pcbc_encrypt.c
src/libafs/MakefileProto.LINUX.in
src/libafs/make_kbuild_makefile.pl
src/lwp/process.c
src/pam/Makefile.in
src/ptserver/pt_util.c
src/rx/LINUX/rx_kmutex.c
src/rx/LINUX/rx_knet.c
src/rx/SUNOS/rx_knet.c
src/tviced/Makefile.in
src/util/Makefile.in
src/venus/fstrace.c
src/viced/host.c

index e94284d18e51374f0c6748f66fb9b7a321d9f538..7f2f42c42c9e588066c86a989af78ecb66e72f43 100644 (file)
@@ -515,6 +515,8 @@ libafsauthent: ubik auth kauth libafsrpc
 # pthread based user space RX library
 shlibafsrpc: rx rxkad des
        case ${SYS_NAME} in \
+       amd64_linux24) \
+               echo Skipping shlibafsrpc for amd64_linux24 ;; \
        alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
        ${COMPILE_PART1} shlibafsrpc ${COMPILE_PART2} ;; \
        *) \
@@ -523,6 +525,8 @@ shlibafsrpc: rx rxkad des
 
 shlibafsauthent: ubik auth kauth shlibafsrpc
        case ${SYS_NAME} in \
+       amd64_linux24) \
+               echo Skipping shlibafsauthent for amd64_linux24 ;; \
        alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
        ${COMPILE_PART1} shlibafsauthent ${COMPILE_PART2} ;; \
        *) \
index d7ee559da182d99b11cae1a0b727a01fab1a7d87..8209ee634965b17fa94daa86a50d20ab6254f383 100644 (file)
@@ -611,7 +611,6 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 LINUX_FS_STRUCT_FOP_HAS_FLOCK
                 LINUX_KERNEL_LINUX_SYSCALL_H
                 LINUX_KERNEL_LINUX_SEQ_FILE_H
-                LINUX_KERNEL_POSIX_LOCK_FILE_WAIT_ARG
                 LINUX_KERNEL_SELINUX
                 LINUX_KERNEL_SOCK_CREATE
                 LINUX_KERNEL_PAGE_FOLLOW_LINK
@@ -627,7 +626,6 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_EXIT_STATE
                 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_TGID
                 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_TODO
-                LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_THREAD_INFO
                 LINUX_EXPORTS_TASKLIST_LOCK
                 LINUX_GET_SB_HAS_STRUCT_VFSMOUNT
                 LINUX_STATFS_TAKES_DENTRY
@@ -769,9 +767,6 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 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_posix_lock_file_wait_arg" = "xyes" ; then
-                 AC_DEFINE(POSIX_LOCK_FILE_WAIT_ARG, 1, [define if your linux kernel uses 3 arguments for posix_lock_file])
-                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
@@ -817,9 +812,6 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 if test "x$ac_cv_linux_sched_struct_task_struct_has_todo" = "xyes"; then 
                  AC_DEFINE(STRUCT_TASK_STRUCT_HAS_TODO, 1, [define if your struct task_struct has todo])
                 fi
-                if test "x$ac_cv_linux_sched_struct_task_struct_has_thread_info" = "xyes"; then 
-                 AC_DEFINE(STRUCT_TASK_STRUCT_HAS_THREAD_INFO, 1, [define if your struct task_struct has thread_info])
-                fi
                 if test "x$ac_cv_linux_get_sb_has_struct_vfsmount" = "xyes"; then
                  AC_DEFINE(GET_SB_HAS_STRUCT_VFSMOUNT, 1, [define if your get_sb_nodev needs a struct vfsmount argument])
                 fi
index 0ce09616e1e4243c4169d80f7f3433ca49b70728..304ee3ae2d691d8ec1ef81396610dd22a5474a40 100644 (file)
@@ -1,5 +1,6 @@
 openafs (1.4.4.dfsg1-7) unstable; urgency=low
 
+  * Switch to quilt for managing patches to the upstream source.
   * Restructure the source for the module package.  The build files for
     the module build are now in debian/module in the source package and
     there is a completely separate rules file.  This way, the module build
diff --git a/debian/patches/README b/debian/patches/README
deleted file mode 100644 (file)
index d337dfa..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-This directory contains patches relative to the upstream OpenAFS source.
-It is not used automatically as part of the build process and is not
-guaranteed to be completely up-to-date; it is intended as documentation of
-significant divergences, a place to store patches that should be sent
-upstream, and a place to document the current status of patches.
-
-Simple Debian-specific changes that aren't of interest to upstream will
-not be included here, such as updating config.{guess,sub} or changing
-paths to fit with the FHS.
diff --git a/debian/patches/amd64-syscall-probe b/debian/patches/amd64-syscall-probe
new file mode 100644 (file)
index 0000000..e658dc2
--- /dev/null
@@ -0,0 +1,111 @@
+Patch the syscall probing to check for readability as well as writability,
+fixing problems with the latest AMD64 kernel.  Pulled from upstream
+stable branch, will be in 1.4.5.
+
+--- openafs.orig/src/afs/LINUX/osi_probe.c
++++ openafs/src/afs/LINUX/osi_probe.c
+@@ -59,6 +59,7 @@
+ #include "afsincludes.h"
+ #endif
+ #include <linux/version.h>
++#include <linux/sched.h>
+ #ifdef CONFIG_H_EXISTS
+ #include <linux/config.h>
+ #endif
+@@ -153,6 +154,7 @@
+  * 0x0010 - detail - check_harder
+  * 0x0020 - detail - check_harder/zapped
+  * 0x0040 - automatically ignore setgroups and afs_syscall
++ * 0x0080 - detail - check_table_readable
+  */
+ static int probe_debug = 0x41;
+ #ifdef module_param
+@@ -298,6 +300,10 @@
+     int debug_ignore_NR[4];         /* syscalls to ignore for debugging */
+ } probectl;
++#if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
++static int check_access(unsigned long, int);
++static int check_table_readable(probectl *, PROBETYPE *);
++#endif
+ /********** Probing Configuration: sys_call_table **********/
+@@ -940,6 +946,11 @@
+     PROBETYPE *x;
+     int i, j;
++#if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
++    i = check_table_readable(P, ptr);
++    if (i >= 0) return i;
++#endif
++
+     for (x = ptr, i = 0; i < _SS(NR_syscalls); i++, x++) {
+ #ifdef OSI_PROBE_DEBUG
+       if (probe_debug & 0x0040) {
+@@ -1062,6 +1073,11 @@
+     unsigned long ip1;
+     int i, s;
++#if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
++    i = check_table_readable(P, p);
++    if (i >= 0) return 0;
++#endif
++
+     /* Check zapped syscalls */
+     for (i = 1; i < P->n_zapped_syscalls; i++) {
+       if (p[_SS(P->zapped_syscalls[i])] != p[_SS(P->zapped_syscalls[0])]) {
+@@ -1349,7 +1365,7 @@
+ }
+ #if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
+-static int check_writable(unsigned long address) 
++static int check_access(unsigned long address, int mode)
+ { 
+     pgd_t *pgd = pgd_offset_k(address);
+ #ifdef PUD_SIZE
+@@ -1374,10 +1390,34 @@
+       pte = (pte_t *)pmd;
+     else
+       pte = pte_offset_kernel(pmd, address);
+-    if (pte_none(*pte) || !pte_present(*pte) || !pte_write(*pte))
++    if (pte_none(*pte) || !pte_present(*pte))
++      return 0;
++    if (mode && !pte_write(*pte))
+       return 0;
+     return 1;
+ }
++
++static int check_table_readable(probectl *P, PROBETYPE *ptr)
++{
++    PROBETYPE *next_page;
++    int i = 0, delta;
++
++    while (i < _SS(NR_syscalls)) {
++      next_page = (PROBETYPE *)PAGE_ALIGN((unsigned long)(ptr+1));
++      delta = next_page - ptr;
++      if (!check_access((unsigned long)ptr, 0)) {
++#ifdef OSI_PROBE_DEBUG
++          if (probe_debug & 0x0080)
++              printk("<7>osi_probe: %s                      0x%016lx not readable; delta=0x%lx\n",
++                     P->symbol, (unsigned long)ptr, delta);
++#endif
++          return delta - 1;
++      }
++      ptr += delta;
++      i += delta;
++    }
++    return -1;
++}
+ #endif
+ void *osi_find_syscall_table(int which)
+@@ -1405,7 +1445,7 @@
+     }
+     printk("Found %s at 0x%lx (%s)\n", P->desc, (unsigned long)answer, method);
+ #if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
+-    if (!check_writable((unsigned long)answer)) {
++    if (!check_access((unsigned long)answer, 1)) {
+       printk("Address 0x%lx is not writable.\n", (unsigned long)answer);
+       printk("System call hooks will not be installed; proceeding anyway\n");
+       return 0;
index d26193c5951753d6c9caced324ae056af55fdb50..cae2297fe7d12e8ced926d99b9ce448e7f228634 100644 (file)
@@ -1,11 +1,12 @@
-Allow a broader range of permissions on /etc/openafs/server and
-/etc/openafs/server-local because we use different permissions than
-upstream.  The /etc/openafs/server-local change would probably be
-acceptable upstream.  The /etc/openafs/server change isn't, since upstream
-supports having bos create /usr/vice/etc as links to the ETC_DIRPATH.
+Expect the server directory to be mode 0700 since that's where the AFS
+KeyFile is stored.  Allow the local directory to be mode 0755, since
+there's no reason for it to be more restrictive.  Allowing the server
+directory to be mode 0700 causes problems upstream if people symlink the
+client configuration to the server directory, which is recommended by
+some documentation.
 
---- openafs-1.3.87.orig/src/bozo/bosoprocs.c
-+++ openafs-1.3.87/src/bozo/bosoprocs.c
+--- openafs.orig/src/bozo/bosoprocs.c
++++ openafs/src/bozo/bosoprocs.c
 @@ -1324,12 +1324,12 @@
  
  struct bozo_bosEntryStats bozo_bosEntryStats[] = {
diff --git a/debian/patches/compiler-flags b/debian/patches/compiler-flags
new file mode 100644 (file)
index 0000000..28ee1d8
--- /dev/null
@@ -0,0 +1,213 @@
+Use $CC for the compiler instead of forcing cc or gcc and add -fPIC in
+a few more places.  The latter should be committed upstream.  The former
+is waiting for upstream work to separate the kernel compiler from the
+userspace compiler, since $CC should only be used for the latter on other
+platforms.
+
+Also combines the sparc sysnames together, which is suitable upstream.
+
+--- openafs.orig/src/cf/osconf.m4
++++ openafs/src/cf/osconf.m4
+@@ -4,9 +4,8 @@
+ dnl defaults, override in case below as needed
+ XCFLAGS='${DBG} ${OPTMZ}'
+ SHLIB_SUFFIX="so"
+-CC="cc"
+-CCOBJ="cc"
+-MT_CC="cc"
++CCOBJ=$CC
++MT_CC=$CC
+ XLIBS="${LIB_AFSDB}"
+ dnl debugging and optimization flag defaults
+@@ -244,6 +243,7 @@
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
++              SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               TXLIBS="-lncurses"
+               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE -G0"
+@@ -271,6 +271,7 @@
+               MT_LIBS="-lpthread"
+               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
++              SHLIB_CFLAGS="-fPIC"
+               TXLIBS="/usr/lib64/libncurses.so"
+               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
+               SHLIB_LINKER="${MT_CC} -shared"
+@@ -291,14 +292,14 @@
+               ;;
+       i386_umlinux22)
+-              CC="gcc -pipe"
+-              CCOBJ="gcc -pipe"
+-              MT_CC="gcc -pipe"
++              CCOBJ="${CC} -pipe"
++              MT_CC="${CC} -pipe"
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
++              SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               TXLIBS="-lncurses"
+               XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
+@@ -307,9 +308,8 @@
+               ;;
+       i386_linux*)
+-              CC="gcc -pipe"
+-              CCOBJ="gcc -pipe"
+-              MT_CC="gcc -pipe"
++              CCOBJ="${CC} -pipe"
++              MT_CC="${CC} -pipe"
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+@@ -320,6 +320,7 @@
+               LWP_OPTMZ=-O2
+               OPTMZ=-O2
+               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
++              SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               TXLIBS="-lncurses"
+               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
+@@ -327,9 +328,8 @@
+               ;;
+       i386_umlinux24)
+-              CC="gcc -pipe"
+-              CCOBJ="gcc -pipe"
+-              MT_CC="gcc -pipe"
++              CCOBJ="${CC} -pipe"
++              MT_CC="${CC} -pipe"
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+@@ -340,6 +340,7 @@
+               LWP_OPTMZ=-O2
+               OPTMZ=-O2
+               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
++              SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               TXLIBS="-lncurses"
+               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
+@@ -347,9 +348,8 @@
+               ;;
+       i386_umlinux26)
+-              CC="gcc -pipe"
+-              CCOBJ="gcc -pipe"
+-              MT_CC="gcc -pipe"
++              CCOBJ="${CC} -pipe"
++              MT_CC="${CC} -pipe"
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+@@ -360,6 +360,7 @@
+               LWP_OPTMZ=-O2
+               OPTMZ=-O2
+               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
++              SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               TXLIBS="-lncurses"
+               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
+@@ -385,6 +386,7 @@
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
++              SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               TXLIBS="-lncurses"
+               XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
+@@ -555,8 +557,7 @@
+               ;;
+       s390_linux22)
+-              CC="gcc"
+-              CCOBJ="gcc"
++              CCOBJ="$CC"
+               LD="ld"
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+@@ -564,6 +565,7 @@
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
++              SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               TXLIBS="-lncurses"
+               XCFLAGS="-O -g -D_LARGEFILE64_SOURCE"
+@@ -572,8 +574,7 @@
+               ;;
+       s390_linux24|s390_linux26)
+-              CC="gcc"
+-              CCOBJ="gcc"
++              CCOBJ="$CC"
+               LD="ld"
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+@@ -581,6 +582,7 @@
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
++              SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               TXLIBS="-lncurses"
+               XCFLAGS="-O -g -D_LARGEFILE64_SOURCE"
+@@ -589,8 +591,7 @@
+               ;;
+       s390x_linux24|s390x_linux26)
+-              CC="gcc"
+-              CCOBJ="gcc -fPIC"
++              CCOBJ="$CC"
+               LD="ld"
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+@@ -598,6 +599,7 @@
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
++              SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x -Xlinker -Bsymbolic"
+               TXLIBS="-lncurses"
+               XCFLAGS="-O -g -D_LARGEFILE64_SOURCE -D__s390x__"
+@@ -667,12 +669,13 @@
+               SHLIB_LINKER="${CC} -shared"
+               ;;
+-      sparc64_linux*)
++      sparc*_linux*)
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
++              SHLIB_CFLAGS="-fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               TXLIBS="-lncurses"
+               XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
+@@ -682,19 +685,6 @@
+               SHLIB_LINKER="${MT_CC} -shared"
+               ;;
+-      sparc_linux22)
+-              KERN_OPTMZ=-O2
+-              LEX="flex -l"
+-              MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+-              MT_LIBS="-lpthread"
+-              PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
+-              SHLIB_LDFLAGS="-shared -Xlinker -x"
+-              TXLIBS="-lncurses"
+-              XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
+-              YACC="bison -y"
+-              SHLIB_LINKER="${MT_CC} -shared"
+-              ;;
+-
+       sun4_413)
+               CCXPG2="/usr/xpg2bin/cc"
+               CC="gcc"
diff --git a/debian/patches/des-alignment b/debian/patches/des-alignment
new file mode 100644 (file)
index 0000000..758969d
--- /dev/null
@@ -0,0 +1,30 @@
+Fix the DES library alignment, which was otherwise causing problems on
+SPARC Linux.  Pulled from the upstream stable branch, will be in 1.4.5.
+
+--- openafs.orig/src/des/des.h
++++ openafs/src/des/des.h
+@@ -20,7 +20,10 @@
+ typedef unsigned char des_cblock[8];  /* crypto-block size */
+ /* Key schedule */
+ typedef struct des_ks_struct {
+-    des_cblock _;
++    union {
++        afs_uint32 i[2];
++        des_cblock _;
++    } _;
+ } des_key_schedule[16];
+ #define DES_KEY_SZ    (sizeof(des_cblock))
+--- openafs.orig/src/des/pcbc_encrypt.c
++++ openafs/src/des/pcbc_encrypt.c
+@@ -24,9 +24,9 @@
+ #ifndef KERNEL
+ #include <stdio.h>
+ #endif
+-#include <des.h>
+ #include <afsconfig.h>
+ #include <afs/param.h>
++#include <des.h>
+ #include "des_prototypes.h"
+ RCSID
diff --git a/debian/patches/dfsg b/debian/patches/dfsg
new file mode 100644 (file)
index 0000000..51a63ba
--- /dev/null
@@ -0,0 +1,62 @@
+Patch upstream Makefiles to remove references to files that had to be
+removed from the source package for DFSG freeness reasons.  Not suitable
+upstream for obvious reasons.
+
+--- openafs.orig/src/afs/Makefile.in
++++ openafs/src/afs/Makefile.in
+@@ -13,7 +13,7 @@
+ all: depinstall
+ depinstall: ${TOP_INCDIR}/afs/afs.h ${TOP_INCDIR}/afs/osi_inode.h ${TOP_INCDIR}/afs/afs_stats.h \
+-      ${TOP_INCDIR}/afs/exporter.h ${TOP_INCDIR}/afs/nfsclient.h afszcm.cat AFS_component_version_number.c ${TOP_INCDIR}/afs/unified_afs.h ${TOP_INCDIR}/afs/sysctl.h
++      ${TOP_INCDIR}/afs/exporter.h ${TOP_INCDIR}/afs/nfsclient.h afszcm.cat AFS_component_version_number.c ${TOP_INCDIR}/afs/unified_afs.h
+       case ${SYS_NAME} in \
+               pmax_ul43 | pmax_ul43a) \
+                       ${INSTALL} longc_procs.h ${TOP_INCDIR}/afs ;; \
+@@ -43,7 +43,7 @@
+                       gencat afszcm.cat afs_trace.msf ;; \
+       esac
+-install:   ${DESTDIR}${includedir}/afs/afs.h  ${DESTDIR}${includedir}/afs/osi_inode.h ${DESTDIR}${includedir}/afs/afs_stats.h ${DESTDIR}${includedir}/afs/exporter.h ${DESTDIR}${includedir}/afs/nfsclient.h ${DESTDIR}${includedir}/afs/unified_afs.h ${DESTDIR}${includedir}/afs/sysctl.h
++install:   ${DESTDIR}${includedir}/afs/afs.h  ${DESTDIR}${includedir}/afs/osi_inode.h ${DESTDIR}${includedir}/afs/afs_stats.h ${DESTDIR}${includedir}/afs/exporter.h ${DESTDIR}${includedir}/afs/nfsclient.h ${DESTDIR}${includedir}/afs/unified_afs.h
+       case ${SYS_NAME} in \
+               pmax_ul43 | pmax_ul43a) \
+                       ${INSTALL} longc_procs.h ${DESTDIR}${includedir}/afs ;; \
+@@ -131,7 +131,7 @@
+       ${INSTALL} $? $@
+-dest:   ${DEST}/include/afs/afs.h ${DEST}/include/afs/osi_inode.h ${DEST}/include/afs/afs_stats.h ${DEST}/include/afs/exporter.h ${DEST}/include/afs/nfsclient.h ${DEST}/include/afs/unified_afs.h ${DEST}/include/afs/sysctl.h
++dest:   ${DEST}/include/afs/afs.h ${DEST}/include/afs/osi_inode.h ${DEST}/include/afs/afs_stats.h ${DEST}/include/afs/exporter.h ${DEST}/include/afs/nfsclient.h ${DEST}/include/afs/unified_afs.h
+       case ${SYS_NAME} in \
+               pmax_ul43 | pmax_ul43a) \
+                       ${INSTALL} longc_procs.h ${DEST}/include/afs ;; \
+--- openafs.orig/src/tviced/Makefile.in
++++ openafs/src/tviced/Makefile.in
+@@ -38,8 +38,7 @@
+ DIROBJS=buffer.o dir.o salvage.o
+ VOLOBJS= vnode.o volume.o vutil.o partition.o fssync.o purge.o \
+-       clone.o devname.o common.o ihandle.o listinodes.o namei_ops.o \
+-       fstab.o
++       clone.o devname.o common.o ihandle.o listinodes.o namei_ops.o
+ FSINTOBJS= afsaux.o afscbint.cs.o afsint.ss.o afsint.xdr.o
+--- openafs.orig/src/util/Makefile.in
++++ openafs/src/util/Makefile.in
+@@ -12,7 +12,7 @@
+ objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \
+        hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \
+-       dirpath.o fileutil.o netutils.o flipbase64.o fstab.o \
++       dirpath.o fileutil.o netutils.o flipbase64.o \
+        afs_atomlist.o afs_lhash.o snprintf.o strlcat.o strlcpy.o \
+        daemon.o rxkstats.o ${REGEX_OBJ}
+@@ -392,4 +392,4 @@
+           assert.c base64.c casestrcpy.c ktime.c volparse.c hostparse.c \
+           hputil.c kreltime.c isathing.c get_krbrlm.c uuid.c serverLog.c \
+           dirpath.c fileutil.c netutils.c flipbase64.c \
+-          afs_atomlist.c afs_lhash.c snprintf.c fstab.c
++          afs_atomlist.c afs_lhash.c snprintf.c
diff --git a/debian/patches/fstrace-paths b/debian/patches/fstrace-paths
new file mode 100644 (file)
index 0000000..bdc45ba
--- /dev/null
@@ -0,0 +1,27 @@
+fstrace uses the NLS functions to do message translation and needs a
+message catalog installed.  The default paths are rather broken.  Patch
+the source to look for it in /usr/share/openafs instead.  Not suitable
+upstream with the hard-coded paths, but something more sophisticated
+would be appropriate.
+
+--- openafs.orig/src/venus/fstrace.c
++++ openafs/src/venus/fstrace.c
+@@ -1471,7 +1471,7 @@
+  */
+ #ifndef RPC_NLS_FORMAT
+-#define RPC_NLS_FORMAT "%s.cat"
++#define RPC_NLS_FORMAT "/usr/share/openafs/%s.cat"
+ #endif
+ dce1_error_inq_text(status_to_convert, error_text, status)
+@@ -1488,7 +1488,8 @@
+     char component_name[4];
+     char *facility_name;
+     char filename_prefix[7];
+-    char nls_filename[11];
++    /* strlen("/usr/share/openafs/") + 6 + strlen(".cat") + 1 */
++    char nls_filename[19 + 6 + 4 + 1];
+     char alt_filename[80];
+     char *message;
+ #if defined(AFS_64BITPOINTER_ENV)
diff --git a/debian/patches/glibc-ucontext b/debian/patches/glibc-ucontext
deleted file mode 100644 (file)
index 8967b12..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-=== src/config/param.alpha_linux_26.h
-==================================================================
---- src/config/param.alpha_linux_26.h  (revision 2485)
-+++ src/config/param.alpha_linux_26.h  (local)
-@@ -81,6 +81,11 @@
- #define SYS_NAME_ID    SYS_NAME_ID_alpha_linux_26
-+#ifdef __GLIBC__
-+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-+#define USE_UCONTEXT
-+#endif
-+#endif
- #endif /* AFS_PARAM_H */
-                                    
- #else /* !defined(UKERNEL) */
-=== src/config/param.ia64_linux26.h
-==================================================================
---- src/config/param.ia64_linux26.h    (revision 2485)
-+++ src/config/param.ia64_linux26.h    (local)
-@@ -97,6 +97,11 @@
- #endif /* KERNEL */
-+#ifdef __GLIBC__
-+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-+#define USE_UCONTEXT
-+#endif
-+#endif
- #endif /* _PARAM_IA64_LINUX20_H_ */
- #else /* !defined(UKERNEL) */
-=== src/config/param.parisc_linux24.h
-==================================================================
---- src/config/param.parisc_linux24.h  (revision 2485)
-+++ src/config/param.parisc_linux24.h  (local)
-@@ -70,6 +70,11 @@
- #endif
- #endif /* KERNEL */
-+#ifdef __GLIBC__
-+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-+#define USE_UCONTEXT
-+#endif
-+#endif
- #endif /* AFS_PARAM_H */
- #else /* !defined(UKERNEL) */
-=== src/config/param.ppc64_linux26.h
-==================================================================
---- src/config/param.ppc64_linux26.h   (revision 2485)
-+++ src/config/param.ppc64_linux26.h   (local)
-@@ -76,6 +76,11 @@
- #endif
- #endif /* KERNEL */
-+#ifdef __GLIBC__
-+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-+#define USE_UCONTEXT
-+#endif
-+#endif
- #endif /* _PARAM_PPC64_LINUX20_H_ */
- #else /* !defined(UKERNEL) */
-=== src/config/param.ppc_linux26.h
-==================================================================
---- src/config/param.ppc_linux26.h     (revision 2485)
-+++ src/config/param.ppc_linux26.h     (local)
-@@ -74,6 +74,11 @@
- #endif
- #endif /* KERNEL */
-+#ifdef __GLIBC__
-+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-+#define USE_UCONTEXT
-+#endif
-+#endif
- #endif /* AFS_PARAM_H */
- #else /* !defined(UKERNEL) */
-=== src/config/param.s390_linux26.h
-==================================================================
---- src/config/param.s390_linux26.h    (revision 2485)
-+++ src/config/param.s390_linux26.h    (local)
-@@ -86,6 +86,11 @@
- #endif
- #endif /* KERNEL */
-+#ifdef __GLIBC__
-+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-+#define USE_UCONTEXT
-+#endif
-+#endif
- #endif /* AFS_PARAM_H */
- #else /* !defined(UKERNEL) */
-=== src/config/param.s390x_linux26.h
-==================================================================
---- src/config/param.s390x_linux26.h   (revision 2485)
-+++ src/config/param.s390x_linux26.h   (local)
-@@ -89,6 +89,11 @@
- #endif
- #endif /* KERNEL */
-+#ifdef __GLIBC__
-+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-+#define USE_UCONTEXT
-+#endif
-+#endif
- #endif /* AFS_PARAM_H */
- #else /* !defined(UKERNEL) */
-=== src/config/param.sparc64_linux26.h
-==================================================================
---- src/config/param.sparc64_linux26.h (revision 2485)
-+++ src/config/param.sparc64_linux26.h (local)
-@@ -95,6 +95,11 @@
- #endif
- #endif
-+#ifdef __GLIBC__
-+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-+#define USE_UCONTEXT
-+#endif
-+#endif
- #endif /* _PARAM_SPARC64_LINUX26_H_ */
- #else /* !defined(UKERNEL) */
-=== src/config/param.sparc_linux24.h
-==================================================================
---- src/config/param.sparc_linux24.h   (revision 2485)
-+++ src/config/param.sparc_linux24.h   (local)
-@@ -98,6 +98,11 @@
- #endif
- #endif
-+#ifdef __GLIBC__
-+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-+#define USE_UCONTEXT
-+#endif
-+#endif
- #endif /* AFS_PARAM_H */
- #else /* !defined(UKERNEL) */
diff --git a/debian/patches/hpux-smp b/debian/patches/hpux-smp
deleted file mode 100644 (file)
index 2565cd3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-A hack for 2.4 HPPA.  I don't completely understand what this does or why
-it helps (and whether it's still needed).
-
---- openafs-1.3.87.orig/src/lwp/process.c
-+++ openafs-1.3.87/src/lwp/process.c
-@@ -101,7 +101,9 @@
- #elif defined(AFS_HPUX_ENV)
- #define       LWP_SP  1
- #elif defined(AFS_LINUX20_ENV)
--#if defined(AFS_PPC_LINUX20_ENV) || defined(AFS_PPC64_LINUX20_ENV)
-+#if defined(AFS_PARISC_LINUX24_ENV )
-+#define       LWP_SP  1
-+#elif defined(AFS_PPC_LINUX20_ENV)|| defined(AFS_PPC64_LINUX20_ENV)
- #define LWP_SP 0
- #elif   defined(AFS_I386_LINUX20_ENV)
- #define LWP_SP 4
diff --git a/debian/patches/ka-forwarder b/debian/patches/ka-forwarder
new file mode 100644 (file)
index 0000000..d9d5bee
--- /dev/null
@@ -0,0 +1,436 @@
+Add the ka-forwarder program, needed for some migration scenarios from
+the AFS kaserver.  Pulled from upstream, will be in 1.4.5.
+
+--- openafs.orig/src/aklog/Makefile.in
++++ openafs/src/aklog/Makefile.in
+@@ -16,7 +16,7 @@
+ SRCS= aklog.c aklog_main.c  krb_util.c linked_list.c
+ OBJS=   aklog.o aklog_main.o krb_util.o linked_list.o
+-all: aklog asetkey
++all: aklog asetkey ka-forwarder
+ aklog:        ${OBJS} ${AFSLIBS}
+       ${CC} -o $@ ${CFLAGS} ${OBJS} ${AKLIBS} ${AFSLIBS} ${XLIBS}
+@@ -24,11 +24,16 @@
+ asetkey: asetkey.o ${AFSLIBS}
+       ${CC} -o $@ ${CFLAGS} asetkey.o ${AKLIBS} ${AFSLIBS} ${XLIBS}
++ka-forwarder: ka-forwarder.o
++      ${CC} -o $@ ${CFLAGS} ka-forwarder.o ${LIBS} ${XLIBS}
++
+ #
+ # Installation targets
+ #
+ install: \
+-      ${DESTDIR}${bindir}/aklog ${DESTDIR}${afssrvbindir}/asetkey
++      ${DESTDIR}${bindir}/aklog \
++      ${DESTDIR}${afssrvbindir}/asetkey \
++      ${DESTDIR}${afssrvbindir}/ka-forwarder
+ ${DESTDIR}${bindir}/aklog: aklog
+       ${INSTALL} $? $@
+@@ -36,8 +41,13 @@
+ ${DESTDIR}${afssrvbindir}/asetkey: asetkey
+       ${INSTALL} $? $@
++${DESTDIR}${afssrvbindir}/ka-forwarder: ka-forwarder
++      ${INSTALL} $? $@
++
+ dest: \
+-      ${DEST}/bin/aklog ${DEST}/root.server/usr/afs/bin/asetkey
++      ${DEST}/bin/aklog \
++      ${DEST}/root.server/usr/afs/bin/asetkey \
++      ${DEST}/root.server/usr/afs/bin/ka-forwarder
+ ${DEST}/bin/aklog: aklog
+       ${INSTALL} $? $@
+@@ -45,11 +55,14 @@
+ ${DEST}/root.server/usr/afs/bin/asetkey: asetkey
+       ${INSTALL} $? $@
++${DEST}/root.server/usr/afs/bin/ka-forwarder: ka-forwarder
++      ${INSTALL} $? $@
++
+ #
+ # Misc. targets
+ #
+ clean:
+-      $(RM) -f *.o ${OBJS} aklog asetkey
++      $(RM) -f *.o ${OBJS} aklog asetkey ka-forwarder
+ include ../config/Makefile.version
+--- /dev/null
++++ openafs/src/aklog/ka-forwarder.c
+@@ -0,0 +1,282 @@
++/*
++ * COPYRIGHT NOTICE
++ * Copyright (c) 1994 Carnegie Mellon University
++ * All Rights Reserved.
++ *
++ * See <cmu_copyright.h> for use and distribution information.
++ */
++
++/*
++ * HISTORY
++ * $Log: ka-forwarder.c,v $
++ * Revision 1.1  1997/06/03 18:23:54  kenh
++ * .
++ *
++ * Revision 1.4  1996/08/09  01:00:21  jhutz
++ *    When initializing the array of fakeka servers, remember to set
++ *    the address family of each server; otherwise SunOS complains.
++ *    [1996/08/09  00:58:46  jhutz]
++ *
++ * Revision 1.3  1996/08/09  00:17:19  jhutz
++ *    Merged in changes from Chuck Silvers:
++ *    - Support for more than one fakeka server
++ *    - Support for specifying ports for each fakeka server separately from the
++ *      others, and from the port we listen on.
++ *
++ *    Plus a minor bug fix to Chuck's code.
++ *    Basically, this version is designed to provide both reliability and
++ *    load-balancing cheaply.  Basically, we forward packets to all of the
++ *    fakeka servers in round-robin fashion.  So, if a client is losing on
++ *    one server, its retry should go to a different one, if more than one
++ *    is specified.
++ *    [1996/08/03  02:13:36  jhutz]
++ *
++ * Revision 1.2  1995/02/23  18:26:36  chs
++ *    Created.
++ *    [1995/02/23  18:26:03  chs]
++ *
++ * $EndLog$
++ */
++
++/*
++ * This program is intended to run on afs DB servers.
++ * Its function is to forward KA requests to a fakeka server
++ * running on an MIT kerberos server.
++ */
++
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <sys/ioctl.h>
++#include <netinet/in.h>
++#include <arpa/inet.h>
++#include <stdio.h>
++#include <netdb.h>
++#include <ctype.h>
++#include <stdlib.h>
++#include <string.h>
++#include <syslog.h>
++#include <unistd.h>
++
++#if   HAVE_GETOPT_H
++#include <getopt.h>
++#else
++int getopt (int, char * const *, const char *);
++int optind, opterr;
++char *optarg;
++#endif
++
++#define BUFFER_SIZE 2048
++
++
++char *prog;
++
++int num_servers, cur_server;
++struct sockaddr_in *servers;
++
++
++void
++perrorexit(str)
++char *str;
++{
++    perror(str);
++    exit(1);
++}
++
++
++void
++setup_servers(argc, argv)
++int argc;
++char **argv;
++{
++    int i;
++    u_int fwdaddr;
++    u_short fwdport;
++
++    num_servers = argc;
++
++    servers = malloc(sizeof(*servers) * num_servers);
++    if (servers == NULL)
++      perrorexit("malloc failed");
++
++    for (i = 0; i < num_servers; i++) {
++      char *host, *port;
++
++      fwdport = htons(7004);
++
++      host = argv[i];
++      port = strchr(host, '/');
++      if (port != NULL) {
++          *port++ = 0;
++
++          if (isdigit(port[0])) {
++              fwdport = htons(atoi(port));
++          }
++          else {
++              struct servent *srv = getservbyname(port, "udp");
++              if (!srv) {
++                  fprintf(stderr, "%s: unknown service %s\n", prog, port);
++                  exit(1);
++              }
++              fwdport = srv->s_port;
++          }
++      }
++
++      if (isdigit(host[0])) {
++          fwdaddr = inet_addr(host);
++      }
++      else {
++          struct hostent *h = gethostbyname(host);
++          if (!h) {
++              fprintf(stderr, "%s: unknown host %s\n", prog, host);
++              exit(1);
++          }
++          bcopy(h->h_addr, &fwdaddr, 4);
++      }
++
++      servers[i].sin_family = AF_INET;
++      servers[i].sin_addr.s_addr = fwdaddr;
++      servers[i].sin_port = fwdport;
++    }
++}
++
++
++int
++setup_socket(port)
++u_short port;
++{
++    int s, rv;
++    struct sockaddr_in sin;
++
++    s = socket(AF_INET, SOCK_DGRAM, 0);
++    if (s < 0)
++      perrorexit("Couldn't create socket");
++
++    sin.sin_family = AF_INET;
++    sin.sin_addr.s_addr = 0;
++    sin.sin_port = htons(port);
++
++    rv = bind(s, (struct sockaddr *)&sin, sizeof(sin));
++    if (rv < 0)
++      perrorexit("Couldn't bind socket");
++
++    return s;
++}
++
++
++int
++packet_is_reply(from)
++struct sockaddr_in *from;
++{
++    int i;
++
++    for (i = 0; i < num_servers; i++) {
++      struct sockaddr_in *sin = &servers[i];
++
++      if (from->sin_addr.s_addr == sin->sin_addr.s_addr &&
++          from->sin_port == sin->sin_port)
++      {
++          return 1;
++      }
++    }
++
++    return 0;
++}
++
++
++int
++main(argc, argv)
++int argc;
++char **argv;
++{
++    int c, s, rv;
++    u_short port;
++
++    if (argc < 2) {
++      fprintf(stderr,
++              "usage: %s [-p port] <host>[/port] [host/port ...]\n",
++              argv[0]);
++      exit(1);
++    }
++
++    prog = argv[0];
++    port = 7004;
++
++    while ((c = getopt(argc, argv, "p:")) != -1) {
++      switch (c) {
++      case 'p':
++          port = atoi(optarg);
++          break;
++      default:
++          fprintf(stderr, "%s: invalid option '%c'\n", prog, c);
++          exit(1);
++      }
++    }
++
++    /*
++     * hmm, different implementations of getopt seem to do different things
++     * when there aren't any options.  linux sets optind = 1, which I would
++     * call correct, but sunos sets optind = 0.  try to do the right thing.
++     */
++    if (optind == 0)
++      optind = 1;
++
++    setup_servers(argc - optind, argv + optind);
++    s = setup_socket(port);
++
++    openlog("ka-forwarder", LOG_PID, LOG_DAEMON);
++
++    for (;;) {
++      char buf[BUFFER_SIZE], *bufp, *sendptr;
++      struct sockaddr_in from, reply, *to;
++      int fromlen, sendlen;
++
++      bufp = buf + 8;
++      fromlen = sizeof(from);
++
++      rv = recvfrom(s, bufp, sizeof(buf) - 8,
++                    0, (struct sockaddr *)&from, &fromlen);
++      if (rv < 0) {
++          syslog(LOG_ERR, "recvfrom: %m");
++          sleep(1);
++          continue;
++      }
++
++      if (packet_is_reply(&from)) {
++          /* this is a reply, forward back to user */
++
++          to = &reply;
++          reply.sin_family = AF_INET;
++          bcopy(bufp, &reply.sin_addr.s_addr, 4);
++          bcopy(bufp + 4, &reply.sin_port, 2);
++          sendptr = bufp + 8;
++          sendlen = rv - 8;
++      }
++      else {
++          /* this is a request, forward to server */
++
++          cur_server = (cur_server + 1) % num_servers;
++          to = &servers[cur_server];
++
++          bcopy(&from.sin_addr.s_addr, bufp - 8, 4);
++          bcopy(&from.sin_port, bufp - 4, 2);
++
++          sendptr = bufp - 8;
++          sendlen = rv + 8;
++      }
++
++      {
++          char a1[16], a2[16];
++          strcpy(a1, inet_ntoa(from.sin_addr));
++          strcpy(a2, inet_ntoa(to->sin_addr));
++
++          syslog(LOG_INFO, "forwarding %d bytes from %s/%d to %s/%d\n",
++                 sendlen, a1, htons(from.sin_port), a2, htons(to->sin_port));
++      }
++
++      rv = sendto(s, sendptr, sendlen,
++                  0, (struct sockaddr *)to, sizeof(*to));
++      if (rv < 0) {
++          syslog(LOG_ERR, "sendto: %m");
++      }
++    }
++}
+--- /dev/null
++++ openafs/doc/man-pages/pod8/ka-forwarder.pod
+@@ -0,0 +1,85 @@
++=head1 NAME
++
++ka-forwarder - Forward AFS Authentication Server requests to another server
++
++=head1 SYNOPSIS
++
++=for html
++<div class="synopsis">
++
++B<ka-forwarder> S<<< [B<-p> <I<port>>] >>> <I<server>>[/<I<port>>] [...]
++
++=for html
++</div>
++
++=head1 DESCRIPTION
++
++B<ka-forwarder> listens for requests for an AFS Authentication Server and
++forwards them to a remove B<fakeka> server.  B<fakeka> is a server that
++answers AFS Authentication Server protocol requests using a regular
++Kerberos KDC and is provided with some Kerberos 5 implementations.
++B<fakeka> has to run on the same host as the Kerberos KDC, however, and
++AFS clients send all native AFS authentication requests to the AFS
++database servers.  If you don't want to run your Kerberos KDCs and your
++AFS database servers on the same host, run B<ka-forwarder> on the AFS
++database servers and point it to B<fakeka> running on the Kerberos KDCs.
++
++B<ka-forwarder> takes one or more servers to which to forward the
++requests.  The default port on the remote server to which to forward the
++command is 7004, but a different port can be specified by following the
++server name with a slash (C</>) and the port number.  If multiple servers
++are given, B<ka-forwarder> will send queries to each server in turn in a
++round-robin fashion.
++
++=head1 CAUTIONS
++
++Due to the way that B<ka-forwarder> distinguishes from client requests and
++server responses, any messages from one of the servers to which
++B<ka-forwarder> is forwarding will be considered a reply rather than a
++command and will not be forwarded.  This means that the servers running
++B<fakeka> will not be able to use native AFS authentication requests and
++rely on B<ka-forwarder> to send the requests to the right server.
++
++B<ka-forwarder> does not background itself.  It should either be run in
++the background via the shell, or run via the Basic OverSeer Server (see
++L<bosserver(8)>).
++
++=head1 OPTIONS
++
++=over 4
++
++=item B<-p> <I<port>>
++
++By default, B<ka-forwarder> listens to the standard AFS Authentication
++Server port (7004).  To listen to a different port, specify it with the
++B<-p> option.
++
++=back
++
++=head1 EXAMPLES
++
++Forward AFS Authentication Server reqests to the B<fakeka> servers on
++kdc1.example.com and kdc2.example.com:
++
++    % ka-forwarder kdc1.example.com kdc2.example.com &
++
++Note the C<&> to tell the shell to run this command in the background.
++
++=head1 PRIVILEGE REQUIRED
++
++B<ka-forwarder> only has to listen to port 7004 and therefore does not
++require any special privileges unless a privileged port is specified with
++the B<-p> option.
++
++=head1 SEE ALSO
++
++L<bosserver(8)>,
++fakeka(8),
++L<kaserver(8)>
++
++=head1 COPYRIGHT
++
++Copyright 2006 Russ Allbery <rra@stanford.edu>
++
++This documentation is covered by the IBM Public License Version 1.0.  This
++man page was written by Russ Allbery for OpenAFS.
diff --git a/debian/patches/kbuild-assembly b/debian/patches/kbuild-assembly
new file mode 100644 (file)
index 0000000..7e818b3
--- /dev/null
@@ -0,0 +1,15 @@
+Change the expected source file name for assembly code in the kernel.
+Only used by the PowerPC build, but fixes build problems on that
+platform.  Pulled from the upstream stable branch, will be in 1.4.5.
+
+--- openafs.orig/src/libafs/make_kbuild_makefile.pl
++++ openafs/src/libafs/make_kbuild_makefile.pl
+@@ -79,7 +79,7 @@
+ foreach (@objects) {
+   die "No source known for $_\n" unless exists $deps{$_};
+   if($deps{$_} =~ /\.s$/) {
+-     ($src = $_) =~ s/\.o$/.s/;
++     ($src = $_) =~ s/\.o$/.S/;
+   } else {
+      ($src = $_) =~ s/\.o$/.c/;
+   }
diff --git a/debian/patches/linux-2.6.22 b/debian/patches/linux-2.6.22
new file mode 100644 (file)
index 0000000..0704933
--- /dev/null
@@ -0,0 +1,164 @@
+Add support for the kernel structure changes in 2.6.22.  Pulled from the
+upstream stable branch, will be in 1.4.5.
+
+--- openafs.orig/acinclude.m4
++++ openafs/acinclude.m4
+@@ -611,6 +611,7 @@
+                LINUX_FS_STRUCT_FOP_HAS_FLOCK
+                LINUX_KERNEL_LINUX_SYSCALL_H
+                LINUX_KERNEL_LINUX_SEQ_FILE_H
++               LINUX_KERNEL_POSIX_LOCK_FILE_WAIT_ARG
+                LINUX_KERNEL_SELINUX
+                LINUX_KERNEL_SOCK_CREATE
+                LINUX_KERNEL_PAGE_FOLLOW_LINK
+@@ -626,6 +627,7 @@
+                LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_EXIT_STATE
+                LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_TGID
+                LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_TODO
++               LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_THREAD_INFO
+                LINUX_EXPORTS_TASKLIST_LOCK
+                LINUX_GET_SB_HAS_STRUCT_VFSMOUNT
+                LINUX_STATFS_TAKES_DENTRY
+@@ -767,6 +769,9 @@
+                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_posix_lock_file_wait_arg" = "xyes" ; then
++                AC_DEFINE(POSIX_LOCK_FILE_WAIT_ARG, 1, [define if your linux kernel uses 3 arguments for posix_lock_file])
++               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
+@@ -812,6 +817,9 @@
+                if test "x$ac_cv_linux_sched_struct_task_struct_has_todo" = "xyes"; then 
+                 AC_DEFINE(STRUCT_TASK_STRUCT_HAS_TODO, 1, [define if your struct task_struct has todo])
+                fi
++               if test "x$ac_cv_linux_sched_struct_task_struct_has_thread_info" = "xyes"; then
++                AC_DEFINE(STRUCT_TASK_STRUCT_HAS_THREAD_INFO, 1, [define if your struct task_struct has thread_info])
++               fi
+                if test "x$ac_cv_linux_get_sb_has_struct_vfsmount" = "xyes"; then
+                 AC_DEFINE(GET_SB_HAS_STRUCT_VFSMOUNT, 1, [define if your get_sb_nodev needs a struct vfsmount argument])
+                fi
+--- openafs.orig/src/afs/LINUX/osi_sleep.c
++++ openafs/src/afs/LINUX/osi_sleep.c
+@@ -205,7 +205,11 @@
+ #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
+           !current->todo
+ #else
++#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
+             test_ti_thread_flag(current->thread_info, TIF_FREEZE)
++#else
++            test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
++#endif
+ #endif
+ #endif
+           )
+@@ -303,7 +307,11 @@
+ #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
+           !current->todo
+ #else
++#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
+             test_ti_thread_flag(current->thread_info, TIF_FREEZE)
++#else
++            test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
++#endif
+ #endif
+ #endif
+           )
+--- openafs.orig/src/afs/LINUX/osi_vfsops.c
++++ openafs/src/afs/LINUX/osi_vfsops.c
+@@ -292,8 +292,10 @@
+ {
+     struct vcache *vcp = (struct vcache *) foo;
++#if defined(SLAB_CTOR_VERIFY)
+     if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
+       SLAB_CTOR_CONSTRUCTOR)
++#endif
+       inode_init_once(AFSTOV(vcp));
+ }
+--- openafs.orig/src/afs/LINUX/osi_vnodeops.c
++++ openafs/src/afs/LINUX/osi_vnodeops.c
+@@ -473,11 +473,11 @@
+ #ifdef AFS_LINUX24_ENV
+     if ((code == 0 || flp->fl_type == F_UNLCK) && 
+         (cmd == F_SETLK || cmd == F_SETLKW)) {
+-#ifdef AFS_LINUX26_ENV
++#ifdef POSIX_LOCK_FILE_WAIT_ARG
++      code = posix_lock_file(fp, flp, 0);
++#else
+       flp->fl_flags &=~ FL_SLEEP;
+       code = posix_lock_file(fp, flp);
+-#else
+-      code = posix_lock_file(fp, flp, 0);
+ #endif 
+       if (code && flp->fl_type != F_UNLCK) {
+           struct AFS_FLOCK flock2;
+--- openafs.orig/src/cf/linux-test4.m4
++++ openafs/src/cf/linux-test4.m4
+@@ -444,6 +444,18 @@
+   AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_exit_state)])
++AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_THREAD_INFO], [
++  AC_MSG_CHECKING([for thread_info in struct task_struct])
++  AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_thread_info], [
++    AC_TRY_KBUILD(
++[#include <linux/sched.h>],
++[struct task_struct _tsk;
++printk("%d\n", _tsk.thread_info);],
++      ac_cv_linux_sched_struct_task_struct_has_thread_info=yes,
++      ac_cv_linux_sched_struct_task_struct_has_thread_info=no)])
++  AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_thread_info)])
++
++
+ AC_DEFUN([LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE], [
+   AC_MSG_CHECKING([for alloc_inode in struct super_operations])
+   AC_CACHE_VAL([ac_cv_linux_fs_struct_super_has_alloc_inode], [
+@@ -456,6 +468,17 @@
+   AC_MSG_RESULT($ac_cv_linux_fs_struct_super_has_alloc_inode)])
++AC_DEFUN([LINUX_KERNEL_POSIX_LOCK_FILE_WAIT_ARG], [
++  AC_MSG_CHECKING([for 3rd argument in posix_lock_file found in new kernels])
++  AC_CACHE_VAL([ac_cv_linux_kernel_posix_lock_file_wait_arg], [
++    AC_TRY_KBUILD(
++[#include <linux/fs.h>],
++[posix_lock_file(0,0,0);],
++      ac_cv_linux_kernel_posix_lock_file_wait_arg=yes,
++      ac_cv_linux_kernel_posix_lock_file_wait_arg=no)])
++  AC_MSG_RESULT($ac_cv_linux_kernel_posix_lock_file_wait_arg)])
++
++
+ AC_DEFUN([LINUX_KERNEL_SOCK_CREATE], [
+   AC_MSG_CHECKING([for 5th argument in sock_create found in some SELinux kernels])
+   AC_CACHE_VAL([ac_cv_linux_kernel_sock_create_v], [
+--- openafs.orig/src/rx/LINUX/rx_kmutex.c
++++ openafs/src/rx/LINUX/rx_kmutex.c
+@@ -122,7 +122,11 @@
+ #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
+           !current->todo
+ #else
++#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
+           test_ti_thread_flag(current->thread_info, TIF_FREEZE)
++#else
++          test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
++#endif
+ #endif
+ #endif
+           )
+--- openafs.orig/src/rx/LINUX/rx_knet.c
++++ openafs/src/rx/LINUX/rx_knet.c
+@@ -173,7 +173,11 @@
+ #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
+           !current->todo
+ #else
++#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
+             test_ti_thread_flag(current->thread_info, TIF_FREEZE)
++#else
++            test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
++#endif
+ #endif
+ #endif
+           )
diff --git a/debian/patches/linux-2.6.22.1-proc b/debian/patches/linux-2.6.22.1-proc
new file mode 100644 (file)
index 0000000..96aa78a
--- /dev/null
@@ -0,0 +1,104 @@
+Fix for the proc structure changes in 2.6.22.1.  Pulled from the upstream
+stable branch, will be in 1.4.5.
+
+--- openafs.orig/src/afs/LINUX/osi_sysctl.c
++++ openafs/src/afs/LINUX/osi_sysctl.c
+@@ -1,7 +1,7 @@
+ /*
+  * osi_sysctl.c: Linux sysctl interface to OpenAFS
+  *
+- * $Id: osi_sysctl.c,v 1.7.2.4 2007/02/22 21:49:01 shadow Exp $
++ * $Id: osi_sysctl.c,v 1.7.2.5 2007/06/12 18:28:49 shadow Exp $
+  *
+  * Written Jan 30, 2002 by Kris Van Hees (Sine Nomine Associates)
+  */
+@@ -27,35 +27,64 @@
+ static struct ctl_table_header *afs_sysctl = NULL;
+ static ctl_table afs_sysctl_table[] = {
+-    {1, "hm_retry_RO",
+-     &hm_retry_RO, sizeof(afs_int32), 0644, NULL,
+-     &proc_dointvec}
+-    ,
+-    {2, "hm_retry_RW",
+-     &hm_retry_RW, sizeof(afs_int32), 0644, NULL,
+-     &proc_dointvec}
+-    ,
+-    {3, "hm_retry_int",
+-     &hm_retry_int, sizeof(afs_int32), 0644, NULL,
+-     &proc_dointvec}
+-    ,
+-    {4, "GCPAGs",
+-     &afs_gcpags, sizeof(afs_int32), 0644, NULL,
+-     &proc_dointvec}
+-    ,
+-    {5, "rx_deadtime",
+-     &afs_rx_deadtime, sizeof(afs_int32), 0644, NULL,
+-     &proc_dointvec}
+-    ,
+-    {6, "bkVolPref",
+-     &afs_bkvolpref, sizeof(afs_int32), 0644, NULL,
+-     &proc_dointvec}
+-    ,
++    {
++      .ctl_name       = 1,
++      .procname       = "hm_retry_RO",
++      .data           = &hm_retry_RO,
++      .maxlen         = sizeof(afs_int32),
++      .mode           = 0644,
++      .proc_handler   = &proc_dointvec
++    },
++    {
++        .ctl_name     = 2,
++        .procname     = "hm_retry_RW",
++        .data         = &hm_retry_RW,
++      .maxlen         = sizeof(afs_int32),
++      .mode           = 0644,
++      .proc_handler   = &proc_dointvec
++    },
++    {
++      .ctl_name       = 3,
++      .procname       = "hm_retry_int",
++      .data           = &hm_retry_int,
++      .maxlen         = sizeof(afs_int32),
++      .mode           = 0644,
++      .proc_handler   = &proc_dointvec
++    },
++    {
++      .ctl_name       = 4,
++      .procname       = "GCPAGs",
++      .data           = &afs_gcpags,
++      .maxlen         = sizeof(afs_int32),
++      .mode           = 0644,
++      .proc_handler   = &proc_dointvec
++    },
++    {
++      .ctl_name       = 5,
++      .procname       = "rx_deadtime",
++      .data           = &afs_rx_deadtime,
++      .maxlen         = sizeof(afs_int32),
++      .mode           = 0644,
++      .proc_handler   = &proc_dointvec
++    },
++    {
++      .ctl_name       = 6,
++      .procname       = "bkVolPref",
++      .data           = &afs_bkvolpref,
++      .maxlen         = sizeof(afs_int32),
++      .mode           = 0644,
++      .proc_handler   = &proc_dointvec
++    },
+     {0}
+ };
+ static ctl_table fs_sysctl_table[] = {
+-    {1, "afs", NULL, 0, 0555, afs_sysctl_table},
++    {
++      .ctl_name       = 1,
++      .procname       = "afs",
++      .mode           = 0555,
++      .child          = afs_sysctl_table
++    },
+     {0}
+ };
index 148d2d837f6f055036e5dea9a6a7bc635965cfe9..8f13bcb960337cf7daf3308f49c96caf7bca97eb 100644 (file)
@@ -1,14 +1,31 @@
-Upstream uses libafs as the module name, mostly for historic reasons.  It
-also uses a different module name depending on whether the module is built
-for SMP systems, something that Debian deals with by creating separate
-packages.  This patch changes the name of the module to openafs and
-removes the separate name for the SMP version.
+Build the kernel module as openafs.ko instead of libafs.ko.  This should
+really be done upstream as well, but it poses backwards compatibility
+problems and it's always been called libafs on other platforms, so it's
+controversial.
 
-Probably not acceptable upstream.
-
---- openafs-1.3.87.orig/src/libafs/MakefileProto.LINUX.in
-+++ openafs-1.3.87/src/libafs/MakefileProto.LINUX.in
-@@ -216,8 +216,8 @@
+--- openafs.orig/src/config/linux-version
++++ openafs/src/config/linux-version
+@@ -38,7 +38,7 @@
+ CAN_BUILD=""
+ for VERS in $LINUX_VERS ; do
+-      dir=$LINUX_SRCDIR$VERS
++      dir=$LINUX_SRCDIR
+       if [ ! -d $dir ] ; then
+           dir=$LINUX_SRCDIR
+           if [ ! -d $dir ] ; then
+@@ -47,7 +47,7 @@
+               continue
+                   fi
+       fi
+-      header=$LINUX_SRCDIR$VERS/include/linux/version.h
++      header=$LINUX_SRCDIR/include/linux/version.h
+       if [ ! -f $header ] ; then
+           header=$LINUX_SRCDIR/include/linux/version.h
+           if [ ! -f $header ] ; then
+--- openafs.orig/src/libafs/MakefileProto.LINUX.in
++++ openafs/src/libafs/MakefileProto.LINUX.in
+@@ -222,8 +222,8 @@
  
  # Below this line are targets when in the COMMON directory:
  # For Linux there is no kernel NFS server.
@@ -19,7 +36,7 @@ Probably not acceptable upstream.
  LIBAFS_EP = libafs-${CLIENT}.ep.${LINUX_MODULE_EXT}
  LIBAFS_BM = libafs-${CLIENT}.bm.${LINUX_MODULE_EXT}
  
-@@ -226,10 +226,8 @@
+@@ -232,10 +232,8 @@
  INST_LIBAFS_EP = ${DESTDIR}${afskerneldir}/${LIBAFS_EP}
  INST_LIBAFS_BM = ${DESTDIR}${afskerneldir}/${LIBAFS_BM}
  
@@ -32,7 +49,7 @@ Probably not acceptable upstream.
  
  
  libafs:       $(LIBAFS) 
-@@ -245,11 +243,11 @@
+@@ -251,11 +249,11 @@
        echo BM Build Complete
  
  <linux26 linux_26 umlinux26>
diff --git a/debian/patches/null-uuid-client b/debian/patches/null-uuid-client
new file mode 100644 (file)
index 0000000..e749d54
--- /dev/null
@@ -0,0 +1,15 @@
+Tell the client to never generate an all-zero UUID, even if the client
+apparently doesn't have any network interfaces.  Fixed upstream a
+different way, so this patch can be dropped after 1.4.5 is released.
+
+--- openafs.orig/src/afs/afs_call.c
++++ openafs/src/afs/afs_call.c
+@@ -858,6 +858,8 @@
+ #if   (!defined(AFS_NONFSTRANS)) || defined(AFS_AIX_IAUTH_ENV)
+       afs_nfsclient_init();
+ #endif
++      if (afs_cb_interface.numberOfInterfaces < 1)
++          afs_uuid_create(&afs_cb_interface.uuid);
+       printf("found %d non-empty cache files (%d%%).\n",
+              afs_stats_cmperf.cacheFilesReused,
+              (100 * afs_stats_cmperf.cacheFilesReused) /
diff --git a/debian/patches/null-uuid-server b/debian/patches/null-uuid-server
new file mode 100644 (file)
index 0000000..b676a0e
--- /dev/null
@@ -0,0 +1,41 @@
+Treat clients that provide an all-zero UUID as if they don't support
+UUIDs at all.  Pulled from the upstream stable branch, will be in 1.4.5.
+
+--- openafs.orig/src/viced/host.c
++++ openafs/src/viced/host.c
+@@ -74,6 +74,7 @@
+ extern int lwps;              /* the max number of server threads */
+ extern afsUUID FS_HostUUID;
++afsUUID nulluuid;
+ int CEs = 0;                  /* active clients */
+ int CEBlocks = 0;             /* number of blocks of CEs */
+ struct client *CEFree = 0;    /* first free client */
+@@ -1329,7 +1330,8 @@
+       rx_PutConnection(cb_conn);
+       cb_conn=NULL;
+       H_LOCK;
+-      if (code == RXGEN_OPCODE) {
++      if ((code == RXGEN_OPCODE) ||
++          (afs_uuid_equal(&interf.uuid, &nulluuid))) {
+           identP = (struct Identity *)malloc(sizeof(struct Identity));
+           if (!identP) {
+               ViceLog(0, ("Failed malloc in h_GetHost_r\n"));
+@@ -1452,7 +1454,8 @@
+           rx_PutConnection(cb_conn);
+           cb_conn=NULL;
+           H_LOCK;
+-          if (code == RXGEN_OPCODE) {
++          if ((code == RXGEN_OPCODE) ||
++              afs_uuid_equal(&interf.uuid, &nulluuid)) {
+               if (!identP)
+                   identP =
+                       (struct Identity *)malloc(sizeof(struct Identity));
+@@ -1662,6 +1665,7 @@
+ void
+ h_InitHostPackage()
+ {
++    memset(&nulluuid, 0, sizeof(afsUUID));
+     afsconf_GetLocalCell(confDir, localcellname, PR_MAXNAMELEN);
+     if (!local_realm[0]) {
+       if (afs_krb_get_lrealm(local_realm, 0) != 0 /*KSUCCESS*/) {
diff --git a/debian/patches/os-config b/debian/patches/os-config
deleted file mode 100644 (file)
index 77829c3..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-Various changes to fix OS configuration.  Use PIC for shared library
-builds on all Linux platforms so that the shared library objects are
-useful for the PIC PAM modules, support 32-bit SPARC builds with the 2.4
-and 2.6 kernels (hopefully), and allow hppa as well as parisc (needed for
-the new config.guess).
-
-This should be okay upstream.  The PIC part has been submitted.
-
---- openafs-1.3.87.orig/src/cf/osconf.m4
-+++ openafs-1.3.87/src/cf/osconf.m4
-@@ -241,6 +241,7 @@
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
-               MT_LIBS="-lpthread"
-               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
-+              SHLIB_CFLAGS="-fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="-lncurses"
-               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE -G0"
-@@ -268,6 +269,7 @@
-               MT_LIBS="-lpthread"
-               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x"
-+              SHLIB_CFLAGS="-fPIC"
-               TXLIBS="/usr/lib64/libncurses.so"
-               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
-               SHLIB_LINKER="${MT_CC} -shared"
-@@ -296,6 +298,7 @@
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
-               MT_LIBS="-lpthread"
-               PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
-+              SHLIB_CFLAGS="-fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="-lncurses"
-               XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
-@@ -317,6 +320,7 @@
-               LWP_OPTMZ=-O2
-               OPTMZ=-O2
-               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
-+              SHLIB_CFLAGS="-fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="-lncurses"
-               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
-@@ -337,6 +341,7 @@
-               LWP_OPTMZ=-O2
-               OPTMZ=-O2
-               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
-+              SHLIB_CFLAGS="-fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="-lncurses"
-               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
-@@ -357,6 +362,7 @@
-               LWP_OPTMZ=-O2
-               OPTMZ=-O2
-               PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
-+              SHLIB_CFLAGS="-fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="-lncurses"
-               XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
-@@ -381,6 +387,7 @@
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
-               MT_LIBS="-lpthread"
-               PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
-+              SHLIB_CFLAGS="-fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="-lncurses"
-               XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
-@@ -452,6 +459,7 @@
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
-               MT_LIBS="-lpthread"
-               PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
-+              SHLIB_CFLAGS="-fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="-lncurses"
-               XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
-@@ -530,6 +538,7 @@
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
-               MT_LIBS="-lpthread"
-               PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
-+              SHLIB_CFLAGS="-fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="-lncurses"
-               XCFLAGS="-O -g -D_LARGEFILE64_SOURCE"
-@@ -547,6 +556,7 @@
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
-               MT_LIBS="-lpthread"
-               PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
-+              SHLIB_CFLAGS="-fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="-lncurses"
-               XCFLAGS="-O -g -D_LARGEFILE64_SOURCE"
-@@ -564,6 +574,7 @@
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
-               MT_LIBS="-lpthread"
-               PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
-+              SHLIB_CFLAGS="-fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x -Xlinker -Bsymbolic"
-               TXLIBS="-lncurses"
-               XCFLAGS="-O -g -D_LARGEFILE64_SOURCE -D__s390x__"
-@@ -633,38 +644,13 @@
-               SHLIB_LINKER="${CC} -shared"
-               ;;
--      sparc64_linux22)
--              KERN_OPTMZ=-O2
--              LEX="flex -l"
--              MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
--              MT_LIBS="-lpthread"
--              PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
--              SHLIB_LDFLAGS="-shared -Xlinker -x"
--              TXLIBS="-lncurses"
--              XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
--              YACC="bison -y"
--              SHLIB_LINKER="${MT_CC} -shared"
--              ;;
--
--      sparc64_linux24)
--              KERN_OPTMZ=-O2
--              LEX="flex -l"
--              MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
--              MT_LIBS="-lpthread"
--              PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
--              SHLIB_LDFLAGS="-shared -Xlinker -x"
--              TXLIBS="-lncurses"
--              XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
--              YACC="bison -y"
--              SHLIB_LINKER="${MT_CC} -shared"
--              ;;
--
--      sparc_linux22)
-+      sparc*_linux*)
-               KERN_OPTMZ=-O2
-               LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
-               MT_LIBS="-lpthread"
-               PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
-+              SHLIB_CFLAGS="-fPIC"
-               SHLIB_LDFLAGS="-shared -Xlinker -x"
-               TXLIBS="-lncurses"
-               XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
---- openafs-1.3.87.orig/acinclude.m4
-+++ openafs-1.3.87/acinclude.m4
-@@ -491,7 +491,7 @@
-               i?86-*-linux*)
-                       AFS_SYSNAME="i386_linuxXX"
-                       ;;
--              parisc-*-linux-gnu)
-+              parisc-*-linux-gnu|hppa-*-linux-gnu)
-                       AFS_SYSNAME="parisc_linuxXX"
-                       enable_pam="no"
-                       ;;
diff --git a/debian/patches/pag-cleanup-lock b/debian/patches/pag-cleanup-lock
new file mode 100644 (file)
index 0000000..da7fb64
--- /dev/null
@@ -0,0 +1,25 @@
+Make sure the AFS lock is held when a user process in a PAG exits, since
+otherwise we may crash.  Pulled from the upstream stable branch, will be
+in 1.4.5.
+
+--- openafs.orig/src/afs/LINUX/osi_groups.c
++++ openafs/src/afs/LINUX/osi_groups.c
+@@ -594,13 +594,18 @@
+ {
+     afs_uint32 pag = key->payload.value;
+     struct unixuser *pu;
++    int locked = ISAFS_GLOCK();
++    if (!locked)
++      AFS_GLOCK();
+     pu = afs_FindUser(pag, -1, READ_LOCK);
+     if (pu) {
+       pu->ct.EndTimestamp = 0;
+       pu->tokenTime = 0;
+       afs_PutUser(pu, READ_LOCK);
+     }
++    if (!locked)
++      AFS_GUNLOCK();
+ }
+ struct key_type key_type_afs_pag =
diff --git a/debian/patches/pam b/debian/patches/pam
deleted file mode 100644 (file)
index c0f00b0..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-The standard upstream source builds the PAM modules against static
-libraries, which means they contain non-PIC code.  This isn't allowed by
-Debian Policy and doesn't work on some supported platforms.
-
-Two approaches for fixing this have been tried.  One is to rebuild the
-various object files that are part of the libraries PIC and then link with
-those object files.  The other, which this implements, is to link with the
-object files used to create the libafsauthent and libafsrpc shared
-libraries (which can't be shipped since they don't have a stable API or
-correct SONAME).  The latter means that the PAM modules must also be
-linked with libpthread, but that's a feature since that means they'll work
-with sshd built threaded.
-
-Not submitted upstream yet.  The call to rx_Init should be submitted
-upstream and would probably be accepted.  Upstream would probably rather
-link the PAM modules against the shared libraries rather than accepting
-this hack, which is unsuitable for Debian until the shared libraries are
-handled more consistently.
-
---- openafs-1.3.87.orig/src/pam/Makefile.in
-+++ openafs-1.3.87/src/pam/Makefile.in
-@@ -25,7 +25,17 @@
-         afs_pam_msg.o afs_message.o AFS_component_version_number.o
-    OBJS = $(SHOBJS) test_pam.o
- INCLUDES=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} 
--CFLAGS =  ${DEBUG} ${INCLUDES} ${PAM_CFLAGS}
-+CFLAGS =  ${DEBUG} ${INCLUDES} ${PAM_CFLAGS} ${MT_CFLAGS}
-+
-+# For Debian, we link directly with the object files that would have gone
-+# into the libafsrpc and libafsauthent shared libraries.  The shared libraries
-+# themselves cannot be used because the interface isn't stable and they have
-+# no SONAME, but this is the easiest way of getting PIC objects built with the
-+# pthread API.
-+SHLIB_OBJS    := `ls ../shlibafsauthent/*.o | grep -v version_num` \
-+                 `ls ../shlibafsrpc/*.o | grep -v version_num`
-+KRB_SHLIB_OBJS        := `ls ../shlibafsauthent/*.o | egrep -v 'version_num|ktc.o'` \
-+                 `ls ../shlibafsrpc/*.o | grep -v version_num`
- all: test_pam ${TOP_LIBDIR}/pam_afs.so.1 ${TOP_LIBDIR}/pam_afs.krb.so.1
-@@ -39,14 +49,18 @@
-       ${CC} ${CFLAGS} -c ${srcdir}/afs_auth.c -o afs_auth.o
- afs_auth_krb.o: afs_auth.c afs_pam_msg.h afs_message.h afs_util.h
--      ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/afs_auth.c -o afs_auth_krb.o
-+      ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV  -c ${srcdir}/afs_auth.c -o afs_auth_krb.o
- afs_util.o: afs_util.c afs_pam_msg.h afs_message.h afs_util.h
-       ${CC} ${CFLAGS} -c ${srcdir}/afs_util.c -o afs_util.o
-+
- afs_util_krb.o: afs_util.c afs_pam_msg.h afs_message.h afs_util.h
-       ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/afs_util.c -o afs_util_krb.o
-+ktc.o: ${srcdir}/../auth/ktc.c
-+      ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/../auth/ktc.c
-+
- pam_afs.so.1: $(SHOBJS) afs_setcred.o afs_auth.o afs_util.o
-       set -x; \
-       case "$(SYS_NAME)" in \
-@@ -59,8 +73,9 @@
-                       afs_setcred.o afs_auth.o afs_util.o \
-                       $(SHOBJS) $(LIBS) ;; \
-       *linux*) \
--              $(CC) $(LDFLAGS) -o $@ afs_setcred.o \
--                      afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\
-+              $(CC) $(LDFLAGS) $(PAM_CFLAGS) -o $@ afs_setcred.o \
-+                      afs_auth.o afs_util.o $(SHOBJS) $(SHLIB_OBJS) \
-+                      $(MT_LIBS) -lpam -lresolv;;\
-       *fbsd*| *nbsd*) \
-               $(CC) $(LDFLAGS) -o $@ afs_setcred.o \
-                       afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\
-@@ -68,7 +83,7 @@
-               echo No link line for system $(SYS_NAME). ;; \
-       esac
--pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o
-+pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o ktc.o
-       set -x; \
-       case "$(SYS_NAME)" in \
-       hp_ux* | ia64_hpux*) \
-@@ -81,7 +96,8 @@
-                       $(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \
-       *linux*) \
-               $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o \
--                      afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
-+                      afs_auth_krb.o afs_util_krb.o ktc.o $(SHOBJS) \
-+                      $(KRB_SHLIB_OBJS) $(MT_LIBS) -lpam -lresolv;;\
-       *fbsd*| *nbsd*) \
-               $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o \
-                       afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
---- openafs-1.3.87.orig/src/pam/afs_setcred.c
-+++ openafs-1.3.87/src/pam/afs_setcred.c
-@@ -52,7 +52,7 @@
-     int refresh_token = 0;
-     int set_expires = 0;      /* the default is to not to set the env variable */
-     int use_klog = 0;
--    int i;
-+    int i, code;
-     struct pam_conv *pam_convp = NULL;
-     char my_password_buf[256];
-     char *cell_ptr = NULL;
-@@ -281,6 +281,11 @@
- #endif
-       }
-+      if ((code = rx_Init(0)) != 0) {
-+          pam_afs_syslog(LOG_ERR, PAMAFS_KAERROR, code);
-+          RET(PAM_AUTH_ERR);
-+      }
-+
-       if (flags & PAM_REFRESH_CRED) {
-           if (use_klog) {
-               auth_ok = !do_klog(user, password, "00:00:01", cell_ptr);
---- openafs-1.3.87.orig/src/pam/afs_auth.c
-+++ openafs-1.3.87/src/pam/afs_auth.c
-@@ -314,6 +314,10 @@
-           if (cpid <= 0) {    /* The child process */
-               if (logmask && LOG_MASK(LOG_DEBUG))
-                   syslog(LOG_DEBUG, "in child");
-+              if ((code = rx_Init(0)) != 0) {
-+                  pam_afs_syslog(LOG_ERR, PAMAFS_KAERROR, code);
-+                  exit(0);
-+              }
-               if (refresh_token || set_token)
-                   code = ka_UserAuthenticateGeneral(KA_USERAUTH_VERSION, user,        /* kerberos name */
-                                                     NULL,     /* instance */
-@@ -363,6 +367,10 @@
-           pam_afs_syslog(LOG_ERR, PAMAFS_PAMERROR, errno);
-       }
-     } else {                  /* dont_fork, used by httpd */
-+      if ((code = rx_Init(0)) != 0) {
-+          pam_afs_syslog(LOG_ERR, PAMAFS_KAERROR, code);
-+          RET(PAM_AUTH_ERR);
-+      }
-       if (logmask && LOG_MASK(LOG_DEBUG))
-           syslog(LOG_DEBUG, "dont_fork");
-       if (refresh_token || set_token)
---- openafs-1.3.87.orig/Makefile.in
-+++ openafs-1.3.87/Makefile.in
-@@ -507,8 +507,6 @@
- # pthread based user space RX library
- shlibafsrpc: rx rxkad des
-       case ${SYS_NAME} in \
--      amd64_linux24) \
--              echo Skipping shlibafsrpc for amd64_linux24 ;; \
-       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
-       ${COMPILE_PART1} shlibafsrpc ${COMPILE_PART2} ;; \
-       *) \
-@@ -517,8 +515,6 @@
- shlibafsauthent: ubik auth kauth shlibafsrpc
-       case ${SYS_NAME} in \
--      amd64_linux24) \
--              echo Skipping shlibafsauthent for amd64_linux24 ;; \
-       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
-       ${COMPILE_PART1} shlibafsauthent ${COMPILE_PART2} ;; \
-       *) \
diff --git a/debian/patches/pam-build b/debian/patches/pam-build
new file mode 100644 (file)
index 0000000..9000aab
--- /dev/null
@@ -0,0 +1,88 @@
+Apply an incredibly ugly hack to build the PAM modules against the shared
+objects generated for the shared libraries.  Not suitable upstream in its
+current form.  The right upstream solution is to standardize the shared
+library ABI and install it with a real SONAME, and then link the PAM
+modules against it.
+
+--- openafs.orig/Makefile.in
++++ openafs/Makefile.in
+@@ -515,8 +515,6 @@
+ # pthread based user space RX library
+ shlibafsrpc: rx rxkad des
+       case ${SYS_NAME} in \
+-      amd64_linux24) \
+-              echo Skipping shlibafsrpc for amd64_linux24 ;; \
+       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
+       ${COMPILE_PART1} shlibafsrpc ${COMPILE_PART2} ;; \
+       *) \
+@@ -525,8 +523,6 @@
+ shlibafsauthent: ubik auth kauth shlibafsrpc
+       case ${SYS_NAME} in \
+-      amd64_linux24) \
+-              echo Skipping shlibafsauthent for amd64_linux24 ;; \
+       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
+       ${COMPILE_PART1} shlibafsauthent ${COMPILE_PART2} ;; \
+       *) \
+--- openafs.orig/src/pam/Makefile.in
++++ openafs/src/pam/Makefile.in
+@@ -25,7 +25,17 @@
+         afs_pam_msg.o afs_message.o AFS_component_version_number.o
+    OBJS = $(SHOBJS) test_pam.o
+ INCLUDES=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} 
+-CFLAGS =  ${DEBUG} ${INCLUDES} ${PAM_CFLAGS}
++CFLAGS =  ${DEBUG} ${INCLUDES} ${PAM_CFLAGS} ${MT_CFLAGS}
++
++# For Debian, we link directly with the object files that would have gone
++# into the libafsrpc and libafsauthent shared libraries.  The shared libraries
++# themselves cannot be used because the interface isn't stable and they have
++# no SONAME, but this is the easiest way of getting PIC objects built with the
++# pthread API.
++SHLIB_OBJS    := `ls ../shlibafsauthent/*.o | grep -v version_num` \
++                 `ls ../shlibafsrpc/*.o | grep -v version_num`
++KRB_SHLIB_OBJS        := `ls ../shlibafsauthent/*.o | egrep -v 'version_num|ktc.o'` \
++                 `ls ../shlibafsrpc/*.o | grep -v version_num`
+ all: test_pam ${TOP_LIBDIR}/pam_afs.so.1 ${TOP_LIBDIR}/pam_afs.krb.so.1
+@@ -47,6 +57,9 @@
+ afs_util_krb.o: afs_util.c afs_pam_msg.h afs_message.h afs_util.h
+       ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/afs_util.c -o afs_util_krb.o
++ktc.o: ${srcdir}/../auth/ktc.c
++      ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/../auth/ktc.c
++
+ pam_afs.so.1: $(SHOBJS) afs_setcred.o afs_auth.o afs_util.o
+       set -x; \
+       case "$(SYS_NAME)" in \
+@@ -59,8 +72,9 @@
+                       afs_setcred.o afs_auth.o afs_util.o \
+                       $(SHOBJS) $(LIBS) ;; \
+       *linux*) \
+-              $(CC) $(LDFLAGS) -o $@ afs_setcred.o \
+-                      afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\
++              $(CC) $(LDFLAGS) $(PAM_CFLAGS) -o $@ afs_setcred.o \
++                      afs_auth.o afs_util.o $(SHOBJS) $(SHLIB_OBJS) \
++                      $(MT_LIBS) -lpam -lresolv;;\
+       *fbsd*| *nbsd*) \
+               $(CC) $(LDFLAGS) -o $@ afs_setcred.o \
+                       afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\
+@@ -68,7 +82,7 @@
+               echo No link line for system $(SYS_NAME). ;; \
+       esac
+-pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o
++pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o ktc.o
+       set -x; \
+       case "$(SYS_NAME)" in \
+       hp_ux* | ia64_hpux*) \
+@@ -81,7 +95,8 @@
+                       $(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \
+       *linux*) \
+               $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o \
+-                      afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
++                      afs_auth_krb.o afs_util_krb.o ktc.o $(SHOBJS) \
++                      $(KRB_SHLIB_OBJS) $(MT_LIBS) -lpam -lresolv;;\
+       *fbsd*| *nbsd*) \
+               $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o \
+                       afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
index be20d821ec3686dc40d27a48301ee937e2f2fba4..f1d497bd767a8d15f7defaf665dd7ef9160812b3 100644 (file)
@@ -1,10 +1,34 @@
-Index: src/afs/LINUX/osi_machdep.h
-===================================================================
-RCS file: /cvs/openafs/src/afs/LINUX/osi_machdep.h,v
-retrieving revision 1.22.2.17
-diff -u -d -r1.22.2.17 osi_machdep.h
---- src/afs/LINUX/osi_machdep.h        8 Feb 2007 22:41:20 -0000       1.22.2.17
-+++ src/afs/LINUX/osi_machdep.h        18 Apr 2007 23:23:28 -0000
+Work around versions of Linux that don't export the paravirt_ops table
+for non-GPL modules, but which redirect core functions through it.  This
+has been fixed in Linux 2.6.22, so this patch can be dropped when 2.6.22
+makes it into testing.
+
+--- openafs.orig/src/afs/LINUX/osi_groups.c
++++ openafs/src/afs/LINUX/osi_groups.c
+@@ -230,6 +230,7 @@
+     struct key *old;
+     char desc[20];
+     unsigned long not_in_quota;
++    unsigned long f;
+     int code = -EINVAL;
+     if (!__key_type_keyring)
+@@ -265,11 +266,11 @@
+     }
+     /* install the keyring */
+-    spin_lock_irq(&task->sighand->siglock);
++    SIG_LOCK(task, f);
+     old = task->signal->session_keyring;
+     smp_wmb();
+     task->signal->session_keyring = keyring;
+-    spin_unlock_irq(&task->sighand->siglock);
++    SIG_UNLOCK(task, f);
+     if (old)
+           key_put(old);
+--- openafs.orig/src/afs/LINUX/osi_machdep.h
++++ openafs/src/afs/LINUX/osi_machdep.h
 @@ -55,14 +55,14 @@
  #endif
  
@@ -26,13 +50,8 @@ diff -u -d -r1.22.2.17 osi_machdep.h
  #endif
  
  #if defined (STRUCT_TASK_STRUCT_HAS_RLIM)
-Index: src/afs/LINUX/osi_misc.c
-===================================================================
-RCS file: /cvs/openafs/src/afs/LINUX/osi_misc.c,v
-retrieving revision 1.34.2.10
-diff -u -d -r1.34.2.10 osi_misc.c
---- src/afs/LINUX/osi_misc.c   11 Jul 2005 19:29:56 -0000      1.34.2.10
-+++ src/afs/LINUX/osi_misc.c   18 Apr 2007 23:23:28 -0000
+--- openafs.orig/src/afs/LINUX/osi_misc.c
++++ openafs/src/afs/LINUX/osi_misc.c
 @@ -353,10 +353,11 @@
  void
  osi_linux_mask(void)
@@ -47,14 +66,9 @@ diff -u -d -r1.34.2.10 osi_misc.c
  }
  
  void
-Index: src/afs/LINUX/osi_sleep.c
-===================================================================
-RCS file: /cvs/openafs/src/afs/LINUX/osi_sleep.c,v
-retrieving revision 1.22.2.10
-diff -u -d -r1.22.2.10 osi_sleep.c
---- src/afs/LINUX/osi_sleep.c  4 Jan 2007 21:26:34 -0000       1.22.2.10
-+++ src/afs/LINUX/osi_sleep.c  18 Apr 2007 23:23:29 -0000
-@@ -240,19 +240,20 @@
+--- openafs.orig/src/afs/LINUX/osi_sleep.c
++++ openafs/src/afs/LINUX/osi_sleep.c
+@@ -244,19 +244,20 @@
  afs_osi_Sleep(void *event)
  {
      sigset_t saved_set;
@@ -79,42 +93,8 @@ diff -u -d -r1.22.2.10 osi_sleep.c
  }
  
  /* osi_TimedSleep
-Index: src/afs/LINUX/osi_groups.c
-===================================================================
-RCS file: /cvs/openafs/src/afs/LINUX/osi_groups.c,v
-retrieving revision 1.25.2.8
-diff -u -d -r1.25.2.8 osi_groups.c
---- src/afs/LINUX/osi_groups.c 15 Jan 2007 15:52:46 -0000      1.25.2.8
-+++ src/afs/LINUX/osi_groups.c 18 Apr 2007 23:23:29 -0000
-@@ -230,6 +230,7 @@
-     struct key *old;
-     char desc[20];
-     unsigned long not_in_quota;
-+    unsigned long f;
-     int code = -EINVAL;
-     if (!__key_type_keyring)
-@@ -265,11 +266,11 @@
-     }
-     /* install the keyring */
--    spin_lock_irq(&task->sighand->siglock);
-+    SIG_LOCK(task, f);
-     old = task->signal->session_keyring;
-     smp_wmb();
-     task->signal->session_keyring = keyring;
--    spin_unlock_irq(&task->sighand->siglock);
-+    SIG_UNLOCK(task);
-     if (old)
-           key_put(old);
-Index: src/rx/LINUX/rx_kmutex.c
-===================================================================
-RCS file: /cvs/openafs/src/rx/LINUX/rx_kmutex.c,v
-retrieving revision 1.7.2.7
-diff -u -d -r1.7.2.7 rx_kmutex.c
---- src/rx/LINUX/rx_kmutex.c   28 Dec 2006 21:32:09 -0000      1.7.2.7
-+++ src/rx/LINUX/rx_kmutex.c   18 Apr 2007 23:23:29 -0000
+--- openafs.orig/src/rx/LINUX/rx_kmutex.c
++++ openafs/src/rx/LINUX/rx_kmutex.c
 @@ -104,11 +104,12 @@
      MUTEX_EXIT(l);
  
@@ -130,7 +110,7 @@ diff -u -d -r1.7.2.7 rx_kmutex.c
      }
  
      while(seq == cv->seq) {
-@@ -140,10 +141,11 @@
+@@ -144,10 +145,11 @@
      set_current_state(TASK_RUNNING);
  
      if (!sigok) {
diff --git a/debian/patches/paths b/debian/patches/paths
new file mode 100644 (file)
index 0000000..4d9a27c
--- /dev/null
@@ -0,0 +1,16 @@
+Patch pt_util to use the correct Debian patch for the Protection Server
+database.  Not suitable upstream in its current form, but will be
+obsolete if upstream uses the standard functions to figure out the
+database path.
+
+--- openafs.orig/src/ptserver/pt_util.c
++++ openafs/src/ptserver/pt_util.c
+@@ -136,7 +136,7 @@
+     struct prentry uentry, gentry;
+     struct ubik_hdr *uh;
+     char *dfile = 0;
+-    char *pfile = "/usr/afs/db/prdb.DB0";
++    char *pfile = "/var/lib/openafs/db/prdb.DB0";
+     struct cmd_parmdesc *tparm;
+     tparm = a_as->parms;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..203a6a4
--- /dev/null
@@ -0,0 +1,18 @@
+dfsg
+paths
+fstrace-paths
+module-name
+pam-build
+bos-permissions
+compiler-flags
+amd64-syscall-probe
+des-alignment
+ka-forwarder
+kbuild-assembly
+linux-2.6.22
+linux-2.6.22.1-proc
+null-uuid-client
+null-uuid-server
+pag-cleanup-lock
+ucontext-everywhere
+paravirt-workaround
diff --git a/debian/patches/ucontext-everywhere b/debian/patches/ucontext-everywhere
new file mode 100644 (file)
index 0000000..326cc63
--- /dev/null
@@ -0,0 +1,151 @@
+Build with UCONTEXT everywhere for current glibc.  Patch pulled from
+upstream stable branch, will be in 1.4.5.
+
+--- openafs.orig/src/config/param.alpha_linux_26.h
++++ openafs/src/config/param.alpha_linux_26.h
+@@ -81,6 +81,11 @@
+ #define SYS_NAME_ID    SYS_NAME_ID_alpha_linux_26
++#ifdef __GLIBC__
++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
++#define USE_UCONTEXT
++#endif
++#endif
+ #endif /* AFS_PARAM_H */
+                                    
+ #else /* !defined(UKERNEL) */
+--- openafs.orig/src/config/param.ia64_linux24.h
++++ openafs/src/config/param.ia64_linux24.h
+@@ -87,6 +87,7 @@
+ #endif
+ #endif /* KERNEL */
++#define USE_UCONTEXT          /* should be in afsconfig.h */
+ #endif /* _PARAM_IA64_LINUX20_H_ */
+@@ -157,6 +158,7 @@
+ #define CMSERVERPREF
+ #endif
++#define USE_UCONTEXT          /* should be in afsconfig.h */
+ #endif /* AFS_PARAM_H */
+--- openafs.orig/src/config/param.ia64_linux26.h
++++ openafs/src/config/param.ia64_linux26.h
+@@ -96,6 +96,7 @@
+ #endif
+ #endif /* KERNEL */
++#define USE_UCONTEXT          /* should be in afsconfig.h */
+ #endif /* _PARAM_IA64_LINUX20_H_ */
+@@ -167,6 +168,7 @@
+ #define CMSERVERPREF
+ #endif
++#define USE_UCONTEXT          /* should be in afsconfig.h */
+ #endif /* AFS_PARAM_H */
+--- openafs.orig/src/config/param.parisc_linux24.h
++++ openafs/src/config/param.parisc_linux24.h
+@@ -70,6 +70,11 @@
+ #endif
+ #endif /* KERNEL */
++#ifdef __GLIBC__
++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
++#define USE_UCONTEXT
++#endif
++#endif
+ #endif /* AFS_PARAM_H */
+ #else /* !defined(UKERNEL) */
+--- openafs.orig/src/config/param.ppc64_linux26.h
++++ openafs/src/config/param.ppc64_linux26.h
+@@ -76,6 +76,11 @@
+ #endif
+ #endif /* KERNEL */
++#ifdef __GLIBC__
++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
++#define USE_UCONTEXT
++#endif
++#endif
+ #endif /* _PARAM_PPC64_LINUX20_H_ */
+ #else /* !defined(UKERNEL) */
+--- openafs.orig/src/config/param.ppc_linux26.h
++++ openafs/src/config/param.ppc_linux26.h
+@@ -74,6 +74,11 @@
+ #endif
+ #endif /* KERNEL */
++#ifdef __GLIBC__
++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
++#define USE_UCONTEXT
++#endif
++#endif
+ #endif /* AFS_PARAM_H */
+ #else /* !defined(UKERNEL) */
+--- openafs.orig/src/config/param.s390_linux26.h
++++ openafs/src/config/param.s390_linux26.h
+@@ -86,6 +86,11 @@
+ #endif
+ #endif /* KERNEL */
++#ifdef __GLIBC__
++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
++#define USE_UCONTEXT
++#endif
++#endif
+ #endif /* AFS_PARAM_H */
+ #else /* !defined(UKERNEL) */
+--- openafs.orig/src/config/param.s390x_linux26.h
++++ openafs/src/config/param.s390x_linux26.h
+@@ -89,6 +89,11 @@
+ #endif
+ #endif /* KERNEL */
++#ifdef __GLIBC__
++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
++#define USE_UCONTEXT
++#endif
++#endif
+ #endif /* AFS_PARAM_H */
+ #else /* !defined(UKERNEL) */
+--- openafs.orig/src/config/param.sparc64_linux26.h
++++ openafs/src/config/param.sparc64_linux26.h
+@@ -95,6 +95,11 @@
+ #endif
+ #endif
++#ifdef __GLIBC__
++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
++#define USE_UCONTEXT
++#endif
++#endif
+ #endif /* _PARAM_SPARC64_LINUX26_H_ */
+ #else /* !defined(UKERNEL) */
+--- openafs.orig/src/config/param.sparc_linux24.h
++++ openafs/src/config/param.sparc_linux24.h
+@@ -98,6 +98,11 @@
+ #endif
+ #endif
++#ifdef __GLIBC__
++#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
++#define USE_UCONTEXT
++#endif
++#endif
+ #endif /* AFS_PARAM_H */
+ #else /* !defined(UKERNEL) */
diff --git a/doc/man-pages/pod8/ka-forwarder.pod b/doc/man-pages/pod8/ka-forwarder.pod
deleted file mode 100644 (file)
index 321f900..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-=head1 NAME
-
-ka-forwarder - Forward AFS Authentication Server requests to another server
-
-=head1 SYNOPSIS
-
-=for html
-<div class="synopsis">
-
-B<ka-forwarder> S<<< [B<-p> <I<port>>] >>> <I<server>>[/<I<port>>] [...]
-
-=for html
-</div>
-
-=head1 DESCRIPTION
-
-B<ka-forwarder> listens for requests for an AFS Authentication Server and
-forwards them to a remove B<fakeka> server.  B<fakeka> is a server that
-answers AFS Authentication Server protocol requests using a regular
-Kerberos KDC and is provided with some Kerberos 5 implementations.
-B<fakeka> has to run on the same host as the Kerberos KDC, however, and
-AFS clients send all native AFS authentication requests to the AFS
-database servers.  If you don't want to run your Kerberos KDCs and your
-AFS database servers on the same host, run B<ka-forwarder> on the AFS
-database servers and point it to B<fakeka> running on the Kerberos KDCs.
-
-B<ka-forwarder> takes one or more servers to which to forward the
-requests.  The default port on the remote server to which to forward the
-command is 7004, but a different port can be specified by following the
-server name with a slash (C</>) and the port number.  If multiple servers
-are given, B<ka-forwarder> will send queries to each server in turn in a
-round-robin fashion.
-
-=head1 CAUTIONS
-
-Due to the way that B<ka-forwarder> distinguishes from client requests and
-server responses, any messages from one of the servers to which
-B<ka-forwarder> is forwarding will be considered a reply rather than a
-command and will not be forwarded.  This means that the servers running
-B<fakeka> will not be able to use native AFS authentication requests and
-rely on B<ka-forwarder> to send the requests to the right server.
-
-B<ka-forwarder> does not background itself.  It should either be run in
-the background via the shell, or run via the Basic OverSeer Server (see
-L<bosserver(8)>).
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<-p> <I<port>>
-
-By default, B<ka-forwarder> listens to the standard AFS Authentication
-Server port (7004).  To listen to a different port, specify it with the
-B<-p> option.
-
-=back
-
-=head1 EXAMPLES
-
-Forward AFS Authentication Server reqests to the B<fakeka> servers on
-kdc1.example.com and kdc2.example.com:
-
-    % ka-forwarder kdc1.example.com kdc2.example.com &
-
-Note the C<&> to tell the shell to run this command in the background.
-
-=head1 PRIVILEGE REQUIRED
-
-B<ka-forwarder> only has to listen to port 7004 and therefore does not
-require any special privileges unless a privileged port is specified with
-the B<-p> option.
-
-=head1 SEE ALSO
-
-L<bosserver(8)>,
-fakeka(8),
-L<kaserver(8)>
-
-=head1 COPYRIGHT
-
-Copyright 2006 Russ Allbery <rra@stanford.edu>
-
-This documentation is covered by the IBM Public License Version 1.0.  This
-man page was written by Russ Allbery for OpenAFS.
index 1078056e5d5f6f511c555d58a9397e6cabe61751..c94977e746364847b6f55d611ec6458d215935c5 100644 (file)
@@ -230,7 +230,6 @@ install_session_keyring(struct task_struct *task, struct key *keyring)
     struct key *old;
     char desc[20];
     unsigned long not_in_quota;
-    unsigned long f;
     int code = -EINVAL;
 
     if (!__key_type_keyring)
@@ -266,11 +265,11 @@ install_session_keyring(struct task_struct *task, struct key *keyring)
     }
 
     /* install the keyring */
-    SIG_LOCK(task, f);
+    spin_lock_irq(&task->sighand->siglock);
     old = task->signal->session_keyring;
     smp_wmb();
     task->signal->session_keyring = keyring;
-    SIG_UNLOCK(task, f);
+    spin_unlock_irq(&task->sighand->siglock);
 
     if (old)
            key_put(old);
@@ -595,18 +594,13 @@ static void afs_pag_destroy(struct key *key)
 {
     afs_uint32 pag = key->payload.value;
     struct unixuser *pu;
-    int locked = ISAFS_GLOCK();
 
-    if (!locked)
-       AFS_GLOCK();
     pu = afs_FindUser(pag, -1, READ_LOCK);
     if (pu) {
        pu->ct.EndTimestamp = 0;
        pu->tokenTime = 0;
        afs_PutUser(pu, READ_LOCK);
     }
-    if (!locked)
-       AFS_GUNLOCK();
 }
 
 struct key_type key_type_afs_pag =
index 57b047f2c2117173691db0deffa8967ecac2f5a0..836a98df11a394e0bf662a4e4e79d504534db7fc 100644 (file)
 #endif
 
 #if defined (STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK)
-#define SIG_LOCK(X,flags) spin_lock_irqsave(&X->sigmask_lock,flags)
-#define SIG_UNLOCK(X),flags spin_unlock_irqrestore(&X->sigmask_lock,flags)
+#define SIG_LOCK(X) spin_lock_irq(&X->sigmask_lock)
+#define SIG_UNLOCK(X) spin_unlock_irq(&X->sigmask_lock)
 #elif defined (STRUCT_TASK_STRUCT_HAS_SIGHAND)
-#define SIG_LOCK(X,flags) spin_lock_irqsave(&X->sighand->siglock,flags)
-#define SIG_UNLOCK(X,flags) spin_unlock_irqrestore(&X->sighand->siglock,flags)
+#define SIG_LOCK(X) spin_lock_irq(&X->sighand->siglock)
+#define SIG_UNLOCK(X) spin_unlock_irq(&X->sighand->siglock)
 #else
-#define SIG_LOCK(X,flags) spin_lock_irqsave(&X->sig->siglock,flags)
-#define SIG_UNLOCK(X,flags) spin_unlock_irqrestore(&X->sig->siglock,flags)
+#define SIG_LOCK(X) spin_lock_irq(&X->sig->siglock)
+#define SIG_UNLOCK(X) spin_unlock_irq(&X->sig->siglock)
 #endif
 
 #if defined (STRUCT_TASK_STRUCT_HAS_RLIM)
index 72c95d827e006cf574e9411ccca9af32e618d013..41bec5b2a558c1373149b1b6bfdfc4c1ca0bea21 100644 (file)
@@ -353,11 +353,10 @@ struct task_struct *rxk_ListenerTask;
 void
 osi_linux_mask(void)
 {
-    unsigned long f;
-    SIG_LOCK(current, f);
+    SIG_LOCK(current);
     sigfillset(&current->blocked);
     RECALC_SIGPENDING(current);
-    SIG_UNLOCK(current, f);
+    SIG_UNLOCK(current);
 }
 
 void
index 1a812367f6e566e74018693ca4704bb4ed65220b..16b5322dd687177e1801158a528341f85d3da3a4 100644 (file)
@@ -59,7 +59,6 @@
 #include "afsincludes.h"
 #endif
 #include <linux/version.h>
-#include <linux/sched.h>
 #ifdef CONFIG_H_EXISTS
 #include <linux/config.h>
 #endif
@@ -154,7 +153,6 @@ MODULE_PARM_DESC(probe_ignore_syscalls, "Syscalls to ignore in table checks");
  * 0x0010 - detail - check_harder
  * 0x0020 - detail - check_harder/zapped
  * 0x0040 - automatically ignore setgroups and afs_syscall
- * 0x0080 - detail - check_table_readable
  */
 static int probe_debug = 0x41;
 #ifdef module_param
@@ -300,10 +298,6 @@ typedef struct {
     int debug_ignore_NR[4];         /* syscalls to ignore for debugging */
 } probectl;
 
-#if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
-static int check_access(unsigned long, int);
-static int check_table_readable(probectl *, PROBETYPE *);
-#endif
 
 
 /********** Probing Configuration: sys_call_table **********/
@@ -946,11 +940,6 @@ static int check_table(probectl *P, PROBETYPE *ptr)
     PROBETYPE *x;
     int i, j;
 
-#if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
-    i = check_table_readable(P, ptr);
-    if (i >= 0) return i;
-#endif
-
     for (x = ptr, i = 0; i < _SS(NR_syscalls); i++, x++) {
 #ifdef OSI_PROBE_DEBUG
        if (probe_debug & 0x0040) {
@@ -1073,11 +1062,6 @@ static int check_harder(probectl *P, PROBETYPE *p)
     unsigned long ip1;
     int i, s;
 
-#if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
-    i = check_table_readable(P, p);
-    if (i >= 0) return 0;
-#endif
-
     /* Check zapped syscalls */
     for (i = 1; i < P->n_zapped_syscalls; i++) {
        if (p[_SS(P->zapped_syscalls[i])] != p[_SS(P->zapped_syscalls[0])]) {
@@ -1365,7 +1349,7 @@ static void *do_find_syscall_table(probectl *P, char **method)
 }
 
 #if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
-static int check_access(unsigned long address, int mode
+static int check_writable(unsigned long address
 { 
     pgd_t *pgd = pgd_offset_k(address);
 #ifdef PUD_SIZE
@@ -1390,34 +1374,10 @@ static int check_access(unsigned long address, int mode)
        pte = (pte_t *)pmd;
     else
        pte = pte_offset_kernel(pmd, address);
-    if (pte_none(*pte) || !pte_present(*pte))
-       return 0;
-    if (mode && !pte_write(*pte))
+    if (pte_none(*pte) || !pte_present(*pte) || !pte_write(*pte))
        return 0;
     return 1;
 }
-
-static int check_table_readable(probectl *P, PROBETYPE *ptr)
-{
-    PROBETYPE *next_page;
-    int i = 0, delta;
-
-    while (i < _SS(NR_syscalls)) {
-       next_page = (PROBETYPE *)PAGE_ALIGN((unsigned long)(ptr+1));
-       delta = next_page - ptr;
-       if (!check_access((unsigned long)ptr, 0)) {
-#ifdef OSI_PROBE_DEBUG
-           if (probe_debug & 0x0080)
-               printk("<7>osi_probe: %s                      0x%016lx not readable; delta=0x%lx\n",
-                      P->symbol, (unsigned long)ptr, delta);
-#endif
-           return delta - 1;
-       }
-       ptr += delta;
-       i += delta;
-    }
-    return -1;
-}
 #endif
 
 void *osi_find_syscall_table(int which)
@@ -1445,7 +1405,7 @@ void *osi_find_syscall_table(int which)
     }
     printk("Found %s at 0x%lx (%s)\n", P->desc, (unsigned long)answer, method);
 #if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
-    if (!check_access((unsigned long)answer, 1)) {
+    if (!check_writable((unsigned long)answer)) {
        printk("Address 0x%lx is not writable.\n", (unsigned long)answer);
        printk("System call hooks will not be installed; proceeding anyway\n");
        return 0;
index 5a862f7fd240fc8f2d5e94bba683bbc05eaa5bc2..de782acd49c7d8169b01a94250fe1d4beeba8134 100644 (file)
@@ -205,11 +205,7 @@ afs_osi_SleepSig(void *event)
 #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
            !current->todo
 #else
-#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
             test_ti_thread_flag(current->thread_info, TIF_FREEZE)
-#else
-            test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
-#endif
 #endif
 #endif
            )
@@ -244,20 +240,19 @@ void
 afs_osi_Sleep(void *event)
 {
     sigset_t saved_set;
-    unsigned long f;
 
-    SIG_LOCK(current,f);
+    SIG_LOCK(current);
     saved_set = current->blocked;
     sigfillset(&current->blocked);
     RECALC_SIGPENDING(current);
-    SIG_UNLOCK(current,f);
+    SIG_UNLOCK(current);
 
     afs_osi_SleepSig(event);
 
-    SIG_LOCK(current,f);
+    SIG_LOCK(current);
     current->blocked = saved_set;
     RECALC_SIGPENDING(current);
-    SIG_UNLOCK(current,f);
+    SIG_UNLOCK(current);
 }
 
 /* osi_TimedSleep
@@ -308,11 +303,7 @@ osi_TimedSleep(char *event, afs_int32 ams, int aintok)
 #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
            !current->todo
 #else
-#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
             test_ti_thread_flag(current->thread_info, TIF_FREEZE)
-#else
-            test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
-#endif
 #endif
 #endif
            )
index 56c0bcb8c5c9e1ba8bc6eff05a7a97671704b350..580a10e0b311b10cd89ab68240699c0971fced9d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * osi_sysctl.c: Linux sysctl interface to OpenAFS
  *
- * $Id: osi_sysctl.c,v 1.7.2.5 2007/06/12 18:28:49 shadow Exp $
+ * $Id: osi_sysctl.c,v 1.7.2.4 2007/02/22 21:49:01 shadow Exp $
  *
  * Written Jan 30, 2002 by Kris Van Hees (Sine Nomine Associates)
  */
@@ -27,64 +27,35 @@ extern afs_int32 hm_retry_int;
 static struct ctl_table_header *afs_sysctl = NULL;
 
 static ctl_table afs_sysctl_table[] = {
-    {
-       .ctl_name       = 1, 
-       .procname       = "hm_retry_RO",
-       .data           = &hm_retry_RO, 
-       .maxlen         = sizeof(afs_int32), 
-       .mode           = 0644,
-       .proc_handler   = &proc_dointvec
-    },
-    {
-        .ctl_name      = 2, 
-        .procname      = "hm_retry_RW",
-        .data          = &hm_retry_RW,
-       .maxlen         = sizeof(afs_int32), 
-       .mode           = 0644,
-       .proc_handler   = &proc_dointvec
-    },
-    {
-       .ctl_name       = 3, 
-       .procname       = "hm_retry_int",
-       .data           = &hm_retry_int, 
-       .maxlen         = sizeof(afs_int32), 
-       .mode           = 0644,
-       .proc_handler   = &proc_dointvec
-    },
-    {
-       .ctl_name       = 4, 
-       .procname       = "GCPAGs",
-       .data           = &afs_gcpags, 
-       .maxlen         = sizeof(afs_int32), 
-       .mode           = 0644,
-       .proc_handler   = &proc_dointvec
-    },
-    {
-       .ctl_name       = 5, 
-       .procname       = "rx_deadtime",
-       .data           = &afs_rx_deadtime, 
-       .maxlen         = sizeof(afs_int32), 
-       .mode           = 0644,
-       .proc_handler   = &proc_dointvec
-    },
-    {
-       .ctl_name       = 6, 
-       .procname       = "bkVolPref",
-       .data           = &afs_bkvolpref, 
-       .maxlen         = sizeof(afs_int32), 
-       .mode           = 0644,
-       .proc_handler   = &proc_dointvec
-    },
+    {1, "hm_retry_RO",
+     &hm_retry_RO, sizeof(afs_int32), 0644, NULL,
+     &proc_dointvec}
+    ,
+    {2, "hm_retry_RW",
+     &hm_retry_RW, sizeof(afs_int32), 0644, NULL,
+     &proc_dointvec}
+    ,
+    {3, "hm_retry_int",
+     &hm_retry_int, sizeof(afs_int32), 0644, NULL,
+     &proc_dointvec}
+    ,
+    {4, "GCPAGs",
+     &afs_gcpags, sizeof(afs_int32), 0644, NULL,
+     &proc_dointvec}
+    ,
+    {5, "rx_deadtime",
+     &afs_rx_deadtime, sizeof(afs_int32), 0644, NULL,
+     &proc_dointvec}
+    ,
+    {6, "bkVolPref",
+     &afs_bkvolpref, sizeof(afs_int32), 0644, NULL,
+     &proc_dointvec}
+    ,
     {0}
 };
 
 static ctl_table fs_sysctl_table[] = {
-    {
-       .ctl_name       = 1, 
-       .procname       = "afs", 
-       .mode           = 0555, 
-       .child          = afs_sysctl_table
-    },
+    {1, "afs", NULL, 0, 0555, afs_sysctl_table},
     {0}
 };
 
index 1e01cd7a3f4a2bf36b008bc506dc489a14fdab57..b9ad8d2f63951fcf7e783c4a32353259696db54a 100644 (file)
@@ -292,10 +292,8 @@ init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
 {
     struct vcache *vcp = (struct vcache *) foo;
 
-#if defined(SLAB_CTOR_VERIFY)
     if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
        SLAB_CTOR_CONSTRUCTOR)
-#endif
        inode_init_once(AFSTOV(vcp));
 }
 
index 108e63db51647c4732a447e1646e6d59d6d48bf3..7c761b61746110a7f39ef0428a200701c7f45777 100644 (file)
@@ -473,11 +473,11 @@ afs_linux_lock(struct file *fp, int cmd, struct file_lock *flp)
 #ifdef AFS_LINUX24_ENV
     if ((code == 0 || flp->fl_type == F_UNLCK) && 
         (cmd == F_SETLK || cmd == F_SETLKW)) {
-#ifdef POSIX_LOCK_FILE_WAIT_ARG
-       code = posix_lock_file(fp, flp, 0);
-#else
+#ifdef AFS_LINUX26_ENV
        flp->fl_flags &=~ FL_SLEEP;
        code = posix_lock_file(fp, flp);
+#else
+       code = posix_lock_file(fp, flp, 0);
 #endif 
        if (code && flp->fl_type != F_UNLCK) {
            struct AFS_FLOCK flock2;
index 2f15bdae29660a41ed6cc0098c8b46b758ab2008..c03c8b90ca4fa08bd7c965513c0b32f22ad14a3e 100644 (file)
@@ -13,7 +13,7 @@ include @TOP_OBJDIR@/src/config/Makefile.config
 all: depinstall
 
 depinstall: ${TOP_INCDIR}/afs/afs.h ${TOP_INCDIR}/afs/osi_inode.h ${TOP_INCDIR}/afs/afs_stats.h \
-       ${TOP_INCDIR}/afs/exporter.h ${TOP_INCDIR}/afs/nfsclient.h afszcm.cat AFS_component_version_number.c ${TOP_INCDIR}/afs/unified_afs.h
+       ${TOP_INCDIR}/afs/exporter.h ${TOP_INCDIR}/afs/nfsclient.h afszcm.cat AFS_component_version_number.c ${TOP_INCDIR}/afs/unified_afs.h ${TOP_INCDIR}/afs/sysctl.h
        case ${SYS_NAME} in \
                pmax_ul43 | pmax_ul43a) \
                        ${INSTALL} longc_procs.h ${TOP_INCDIR}/afs ;; \
@@ -43,7 +43,7 @@ afszcm.cat: afs_trace.msf
                        gencat afszcm.cat afs_trace.msf ;; \
        esac
 
-install:   ${DESTDIR}${includedir}/afs/afs.h  ${DESTDIR}${includedir}/afs/osi_inode.h ${DESTDIR}${includedir}/afs/afs_stats.h ${DESTDIR}${includedir}/afs/exporter.h ${DESTDIR}${includedir}/afs/nfsclient.h ${DESTDIR}${includedir}/afs/unified_afs.h
+install:   ${DESTDIR}${includedir}/afs/afs.h  ${DESTDIR}${includedir}/afs/osi_inode.h ${DESTDIR}${includedir}/afs/afs_stats.h ${DESTDIR}${includedir}/afs/exporter.h ${DESTDIR}${includedir}/afs/nfsclient.h ${DESTDIR}${includedir}/afs/unified_afs.h ${DESTDIR}${includedir}/afs/sysctl.h
        case ${SYS_NAME} in \
                pmax_ul43 | pmax_ul43a) \
                        ${INSTALL} longc_procs.h ${DESTDIR}${includedir}/afs ;; \
@@ -131,7 +131,7 @@ ${TOP_INCDIR}/afs/nfsclient.h: nfsclient.h
        ${INSTALL} $? $@
 
 
-dest:   ${DEST}/include/afs/afs.h ${DEST}/include/afs/osi_inode.h ${DEST}/include/afs/afs_stats.h ${DEST}/include/afs/exporter.h ${DEST}/include/afs/nfsclient.h ${DEST}/include/afs/unified_afs.h
+dest:   ${DEST}/include/afs/afs.h ${DEST}/include/afs/osi_inode.h ${DEST}/include/afs/afs_stats.h ${DEST}/include/afs/exporter.h ${DEST}/include/afs/nfsclient.h ${DEST}/include/afs/unified_afs.h ${DEST}/include/afs/sysctl.h
        case ${SYS_NAME} in \
                pmax_ul43 | pmax_ul43a) \
                        ${INSTALL} longc_procs.h ${DEST}/include/afs ;; \
index 5522e1696f039344f1e9c3a2da309a34a184e5ee..f2fd255477631099171879b5628d1eed1e5de9cb 100644 (file)
@@ -858,8 +858,6 @@ afs_syscall_call(parm, parm2, parm3, parm4, parm5, parm6)
 #if    (!defined(AFS_NONFSTRANS)) || defined(AFS_AIX_IAUTH_ENV)
        afs_nfsclient_init();
 #endif
-       if (afs_cb_interface.numberOfInterfaces < 1)
-           afs_uuid_create(&afs_cb_interface.uuid);
        printf("found %d non-empty cache files (%d%%).\n",
               afs_stats_cmperf.cacheFilesReused,
               (100 * afs_stats_cmperf.cacheFilesReused) /
index 51607646459a1268bfc478918b2ded1ef381bec0..b50cf4d8abc1e411e5ccb6f2877842280a25a0ad 100644 (file)
@@ -16,7 +16,7 @@ AFSLIBS = ${TOP_LIBDIR}/libprot.a ${TOP_LIBDIR}/libubik.a \
 SRCS=  aklog.c aklog_main.c  krb_util.c linked_list.c
 OBJS=   aklog.o aklog_main.o krb_util.o linked_list.o
 
-all: aklog asetkey ka-forwarder
+all: aklog asetkey
 
 aklog: ${OBJS} ${AFSLIBS}
        ${CC} -o $@ ${CFLAGS} ${OBJS} ${AKLIBS} ${AFSLIBS} ${XLIBS}
@@ -24,16 +24,11 @@ aklog:      ${OBJS} ${AFSLIBS}
 asetkey: asetkey.o ${AFSLIBS}
        ${CC} -o $@ ${CFLAGS} asetkey.o ${AKLIBS} ${AFSLIBS} ${XLIBS}
 
-ka-forwarder: ka-forwarder.o
-       ${CC} -o $@ ${CFLAGS} ka-forwarder.o ${LIBS} ${XLIBS}
-
 #
 # Installation targets
 #
 install: \
-       ${DESTDIR}${bindir}/aklog \
-       ${DESTDIR}${afssrvbindir}/asetkey \
-       ${DESTDIR}${afssrvbindir}/ka-forwarder
+       ${DESTDIR}${bindir}/aklog ${DESTDIR}${afssrvbindir}/asetkey
 
 ${DESTDIR}${bindir}/aklog: aklog
        ${INSTALL} $? $@
@@ -41,13 +36,8 @@ ${DESTDIR}${bindir}/aklog: aklog
 ${DESTDIR}${afssrvbindir}/asetkey: asetkey
        ${INSTALL} $? $@
 
-${DESTDIR}${afssrvbindir}/ka-forwarder: ka-forwarder
-       ${INSTALL} $? $@
-
 dest: \
-       ${DEST}/bin/aklog \
-       ${DEST}/root.server/usr/afs/bin/asetkey \
-       ${DEST}/root.server/usr/afs/bin/ka-forwarder
+       ${DEST}/bin/aklog ${DEST}/root.server/usr/afs/bin/asetkey
 
 ${DEST}/bin/aklog: aklog
        ${INSTALL} $? $@
@@ -55,14 +45,11 @@ ${DEST}/bin/aklog: aklog
 ${DEST}/root.server/usr/afs/bin/asetkey: asetkey
        ${INSTALL} $? $@
 
-${DEST}/root.server/usr/afs/bin/ka-forwarder: ka-forwarder
-       ${INSTALL} $? $@
-
 #
 # Misc. targets
 #
 clean:
-       $(RM) -f *.o ${OBJS} aklog asetkey ka-forwarder
+       $(RM) -f *.o ${OBJS} aklog asetkey
 
 include ../config/Makefile.version
 
diff --git a/src/aklog/ka-forwarder.c b/src/aklog/ka-forwarder.c
deleted file mode 100644 (file)
index f8732d3..0000000
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * COPYRIGHT NOTICE
- * Copyright (c) 1994 Carnegie Mellon University
- * All Rights Reserved.
- * 
- * See <cmu_copyright.h> for use and distribution information.
- */
-
-/*
- * HISTORY
- * $Log: ka-forwarder.c,v $
- * Revision 1.1  1997/06/03 18:23:54  kenh
- * .
- *
- * Revision 1.4  1996/08/09  01:00:21  jhutz
- *     When initializing the array of fakeka servers, remember to set
- *     the address family of each server; otherwise SunOS complains.
- *     [1996/08/09  00:58:46  jhutz]
- *
- * Revision 1.3  1996/08/09  00:17:19  jhutz
- *     Merged in changes from Chuck Silvers:
- *     - Support for more than one fakeka server
- *     - Support for specifying ports for each fakeka server separately from the
- *       others, and from the port we listen on.
- * 
- *     Plus a minor bug fix to Chuck's code.
- *     Basically, this version is designed to provide both reliability and
- *     load-balancing cheaply.  Basically, we forward packets to all of the
- *     fakeka servers in round-robin fashion.  So, if a client is losing on
- *     one server, its retry should go to a different one, if more than one
- *     is specified.
- *     [1996/08/03  02:13:36  jhutz]
- * 
- * Revision 1.2  1995/02/23  18:26:36  chs
- *     Created.
- *     [1995/02/23  18:26:03  chs]
- * 
- * $EndLog$
- */
-
-/*
- * This program is intended to run on afs DB servers.
- * Its function is to forward KA requests to a fakeka server
- * running on an MIT kerberos server.
- */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <stdio.h>
-#include <netdb.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <syslog.h>
-#include <unistd.h>
-
-#if    HAVE_GETOPT_H
-#include <getopt.h>
-#else
-int getopt (int, char * const *, const char *);
-int optind, opterr;
-char *optarg;
-#endif
-
-#define BUFFER_SIZE 2048
-
-
-char *prog;
-
-int num_servers, cur_server;
-struct sockaddr_in *servers;
-
-
-void
-perrorexit(str)
-char *str;
-{
-    perror(str);
-    exit(1);
-}
-
-
-void
-setup_servers(argc, argv)
-int argc;
-char **argv;
-{
-    int i;
-    u_int fwdaddr;
-    u_short fwdport;
-
-    num_servers = argc;
-
-    servers = malloc(sizeof(*servers) * num_servers);
-    if (servers == NULL)
-       perrorexit("malloc failed");
-
-    for (i = 0; i < num_servers; i++) {
-       char *host, *port;
-
-       fwdport = htons(7004);
-
-       host = argv[i];
-       port = strchr(host, '/');
-       if (port != NULL) {
-           *port++ = 0;
-
-           if (isdigit(port[0])) {
-               fwdport = htons(atoi(port));
-           }
-           else {
-               struct servent *srv = getservbyname(port, "udp");
-               if (!srv) {
-                   fprintf(stderr, "%s: unknown service %s\n", prog, port);
-                   exit(1);
-               }
-               fwdport = srv->s_port;
-           }
-       }
-
-       if (isdigit(host[0])) {
-           fwdaddr = inet_addr(host);
-       }
-       else {
-           struct hostent *h = gethostbyname(host);
-           if (!h) {
-               fprintf(stderr, "%s: unknown host %s\n", prog, host);
-               exit(1);
-           }
-           bcopy(h->h_addr, &fwdaddr, 4);
-       }
-
-       servers[i].sin_family = AF_INET;
-       servers[i].sin_addr.s_addr = fwdaddr;
-       servers[i].sin_port = fwdport;
-    }
-}
-
-
-int
-setup_socket(port)
-u_short port;
-{
-    int s, rv;
-    struct sockaddr_in sin;
-
-    s = socket(AF_INET, SOCK_DGRAM, 0);
-    if (s < 0)
-       perrorexit("Couldn't create socket");
-
-    sin.sin_family = AF_INET;
-    sin.sin_addr.s_addr = 0;
-    sin.sin_port = htons(port);
-
-    rv = bind(s, (struct sockaddr *)&sin, sizeof(sin));
-    if (rv < 0)
-       perrorexit("Couldn't bind socket");
-
-    return s;
-}
-
-
-int
-packet_is_reply(from)
-struct sockaddr_in *from;
-{
-    int i;
-
-    for (i = 0; i < num_servers; i++) {
-       struct sockaddr_in *sin = &servers[i];
-
-       if (from->sin_addr.s_addr == sin->sin_addr.s_addr &&
-           from->sin_port == sin->sin_port)
-       {
-           return 1;
-       }
-    }
-
-    return 0;
-}
-
-
-int
-main(argc, argv)
-int argc;
-char **argv;
-{
-    int c, s, rv;
-    u_short port;
-
-    if (argc < 2) {
-       fprintf(stderr,
-               "usage: %s [-p port] <host>[/port] [host/port ...]\n",
-               argv[0]);
-       exit(1);
-    }
-
-    prog = argv[0];
-    port = 7004;
-
-    while ((c = getopt(argc, argv, "p:")) != -1) {
-       switch (c) {
-       case 'p':
-           port = atoi(optarg);
-           break;
-       default:
-           fprintf(stderr, "%s: invalid option '%c'\n", prog, c);
-           exit(1);
-       }
-    }
-
-    /*
-     * hmm, different implementations of getopt seem to do different things
-     * when there aren't any options.  linux sets optind = 1, which I would
-     * call correct, but sunos sets optind = 0.  try to do the right thing.
-     */
-    if (optind == 0)
-       optind = 1;
-
-    setup_servers(argc - optind, argv + optind);
-    s = setup_socket(port);
-
-    openlog("ka-forwarder", LOG_PID, LOG_DAEMON);
-
-    for (;;) {
-       char buf[BUFFER_SIZE], *bufp, *sendptr;
-       struct sockaddr_in from, reply, *to;
-       int fromlen, sendlen;
-
-       bufp = buf + 8;
-       fromlen = sizeof(from);
-
-       rv = recvfrom(s, bufp, sizeof(buf) - 8,
-                     0, (struct sockaddr *)&from, &fromlen);
-       if (rv < 0) {
-           syslog(LOG_ERR, "recvfrom: %m");
-           sleep(1);
-           continue;
-       }
-
-       if (packet_is_reply(&from)) {
-           /* this is a reply, forward back to user */
-
-           to = &reply;
-           reply.sin_family = AF_INET;
-           bcopy(bufp, &reply.sin_addr.s_addr, 4);
-           bcopy(bufp + 4, &reply.sin_port, 2);
-           sendptr = bufp + 8;
-           sendlen = rv - 8;
-       }
-       else {
-           /* this is a request, forward to server */
-
-           cur_server = (cur_server + 1) % num_servers;
-           to = &servers[cur_server];
-
-           bcopy(&from.sin_addr.s_addr, bufp - 8, 4);
-           bcopy(&from.sin_port, bufp - 4, 2);
-
-           sendptr = bufp - 8;
-           sendlen = rv + 8;
-       }
-
-       {
-           char a1[16], a2[16];
-           strcpy(a1, inet_ntoa(from.sin_addr));
-           strcpy(a2, inet_ntoa(to->sin_addr));
-
-           syslog(LOG_INFO, "forwarding %d bytes from %s/%d to %s/%d\n",
-                  sendlen, a1, htons(from.sin_port), a2, htons(to->sin_port));
-       }
-
-       rv = sendto(s, sendptr, sendlen,
-                   0, (struct sockaddr *)to, sizeof(*to));
-       if (rv < 0) {
-           syslog(LOG_ERR, "sendto: %m");
-       }
-    }
-}
index 794830188bda5fd21b1ce1b99d18ddd0a54d6862..ce506a70d53f7675e37da7d15d1caf862117cb72 100644 (file)
@@ -1324,12 +1324,12 @@ SBOZO_EnumerateInstance(acall, anum, ainstance)
 
 struct bozo_bosEntryStats bozo_bosEntryStats[] = {
     {NULL, 1, 1, 0755, 02},    /* AFSDIR_SERVER_AFS_DIRPATH    */
-    {NULL, 1, 1, 0700, 02},    /* AFSDIR_SERVER_ETC_DIRPATH    */
+    {NULL, 1, 1, 0755, 02},    /* AFSDIR_SERVER_ETC_DIRPATH    */
     {NULL, 1, 1, 0755, 02},    /* AFSDIR_SERVER_BIN_DIRPATH    */
     {NULL, 1, 1, 0755, 02},    /* AFSDIR_SERVER_LOGS_DIRPATH   */
     {NULL, 1, 0, 0700, 07},    /* AFSDIR_SERVER_BACKUP_DIRPATH */
     {NULL, 1, 1, 0700, 07},    /* AFSDIR_SERVER_DB_DIRPATH     */
-    {NULL, 1, 1, 0700, 02},    /* AFSDIR_SERVER_LOCAL_DIRPATH  */
+    {NULL, 1, 1, 0700, 07},    /* AFSDIR_SERVER_LOCAL_DIRPATH  */
     {NULL, 0, 1, 0600, 07},    /* AFSDIR_SERVER_KEY_FILEPATH   */
     {NULL, 0, 1, 0600, 03}
 };                             /* AFSDIR_SERVER_ULIST_FILEPATH */
index cc6908c844eb98d33d15cdbc31450d026a6824e0..653464fb6e145fdd60e49a3fe926677623e27873 100644 (file)
@@ -444,18 +444,6 @@ printk("%d\n", _tsk.exit_state);],
   AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_exit_state)])
 
 
-AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_THREAD_INFO], [
-  AC_MSG_CHECKING([for thread_info in struct task_struct])
-  AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_thread_info], [
-    AC_TRY_KBUILD(
-[#include <linux/sched.h>],
-[struct task_struct _tsk;
-printk("%d\n", _tsk.thread_info);],
-      ac_cv_linux_sched_struct_task_struct_has_thread_info=yes,
-      ac_cv_linux_sched_struct_task_struct_has_thread_info=no)])
-  AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_thread_info)])
-
-
 AC_DEFUN([LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE], [
   AC_MSG_CHECKING([for alloc_inode in struct super_operations])
   AC_CACHE_VAL([ac_cv_linux_fs_struct_super_has_alloc_inode], [
@@ -468,17 +456,6 @@ printk("%p\n", _super.alloc_inode);],
   AC_MSG_RESULT($ac_cv_linux_fs_struct_super_has_alloc_inode)])
 
 
-AC_DEFUN([LINUX_KERNEL_POSIX_LOCK_FILE_WAIT_ARG], [
-  AC_MSG_CHECKING([for 3rd argument in posix_lock_file found in new kernels])
-  AC_CACHE_VAL([ac_cv_linux_kernel_posix_lock_file_wait_arg], [
-    AC_TRY_KBUILD(
-[#include <linux/fs.h>],
-[posix_lock_file(0,0,0);],
-      ac_cv_linux_kernel_posix_lock_file_wait_arg=yes,
-      ac_cv_linux_kernel_posix_lock_file_wait_arg=no)])
-  AC_MSG_RESULT($ac_cv_linux_kernel_posix_lock_file_wait_arg)])
-
-
 AC_DEFUN([LINUX_KERNEL_SOCK_CREATE], [
   AC_MSG_CHECKING([for 5th argument in sock_create found in some SELinux kernels])
   AC_CACHE_VAL([ac_cv_linux_kernel_sock_create_v], [
index 0fcd3eb02330ad668bd3b8960bada55745894267..29567b25bd0649da3cea848f875445433bf77295 100644 (file)
@@ -4,8 +4,9 @@ AC_DEFUN([OPENAFS_OSCONF], [
 dnl defaults, override in case below as needed
 XCFLAGS='${DBG} ${OPTMZ}'
 SHLIB_SUFFIX="so"
-CCOBJ=$CC
-MT_CC=$CC
+CC="cc"
+CCOBJ="cc"
+MT_CC="cc"
 XLIBS="${LIB_AFSDB}"
 
 dnl debugging and optimization flag defaults
@@ -243,7 +244,6 @@ case $AFS_SYSNAME in
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
-               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
                TXLIBS="-lncurses"
                XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE -G0"
@@ -271,7 +271,6 @@ case $AFS_SYSNAME in
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
-               SHLIB_CFLAGS="-fPIC"
                TXLIBS="/usr/lib64/libncurses.so"
                XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
                SHLIB_LINKER="${MT_CC} -shared"
@@ -292,14 +291,14 @@ case $AFS_SYSNAME in
                ;;
 
        i386_umlinux22)
-               CCOBJ="${CC} -pipe"
-               MT_CC="${CC} -pipe"
+               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"
                PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
-               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
                TXLIBS="-lncurses"
                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
@@ -308,8 +307,9 @@ case $AFS_SYSNAME in
                ;;
 
        i386_linux*)
-               CCOBJ="${CC} -pipe"
-               MT_CC="${CC} -pipe"
+               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}'
@@ -320,7 +320,6 @@ case $AFS_SYSNAME in
                LWP_OPTMZ=-O2
                OPTMZ=-O2
                PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
-               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
                TXLIBS="-lncurses"
                XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
@@ -328,8 +327,9 @@ case $AFS_SYSNAME in
                ;;
 
        i386_umlinux24)
-               CCOBJ="${CC} -pipe"
-               MT_CC="${CC} -pipe"
+               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}'
@@ -340,7 +340,6 @@ case $AFS_SYSNAME in
                LWP_OPTMZ=-O2
                OPTMZ=-O2
                PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
-               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
                TXLIBS="-lncurses"
                XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
@@ -348,8 +347,9 @@ case $AFS_SYSNAME in
                ;;
 
        i386_umlinux26)
-               CCOBJ="${CC} -pipe"
-               MT_CC="${CC} -pipe"
+               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}'
@@ -360,7 +360,6 @@ case $AFS_SYSNAME in
                LWP_OPTMZ=-O2
                OPTMZ=-O2
                PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
-               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
                TXLIBS="-lncurses"
                XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
@@ -386,7 +385,6 @@ case $AFS_SYSNAME in
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
-               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
                TXLIBS="-lncurses"
                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
@@ -557,7 +555,8 @@ case $AFS_SYSNAME in
                ;;
 
        s390_linux22)
-               CCOBJ="$CC"
+               CC="gcc"
+               CCOBJ="gcc"
                LD="ld"
                KERN_OPTMZ=-O2
                LEX="flex -l"
@@ -565,7 +564,6 @@ case $AFS_SYSNAME in
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
-               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
                TXLIBS="-lncurses"
                XCFLAGS="-O -g -D_LARGEFILE64_SOURCE"
@@ -574,7 +572,8 @@ case $AFS_SYSNAME in
                ;;
 
        s390_linux24|s390_linux26)
-               CCOBJ="$CC"
+               CC="gcc"
+               CCOBJ="gcc"
                LD="ld"
                KERN_OPTMZ=-O2
                LEX="flex -l"
@@ -582,7 +581,6 @@ case $AFS_SYSNAME in
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
-               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
                TXLIBS="-lncurses"
                XCFLAGS="-O -g -D_LARGEFILE64_SOURCE"
@@ -591,7 +589,8 @@ case $AFS_SYSNAME in
                ;;
 
        s390x_linux24|s390x_linux26)
-               CCOBJ="$CC"
+               CC="gcc"
+               CCOBJ="gcc -fPIC"
                LD="ld"
                KERN_OPTMZ=-O2
                LEX="flex -l"
@@ -599,7 +598,6 @@ case $AFS_SYSNAME in
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
-               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x -Xlinker -Bsymbolic"
                TXLIBS="-lncurses"
                XCFLAGS="-O -g -D_LARGEFILE64_SOURCE -D__s390x__"
@@ -669,13 +667,12 @@ case $AFS_SYSNAME in
                SHLIB_LINKER="${CC} -shared"
                ;;
 
-       sparc*_linux*)
+       sparc64_linux*)
                KERN_OPTMZ=-O2
                LEX="flex -l"
                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
-               SHLIB_CFLAGS="-fPIC"
                SHLIB_LDFLAGS="-shared -Xlinker -x"
                TXLIBS="-lncurses"
                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
@@ -685,6 +682,19 @@ case $AFS_SYSNAME in
                SHLIB_LINKER="${MT_CC} -shared"
                ;;
 
+       sparc_linux22)
+               KERN_OPTMZ=-O2
+               LEX="flex -l"
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_LIBS="-lpthread"
+               PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
+               SHLIB_LDFLAGS="-shared -Xlinker -x"
+               TXLIBS="-lncurses"
+               XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
+               YACC="bison -y"
+               SHLIB_LINKER="${MT_CC} -shared"
+               ;;
+
        sun4_413)
                CCXPG2="/usr/xpg2bin/cc"
                CC="gcc"
index ebc8437a6c517d46302dac36fe7af647e548324c..caa7b253d08ca463f516d396fe26a880921dd697 100644 (file)
@@ -38,7 +38,7 @@ found_one="false"
 CAN_BUILD=""
 
 for VERS in $LINUX_VERS ; do
-       dir=$LINUX_SRCDIR
+       dir=$LINUX_SRCDIR$VERS
        if [ ! -d $dir ] ; then
            dir=$LINUX_SRCDIR
            if [ ! -d $dir ] ; then
@@ -47,7 +47,7 @@ for VERS in $LINUX_VERS ; do
                continue
            fi
        fi
-       header=$LINUX_SRCDIR/include/linux/version.h
+       header=$LINUX_SRCDIR$VERS/include/linux/version.h
        if [ ! -f $header ] ; then
            header=$LINUX_SRCDIR/include/linux/version.h
            if [ ! -f $header ] ; then
index 2ec3ba147797f26347aabff10ba8cca7fd053b70..1d44da6d742b4054bfc8dfa209710ecd9b0ee1ec 100644 (file)
 #define SYS_NAME_ID    SYS_NAME_ID_alpha_linux_26
 
 
-#ifdef __GLIBC__
-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-#define USE_UCONTEXT
-#endif
-#endif
 #endif /* AFS_PARAM_H */
                                     
 #else /* !defined(UKERNEL) */
index 47c36980022cf42e8a22ad3839e8c27d0edbe0f8..e5f9a49bb39ca78eddab0af7cbb9da8eb2b37212 100644 (file)
@@ -87,7 +87,6 @@
 #endif
 #endif /* KERNEL */
 
-#define USE_UCONTEXT           /* should be in afsconfig.h */
 
 #endif /* _PARAM_IA64_LINUX20_H_ */
 
 #define CMSERVERPREF
 #endif
 
-#define USE_UCONTEXT           /* should be in afsconfig.h */
 
 #endif /* AFS_PARAM_H */
 
index d534f06c392088b0c3a212229941f8d4e5851654..5f28d47a34463a375543a56ecba3bc6861dfd63e 100644 (file)
@@ -96,7 +96,6 @@
 #endif
 #endif /* KERNEL */
 
-#define USE_UCONTEXT           /* should be in afsconfig.h */
 
 #endif /* _PARAM_IA64_LINUX20_H_ */
 
 #define CMSERVERPREF
 #endif
 
-#define USE_UCONTEXT           /* should be in afsconfig.h */
 
 #endif /* AFS_PARAM_H */
 
index e70234abb69b1bab23e09939573073778604d730..ad7506f5e5ea85a45c4d29a979797be7f986b570 100644 (file)
 #endif
 #endif /* KERNEL */
 
-#ifdef __GLIBC__
-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-#define USE_UCONTEXT
-#endif
-#endif
 #endif /* AFS_PARAM_H */
 
 #else /* !defined(UKERNEL) */
index 11f7557bd12bb552514291770a8d7866c9927b6e..730caf37c4fe7f251e610578f6bef86944f6d14c 100644 (file)
 #endif
 #endif /* KERNEL */
 
-#ifdef __GLIBC__
-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-#define USE_UCONTEXT
-#endif
-#endif
 #endif /* _PARAM_PPC64_LINUX20_H_ */
 
 #else /* !defined(UKERNEL) */
index d9dd4d8f9e5014ef848aa941e47517fb38ed622c..37abeacb9dd31f47224dec99443a4f9b73044daf 100644 (file)
 #endif
 #endif /* KERNEL */
 
-#ifdef __GLIBC__
-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-#define USE_UCONTEXT
-#endif
-#endif
 #endif /* AFS_PARAM_H */
 
 #else /* !defined(UKERNEL) */
index cf3ebf7e12b968451626f0eb9473aac754f301d3..a941c28c384e186d7f8fc614bdd35517d4b5ad3d 100644 (file)
 #endif
 #endif /* KERNEL */
 
-#ifdef __GLIBC__
-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-#define USE_UCONTEXT
-#endif
-#endif
 #endif /* AFS_PARAM_H */
 
 #else /* !defined(UKERNEL) */
index bb3bc8515829ee53074e06e232e3d50a65ea7033..5ad1806f46ef19cd0e01239a54ac60a351e300f7 100644 (file)
 #endif
 #endif /* KERNEL */
 
-#ifdef __GLIBC__
-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-#define USE_UCONTEXT
-#endif
-#endif
 #endif /* AFS_PARAM_H */
 
 #else /* !defined(UKERNEL) */
index 30550e2cfa924989eefb49351fb8e8b33522c159..68bd28a24013e429545a66f5b181277d75ec9f6c 100644 (file)
 #endif
 #endif
 
-#ifdef __GLIBC__
-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-#define USE_UCONTEXT
-#endif
-#endif
 #endif /* _PARAM_SPARC64_LINUX26_H_ */
 
 #else /* !defined(UKERNEL) */
index 7373559e2f3b3e21df9d50087aefabb0466d6eb5..3082a524e7cf267f2a4e61c68f6f0a18afb3f50b 100644 (file)
 #endif
 #endif
 
-#ifdef __GLIBC__
-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-#define USE_UCONTEXT
-#endif
-#endif
 #endif /* AFS_PARAM_H */
 
 #else /* !defined(UKERNEL) */
index 91c8ba534122630281cbbfe0f5fbffa19dff36c3..e75e90af1193fe01f19a8c790cbb97d193f16ca3 100644 (file)
 typedef unsigned char des_cblock[8];   /* crypto-block size */
 /* Key schedule */
 typedef struct des_ks_struct {
-    union {
-        afs_uint32 i[2];
-        des_cblock _;
-    } _;
+    des_cblock _;
 } des_key_schedule[16];
 
 #define DES_KEY_SZ     (sizeof(des_cblock))
index 6270cd160b0410a7a035c87fe3581d53a67ed0cf..cb28d1fd03439d533ad5542b8c2e9171e440700a 100644 (file)
@@ -24,9 +24,9 @@
 #ifndef KERNEL
 #include <stdio.h>
 #endif
+#include <des.h>
 #include <afsconfig.h>
 #include <afs/param.h>
-#include <des.h>
 #include "des_prototypes.h"
 
 RCSID
index cb9505e5fa2a66f5ae3cf13e98734ca8f6b012ca..6b7895d6f3e324455829ce6ff617ee49db0cba29 100644 (file)
@@ -222,8 +222,8 @@ linux_destdirs_libafs.bm: dest_libafs.bm
 
 # Below this line are targets when in the COMMON directory:
 # For Linux there is no kernel NFS server.
-LIBAFS = openafs.${LINUX_MODULE_EXT}
-LIBAFS_MP = openafs.${LINUX_MODULE_EXT}
+LIBAFS = libafs-${CLIENT}.${LINUX_MODULE_EXT}
+LIBAFS_MP = libafs-${CLIENT}.mp.${LINUX_MODULE_EXT}
 LIBAFS_EP = libafs-${CLIENT}.ep.${LINUX_MODULE_EXT}
 LIBAFS_BM = libafs-${CLIENT}.bm.${LINUX_MODULE_EXT}
 
@@ -232,8 +232,10 @@ INST_LIBAFS_MP = ${DESTDIR}${afskerneldir}/${LIBAFS_MP}
 INST_LIBAFS_EP = ${DESTDIR}${afskerneldir}/${LIBAFS_EP}
 INST_LIBAFS_BM = ${DESTDIR}${afskerneldir}/${LIBAFS_BM}
 
-DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/openafs.o
-DEST_LIBAFS_MP = ${DEST}/root.client/usr/vice/etc/modload/openafs.mp.o
+DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS}
+DEST_LIBAFS_MP = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS_MP}
+DEST_LIBAFS_EP = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS_EP}
+DEST_LIBAFS_BM = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS_BM}
 
 
 libafs:        $(LIBAFS) 
@@ -249,11 +251,11 @@ libafs.bm: $(LIBAFS_BM)
        echo BM Build Complete
 
 <linux26 linux_26 umlinux26>
-${LIBAFS} ${LIBAFS_MP} ${LIBAFS_EP} ${LIBAFS_BM}: openafs.ko
-       cp openafs.ko $@
+${LIBAFS} ${LIBAFS_MP} ${LIBAFS_EP} ${LIBAFS_BM}: libafs.ko
+       cp libafs.ko $@
 
 .FORCE:
-openafs.ko: .FORCE
+libafs.ko: .FORCE
        env EXTRA_CFLAGS="${EXTRA_CFLAGS}" @TOP_SRCDIR@/libafs/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
         
index dd10db1e327f637d251575ece4bc612b8c164c27..ce046e17234b008f9935e05750c362f31fe031b0 100755 (executable)
@@ -79,7 +79,7 @@ if (! -d $KDIR) {
 foreach (@objects) {
   die "No source known for $_\n" unless exists $deps{$_};
   if($deps{$_} =~ /\.s$/) {
-     ($src = $_) =~ s/\.o$/.S/;
+     ($src = $_) =~ s/\.o$/.s/;
   } else {
      ($src = $_) =~ s/\.o$/.c/;
   }
index 2cafd9a589cf987fe8c688f69544416a653ac118..6a195d477eb45495ec979677c7d46135dc337512 100644 (file)
@@ -92,9 +92,7 @@ returnto(savearea)
 #elif  defined(AFS_HPUX_ENV) || defined(AFS_PARISC_LINUX24_ENV)
 #define        LWP_SP  1
 #elif  defined(AFS_LINUX20_ENV)
-#if defined(AFS_PARISC_LINUX24_ENV )
-#define        LWP_SP  1
-#elif defined(AFS_PPC_LINUX20_ENV)|| defined(AFS_PPC64_LINUX20_ENV)
+#if defined(AFS_PPC_LINUX20_ENV) || defined(AFS_PPC64_LINUX20_ENV)
 #define LWP_SP 0
 #elif   defined(AFS_I386_LINUX20_ENV)
 #define LWP_SP 4
index c198ab0133e89af2d351eb24c2715dba1baf0a1f..4d5b0fd0a0a66d9429b7af1aa2811f493fc3a33e 100644 (file)
@@ -25,17 +25,7 @@ LDFLAGS = ${SHLIB_LDFLAGS}
          afs_pam_msg.o afs_message.o AFS_component_version_number.o
    OBJS = $(SHOBJS) test_pam.o
 INCLUDES=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} 
-CFLAGS =  ${DEBUG} ${INCLUDES} ${PAM_CFLAGS} ${MT_CFLAGS}
-
-# For Debian, we link directly with the object files that would have gone
-# into the libafsrpc and libafsauthent shared libraries.  The shared libraries
-# themselves cannot be used because the interface isn't stable and they have
-# no SONAME, but this is the easiest way of getting PIC objects built with the
-# pthread API.
-SHLIB_OBJS     := `ls ../shlibafsauthent/*.o | grep -v version_num` \
-                  `ls ../shlibafsrpc/*.o | grep -v version_num`
-KRB_SHLIB_OBJS := `ls ../shlibafsauthent/*.o | egrep -v 'version_num|ktc.o'` \
-                  `ls ../shlibafsrpc/*.o | grep -v version_num`
+CFLAGS =  ${DEBUG} ${INCLUDES} ${PAM_CFLAGS}
 
 all: test_pam ${TOP_LIBDIR}/pam_afs.so.1 ${TOP_LIBDIR}/pam_afs.krb.so.1
 
@@ -57,9 +47,6 @@ afs_util.o: afs_util.c afs_pam_msg.h afs_message.h afs_util.h
 afs_util_krb.o: afs_util.c afs_pam_msg.h afs_message.h afs_util.h
        ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/afs_util.c -o afs_util_krb.o
 
-ktc.o: ${srcdir}/../auth/ktc.c
-       ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/../auth/ktc.c
-
 pam_afs.so.1: $(SHOBJS) afs_setcred.o afs_auth.o afs_util.o
        set -x; \
        case "$(SYS_NAME)" in \
@@ -72,9 +59,8 @@ pam_afs.so.1: $(SHOBJS) afs_setcred.o afs_auth.o afs_util.o
                        afs_setcred.o afs_auth.o afs_util.o \
                        $(SHOBJS) $(LIBS) ;; \
        *linux*) \
-               $(CC) $(LDFLAGS) $(PAM_CFLAGS) -o $@ afs_setcred.o \
-                       afs_auth.o afs_util.o $(SHOBJS) $(SHLIB_OBJS) \
-                       $(MT_LIBS) -lpam -lresolv;;\
+               $(CC) $(LDFLAGS) -o $@ afs_setcred.o \
+                       afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\
        *fbsd*| *nbsd*) \
                $(CC) $(LDFLAGS) -o $@ afs_setcred.o \
                        afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\
@@ -82,7 +68,7 @@ pam_afs.so.1: $(SHOBJS) afs_setcred.o afs_auth.o afs_util.o
                echo No link line for system $(SYS_NAME). ;; \
        esac
 
-pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o ktc.o
+pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o
        set -x; \
        case "$(SYS_NAME)" in \
        hp_ux* | ia64_hpux*) \
@@ -95,8 +81,7 @@ pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o ktc.
                        $(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \
        *linux*) \
                $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o \
-                       afs_auth_krb.o afs_util_krb.o ktc.o $(SHOBJS) \
-                       $(KRB_SHLIB_OBJS) $(MT_LIBS) -lpam -lresolv;;\
+                       afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
        *fbsd*| *nbsd*) \
                $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o \
                        afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
index 159d8bfbe96d0bf45214980d2d757b77a487583c..3b8ddf9cd306a5cc3f9f9b37d7462e1de62d8631 100644 (file)
@@ -136,7 +136,7 @@ CommandProc(register struct cmd_syndesc *a_as)
     struct prentry uentry, gentry;
     struct ubik_hdr *uh;
     char *dfile = 0;
-    char *pfile = "/var/lib/openafs/db/prdb.DB0";
+    char *pfile = "/usr/afs/db/prdb.DB0";
     struct cmd_parmdesc *tparm;
 
     tparm = a_as->parms;
index 1732f9089e1e724454a78e9700a259d11ce66756..a7a3173212f4b5708160f6c30f9f6b915ad66877 100644 (file)
@@ -104,12 +104,11 @@ afs_cv_wait(afs_kcondvar_t * cv, afs_kmutex_t * l, int sigok)
     MUTEX_EXIT(l);
 
     if (!sigok) {
-       unsigned long f;
-       SIG_LOCK(current,f);
+       SIG_LOCK(current);
        saved_set = current->blocked;
        sigfillset(&current->blocked);
        RECALC_SIGPENDING(current);
-       SIG_UNLOCK(current,f);
+       SIG_UNLOCK(current);
     }
 
     while(seq == cv->seq) {
@@ -123,11 +122,7 @@ afs_cv_wait(afs_kcondvar_t * cv, afs_kmutex_t * l, int sigok)
 #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
            !current->todo
 #else
-#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
            test_ti_thread_flag(current->thread_info, TIF_FREEZE)
-#else
-           test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
-#endif
 #endif
 #endif
            )
@@ -145,11 +140,10 @@ afs_cv_wait(afs_kcondvar_t * cv, afs_kmutex_t * l, int sigok)
     set_current_state(TASK_RUNNING);
 
     if (!sigok) {
-       unsigned long f;
-       SIG_LOCK(current, f);
+       SIG_LOCK(current);
        current->blocked = saved_set;
        RECALC_SIGPENDING(current);
-       SIG_UNLOCK(current, f);
+       SIG_UNLOCK(current);
     }
 
     if (isAFSGlocked)
index 967159edbfeefa0685b422520915c371454618f5..8fbb280e3a14c63c864d13c734c3dc72a657d573 100644 (file)
@@ -173,11 +173,7 @@ osi_NetReceive(osi_socket so, struct sockaddr_in *from, struct iovec *iov,
 #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
            !current->todo
 #else
-#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
             test_ti_thread_flag(current->thread_info, TIF_FREEZE)
-#else
-            test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
-#endif
 #endif
 #endif
            )
index 89b35272a6cde927d68d3020f71999fab01d2dc9..a55f44dba50ff0c615536e9be126041b309c6ba3 100644 (file)
@@ -1 +1 @@
-#error kernel code not supported on SunOS 4
+#error kernel code not supported on SunOS 4 
index b0bbf3a3326db677461ac07d917d51a4d23db814..f7c234f5fb1234ace3e73b05b0289662bdc43721 100644 (file)
@@ -38,7 +38,8 @@ UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o
 DIROBJS=buffer.o dir.o salvage.o
 
 VOLOBJS= vnode.o volume.o vutil.o partition.o fssync.o purge.o \
-        clone.o devname.o common.o ihandle.o listinodes.o namei_ops.o
+        clone.o devname.o common.o ihandle.o listinodes.o namei_ops.o \
+        fstab.o
 
 FSINTOBJS= afsaux.o afscbint.cs.o afsint.ss.o afsint.xdr.o
 
index 03a28f029aa7b0395ffcce3736d0aeaf0a7e925b..7b8c36e3ea9f7e6bee6a12d09981fcc5fd5a5e95 100644 (file)
@@ -12,7 +12,7 @@ HELPER_SPLINT=@HELPER_SPLINT@
 
 objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \
         hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \
-        dirpath.o fileutil.o netutils.o flipbase64.o \
+        dirpath.o fileutil.o netutils.o flipbase64.o fstab.o \
         afs_atomlist.o afs_lhash.o snprintf.o strlcat.o strlcpy.o \
         daemon.o rxkstats.o ${REGEX_OBJ}
 
@@ -392,4 +392,4 @@ check-splint:
            assert.c base64.c casestrcpy.c ktime.c volparse.c hostparse.c \
            hputil.c kreltime.c isathing.c get_krbrlm.c uuid.c serverLog.c \
            dirpath.c fileutil.c netutils.c flipbase64.c \
-           afs_atomlist.c afs_lhash.c snprintf.c
+           afs_atomlist.c afs_lhash.c snprintf.c fstab.c
index bd35b4633d44048034513adcd028ca9a0604796f..abdb7f33711173dbb0d59bd08c2fbd26d7a01c8e 100644 (file)
@@ -1471,7 +1471,7 @@ catgets1(nl_catd catd, int setno, int msgno, char *def)
  */
 
 #ifndef RPC_NLS_FORMAT
-#define RPC_NLS_FORMAT "/usr/share/openafs/%s.cat"
+#define RPC_NLS_FORMAT "%s.cat"
 #endif
 
 dce1_error_inq_text(status_to_convert, error_text, status)
@@ -1488,8 +1488,7 @@ dce1_error_inq_text(status_to_convert, error_text, status)
     char component_name[4];
     char *facility_name;
     char filename_prefix[7];
-    /* strlen("/usr/share/openafs/") + 6 + strlen(".cat") + 1 */
-    char nls_filename[19 + 6 + 4 + 1];
+    char nls_filename[11];
     char alt_filename[80];
     char *message;
 #if defined(AFS_64BITPOINTER_ENV)
index 65f16db17cb6e085407ca88d07eaa89fe9a5263d..99d10431cd84ab1a0628e009d92c900d932efbad 100644 (file)
@@ -74,7 +74,6 @@ extern struct afsconf_dir *confDir;   /* config dir object */
 extern int lwps;               /* the max number of server threads */
 extern afsUUID FS_HostUUID;
 
-afsUUID nulluuid;
 int CEs = 0;                   /* active clients */
 int CEBlocks = 0;              /* number of blocks of CEs */
 struct client *CEFree = 0;     /* first free client */
@@ -1330,8 +1329,7 @@ h_GetHost_r(struct rx_connection *tcon)
        rx_PutConnection(cb_conn);
        cb_conn=NULL;
        H_LOCK;
-       if ((code == RXGEN_OPCODE) || 
-           (afs_uuid_equal(&interf.uuid, &nulluuid))) {
+       if (code == RXGEN_OPCODE) {
            identP = (struct Identity *)malloc(sizeof(struct Identity));
            if (!identP) {
                ViceLog(0, ("Failed malloc in h_GetHost_r\n"));
@@ -1454,8 +1452,7 @@ h_GetHost_r(struct rx_connection *tcon)
            rx_PutConnection(cb_conn);
            cb_conn=NULL;
            H_LOCK;
-           if ((code == RXGEN_OPCODE) || 
-               afs_uuid_equal(&interf.uuid, &nulluuid)) {
+           if (code == RXGEN_OPCODE) {
                if (!identP)
                    identP =
                        (struct Identity *)malloc(sizeof(struct Identity));
@@ -1665,7 +1662,6 @@ char local_realm[AFS_REALM_SZ] = "";
 void
 h_InitHostPackage()
 {
-    memset(&nulluuid, 0, sizeof(afsUUID));
     afsconf_GetLocalCell(confDir, localcellname, PR_MAXNAMELEN);
     if (!local_realm[0]) {
        if (afs_krb_get_lrealm(local_realm, 0) != 0 /*KSUCCESS*/) {