<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Index: openafs/src/afs/afs_pioctl.c
diff -c openafs/src/afs/afs_pioctl.c:1.81.2.38 openafs/src/afs/afs_pioctl.c:1.81.2.39
*** openafs/src/afs/afs_pioctl.c:1.81.2.38	Wed Jun 24 19:15:06 2009
--- openafs/src/afs/afs_pioctl.c	Mon Jun 29 16:24:47 2009
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.81.2.38 2009/06/24 23:15:06 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #ifdef AFS_OBSD_ENV
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.81.2.39 2009/06/29 20:24:47 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #ifdef AFS_OBSD_ENV
***************
*** 751,757 ****
  #if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
      return (code);
  #endif
- return 0;
  }
  #endif /* AFS_SGI_ENV */
  #endif /* AFS_HPUX102_ENV */
--- 751,756 ----
Index: openafs/src/afs/LINUX/osi_groups.c
diff -c openafs/src/afs/LINUX/osi_groups.c:1.25.2.21 openafs/src/afs/LINUX/osi_groups.c:1.25.2.22
*** openafs/src/afs/LINUX/osi_groups.c:1.25.2.21	Wed Jun 24 17:55:01 2009
--- openafs/src/afs/LINUX/osi_groups.c	Wed Jul  1 16:57:15 2009
***************
*** 20,26 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_groups.c,v 1.25.2.21 2009/06/24 21:55:01 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
--- 20,26 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_groups.c,v 1.25.2.22 2009/07/01 20:57:15 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
***************
*** 635,640 ****
--- 635,641 ----
  
  void osi_keyring_init(void)
  {
+ #if !defined(EXPORTED_KEY_TYPE_KEYRING)
      struct task_struct *p;
  
      /* If we can't lock the tasklist, either with its explicit lock,
***************
*** 658,667 ****
  #if defined(EXPORTED_FIND_TASK_BY_PID)
  	p = find_task_by_pid(1);
  #else
- 	p = pid_task(1, PIDTYPE_PID);
- /*
  	p = find_task_by_vpid(1);
- */
  #endif
  	if (p &amp;&amp; task_user(p)-&gt;session_keyring)
  	    __key_type_keyring = task_user(p)-&gt;session_keyring-&gt;type;
--- 659,665 ----
***************
*** 677,682 ****
--- 675,681 ----
  # endif
      }
  #endif
+ #endif
  
      register_key_type(&amp;key_type_afs_pag);
  }
Index: openafs/src/afs/LINUX/osi_vnodeops.c
diff -c openafs/src/afs/LINUX/osi_vnodeops.c:1.81.2.82 openafs/src/afs/LINUX/osi_vnodeops.c:1.81.2.83
*** openafs/src/afs/LINUX/osi_vnodeops.c:1.81.2.82	Wed Jun  3 01:41:59 2009
--- openafs/src/afs/LINUX/osi_vnodeops.c	Fri Jul  3 09:18:32 2009
***************
*** 22,28 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.81.2.82 2009/06/03 05:41:59 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
--- 22,28 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.81.2.83 2009/07/03 13:18:32 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
***************
*** 58,63 ****
--- 58,79 ----
  extern int afs_notify_change(struct dentry *dp, struct iattr *iattrp);
  
  
+ 
+ /* This function converts a positive error code from AFS into a negative
+  * code suitable for passing into the Linux VFS layer. It checks that the
+  * error code is within the permissable bounds for the ERR_PTR mechanism.
+  *
+  * _All_ error codes which come from the AFS layer should be passed through
+  * this function before being returned to the kernel.
+  */
+ 
+ static inline int afs_convert_code(int code) {
+     if ((code &gt;= 0) &amp;&amp; (code &lt;= MAX_ERRNO))
+ 	return -code;
+     else
+ 	return -EIO;
+ }
+ 
  static ssize_t
  afs_linux_read(struct file *fp, char *buf, size_t count, loff_t * offp)
  {
***************
*** 77,83 ****
  	code = afs_VerifyVCache(vcp, &amp;treq);
  
      if (code)
! 	code = -code;
      else {
  	    osi_FlushPages(vcp, credp);	/* ensure stale pages are gone */
  	    AFS_GUNLOCK();
--- 93,99 ----
  	code = afs_VerifyVCache(vcp, &amp;treq);
  
      if (code)
! 	code = afs_convert_code(code);
      else {
  	    osi_FlushPages(vcp, credp);	/* ensure stale pages are gone */
  	    AFS_GUNLOCK();
***************
*** 127,133 ****
      afs_FakeOpen(vcp);
      ReleaseWriteLock(&amp;vcp-&gt;lock);
      if (code)
! 	code = -code;
      else {
  	    AFS_GUNLOCK();
  #ifdef DO_SYNC_READ
--- 143,149 ----
      afs_FakeOpen(vcp);
      ReleaseWriteLock(&amp;vcp-&gt;lock);
      if (code)
! 	code = afs_convert_code(code);
      else {
  	    AFS_GUNLOCK();
  #ifdef DO_SYNC_READ
***************
*** 182,200 ****
  
      code = afs_InitReq(&amp;treq, credp);
      crfree(credp);
!     if (code)
  	goto out1;
  
      afs_InitFakeStat(&amp;fakestat);
      code = afs_EvalFakeStat(&amp;avc, &amp;fakestat, &amp;treq);
!     if (code)
  	goto out;
  
      /* update the cache entry */
    tagain:
      code = afs_VerifyVCache(avc, &amp;treq);
!     if (code)
  	goto out;
  
      /* get a reference to the entire directory */
      tdc = afs_GetDCache(avc, (afs_size_t) 0, &amp;treq, &amp;origOffset, &amp;tlen, 1);
--- 198,222 ----
  
      code = afs_InitReq(&amp;treq, credp);
      crfree(credp);
!     if (code) {
! 	code = afs_convert_code(code);
  	goto out1;
+     }
  
      afs_InitFakeStat(&amp;fakestat);
      code = afs_EvalFakeStat(&amp;avc, &amp;fakestat, &amp;treq);
!     if (code) {
! 	code = afs_convert_code(code);
  	goto out;
+     }
  
      /* update the cache entry */
    tagain:
      code = afs_VerifyVCache(avc, &amp;treq);
!     if (code) {
! 	code = afs_convert_code(code);
  	goto out;
+     }
  
      /* get a reference to the entire directory */
      tdc = afs_GetDCache(avc, (afs_size_t) 0, &amp;treq, &amp;origOffset, &amp;tlen, 1);
***************
*** 375,381 ****
      return code;
  
  out_err:
!     code = -code;
      goto out;
  }
  
--- 397,403 ----
      return code;
  
  out_err:
!     code = afs_convert_code(code);
      goto out;
  }
  
***************
*** 397,403 ****
  #endif
  
      crfree(credp);
!     return -code;
  }
  
  static int
--- 419,425 ----
  #endif
  
      crfree(credp);
!     return afs_convert_code(code);
  }
  
  static int
***************
*** 418,424 ****
  #endif
  
      crfree(credp);
!     return -code;
  }
  
  static int
--- 440,446 ----
  #endif
  
      crfree(credp);
!     return afs_convert_code(code);
  }
  
  static int
***************
*** 442,448 ****
      unlock_kernel();
  #endif
      crfree(credp);
!     return -code;
  
  }
  
--- 464,470 ----
      unlock_kernel();
  #endif
      crfree(credp);
!     return afs_convert_code(code);
  
  }
  
***************
*** 502,508 ****
      flp-&gt;fl_end = flock.l_start + flock.l_len;
  
      crfree(credp);
!     return -code;
  }
  
  #ifdef STRUCT_FILE_OPERATIONS_HAS_FLOCK
--- 524,530 ----
      flp-&gt;fl_end = flock.l_start + flock.l_len;
  
      crfree(credp);
!     return afs_convert_code(code);
  }
  
  #ifdef STRUCT_FILE_OPERATIONS_HAS_FLOCK
***************
*** 552,558 ****
      flp-&gt;fl_pid = flock.l_pid;
  
      crfree(credp);
!     return -code;
  }
  #endif
  
--- 574,580 ----
      flp-&gt;fl_pid = flock.l_pid;
  
      crfree(credp);
!     return afs_convert_code(code);
  }
  #endif
  
***************
*** 600,606 ****
      AFS_GUNLOCK();
  
      crfree(credp);
!     return -code;
  }
  
  #if !defined(AFS_LINUX24_ENV)
--- 622,628 ----
      AFS_GUNLOCK();
  
      crfree(credp);
!     return afs_convert_code(code);
  }
  
  #if !defined(AFS_LINUX24_ENV)
***************
*** 757,763 ****
  #endif
      crfree(credp);
  
!     return -code;
  }
  
  #if defined(AFS_LINUX26_ENV)
--- 779,785 ----
  #endif
      crfree(credp);
  
!     return afs_convert_code(code);
  }
  
  #if defined(AFS_LINUX26_ENV)
***************
*** 1008,1014 ****
      unlock_kernel();
  #endif
      crfree(credp);
!     return -code;
  }
  
  /* afs_linux_lookup */
--- 1030,1036 ----
      unlock_kernel();
  #endif
      crfree(credp);
!     return afs_convert_code(code);
  }
  
  /* afs_linux_lookup */
***************
*** 1090,1103 ****
  #if LINUX_VERSION_CODE &gt;= KERNEL_VERSION(2,2,10)
      if (code == ENOENT)
  	return ERR_PTR(0);
!     else if ((code &gt;= 0) &amp;&amp; (code &lt;= MAX_ERRNO))
! 	return ERR_PTR(-code);
!     else 
! 	return ERR_PTR(-EIO);
  #else
      if (code == ENOENT)
  	code = 0;
!     return -code;
  #endif
  }
  
--- 1112,1123 ----
  #if LINUX_VERSION_CODE &gt;= KERNEL_VERSION(2,2,10)
      if (code == ENOENT)
  	return ERR_PTR(0);
!     else
! 	return ERR_PTR(afs_convert_code(code));
  #else
      if (code == ENOENT)
  	code = 0;
!     return afs_convert_code(code);
  #endif
  }
  
***************
*** 1119,1125 ****
  
      AFS_GUNLOCK();
      crfree(credp);
!     return -code;
  }
  
  static int
--- 1139,1145 ----
  
      AFS_GUNLOCK();
      crfree(credp);
!     return afs_convert_code(code);
  }
  
  static int
***************
*** 1199,1205 ****
      unlock_kernel();
  #endif
      crfree(credp);
!     return -code;
  }
  
  
--- 1219,1225 ----
      unlock_kernel();
  #endif
      crfree(credp);
!     return afs_convert_code(code);
  }
  
  
***************
*** 1221,1227 ****
      code = afs_symlink(VTOAFS(dip), name, &amp;vattr, target, credp);
      AFS_GUNLOCK();
      crfree(credp);
!     return -code;
  }
  
  static int
--- 1241,1247 ----
      code = afs_symlink(VTOAFS(dip), name, &amp;vattr, target, credp);
      AFS_GUNLOCK();
      crfree(credp);
!     return afs_convert_code(code);
  }
  
  static int
***************
*** 1258,1264 ****
      unlock_kernel();
  #endif
      crfree(credp);
!     return -code;
  }
  
  static int
--- 1278,1284 ----
      unlock_kernel();
  #endif
      crfree(credp);
!     return afs_convert_code(code);
  }
  
  static int
***************
*** 1287,1293 ****
      }
  
      crfree(credp);
!     return -code;
  }
  
  
--- 1307,1313 ----
      }
  
      crfree(credp);
!     return afs_convert_code(code);
  }
  
  
***************
*** 1336,1342 ****
  #endif
  
      crfree(credp);
!     return -code;
  }
  
  
--- 1356,1362 ----
  #endif
  
      crfree(credp);
!     return afs_convert_code(code);
  }
  
  
***************
*** 1359,1365 ****
      if (!code)
  	return maxlen - tuio.uio_resid;
      else
! 	return -code;
  }
  
  #if !defined(USABLE_KERNEL_PAGE_SYMLINK_CACHE)
--- 1379,1385 ----
      if (!code)
  	return maxlen - tuio.uio_resid;
      else
! 	return afs_convert_code(code);
  }
  
  #if !defined(USABLE_KERNEL_PAGE_SYMLINK_CACHE)
***************
*** 1538,1544 ****
      }
  
      crfree(credp);
!     return -code;
  }
  
  
--- 1558,1564 ----
      }
  
      crfree(credp);
!     return afs_convert_code(code);
  }
  
  
***************
*** 1601,1607 ****
  	if (!afs_InitReq(&amp;treq, credp))
  	    code = afs_DoPartialWrite(vcp, &amp;treq);
      }
!     code = code ? -code : count - tuio.uio_resid;
  
      vcp-&gt;states &amp;= ~CPageWrite;
      ReleaseWriteLock(&amp;vcp-&gt;lock);
--- 1621,1627 ----
  	if (!afs_InitReq(&amp;treq, credp))
  	    code = afs_DoPartialWrite(vcp, &amp;treq);
      }
!     code = code ? afs_convert_code(code) : count - tuio.uio_resid;
  
      vcp-&gt;states &amp;= ~CPageWrite;
      ReleaseWriteLock(&amp;vcp-&gt;lock);
***************
*** 1714,1720 ****
  	ReleaseWriteLock(&amp;vcp-&gt;lock);
      }
  
!     code = code ? -code : count - tuio.uio_resid;
      afs_Trace4(afs_iclSetp, CM_TRACE_UPDATEPAGE, ICL_TYPE_POINTER, vcp,
  	       ICL_TYPE_POINTER, pp, ICL_TYPE_INT32, page_count(pp),
  	       ICL_TYPE_INT32, code);
--- 1734,1740 ----
  	ReleaseWriteLock(&amp;vcp-&gt;lock);
      }
  
!     code = code ? afs_convert_code(code) : count - tuio.uio_resid;
      afs_Trace4(afs_iclSetp, CM_TRACE_UPDATEPAGE, ICL_TYPE_POINTER, vcp,
  	       ICL_TYPE_POINTER, pp, ICL_TYPE_INT32, page_count(pp),
  	       ICL_TYPE_INT32, code);
***************
*** 1752,1758 ****
  
      AFS_GUNLOCK();
      crfree(credp);
!     return -code;
  }
  
  #if defined(AFS_LINUX24_ENV) &amp;&amp; !(LINUX_VERSION_CODE &gt;= KERNEL_VERSION(2,6,28) &amp;&amp; defined(HAVE_WRITE_BEGIN))
--- 1772,1778 ----
  
      AFS_GUNLOCK();
      crfree(credp);
!     return afs_convert_code(code);
  }
  
  #if defined(AFS_LINUX24_ENV) &amp;&amp; !(LINUX_VERSION_CODE &gt;= KERNEL_VERSION(2,6,28) &amp;&amp; defined(HAVE_WRITE_BEGIN))
Index: openafs/src/auth/ktc.c
diff -c openafs/src/auth/ktc.c:1.15.2.13 openafs/src/auth/ktc.c:1.15.2.14
*** openafs/src/auth/ktc.c:1.15.2.13	Thu Jun  4 16:51:57 2009
--- openafs/src/auth/ktc.c	Mon Jun 29 16:24:49 2009
***************
*** 17,23 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/ktc.c,v 1.15.2.13 2009/06/04 20:51:57 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
--- 17,23 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/ktc.c,v 1.15.2.14 2009/06/29 20:24:49 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
***************
*** 1621,1627 ****
      afs_int32 pag;
  
      /* now setup for the pioctl */
!     iob.in = -1;
      iob.in_size = 0;
      iob.out = &amp;pag;
      iob.out_size = sizeof(afs_int32);
--- 1621,1627 ----
      afs_int32 pag;
  
      /* now setup for the pioctl */
!     iob.in = NULL;
      iob.in_size = 0;
      iob.out = &amp;pag;
      iob.out_size = sizeof(afs_int32);
Index: openafs/src/cf/linux-test4.m4
diff -c openafs/src/cf/linux-test4.m4:1.20.2.62 openafs/src/cf/linux-test4.m4:1.20.2.63
*** openafs/src/cf/linux-test4.m4:1.20.2.62	Mon May 11 10:55:39 2009
--- openafs/src/cf/linux-test4.m4	Wed Jul  1 16:57:15 2009
***************
*** 1152,1154 ****
--- 1152,1174 ----
    if test "x$ac_cv_linux_struct_proc_dir_entry_has_owner" = "xyes"; then
      AC_DEFINE([STRUCT_PROC_DIR_ENTRY_HAS_OWNER], 1, [define if struct proc_dir_entry has an owner member])
    fi])
+ 
+ AC_DEFUN([LINUX_EXPORTS_KEY_TYPE_KEYRING], [
+   AC_MSG_CHECKING([for exported key_type_keyring])
+   AC_CACHE_VAL([ac_cv_linux_exports_key_type_keyring], [
+     AC_TRY_KBUILD(
+ [
+ #ifdef KEY_TYPE_H_EXISTS
+ #include &lt;linux/key-type.h&gt;
+ #endif
+ #include &lt;linux/key.h&gt;],
+ [
+ printk("%s", key_type_keyring.name);
+ ],
+       ac_cv_linux_exports_key_type_keyring=yes,
+       ac_cv_linux_exports_key_type_keyring=no)])
+   AC_MSG_RESULT($ac_cv_linux_exports_key_type_keyring)
+   if test "x$ac_cv_linux_exports_key_type_keyring" = "xyes"; then
+     AC_DEFINE([EXPORTED_KEY_TYPE_KEYRING], 1, [define if key_type_keyring is exported])
+   fi]) 
+ 
Index: openafs/src/packaging/RedHat/openafs.spec.in
diff -c openafs/src/packaging/RedHat/openafs.spec.in:1.1.2.30 openafs/src/packaging/RedHat/openafs.spec.in:1.1.2.31
*** openafs/src/packaging/RedHat/openafs.spec.in:1.1.2.30	Wed Jun  3 01:42:00 2009
--- openafs/src/packaging/RedHat/openafs.spec.in	Fri Jul  3 08:57:20 2009
***************
*** 1,4 ****
! # Openafs Spec $Revision: 1.1.2.30 $
  
  # TEMPORARY fix for patch fuzz so we can build on Fedora 10
  %define _default_patch_fuzz 2
--- 1,4 ----
! # Openafs Spec $Revision: 1.1.2.31 $
  
  # TEMPORARY fix for patch fuzz so we can build on Fedora 10
  %define _default_patch_fuzz 2
***************
*** 1448,1457 ****
--- 1448,1460 ----
  %{pamdir}/pam_afs.so
  %{initdir}/openafs-client
  %{_mandir}/man1/cmdebug.*
+ %{_mandir}/man1/copyauth.*
  %{_mandir}/man1/up.*
  %{_mandir}/man5/afs*
  %{_mandir}/man5/cacheinfo.*
  %{_mandir}/man8/afsd.*
+ %{_mandir}/man8/rmtsysd.*
+ %{_mandir}/man8/vsys.*
  %{_mandir}/man5/CellAlias.*
  %{_mandir}/man5/afszcm.cat.*
  
***************
*** 1514,1519 ****
--- 1517,1523 ----
  %{_mandir}/man8/prdb_check.*
  %{_mandir}/man8/ptserver.*
  %{_mandir}/man8/pt_util.*
+ %{_mandir}/man8/restorevol.*
  %{_mandir}/man8/salvager.*
  %{_mandir}/man8/upclient.*
  %{_mandir}/man8/upserver.*
***************
*** 1565,1570 ****
--- 1569,1575 ----
  %{_libdir}/librxstat.a
  %{_libdir}/libubik.a
  %{_mandir}/man1/rxgen.*
+ %{_mandir}/man1/compile_et.*
  
  %if %{build_dkmspkg}
  %files -n dkms-%{name}
Index: openafs/src/viced/afsfileprocs.c
diff -c openafs/src/viced/afsfileprocs.c:1.81.2.53 openafs/src/viced/afsfileprocs.c:1.81.2.54
*** openafs/src/viced/afsfileprocs.c:1.81.2.53	Wed Mar 25 09:07:27 2009
--- openafs/src/viced/afsfileprocs.c	Fri Jul  3 09:04:17 2009
***************
*** 29,35 ****
  #include &lt;afs/param.h&gt;
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.81.2.53 2009/03/25 13:07:27 shadow Exp $");
  
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
--- 29,35 ----
  #include &lt;afs/param.h&gt;
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.81.2.54 2009/07/03 13:04:17 shadow Exp $");
  
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
***************
*** 336,343 ****
  
  	/* Is it still necessary to drop this? We hit the net, we should... */
  	H_UNLOCK;
! 	if (uclient) 
  	    hpr_End(uclient);
  	code = hpr_Initialize(&amp;uclient);
  
  	if (!code)
--- 336,345 ----
  
  	/* Is it still necessary to drop this? We hit the net, we should... */
  	H_UNLOCK;
! 	if (uclient) {
  	    hpr_End(uclient);
+ 	    uclient = NULL;
+ 	}
  	code = hpr_Initialize(&amp;uclient);
  
  	if (!code)
Index: openafs/src/volser/dumpstuff.c
diff -c openafs/src/volser/dumpstuff.c:1.25.2.12 openafs/src/volser/dumpstuff.c:1.25.2.13
*** openafs/src/volser/dumpstuff.c:1.25.2.12	Fri Oct 10 10:43:04 2008
--- openafs/src/volser/dumpstuff.c	Mon Jun 29 11:28:22 2009
***************
*** 11,17 ****
  #include &lt;afs/param.h&gt;
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/dumpstuff.c,v 1.25.2.12 2008/10/10 14:43:04 shadow Exp $");
  
  #include &lt;sys/types.h&gt;
  #include &lt;ctype.h&gt;
--- 11,17 ----
  #include &lt;afs/param.h&gt;
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/dumpstuff.c,v 1.25.2.13 2009/06/29 15:28:22 shadow Exp $");
  
  #include &lt;sys/types.h&gt;
  #include &lt;ctype.h&gt;
***************
*** 383,388 ****
--- 383,392 ----
  	    if (!ReadInt32(iodp, (afs_uint32 *) &amp; vol-&gt;dayUse))
  		return VOLSERREAD_DUMPERROR;
  	    break;
+ 	case 'V':
+ 	    if (!ReadInt32(iodp, &amp;trash/*volUpdateCounter*/))
+ 		return VOLSERREAD_DUMPERROR;
+ 	    break;
  	}
      }
      iod_ungetc(iodp, tag);
</pre></body></html>