Changeset 83 for server/common/patches


Ignore:
Timestamp:
Jan 19, 2007, 2:39:05 PM (16 years ago)
Author:
jbarnold
Message:
attempt at fixing vanishing-credentials bug
File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/common/patches/openafs-scripts.patch

    r55 r83  
    3333--- openafs-1.4.1-rc10/src/afs/afs.h    2006-02-17 16:58:33.000000000 -0500
    3434+++ openafs-1.4.1-rc10-scripts/src/afs/afs.h    2006-04-18 16:38:55.000000000 -0400
    35 @@ -175,8 +175,12 @@
     35@@ -175,8 +175,13 @@
    3636    struct afs_q *prev;
    3737 };
     
    3939+#define AFSAGENT_UID (101)
    4040+#define HTTPD_UID (48)
     41+#define POSTFIX_UID (89)
    4142+#define DAEMON_SCRIPTS_PTSID (33554596)
    4243 struct vrequest {
     
    5859  * Pags are implemented as follows: the set of groups whose long
    5960  * representation is '41XXXXXX' hex are used to represent the pags.
     61@@ -77,9 +77,9 @@
     62     AFS_STATCNT(genpag);
     63 #ifdef AFS_LINUX20_ENV
     64     /* Ensure unique PAG's (mod 200 days) when reloading the client. */
     65-    return (('A' << 24) + ((pag_epoch + pagCounter++) & 0xffffff));
     66+    return (('A' << 24) + ((pag_epoch + pagCounter) & 0xffffff));
     67 #else /* AFS_LINUX20_ENV */
     68-    return (('A' << 24) + (pagCounter++ & 0xffffff));
     69+    return (('A' << 24) + (pagCounter & 0xffffff));
     70 #endif /* AFS_LINUX20_ENV */
     71 }
     72
     73@@ -105,9 +105,9 @@
     74 {
     75     AFS_STATCNT(genpag);
     76 #ifdef AFS_LINUX20_ENV
     77-    return (pag_epoch + pagCounter++);
     78+    return (pag_epoch + pagCounter);
     79 #else
     80-    return (pagCounter++);
     81+    return (pagCounter);
     82 #endif /* AFS_LINUX20_ENV */
     83 }
     84 
    6085@@ -426,6 +430,15 @@
    6186        av->uid = acred->cr_ruid;       /* default when no pag is set */
     
    121146+           !((avc->anyAccess | arights) == avc->anyAccess) &&
    122147+           !(((arights & ~(PRSFS_LOOKUP|PRSFS_READ)) == 0) && areq->realuid == HTTPD_UID) &&
    123 +           !(areq->realuid == AFSAGENT_UID)) {
     148+           !(((arights & ~(PRSFS_LOOKUP|PRSFS_READ)) == 0) && areq->realuid == POSTFIX_UID) ) {
    124149+         return 0;
    125150+      }
     
    136161+             !((avc->anyAccess | arights) == avc->anyAccess) &&
    137162+             !(arights == PRSFS_LOOKUP && areq->realuid == HTTPD_UID) &&
    138 +             !(areq->realuid == AFSAGENT_UID) &&
     163+             !(arights == PRSFS_LOOKUP && areq->realuid == POSTFIX_UID) &&
    139164+             !(arights == PRSFS_READ && avc->m.Mode == 33279)) {
    140165+           return 0;
     
    174199 }
    175200 
    176 diff -ru openafs-1.4.2/configure openafs-1.4.2-scripts/configure
    177 --- openafs-1.4.2/configure     2006-10-13 15:48:34.000000000 -0400
    178 +++ openafs-1.4.2-scripts/configure     2006-11-29 19:47:43.000000000 -0500
    179 @@ -11512,7 +11512,7 @@
    180    if test "x$ac_cv_linux_keyring_support" = "xyes"; then
    181  
    182  cat >>confdefs.h <<\_ACEOF
    183 -#define LINUX_KEYRING_SUPPORT 1
    184 +#undef LINUX_KEYRING_SUPPORT
    185  _ACEOF
    186  
    187    fi
     201--- openafs-1.4.2/src/afs/afs_user.c.scripts    2007-01-18 19:22:49.000000000 -0500
     202+++ openafs-1.4.2/src/afs/afs_user.c    2007-01-19 13:46:36.000000000 -0500
     203@@ -110,6 +110,7 @@
     204     now = osi_Time();
     205     for (i = 0; i < NUSERS; i++) {
     206        for (lu = &afs_users[i], tu = *lu; tu; tu = nu) {
     207+            if(tu->uid == AFSAGENT_UID) continue;
     208            delFlag = 0;        /* should we delete this dude? */
     209            /* Don't garbage collect users in use now (refCount) */
     210            if (tu->refCount == 0) {
Note: See TracChangeset for help on using the changeset viewer.