]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Merge final upstream 1.4.5 release.
authorRuss Allbery <rra@debian.org>
Sat, 10 Nov 2007 03:00:35 +0000 (03:00 +0000)
committerRuss Allbery <rra@debian.org>
Sat, 10 Nov 2007 03:00:35 +0000 (03:00 +0000)
22 files changed:
configure
configure-libafs
configure-libafs.in
configure.in
debian/changelog
debian/rules
doc/man-pages/man1/fs_uuid.1 [new file with mode: 0644]
doc/man-pages/pod1/fs_uuid.pod [new file with mode: 0644]
src/afs/DARWIN/osi_vnodeops.c
src/afs/LINUX/osi_module.c
src/afs/VNOPS/afs_vnop_lookup.c
src/afs/afs_call.c
src/afs/afs_daemons.c
src/afs/afs_nfsclnt.c
src/afs/afs_osidnlc.c
src/afsd/afsd.c
src/bucoord/restore.c
src/packaging/RedHat/openafs-buildall.sh
src/packaging/RedHat/openafs.spec.in
src/venus/fs.c
src/viced/callback.c
src/volser/vos.c

index 905b80e2590090ebbc7c0a78418bc18df7713e97..e62e8d70dd03e6ef6d3ce65fd8e463e92346d759 100755 (executable)
--- a/configure
+++ b/configure
@@ -2170,7 +2170,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=openafs
- VERSION=1.4.5pre2
+ VERSION=1.4.5
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2318,7 +2318,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
 ac_config_headers="$ac_config_headers src/config/afsconfig.h"
 
-MACOS_VERSION=1.4.5fc2
+MACOS_VERSION=1.4.5
 
 
 
index 141f0003a98ff622297bcc3d857675b2398abe79..39092b039acece36064725dd93c14500b59f2411 100755 (executable)
@@ -2170,7 +2170,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=openafs-libafs
- VERSION=1.4.5pre2
+ VERSION=1.4.5
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2318,7 +2318,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
 ac_config_headers="$ac_config_headers src/config/afsconfig.h"
 
-MACOS_VERSION=1.4.5fc2
+MACOS_VERSION=1.4.5
 
 
 
index 7799910bfe959f2620dae3d8a6466850cd9164fb..8c211b0eebaffbc1ddcea8166e5992ff178fe454 100644 (file)
@@ -1,7 +1,7 @@
 AC_INIT(src/libafs/Makefile.common.in)
-AM_INIT_AUTOMAKE(openafs-libafs,1.4.5pre2)
+AM_INIT_AUTOMAKE(openafs-libafs,1.4.5)
 AC_CONFIG_HEADER(src/config/afsconfig.h)
-MACOS_VERSION=1.4.5fc2
+MACOS_VERSION=1.4.5
 
 AC_SUBST(MACOS_VERSION)
 
index 1e21ca7324e5ab12b79c368bce54c1be94e67439..350778c58f58fb321eb6409ab38385f89a1fcb88 100644 (file)
@@ -1,7 +1,7 @@
 AC_INIT(src/config/stds.h)
-AM_INIT_AUTOMAKE(openafs,1.4.5pre2)
+AM_INIT_AUTOMAKE(openafs,1.4.5)
 AC_CONFIG_HEADER(src/config/afsconfig.h)
-MACOS_VERSION=1.4.5fc2
+MACOS_VERSION=1.4.5
 
 AC_SUBST(MACOS_VERSION)
 
index ce7753e66d59c0b053beda67c72a5078eeb8b29a..22d1e58c47cb5ae4642515034484da343c9e9e7a 100644 (file)
@@ -1,3 +1,9 @@
+openafs (1.4.5.dfsg1-1) unstable; urgency=low
+
+  * New upstream release.
+
+ --
+
 openafs (1.4.5~pre2.dfsg1-1) unstable; urgency=low
 
   * New upstream release candidate.
index 8b9b62f27f4101ce535d00a6fed624c8bdc35f44..baf4439d1db97578a0a0fb01efc201d7599ac259 100755 (executable)
@@ -46,9 +46,9 @@ DOC_PACKAGES = libpam-openafs-kaserver openafs-dbserver openafs-fileserver \
 
 # These variable is used only by get-orig-source, which will normally only be
 # run by maintainers.
-VERSION   = 1.4.5pre2
-DEBVERS   = 1.4.5~pre2.dfsg1
-UPSTREAM  = /afs/grand.central.org/software/openafs/candidate/$(VERSION)
+VERSION   = 1.4.5
+DEBVERS   = 1.4.5.dfsg1
+UPSTREAM  = /afs/grand.central.org/software/openafs/$(VERSION)
 
 # Download the upstream source, merge in the doc tarball, and do the
 # repackaging that we have to do for DFSG reasons.  This assumes AFS is
diff --git a/doc/man-pages/man1/fs_uuid.1 b/doc/man-pages/man1/fs_uuid.1
new file mode 100644 (file)
index 0000000..f8cb093
--- /dev/null
@@ -0,0 +1,271 @@
+.rn '' }`
+''' $RCSfile$$Revision$$Date$
+'''
+''' $Log$
+'''
+.de Sh
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp
+.if t .sp .5v
+.if n .sp
+..
+.de Ip
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.de Vb
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve
+.ft R
+
+.fi
+..
+'''
+'''
+'''     Set up \*(-- to give an unbreakable dash;
+'''     string Tr holds user defined translation string.
+'''     Bell System Logo is used as a dummy character.
+'''
+.tr \(*W-|\(bv\*(Tr
+.ie n \{\
+.ds -- \(*W-
+.ds PI pi
+.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+.ds L" ""
+.ds R" ""
+'''   \*(M", \*(S", \*(N" and \*(T" are the equivalent of
+'''   \*(L" and \*(R", except that they are used on ".xx" lines,
+'''   such as .IP and .SH, which do another additional levels of
+'''   double-quote interpretation
+.ds M" """
+.ds S" """
+.ds N" """""
+.ds T" """""
+.ds L' '
+.ds R' '
+.ds M' '
+.ds S' '
+.ds N' '
+.ds T' '
+'br\}
+.el\{\
+.ds -- \(em\|
+.tr \*(Tr
+.ds L" ``
+.ds R" ''
+.ds M" ``
+.ds S" ''
+.ds N" ``
+.ds T" ''
+.ds L' `
+.ds R' '
+.ds M' `
+.ds S' '
+.ds N' `
+.ds T' '
+.ds PI \(*p
+'br\}
+.\"    If the F register is turned on, we'll generate
+.\"    index entries out stderr for the following things:
+.\"            TH      Title 
+.\"            SH      Header
+.\"            Sh      Subsection 
+.\"            Ip      Item
+.\"            X<>     Xref  (embedded
+.\"    Of course, you have to process the output yourself
+.\"    in some meaninful fashion.
+.if \nF \{
+.de IX
+.tm Index:\\$1\t\\n%\t"\\$2"
+..
+.nr % 0
+.rr F
+.\}
+.TH FS_UUID 1 "OpenAFS" "23/Oct/2007" "AFS Command Reference"
+.UC
+.if n .hy 0
+.if n .na
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.de CQ          \" put $1 in typewriter font
+.ft CW
+'if n "\c
+'if t \\&\\$1\c
+'if n \\&\\$1\c
+'if n \&"
+\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
+'.ft R
+..
+.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
+.      \" AM - accent mark definitions
+.bd B 3
+.      \" fudge factors for nroff and troff
+.if n \{\
+.      ds #H 0
+.      ds #V .8m
+.      ds #F .3m
+.      ds #[ \f1
+.      ds #] \fP
+.\}
+.if t \{\
+.      ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.      ds #V .6m
+.      ds #F 0
+.      ds #[ \&
+.      ds #] \&
+.\}
+.      \" simple accents for nroff and troff
+.if n \{\
+.      ds ' \&
+.      ds ` \&
+.      ds ^ \&
+.      ds , \&
+.      ds ~ ~
+.      ds ? ?
+.      ds ! !
+.      ds /
+.      ds q
+.\}
+.if t \{\
+.      ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.      ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.      ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.      ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.      ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.      ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
+.      ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
+.      ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.      ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
+.\}
+.      \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
+.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
+.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
+.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.ds oe o\h'-(\w'o'u*4/10)'e
+.ds Oe O\h'-(\w'O'u*4/10)'E
+.      \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.      \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.      ds : e
+.      ds 8 ss
+.      ds v \h'-1'\o'\(aa\(ga'
+.      ds _ \h'-1'^
+.      ds . \h'-1'.
+.      ds 3 3
+.      ds o a
+.      ds d- d\h'-1'\(ga
+.      ds D- D\h'-1'\(hy
+.      ds th \o'bp'
+.      ds Th \o'LP'
+.      ds ae ae
+.      ds Ae AE
+.      ds oe oe
+.      ds Oe OE
+.\}
+.rm #[ #] #H #V #F C
+.SH "NAME"
+fs uuid \- Prints the uuid of the client or generates a new one
+.SH "SYNOPSIS"
+\fBfs uuid\fR [\fB\-generate\fR] [\fB\-help\fR]
+.SH "DESCRIPTION"
+\fBfs uuid\fR prints the current uuid of an OpenAFS client. It can
+optionally force the generation of a new uuid, if needed. The client
+uuid is used by the \fBfileserver\fR to differentiate clients with the
+same IP address.
+.SH "CAUTIONS"
+The \fBfs uuid\fR command is only available in OpenAFS versions after
+1.4.5 and 1.5.8. The behavior differs slightly between versions. In
+OpenAFS 1.4.5 and later, the \fB\-generate\fR option is required and the
+uuid for the client machine is never printed. OpenAFS versions 1.5.8
+and later will print the uuid.
+.SH "OPTIONS"
+.Ip "\fB\-generate\fR" 4
+Generates a new uuid for the cache manager. This is useful if two
+clients share the same uuid. \fB\-generate\fR is optional in OpenAFS
+versions 1.5.8 and later, but it is required in OpenAFS versions 1.4.5
+and later.
+.Ip "\fB\-help\fR" 4
+Prints the online help for this command. All other valid options are
+ignored.
+.SH "OUTPUT"
+\fBfs uuid\fR prints out the current uuid for the client or the new uuid
+if the \fB\-generate\fR option is passed to it.
+.SH "EXAMPLES"
+There are only two ways to invoke \fBfs uuid\fR under 1.5.8 and later:
+.PP
+.Vb 2
+\&   % fs uuid
+\&   UUID: 8ac66f9308a8e-47d7-80f7-50d0040cddc2
+.Ve
+.Vb 2
+\&   % fs uuid -generate
+\&   New UUID: 436bd660-1720-429508e470cff38f5c6fb0
+.Ve
+Here is the only way to invoke \fBfs uuid\fR under OpenAFS 1.4.5 and later:
+.PP
+.Vb 2
+\&   % fs uuid -generate
+\&   New uuid generated.
+.Ve
+.SH "PRIVILEGE REQUIRED"
+The issuer must be logged on as the local superuser \f(CWroot\fR.
+.SH "SEE ALSO"
+the \fIfs(1)\fR manpage
+.SH "COPYRIGHT"
+Copyright 2007 Jason Edgecombe <jason@rampaginggeek.com>
+.PP
+This documentation is covered by the IBM Public License Version 1.0. This
+man page was written by Jason Edgecombe for OpenAFS.
+
+.rn }` ''
+.IX Title "FS_UUID 1"
+.IX Name "fs uuid - Prints the uuid of the client or generates a new one"
+
+.IX Header "NAME"
+
+.IX Header "SYNOPSIS"
+
+.IX Header "DESCRIPTION"
+
+.IX Header "CAUTIONS"
+
+.IX Header "OPTIONS"
+
+.IX Item "\fB\-generate\fR"
+
+.IX Item "\fB\-help\fR"
+
+.IX Header "OUTPUT"
+
+.IX Header "EXAMPLES"
+
+.IX Header "PRIVILEGE REQUIRED"
+
+.IX Header "SEE ALSO"
+
+.IX Header "COPYRIGHT"
+
diff --git a/doc/man-pages/pod1/fs_uuid.pod b/doc/man-pages/pod1/fs_uuid.pod
new file mode 100644 (file)
index 0000000..244f5aa
--- /dev/null
@@ -0,0 +1,82 @@
+=head1 NAME
+
+fs uuid - Prints the uuid of the client or generates a new one
+
+=head1 SYNOPSIS
+
+=for html
+<div class="synopsis">
+
+B<fs uuid> [B<-generate>] [B<-help>]
+
+=for html
+</div>
+
+=head1 DESCRIPTION
+
+B<fs uuid> prints the current uuid of an OpenAFS client. It can
+optionally force the generation of a new uuid, if needed. The client
+uuid is used by the B<fileserver> to differentiate clients with the
+same IP address.
+
+=head1 CAUTIONS
+
+The B<fs uuid> command is only available in OpenAFS versions after
+1.4.5 and 1.5.8. The behavior differs slightly between versions. In
+OpenAFS 1.4.5 and later, the B<-generate> option is required and the
+uuid for the client machine is never printed. OpenAFS versions 1.5.8
+and later will print the uuid.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-generate>
+
+Generates a new uuid for the cache manager. This is useful if two
+clients share the same uuid. B<-generate> is optional in OpenAFS
+versions 1.5.8 and later, but it is required in OpenAFS versions 1.4.5
+and later.
+
+=item B<-help>
+
+Prints the online help for this command. All other valid options are
+ignored.
+
+=back
+
+=head1 OUTPUT
+
+B<fs uuid> prints out the current uuid for the client or the new uuid
+if the B<-generate> option is passed to it.
+
+=head1 EXAMPLES
+
+There are only two ways to invoke B<fs uuid> under 1.5.8 and later:
+
+   % fs uuid
+   UUID: 8ac66f9308a8e-47d7-80f7-50d0040cddc2
+
+   % fs uuid -generate
+   New UUID: 436bd660-1720-429508e470cff38f5c6fb0
+
+Here is the only way to invoke B<fs uuid> under OpenAFS 1.4.5 and later:
+
+   % fs uuid -generate
+   New uuid generated.
+
+
+=head1 PRIVILEGE REQUIRED
+
+The issuer must be logged on as the local superuser C<root>.
+
+=head1 SEE ALSO
+
+L<fs(1)>
+
+=head1 COPYRIGHT
+
+Copyright 2007 Jason Edgecombe <jason@rampaginggeek.com>
+
+This documentation is covered by the IBM Public License Version 1.0. This
+man page was written by Jason Edgecombe for OpenAFS.
index 75580a4fd3d40058b8e9ce54a76f6fd1f368f993..7fad134a727674789e4aeecc8fecd87f1600b8c6 100644 (file)
@@ -5,7 +5,7 @@
 #include <afs/param.h>
 
 RCSID
-    ("$Header: /cvs/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.18.2.24 2007/10/15 19:22:43 shadow Exp $");
+    ("$Header: /cvs/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.18.2.28 2007/10/24 05:45:38 shadow Exp $");
 
 #include <afs/sysincludes.h>   /* Standard vendor system headers */
 #include <afsincludes.h>       /* Afs-based standard headers */
@@ -542,6 +542,8 @@ afs_vop_close(ap)
     else
        code = afs_close(avc, ap->a_fflag, &afs_osi_cred, vop_proc);
     osi_FlushPages(avc, vop_cred);     /* hold bozon lock, but not basic vnode lock */
+    /* This is legit; it just forces the fstrace event to happen */
+    code = afs_CheckCode(code, NULL, 60);
     AFS_GUNLOCK();
 
     return code;
@@ -634,17 +636,22 @@ afs_vop_access(ap)
     /* we can't check for KAUTH_VNODE_TAKE_OWNERSHIP, so we always permit it */
     
     code = afs_AccessOK(tvc, bits, &treq, cmb);
-
+#if defined(AFS_DARWIN80_ENV)
+    /* In a dropbox, cp on 10.4 behaves badly, looping on EACCES */
+    /* In a dropbox, Finder may reopen the file. Let it. */
+    if (code == 0 && ((bits &~(PRSFS_READ|PRSFS_WRITE)) == 0)) {
+       code = afs_AccessOK(tvc, PRSFS_ADMINISTER|PRSFS_INSERT|bits, &treq, cmb);
+    }
+#endif
     if (code == 1 && vnode_vtype(ap->a_vp) == VREG &&
         ap->a_action & KAUTH_VNODE_EXECUTE &&
         (tvc->m.Mode & 0100) != 0100) {
         code = 0;
-     }
+    }
     if (code) {
         code= 0;               /* if access is ok */
     } else {
-       /* In 10.4 cp will loop forever on EACCES */
-        code = afs_CheckCode(EPERM, &treq, 57);        /* failure code */
+        code = afs_CheckCode(EACCES, &treq, 57);        /* failure code */
     }
 out:
      afs_PutFakeStat(&fakestate);
@@ -683,12 +690,15 @@ afs_vop_getattr(ap)
 
     AFS_GLOCK();
     code = afs_getattr(VTOAFS(ap->a_vp), ap->a_vap, vop_cred);
+    /* This is legit; it just forces the fstrace event to happen */
+    code = afs_CheckCode(code, NULL, 58);
     AFS_GUNLOCK();
 #ifdef AFS_DARWIN80_ENV
     VATTR_SET_SUPPORTED(ap->a_vap, va_type);
     VATTR_SET_SUPPORTED(ap->a_vap, va_mode);
     VATTR_SET_SUPPORTED(ap->a_vap, va_uid);
     VATTR_SET_SUPPORTED(ap->a_vap, va_gid);
+    VATTR_SET_SUPPORTED(ap->a_vap, va_fsid);
     VATTR_SET_SUPPORTED(ap->a_vap, va_fileid);
     VATTR_SET_SUPPORTED(ap->a_vap, va_nlink);
     VATTR_SET_SUPPORTED(ap->a_vap, va_data_size);
@@ -715,6 +725,8 @@ afs_vop_setattr(ap)
     int code;
     AFS_GLOCK();
     code = afs_setattr(VTOAFS(ap->a_vp), ap->a_vap, vop_cred);
+    /* This is legit; it just forces the fstrace event to happen */
+    code = afs_CheckCode(code, NULL, 59);
     AFS_GUNLOCK();
     return code;
 }
@@ -1191,6 +1203,7 @@ afs_vop_remove(ap)
     GETNAME();
     AFS_GLOCK();
     error = afs_remove(VTOAFS(dvp), name, vop_cn_cred);
+    error = afs_CheckCode(error, NULL, 61);
     AFS_GUNLOCK();
     cache_purge(vp);
     if (!error) {
@@ -1208,6 +1221,12 @@ afs_vop_remove(ap)
        /* If crashes continue in ubc_hold, comment this out */
         (void)ubc_uncache(vp);
 #endif
+    } else {
+       /* should check for PRSFS_INSERT and not PRSFS_DELETE, but the
+          goal here is to deal with Finder's unhappiness with resource
+          forks that have no resources in a dropbox setting */
+       if (name[0] == '.' && name[1] == '_' && error == EACCES) 
+           error = 0;
     }
 
 #ifndef AFS_DARWIN80_ENV
@@ -2061,14 +2080,14 @@ afs_darwin_getnewvnode(struct vcache *avc)
    Don't touch! */
 int 
 afs_darwin_finalizevnode(struct vcache *avc, struct vnode *dvp, struct componentname *cnp, int isroot) {
-   vnode_t ovp = AFSTOV(avc);
+   vnode_t ovp;
    vnode_t nvp;
    int error;
    struct vnode_fsparam par;
    AFS_GLOCK();
    ObtainWriteLock(&avc->lock,325);
+   ovp = AFSTOV(avc);
    if (!(avc->states & CDeadVnode) && vnode_vtype(ovp) != VNON) {
-        ReleaseWriteLock(&avc->lock);
         AFS_GUNLOCK();
 #if 0 /* unsupported */
         if (dvp && cnp)
@@ -2076,7 +2095,11 @@ afs_darwin_finalizevnode(struct vcache *avc, struct vnode *dvp, struct component
                               cnp->cn_hash,
                               VNODE_UPDATE_PARENT|VNODE_UPDATE_NAME);
 #endif
+       /* Can end up in reclaim... drop GLOCK */
         vnode_rele(ovp);
+       AFS_GLOCK();
+        ReleaseWriteLock(&avc->lock);
+       AFS_GUNLOCK();
         return 0;
    }
    if ((avc->states & CDeadVnode) && vnode_vtype(ovp) != VNON) 
@@ -2098,20 +2121,24 @@ afs_darwin_finalizevnode(struct vcache *avc, struct vnode *dvp, struct component
    error = vnode_create(VNCREATE_FLAVOR, VCREATESIZE, &par, &nvp);
    if (!error) {
        vnode_addfsref(nvp);
+       if ((avc->states & CDeadVnode) && vnode_vtype(ovp) != VNON) 
+          printf("vcache %p should not be CDeadVnode", avc);
+       if (avc->v == ovp) {
+          if (!(avc->states & CVInit)) {
+              vnode_clearfsnode(ovp);
+              vnode_removefsref(ovp);
+          }
+       }
        avc->v = nvp;
        avc->states &=~ CDeadVnode;
-       if (!(avc->states & CVInit)) {
-          vnode_clearfsnode(ovp);
-          vnode_removefsref(ovp);
-       }
    }
+   vnode_put(ovp);
+   vnode_rele(ovp);
    AFS_GLOCK();
    ReleaseWriteLock(&avc->lock);
    if (!error)
       afs_osi_Wakeup(&avc->states);
    AFS_GUNLOCK();
-   vnode_put(ovp);
-   vnode_rele(ovp);
    return error;
 }
 #endif
index d25f6f6166e7dbd56975eab806d6232ea39f5117..52d2ced82855bce2369361ab9a33eaead255f9ee 100644 (file)
@@ -15,7 +15,7 @@
 #include "afs/param.h"
 
 RCSID
-    ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.28 2007/08/22 02:19:28 shadow Exp $");
+    ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.29 2007/10/24 18:09:50 shadow Exp $");
 
 #include <linux/module.h> /* early to avoid printf->printk mapping */
 #include "afs/sysincludes.h"
@@ -379,9 +379,7 @@ init_module(void)
     err = register_filesystem(&afs_fs_type);
     if (err) {
        afs_destroy_inodecache();
-#ifndef LINUX_KEYRING_SUPPORT
        osi_syscall_clean();
-#endif
        return err;
     }
 
@@ -408,9 +406,7 @@ cleanup_module(void)
     osi_keyring_shutdown();
 #endif
     osi_sysctl_clean();
-#ifndef LINUX_KEYRING_SUPPORT
     osi_syscall_clean();
-#endif
     unregister_filesystem(&afs_fs_type);
 
     afs_destroy_inodecache();
index 5f8053f48e64c7601aa976d435b9ae7cec0bf9b2..e1c11a99fb77adcbc345ac2526636203f811ac32 100644 (file)
@@ -18,7 +18,7 @@
 #include "afs/param.h"
 
 RCSID
-    ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_lookup.c,v 1.50.2.18 2006/02/18 04:09:36 shadow Exp $");
+    ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_lookup.c,v 1.50.2.19 2007/10/16 22:03:46 shadow Exp $");
 
 #include "afs/sysincludes.h"   /* Standard vendor system headers */
 #include "afsincludes.h"       /* Afs-based standard headers */
@@ -497,7 +497,7 @@ Next_AtSys(register struct vcache *avc, struct vrequest *areq,
            au = afs_GetUser(areq->uid, avc->fid.Cell, 0);
            if (au->exporter) {
                error =
-                   EXP_SYSNAME(au->exporter, (char *)0, sysnamelist, num);
+                   EXP_SYSNAME(au->exporter, (char *)0, sysnamelist, &num);
                if (error) {
                    return 0;
                }
index d9ead8b15fb46fa92808fa4321e59650a98a55df..70a764c7ad1db709c8cd69d81598c4392893edb8 100644 (file)
@@ -11,7 +11,7 @@
 #include "afs/param.h"
 
 RCSID
-    ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.74.2.23 2007/10/10 16:57:54 shadow Exp $");
+    ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.74.2.25 2007/10/17 03:51:44 shadow Exp $");
 
 #include "afs/sysincludes.h"   /* Standard vendor system headers */
 #include "afsincludes.h"       /* Afs-based standard headers */
@@ -508,11 +508,12 @@ afs_DaemonOp(long parm, long parm2, long parm3, long parm4, long parm5,
 static void
 wait_for_cachedefs(void) {
 #ifdef AFS_CACHE_VNODE_PATH
-    while ((afs_numcachefiles < 1) || (afs_numfilesperdir < 1) ||
-          (afs_cachebasedir[0] != '/')) {
-       printf("afs: waiting for cache parameter definitions\n");
-       afs_osi_Sleep(&afs_initState);
-    }
+    if (cacheDiskType != AFS_FCACHE_TYPE_MEM) 
+       while ((afs_numcachefiles < 1) || (afs_numfilesperdir < 1) ||
+              (afs_cachebasedir[0] != '/')) {
+           printf("afs: waiting for cache parameter definitions\n");
+           afs_osi_Sleep(&afs_initState);
+       }
 #endif
 }
 
@@ -894,22 +895,24 @@ afs_syscall_call(parm, parm2, parm3, parm4, parm5, parm6)
        osi_FreeSmallSpace(tbuffer);
     } else if (parm == AFSOP_GO) {
 #ifdef AFS_CACHE_VNODE_PATH
-       afs_int32 dummy;
-
-       wait_for_cachedefs();
-
+       if (cacheDiskType != AFS_FCACHE_TYPE_MEM) {
+           afs_int32 dummy;
+           
+           wait_for_cachedefs();
+           
 #ifdef AFS_DARWIN80_ENV
-       get_vfs_context();
-#endif
-       if ((afs_numcachefiles > 0) && (afs_numfilesperdir > 0) && 
-           (afs_cachebasedir[0] == '/')) {
-           for (dummy = 0; dummy < afs_numcachefiles; dummy++) {
-               code = afs_InitCacheFile(NULL, dummy);
-           }
-       }
+           get_vfs_context();
+#endif
+           if ((afs_numcachefiles > 0) && (afs_numfilesperdir > 0) && 
+               (afs_cachebasedir[0] == '/')) {
+               for (dummy = 0; dummy < afs_numcachefiles; dummy++) {
+                   code = afs_InitCacheFile(NULL, dummy);
+               }
+           }
 #ifdef AFS_DARWIN80_ENV
-       put_vfs_context();
+           put_vfs_context();
 #endif
+       }
 #endif
        /* the generic initialization calls come here.  One parameter: should we do the
         * set-time operation on this workstation */
index 81e3db070d53a9eddf8f4ccfc5f47c298f96721a..1cc6c11ad0fe257a4069827da9f2c1a80eab7c77 100644 (file)
@@ -11,7 +11,7 @@
 #include "afs/param.h"
 
 RCSID
-    ("$Header: /cvs/openafs/src/afs/afs_daemons.c,v 1.28.2.13 2006/02/13 18:31:13 shadow Exp $");
+    ("$Header: /cvs/openafs/src/afs/afs_daemons.c,v 1.28.2.14 2007/10/23 00:03:01 shadow Exp $");
 
 #ifdef AFS_AIX51_ENV
 #define __FULL_PROTO
@@ -49,7 +49,7 @@ afs_int32 afs_CheckServerDaemonStarted = 0;
 #ifdef DEFAULT_PROBE_INTERVAL
 afs_int32 PROBE_INTERVAL = DEFAULT_PROBE_INTERVAL;     /* overridding during compile */
 #else
-afs_int32 PROBE_INTERVAL = 180;        /* default to 3 min */
+afs_int32 PROBE_INTERVAL = 30; /* default to 3 min */
 #endif
 
 #define PROBE_WAIT() (1000 * (PROBE_INTERVAL - ((afs_random() & 0x7fffffff) \
index 203c273613244f2e2e80737d9042776aa79555aa..071f0b5b3542fba48f75f4effde69a9dc02f8b36 100644 (file)
@@ -11,7 +11,7 @@
 #include "afs/param.h"
 
 RCSID
-    ("$Header: /cvs/openafs/src/afs/afs_nfsclnt.c,v 1.12.2.3 2007/03/20 19:24:11 shadow Exp $");
+    ("$Header: /cvs/openafs/src/afs/afs_nfsclnt.c,v 1.12.2.4 2007/10/16 22:03:45 shadow Exp $");
 
 #if !defined(AFS_NONFSTRANS) || defined(AFS_AIX_IAUTH_ENV)
 #include "afs/sysincludes.h"   /* Standard vendor system headers */
@@ -331,6 +331,8 @@ afs_nfsclient_sysname(register struct nfsclientpag *np, char *inname,
     }
     *outname = np->sysname;
     *num = np->sysnamecount;
+    if (!np->sysname[0])
+       return ENODEV; /* XXX */
     return 0;
 }
 
index 05361c615c5d9762c6ae379cf4824e981cdb6346..5caf6549ff60b18f7739f24b70e28f979dd13efd 100644 (file)
@@ -11,7 +11,7 @@
 #include "afs/param.h"
 
 RCSID
-    ("$Header: /cvs/openafs/src/afs/afs_osidnlc.c,v 1.8.2.5 2006/02/18 04:09:33 shadow Exp $");
+    ("$Header: /cvs/openafs/src/afs/afs_osidnlc.c,v 1.8.2.6 2007/10/19 20:40:52 shadow Exp $");
 
 #include "afs/sysincludes.h"   /*Standard vendor system headers */
 #include "afsincludes.h"       /*AFS-based standard headers */
@@ -242,7 +242,12 @@ osi_dnlc_lookup(struct vcache *adp, char *aname, int locktype)
        ReleaseReadLock(&afs_xvcache);
        dnlcstats.misses++;
     } else {
-       if (tvc->states & CVInit) {
+       if ((tvc->states & CVInit)
+#ifdef  AFS_DARWIN80_ENV
+           ||(tvc->states & CDeadVnode)
+#endif
+           )      
+       {
            ReleaseReadLock(&afs_xvcache);
            dnlcstats.misses++;
            osi_dnlc_remove(adp, aname, tvc);
index 7c5e5e269977fe7c4031b4ffe5df8a55e118059a..6ff46c3fcaf22677c1725fd12eeda0e381aee933 100644 (file)
@@ -58,7 +58,7 @@
 #include <afs/param.h>
 
 RCSID
-    ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.43.2.22 2007/10/10 16:57:56 shadow Exp $");
+    ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.43.2.23 2007/10/23 14:31:29 shadow Exp $");
 
 #define VFS 1
 
@@ -428,7 +428,7 @@ afsd_event_cleanup(int signo) {
 
     CFRunLoopRemoveSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode);
     CFRelease (source);
-    IODeregisterForSystemPower(iterator);
+    IODeregisterForSystemPower(&iterator);
     IOServiceClose(root_port);
     IONotificationPortDestroy(notify);
 
index 0835edaec83d9d08fd038fec91525e24432350aa..7486cbd817c0ee4261af400701e8e2200d7ec333 100644 (file)
@@ -15,7 +15,7 @@
 #include <afs/param.h>
 
 RCSID
-    ("$Header: /cvs/openafs/src/bucoord/restore.c,v 1.8.2.7 2007/06/26 05:44:57 jaltman Exp $");
+    ("$Header: /cvs/openafs/src/bucoord/restore.c,v 1.8.2.8 2007/10/16 16:56:48 jaltman Exp $");
 
 #include <afs/stds.h>
 #include <sys/types.h>
@@ -224,7 +224,7 @@ bc_Restorer(aindex)
            code = bcdb_FindDumpByID(dumpTaskPtr->parentDumpID, dumpDescr);
            if (code)
              {
-               afs_com_err(whoami, "Couldn't look up info for dump %d\n",
+               afs_com_err(whoami, code, "Couldn't look up info for dump %d\n",
                        dumpTaskPtr->parentDumpID);
                continue;
              }
index 788cb2a31b90444310a6a4898c08f2feeecc1930..40108b5399cd4523ce0d7c5557eb9e103da22123 100755 (executable)
@@ -4,7 +4,7 @@
 #
 # Written by:  Derek Atkins <warlord@MIT.EDU>
 #
-# $Revision: 1.1.2.2 $
+# $Revision: 1.1.2.3 $
 #
 
 # Define where the Specfile is located.
@@ -21,10 +21,17 @@ buildopts=
 if [ `echo $rhrel | grep -c 'Fedora Core'` = 1 ] ; then
   ostype='fc'
   osrel=`echo $rhrel | sed -e 's/^.*release \([^ ]*\).*$/\1/' -e 's/\.//g'`
+elif [ `echo $rhrel | grep -c 'Fedora'` = 1 ] ; then
+  ostype='fc'
+  osrel=`echo $rhrel | sed -e 's/^.*release \([^ ]*\).*$/\1/' -e 's/\.//g'`
 elif [ `echo $rhrel | grep -c 'Red Hat Enterprise Linux'` = 1 ] ; then
   ostype='rhel'
   excludearch=i586
   osrel=`echo $rhrel | sed -e 's/^.*release \([^ ]*\).*$/\1/' -e 's/\.//g'`
+elif [ `echo $rhrel | grep -c 'CentOS'` = 1 ] ; then
+  ostype='rhel'
+  excludearch=i586
+  osrel=`echo $rhrel | sed -e 's/^.*release \([^ ]*\).*$/\1/' -e 's/\.//g'`
 elif [ `echo $rhrel | grep -c 'Red Hat Linux'` = 1 ] ; then
   ostype='rh'
   osrel=`echo $rhrel | sed -e 's/^.*release \([^ ]*\).*$/\1/' -e 's/\.//g'`
index f7c626315637fce38812cd9c96fa0b71e570357d..99ae034fbe9488e64b0f9785ea4dc0dcc1c3593f 100644 (file)
@@ -1,4 +1,4 @@
-# Openafs Spec $Revision: 1.1.2.4 $
+# Openafs Spec $Revision: 1.1.2.6 $
 
 %define afsvers 1.4.5pre1
 %define pkgvers 1.4.5pre1
@@ -229,7 +229,7 @@ URL: http://www.openafs.org
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 Packager: Derek Atkins <warlord@MIT.EDU>
 Group: Networking/Filesystems
-BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel
+BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
 %if %{build_userspace}
 BuildRequires: autoconf
 %endif
@@ -244,6 +244,7 @@ Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
 Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
 
 Source30: openafs-kernel-version.sh
+Source998: openafs-buildall.sh
 Source999: kmodtool
 
 Patch0:  openafs-1.4.0-kmodule26.patch
index 9eac9dad584d8fdd12144d5c8098fd6f3867e609..a5c5dd89aefc2853acdde85e58408a8e357d3584 100644 (file)
@@ -11,7 +11,7 @@
 #include <afs/param.h>
 
 RCSID
-    ("$Header: /cvs/openafs/src/venus/fs.c,v 1.24.2.7 2007/06/12 19:20:21 shadow Exp $");
+    ("$Header: /cvs/openafs/src/venus/fs.c,v 1.24.2.8 2007/10/16 17:20:09 jaltman Exp $");
 
 #include <afs/afs_args.h>
 #include <rx/xdr.h>
@@ -69,7 +69,7 @@ static char tspace[1024];
 static struct ubik_client *uclient;
 
 static int GetClientAddrsCmd(), SetClientAddrsCmd(), FlushMountCmd();
-static int RxStatProcCmd(), RxStatPeerCmd(), GetFidCmd(), NewUuidCmd();
+static int RxStatProcCmd(), RxStatPeerCmd(), GetFidCmd(), UuidCmd();
 
 extern char *hostutil_GetNameByINet();
 extern struct hostent *hostutil_GetHostByName();
@@ -1244,21 +1244,40 @@ FlushVolumeCmd(struct cmd_syndesc *as, char *arock)
     return error;
 }
 
+/* 
+ * The Windows version of UuidCmd displays the UUID.
+ * When the UNIX version is updated to do the same
+ * be sure to replace the CMD_REQUIRED flag with
+ * CMD_OPTIONAL in the cmd_AddParam(-generate) call 
+ */
 static int
-NewUuidCmd(struct cmd_syndesc *as, char *arock)
+UuidCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
 
     blob.in_size = 0;
     blob.out_size = 0;
-    code = pioctl(0, VIOC_NEWUUID, &blob, 1);
-    if (code) {
-       Die(errno, 0);
-       return 1;
-    }
+    
+    if (as->parms[0].items) {
+        if (geteuid()) {
+            fprintf (stderr, "Permission denied: requires root access.\n");
+            return EACCES;
+        }
+
+        /* generate new UUID */
+        code = pioctl(0, VIOC_NEWUUID, &blob, 1);
 
-    printf("New uuid generated.\n");
+        if (code) {
+            Die(errno, 0);
+            return 1;
+        }
+
+        printf("New uuid generated.\n");
+    } else {
+        /* This will never execute */
+        printf("Please add the '-generate' option to generate a new UUID.\n");
+    }
     return 0;
 }
 
@@ -3460,8 +3479,8 @@ defect 3069
                          "get fid for file(s)");
     cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
 
-    ts = cmd_CreateSyntax("newuuid", NewUuidCmd, 0,
-                         "force a new uuid");
+    ts = cmd_CreateSyntax("uuid", UuidCmd, 0, "manage the UUID for the cache manager");
+    cmd_AddParm(ts, "-generate", CMD_FLAG, CMD_REQUIRED, "generate a new UUID");
 
     code = cmd_Dispatch(argc, argv);
     if (rxInitDone)
index 327c17cb67f4ec7fb4853820fae0f64397377bec..66f674e2255b1c846e45e50a61c79d5692dea656 100644 (file)
@@ -83,7 +83,7 @@
 #include <afs/param.h>
 
 RCSID
-    ("$Header: /cvs/openafs/src/viced/callback.c,v 1.55.2.17 2007/08/21 08:28:37 jaltman Exp $");
+    ("$Header: /cvs/openafs/src/viced/callback.c,v 1.55.2.18 2007/10/24 15:37:32 shadow Exp $");
 
 #include <stdio.h>
 #include <stdlib.h>            /* for malloc() */
@@ -1181,7 +1181,7 @@ BreakDelayedCallBacks_r(struct host *host)
 
     cbstuff.nbreakers--;
     /* If we succeeded it's always ok to unset HFE_LATER */
-    if (!host->hostFlags & VENUSDOWN)
+    if (!(host->hostFlags & VENUSDOWN))
        host->hostFlags &= ~HFE_LATER;
     return (host->hostFlags & VENUSDOWN);
 }
index 4b5629983bce53855d704513e7a845afe60da0e2..47a8e137f4e3d8c966571a172c9e3af367331e6a 100644 (file)
@@ -11,7 +11,7 @@
 #include <afs/param.h>
 
 RCSID
-    ("$Header: /cvs/openafs/src/volser/vos.c,v 1.40.2.19 2007/07/19 18:52:40 shadow Exp $");
+    ("$Header: /cvs/openafs/src/volser/vos.c,v 1.40.2.20 2007/10/23 14:22:27 shadow Exp $");
 
 #include <sys/types.h>
 #ifdef AFS_NT40_ENV
@@ -342,21 +342,21 @@ WriteData(struct rx_call *call, char *rock)
            error = VOLSERBADOP;
            goto wfail;
        }
+       /* test if we have a valid dump */
+       hset64(filesize, 0, 0);
+       USD_SEEK(ufd, filesize, SEEK_END, &currOffset);
+       hset64(filesize, hgethi(currOffset), hgetlo(currOffset)-sizeof(afs_uint32));
+       USD_SEEK(ufd, filesize, SEEK_SET, &currOffset);
+       USD_READ(ufd, &buffer, sizeof(afs_uint32), &got);
+       if ((got != sizeof(afs_uint32)) || (ntohl(buffer) != DUMPENDMAGIC)) {
+           fprintf(STDERR, "Signature missing from end of file '%s'\n", filename);
+           error = VOLSERBADOP;
+           goto wfail;
+       }
+       /* rewind, we are done */
+       hset64(filesize, 0, 0);
+       USD_SEEK(ufd, filesize, SEEK_SET, &currOffset);
     }
-    /* test if we have a valid dump */
-    hset64(filesize, 0, 0);
-    USD_SEEK(ufd, filesize, SEEK_END, &currOffset);
-    hset64(filesize, hgethi(currOffset), hgetlo(currOffset)-sizeof(afs_uint32));
-    USD_SEEK(ufd, filesize, SEEK_SET, &currOffset);
-    USD_READ(ufd, &buffer, sizeof(afs_uint32), &got);
-    if ((got != sizeof(afs_uint32)) || (ntohl(buffer) != DUMPENDMAGIC)) {
-       fprintf(STDERR, "Signature missing from end of file '%s'\n", filename);
-        error = VOLSERBADOP;
-        goto wfail;
-    }
-    hset64(filesize, 0, 0);
-    USD_SEEK(ufd, filesize, SEEK_SET, &currOffset);
-    /* rewind, we are done */
     code = SendFile(ufd, call, blksize);
     if (code) {
        error = code;