]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-obsd-39-141-20060623
authorJim Rees <rees@umich.edu>
Fri, 23 Jun 2006 15:21:12 +0000 (15:21 +0000)
committerJim Rees <rees@umich.edu>
Fri, 23 Jun 2006 15:21:12 +0000 (15:21 +0000)
By popular demand, merge OpenBSD 3.9 changes to 1.4.x branch

src/afs/OBSD/osi_file.c
src/afs/OBSD/osi_groups.c
src/afs/OBSD/osi_machdep.h
src/afs/OBSD/osi_vnodeops.c
src/config/afs_sysnames.h
src/packaging/OpenBSD/buildpkg.sh
src/packaging/OpenBSD/postinstall

index fd0aaa03d1434b6606c3d7cf8d1ac47446a55913..db1f3e7a38b2c3ee3b5a6e3e9515f1aa011301de 100644 (file)
@@ -48,7 +48,11 @@ osi_UFSOpen(afs_int32 ainode)
     }
     VOP_UNLOCK(vp, 0, curproc);
     afile->vnode = vp;
+#ifdef AFS_OBSD39_ENV
+    afile->size = VTOI(vp)->i_ffs1_size;
+#else
     afile->size = VTOI(vp)->i_ffs_size;
+#endif
     afile->offset = 0;
     afile->proc = NULL;
     afile->inum = ainode;      /* for hint validity checking */
index dc320d9fdcbd057dc484b9450e8794a857b9d646..96335118c914f516eb8e9fff2605750b858a214a 100644 (file)
@@ -47,10 +47,10 @@ Afs_xsetgroups(p, args, retval)
     struct vrequest treq;
 
     AFS_STATCNT(afs_xsetgroups);
-    AFS_GLOCK();
+    AFS_GLOCKP(p);
 
     code = afs_InitReq(&treq, p->p_rcred);
-    AFS_GUNLOCK();
+    AFS_GUNLOCKP(p);
     if (code)
        return code;
 
@@ -61,10 +61,10 @@ Afs_xsetgroups(p, args, retval)
      */
     if (PagInCred(p->p_rcred) == NOPAG) {
        if (((treq.uid >> 24) & 0xff) == 'A') {
-           AFS_GLOCK();
+           AFS_GLOCKP(p);
            /* we've already done a setpag, so now we redo it */
            AddPag(p, treq.uid, &p->p_rcred);
-           AFS_GUNLOCK();
+           AFS_GUNLOCKP(p);
        }
     }
     return code;
index 538f6f5c071c23ef044bb12d69da6cba4792c420..048ec337d11ef733f1b21b4e2c09a2f74f37ab33 100644 (file)
@@ -104,30 +104,38 @@ extern int afs_vget();
 #define        gop_lookupname(fnamep, segflg, followlink, compvpp) \
        afs_nbsd_lookupname((fnamep), (segflg), (followlink), (compvpp))
 
+#ifdef AFS_OBSD39_ENV
+#define afs_osi_lockmgr(l, f, i, p) lockmgr((l), (f), (i))
+#else
+#define afs_osi_lockmgr(l, f, i, p) lockmgr((l), (f), (i), (p))
+#endif
+
 #ifdef KERNEL
 
+#define AFS_GLOCK() AFS_GLOCKP(curproc)
+#define AFS_GUNLOCK() AFS_GUNLOCKP(curproc)
 #ifdef AFS_GLOBAL_SUNLOCK
 extern struct proc *afs_global_owner;
 extern struct lock afs_global_lock;
-#define AFS_GLOCK() \
+#define AFS_GLOCKP(p) \
     do { \
-        osi_Assert(curproc); \
-       lockmgr(&afs_global_lock, LK_EXCLUSIVE, 0, curproc); \
+        osi_Assert(p); \
+       afs_osi_lockmgr(&afs_global_lock, LK_EXCLUSIVE, 0, (p)); \
         osi_Assert(afs_global_owner == NULL); \
-       afs_global_owner = curproc; \
+       afs_global_owner = (p); \
     } while (0)
-#define AFS_GUNLOCK() \
+#define AFS_GUNLOCKP(p) \
     do { \
-        osi_Assert(curproc); \
-       osi_Assert(afs_global_owner == curproc); \
+        osi_Assert(p); \
+       osi_Assert(afs_global_owner == (p)); \
         afs_global_owner = NULL; \
-        lockmgr(&afs_global_lock, LK_RELEASE, 0, curproc); \
+        afs_osi_lockmgr(&afs_global_lock, LK_RELEASE, 0, (p)); \
     } while(0)
 #define ISAFS_GLOCK() (afs_global_owner == curproc && curproc)
 #else
-extern struct simplelock afs_global_lock;
-#define AFS_GLOCK()
-#define AFS_GUNLOCK()
+extern struct lock afs_global_lock;
+#define AFS_GLOCKP(p)
+#define AFS_GUNLOCKP(p)
 #define AFS_ASSERT_GLOCK()
 #define ISAFS_GLOCK() 1
 #endif
index 426d4f436479b79703d5cbbc6158bd0d3a1152fa..880fe45320879de096d0dfc685c19d3cfe4e9bf3 100644 (file)
@@ -933,7 +933,7 @@ afs_nbsd_lock(void *v)
 
     if (!vc)
        panic("afs_nbsd_lock: null vcache");
-    return lockmgr(&vc->rwlock, ap->a_flags | LK_CANRECURSE, &vp->v_interlock,
+    return afs_osi_lockmgr(&vc->rwlock, ap->a_flags | LK_CANRECURSE, &vp->v_interlock,
                   ap->a_p);
 }
 
@@ -950,7 +950,7 @@ afs_nbsd_unlock(void *v)
 
     if (!vc)
        panic("afs_nbsd_unlock: null vcache");
-    return lockmgr(&vc->rwlock, ap->a_flags | LK_RELEASE, &vp->v_interlock,
+    return afs_osi_lockmgr(&vc->rwlock, ap->a_flags | LK_RELEASE, &vp->v_interlock,
                   ap->a_p);
 }
 
index c7d82384aa78d0f8615ab3b2eab23141e866b78a..4b864ac480f4afb0a03712ad014e5ac9c70eb3c0 100644 (file)
 #define SYS_NAME_ID_i386_fbsd_52        2107
 #define SYS_NAME_ID_i386_fbsd_53        2108
 #define SYS_NAME_ID_i386_fbsd_60        2112
+#define SYS_NAME_ID_i386_fbsd_61        2113
 
 #define SYS_NAME_ID_ia64_linux2                2200
 #define SYS_NAME_ID_ia64_linux22       2201
 #define SYS_NAME_ID_i386_obsd36                2605
 #define SYS_NAME_ID_i386_obsd37                2606
 #define SYS_NAME_ID_i386_obsd38                2607
+#define SYS_NAME_ID_i386_obsd39                2608
 
 #define SYS_NAME_ID_amd64_linux2        2700
 #define SYS_NAME_ID_amd64_linux22       2701
index 66bfbe82e29a240466d768ef1e718d624aaffd5f..8d76faac4e5f915d87638ab1965f884dbd0b73ff 100644 (file)
@@ -1,5 +1,7 @@
 # $Id$
 
+# This doesn't actually build a package any more
+
 SRC=../../../../..
 umask 022
 
@@ -30,4 +32,6 @@ ln -s $SRC/afsd/afs.rc.obsd usr/vice/etc/rc.securelevel.afs
 
 echo '/afs:/usr/vice/cache:96000' >usr/vice/etc/cacheinfo
 
-pkg_create -v -h -f packinglist -c -OpenAFS -d desc -p / -s $PWD openafs-client
+tar chfvz openafs-client.tgz usr/vice
+
+#pkg_create -v -h -f packinglist -c -OpenAFS -d desc -p / -s $PWD openafs-client
index bbaf929a9a4fbd35c13be75e3caebeebd2454881..c958909ef4cb64b0a3dfc85122eefd71902040e5 100644 (file)
@@ -1,10 +1,18 @@
 # $Id$
 
+if [ `id -u` != "0" ]; then
+  echo "Must be root; current id="`id -u`
+  exit 1
+fi
+
 umask 022
 if [ ! -d /afs ]; then
   mkdir /afs
 fi
 
+chown root.bin /usr/vice /usr/vice/cache
+chown -R root.bin /usr/vice/bin /usr/vice/etc
+
 strip -x /usr/vice/bin/*
 
 echo "Fetching CellServDB..."