]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Apply STABLE14-linux26-defer-cred-changing-20090511
authorRuss Allbery <rra@debian.org>
Tue, 26 May 2009 23:34:35 +0000 (16:34 -0700)
committerRuss Allbery <rra@debian.org>
Tue, 26 May 2009 23:34:35 +0000 (16:34 -0700)
* Apply upstream CVS deltas:
  - STABLE14-linux26-defer-cred-changing-20090511: defer changing groups
    when the real and effective credentials of a process differ to avoid
    running afoul of checks in newer Linux kernels that cause oops.
    (Closes: #528785)

debian/changelog
src/afs/LINUX/osi_cred.c

index 0402ba9d20b777deec325a29cb23b13f34f0077e..0428a8f1ef29e1e524698067156dda4211bceba2 100644 (file)
@@ -1,5 +1,10 @@
 openafs (1.4.10+dfsg1-2) UNRELEASED; urgency=low
 
+  * Apply upstream CVS deltas:
+    - STABLE14-linux26-defer-cred-changing-20090511: defer changing groups
+      when the real and effective credentials of a process differ to avoid
+      running afoul of checks in newer Linux kernels that cause oops.
+      (Closes: #528785)
   * Provide an openafs-modules-dkms package that uses DKMS to dynamically
     build kernel modules for the local kernel and document this option in
     README.modules.  This is an alternative to installing
index bf4845d6d13bda04c4bec86c3eb9228f1cc09dcb..4ee31abd130d2ac95af846cd38ed1a7d6da31cf7 100644 (file)
@@ -15,7 +15,7 @@
 #include "afs/param.h"
 
 RCSID
-    ("$Header: /cvs/openafs/src/afs/LINUX/osi_cred.c,v 1.10.2.4 2009/01/15 13:27:43 shadow Exp $");
+    ("$Header: /cvs/openafs/src/afs/LINUX/osi_cred.c,v 1.10.2.6 2009/05/11 14:55:40 shadow Exp $");
 
 #include "afs/sysincludes.h"
 #include "afsincludes.h"
@@ -104,6 +104,12 @@ crset(cred_t * cr)
 #if defined(STRUCT_TASK_HAS_CRED)
     struct cred *new_creds;
 
+    /* If our current task doesn't have identical real and effective
+     * credentials, commit_cred won't let us change them, so we just
+     * bail here.
+     */
+    if (current->cred != current->real_cred)
+        return;
     new_creds = prepare_creds();
     new_creds->fsuid = cr->cr_uid;
     new_creds->uid = cr->cr_ruid;