openafs.git
14 years agoFix build for FBSD80
Ben Kaduk [Wed, 31 Mar 2010 15:27:38 +0000]
Fix build for FBSD80

The change to a dynamically-allocated group list came before
the change to allow the maximum size of that group list to
be set as a tuneable at boot.  The 8.0 release happened to
come between them, so we must treat both cases.
(Note that AFS_FBSD81_ENV is not yet defined anywhere; that
will come later.)

Change-Id: I87a0e2cff3c42de60d512fe5653abe0161afc789
Reviewed-on: http://gerrit.openafs.org/1676
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUpdate to the new thread world order for FBSD
Ben Kaduk [Wed, 31 Mar 2010 04:49:02 +0000]
Update to the new thread world order for FBSD

Since FreeBSD 5.0, system calls have taken a thread argument instead
of a proc argument.  Finish catching up.

Also remove the retval argument, which is not in the system sysent
definition, and is unused.

Since we took our sweet time getting around to it, we can also
remove large swaths of FreeBSD 4.X-only code from the area.

Fix the vop_*_args struct definition comments that had changes in
addition to proc-->thread while we're here.

Change-Id: Ib469e77655a6c04bfbfe1e5fab54f6f3a6119a85
Reviewed-on: http://gerrit.openafs.org/1675
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoInclude limits.h for FBSD
Ben Kaduk [Wed, 31 Mar 2010 03:35:13 +0000]
Include limits.h for FBSD

Needed to pick up INT_MAX in the KERNEL case, for stopping the
XDR madness, among other things.

Change-Id: Ibcf2681b450f6a3603418991951f5144ab677d28
Reviewed-on: http://gerrit.openafs.org/1674
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoopenafs 1.5.73.1 openafs-devel-1_5_73_1
Derrick Brashear [Tue, 30 Mar 2010 20:28:27 +0000]
openafs 1.5.73.1

with rpm and macos versions which hopefully work for packaging
(well, the macos does)

Change-Id: I42016db95ddaff6f76e1f0954eb06cfd743f18cf
Reviewed-on: http://gerrit.openafs.org/1670
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoMake GCPAGs_perproc_func cleaner for FBSD case
Ben Kaduk [Wed, 31 Mar 2010 00:34:02 +0000]
Make GCPAGs_perproc_func cleaner for FBSD case

Partially rewrite 2cf1f10a to reduce code clutter.
Instead of accessing pproc->p_ucred directly in afs_GCPAGs_perproc_func(),
push this access into a FBSD-specific afs_proc2cred() function.
This is not quite right, since we do not lock the proc mutex, but
in the same way as the old version and with more reasonable preprocessor
conditionals.
This also eliminates a probably-needless call to osi_Panic.

Change-Id: Ib403132f31cc13f8c4581cb89ecc8938d0a0dd88
Reviewed-on: http://gerrit.openafs.org/1672
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUpdated RedHat RPM spec file to include unreferenced files
Jonathan Billings [Tue, 30 Mar 2010 20:35:50 +0000]
Updated RedHat RPM spec file to include unreferenced files

Added the libkopenafs libraries and headers to the authlib package.

Added the afs_compile_et binary to the devel package

Removed the reference to .../man5/afszcm.cat.* because it is already
caught by the earlier reference to .../man5/afs* glob.  This caused a
warning during the package build process.

Change-Id: I64a037a8534ac3d2c6b0aa22249d6827e08af9b1
Reviewed-on: http://gerrit.openafs.org/1671
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoMove restorevol to bin from sbin in make dest
Jonathan Billings [Tue, 30 Mar 2010 20:06:07 +0000]
Move restorevol to bin from sbin in make dest

Adds to the changes made in d6df1a8cec39edf7c0d2598921c735ac6aca70d7
so that 'make dest' installs restorevol into bin.

Change-Id: I9c7f302ad9a2f25e9a362ea96dbbf0d91a7d9b04
Reviewed-on: http://gerrit.openafs.org/1669
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agodarwin notify avoid reentrant vfs context panic
Derrick Brashear [Tue, 30 Mar 2010 15:43:33 +0000]
darwin notify avoid reentrant vfs context panic

if we own the context, don't get it again.

Change-Id: I1f574bc3dda764c7a9552f1adf0f64e50afc1d7d
Reviewed-on: http://gerrit.openafs.org/1668
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoUpdate VCS instructions for Git
Russ Allbery [Tue, 30 Mar 2010 05:17:31 +0000]
Update VCS instructions for Git

Rename README.CVS to README.GIT and update the references from CVS
to GIT.  Refer readers to the wiki for the detailed instructions and
information about Gerrit.

Change-Id: Ia1826110c4b974ab36a64555ca44e6c5ce74f7ef
Reviewed-on: http://gerrit.openafs.org/1667
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoMinor state_analyzer manpage corrections
Davor Ocelic [Mon, 29 Mar 2010 14:54:43 +0000]
Minor state_analyzer manpage corrections

Done according to adeason's comments on http://gerrit.openafs.org/#change,1655

Change-Id: Ia5b28473fa37ad2a877a5a56b1b7f1c4893e8db1
Reviewed-on: http://gerrit.openafs.org/1666
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoRender the IP address for the "Ubik: Lost contact with sync-site" log
Rod Widdowson [Wed, 24 Mar 2010 16:59:15 +0000]
Render the IP address for the "Ubik: Lost contact with sync-site" log
message in the same way that all other IP addresses are (via
afs_inet_ntoa, rather than stripping the buytes out in a manner which
assumes a specific endianism).

Done more as a way to test my understanding of the GIT/GERRIT
technology with a small non-important checkin.

Change-Id: I177e1288e8e23087aeebb7abe4ed63a7c2b88ccb
Reviewed-on: http://gerrit.openafs.org/1649
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoCatch up to dynamically-sized cr_groups in FBSD80
Ben Kaduk [Tue, 23 Mar 2010 02:35:51 +0000]
Catch up to dynamically-sized cr_groups in FBSD80

In FreeBSD 8.0 and later, (struct ucred)->cr_groups is a pointer
to a dynamically-allocated array, and NGROUPS is now 1024 by default
(tuneable at boot).
Don't put a gid_t[NGROUPS] on the stack for the FBSD80_ENV case.
Also avoid keeping a function-local ucred structure (in
afs_osi_proc2cred()), by bypassing that function entirely
(though this accesses the process credentials directly, which may
require locking; thread credentials accesses can be safely done
lock-free).  Add an osi_Panic() to ensure that it stays that way.
Don't pretend that we have a useful afs_osi_cred to export.
Don't blindly overwrite NGROUPS past cr_groups.

Change-Id: I76295164a24bddf2782ab2fa662acd0e1b4855d6
Reviewed-on: http://gerrit.openafs.org/1665
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoInitial; add state_analyzer manpage
Davor Ocelic [Wed, 24 Mar 2010 21:45:20 +0000]
Initial; add state_analyzer manpage

Change-Id: I5dd43e6ea5764421a6e44f372f4e9c9576de627e
Reviewed-on: http://gerrit.openafs.org/1655
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: buffers whose offsets are beyond EOF should be zero filled and locally allocated
Jeffrey Altman [Sat, 27 Mar 2010 20:13:27 +0000]
Windows: buffers whose offsets are beyond EOF should be zero filled and locally allocated

When a buffer is being allocated for an offset that exceeds the
file length as known to the file server, that buffer should be zero
filled and it does not require server validation.

Previously all buffers were populated with a FetchData call.
This is wasteful of time and server resources when there is a
valid callback registration because the serverLength is known
to be valid.

LICENSE MIT

Change-Id: I13f9a8dbd6387c3ba71638a682e995d7a7d0862f
Reviewed-on: http://gerrit.openafs.org/1664
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoGUI Update for Kerberos Ticket Renew
Claudio Bisegni [Wed, 24 Mar 2010 22:27:05 +0000]
GUI Update for Kerberos Ticket Renew

Now the NSEditText for Renew Time is replaced by NSStepper for Days:Hours:Minutes:Seconds

Change-Id: If696f456faada6762def192ab0887539d55bc5d4
Reviewed-on: http://gerrit.openafs.org/1656
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoaklog pt error table warning fix
Derrick Brashear [Sat, 27 Mar 2010 16:45:40 +0000]
aklog pt error table warning fix

include the header file that prototypes the pt error table

Change-Id: Ibd1a7cb04d8084a50d3a429fa69cfb2967874c9b
Reviewed-on: http://gerrit.openafs.org/1663
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoaklog more error tables
Derrick Brashear [Thu, 25 Mar 2010 13:01:23 +0000]
aklog more error tables

initialize the rest that we might need

Change-Id: If4e02add67994ae5397c60de3e64c072c3512a2e
Reviewed-on: http://gerrit.openafs.org/1661
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoLINUX: you dont need to memset() after allocating credentials
Chas Williams - CONTRACTOR [Thu, 7 Jan 2010 23:35:37 +0000]
LINUX: you dont need to memset() after allocating credentials

If you wanted to create a blank credential, you wouldn't want to make
it uid = 0.  Anyone allocating a credential SHOULD properly fill in all
fields making this blanking operation moot.  Regardless, this memset()
is before the allocation failure test and would/could panic.

Change-Id: Ia182a874a5e1bf28a2cd94898f67d81e5588d58c
Reviewed-on: http://gerrit.openafs.org/1080
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: afslogon.dll vs windows 7
Jeffrey Altman [Thu, 25 Mar 2010 05:23:23 +0000]
Windows: afslogon.dll vs windows 7

In Windows 7 the GINA is no longer used.  As a result, when a
non-Heimdal realm is used for logon, the LogonDomain field
is no longer populated during the NPLogonNotify call.  Instead
we must obtain the Kerberos realm from the UPN specified in
the Username field.

Change-Id: I838e0a5b19d560dd2fed6ccccf1e136fe1c4e0c2
Reviewed-on: http://gerrit.openafs.org/1660
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: aklog must reset viceId to 0 before pr_CreateUser call
Jeffrey Altman [Thu, 25 Mar 2010 04:40:29 +0000]
Windows: aklog must reset viceId to 0 before pr_CreateUser call

If the viceId is not reset to 0, the ptserver believes the
client is attempting to request the anonymous id value
and fails the registration request with permission denied.

LICENSE MIT

Change-Id: I82cc6105ad9d08b2f460b0c08cf7de500cea8537
Reviewed-on: http://gerrit.openafs.org/1659
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: output pt error messages as strings
Jeffrey Altman [Thu, 25 Mar 2010 02:07:29 +0000]
Windows: output pt error messages as strings

Build and link in ptserver/pterror.c so that aklog
can output pt error messages as strings.

LICENSE MIT

Change-Id: I93d966e0e62bb693612c6310781aadbfa6c09988
Reviewed-on: http://gerrit.openafs.org/1658
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agogrowl agent should handle port busy
Derrick Brashear [Wed, 24 Mar 2010 18:49:11 +0000]
growl agent should handle port busy

if the port can't be bound, die cleanly.
FIXES 126812

Change-Id: I6523f18c2b5f5bacfbd11d08736b9af14fa666e2
Reviewed-on: http://gerrit.openafs.org/1651
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoavoid double-free cell name canonicalization
Derrick Brashear [Wed, 24 Mar 2010 21:18:24 +0000]
avoid double-free cell name canonicalization

if we free the cell name, so note it so we don't try again.

FIXES 126813

Change-Id: I4149fac057c587123f6bf6da8a42a4cd5e590716
Reviewed-on: http://gerrit.openafs.org/1654
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoLinux : Apply more dget_parent() pixie dust
Simon Wilkinson [Wed, 24 Mar 2010 16:48:35 +0000]
Linux : Apply more dget_parent() pixie dust

Replace another dentry->d_parent->d_inode lookup with a dget_parent()
- accessing d_parent directly is potentially racy.

Change-Id: I2c21cd6ef5c1b4b601c830836590705b397915e4
Reviewed-on: http://gerrit.openafs.org/1647
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoafsdump warning killing
Derrick Brashear [Wed, 24 Mar 2010 16:54:30 +0000]
afsdump warning killing

a couple legit bugs here but mostly i used my parentheses shaker.

Change-Id: I645a239ca584fbb5759d885d42c058c757a35731
Reviewed-on: http://gerrit.openafs.org/1648
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agomake 1.5.73 relnotes openafs-devel-1_5_73
Derrick Brashear [Wed, 24 Mar 2010 04:19:56 +0000]
make 1.5.73 relnotes

release notes for 1.5.73

Change-Id: I4fd8d0b40f97311f42ee77f9245bd9e9cb87188f
Reviewed-on: http://gerrit.openafs.org/1642
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoopenafs 1.5.73 version strings
Derrick Brashear [Tue, 23 Mar 2010 03:44:52 +0000]
openafs 1.5.73 version strings

make windows and unix 1.5.73

Change-Id: Ice7fb6bab06ab6b5a1e6d5309f13d242289d2b0a
Reviewed-on: http://gerrit.openafs.org/1620
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoUpdating UserGuide with Kerberos v5 authentication
Booker Bense [Fri, 5 Mar 2010 15:11:41 +0000]
Updating UserGuide with Kerberos v5 authentication

This patchset contains updates to the OpenAFS UserGuide that
explains how to authentication OpenAFS using kinit/aklog
and uses language describing Kerberos outside the context
of the kaserver.  References to applications such as telnet
have been replaced with more modern equivalents such as ssh.

Change-Id: Ifae779b04a26beb9be9cf58b450958acdc477c06
Reviewed-on: http://gerrit.openafs.org/1521
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Use a timestamp for the minidump filename
Asanka Herath [Sat, 20 Mar 2010 02:13:41 +0000]
Windows: Use a timestamp for the minidump filename

Set the name of the minidump file to :
%TMP%\afsd-<yyyy>-<mm>-<dd>-<hh>_<mm>_<ss>.dmp

This prevents new minidump files from overwriting older ones.

Change-Id: I057963bedf618eb23720f17d62c8473790569273
Reviewed-on: http://gerrit.openafs.org/1633
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Monitor requests and gather diagnostics before a timeout
Asanka Herath [Fri, 19 Mar 2010 01:13:35 +0000]
Windows: Monitor requests and gather diagnostics before a timeout

This patch monitors SMB requests that are being serviced and
automatically enables logging if a request takes longer than one
minute to complete.  If the requst hasn't completed by the two minute
mark, the code generates a minidump.  Once a minimump is generated, no
more minidumps will be produced for another 5 minutes.

SMB monitoring can be enabled/disabled using the new registry
parameter 'SMBRequestMonitor.'

Change-Id: I5aae22f6bfa635cec4a803089b483698641080eb
Reviewed-on: http://gerrit.openafs.org/1632
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoadd missed release notes
Derrick Brashear [Wed, 24 Mar 2010 01:49:26 +0000]
add missed release notes

these are the release notes available via the web but not here.

Change-Id: Ieb4af99a4d6a1dfdaabccdac79d03f7d328de675
Reviewed-on: http://gerrit.openafs.org/1641
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: changelog for 1.5.73
Jeffrey Altman [Tue, 23 Mar 2010 22:01:45 +0000]
Windows: changelog for 1.5.73

Change-Id: I83ab533c7ec52b82e76a857f3ac4a12e1d8b1939
Reviewed-on: http://gerrit.openafs.org/1636
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: cm_attrs_t requires inclusion of cm_vnodeops.h
Jeffrey Altman [Tue, 23 Mar 2010 23:00:27 +0000]
Windows: cm_attrs_t requires inclusion of cm_vnodeops.h

Include cm_vnodeops.h before reference to cm_attrs_t.

LICENSE MIT

Change-Id: Ic6d2a505d4f30c75d16d5c99eef306af7563ba4c
Reviewed-on: http://gerrit.openafs.org/1639
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows LWP and UNIX LWP do not have the same lwp_cpptr structure
Jeffrey Altman [Tue, 23 Mar 2010 22:57:19 +0000]
Windows LWP and UNIX LWP do not have the same lwp_cpptr structure

Windows LWP uses Windows Fibers.  There is no 'stack' field.

Change-Id: I8ebc7b355642f9e3ad6f2953345b9858ab9c151a
Reviewed-on: http://gerrit.openafs.org/1638
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWarning fix: print burstWait fields
Marc Dionne [Tue, 23 Mar 2010 22:36:17 +0000]
Warning fix: print burstWait fields

burstWait is a struct clock with two int fields, but we
try to print it as a %u.
Print the fields separately like we do for timeout.

Change-Id: I42ab3e4557af96cacae00b89841b1fcdfa832d4b
Reviewed-on: http://gerrit.openafs.org/1637
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix #ifdef typo
Marc Dionne [Tue, 23 Mar 2010 21:49:22 +0000]
Fix #ifdef typo

Fix ifdef typo.  The compiler complains that the variable
is undefined.  Not sure what effect this may have had on
the intended preprocessor output.

Change-Id: Idef3f4ac42a96a096be25d31ff416f7a23560d70
Reviewed-on: http://gerrit.openafs.org/1635
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoDefine __USE_XOPEN conditionally
Marc Dionne [Tue, 23 Mar 2010 21:32:11 +0000]
Define __USE_XOPEN conditionally

Only define __USE_XOPEN if not already defined.
In this part of the code it might now already be defined since
we enabled AC_USE_SYSTEM_EXTENSIONS.

Change-Id: I0651658d82550ee9be593d281bf50205815f9ef7
Reviewed-on: http://gerrit.openafs.org/1634
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: Make default mode bits configurable
Asanka Herath [Sat, 20 Mar 2010 20:46:05 +0000]
Windows: Make default mode bits configurable

Mode bits aren't directly exposed by the Win32 API. We were leaving
them to default to 0777 when creating new files and directories.

This patch introduces two configuration parameters;
'UnixModeFileDefault' and 'UnixModeDirDefault' which are DWORD
registry entries that are used to set the initial mode bits.

If the values are set to 0, then the behavior is identical to what we
had before.

Change-Id: I7822141aab1e12cc8e151be771f779284fa68465
Reviewed-on: http://gerrit.openafs.org/1602
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoremove vnop needs discon lock
Derrick Brashear [Tue, 23 Mar 2010 20:06:38 +0000]
remove vnop needs discon lock

right now, the discon lock never happens over a remove.
fix that. restructure the code to allow one unlock and exit.

Change-Id: I88fefa30c9ba8ad4a4ccce1a5b02e9fb8403b99d
Reviewed-on: http://gerrit.openafs.org/1629
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoDevelop Kerberos renew system for ticket
Claudio Bisegni [Mon, 22 Mar 2010 22:35:22 +0000]
Develop Kerberos renew system for ticket

    - In Preference pane has been added a tab called "Option" where are
      showned the option for kerberos renew
    - In AfsBackgrounder has been implemented the NSTimer that will call
      the krb5 renew action according to user preference value

Change-Id: Ica4b705018722488613ac09586e60c69303d1076
Change-Id: I79ce1334d99f926544e865fbb563a1ffecaa969c
Reviewed-on: http://gerrit.openafs.org/1606
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agokill MultiBreakVolumeCallBack too
Derrick Brashear [Tue, 23 Mar 2010 20:53:31 +0000]
kill MultiBreakVolumeCallBack too

this is also now unused. kill it.

Change-Id: Ie2f3edef4dc74ee874eb5aedaf2c0d2ee548ae6d
Reviewed-on: http://gerrit.openafs.org/1631
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoRemove BreakVolumeCallBacks prototype
Andrew Deason [Tue, 23 Mar 2010 19:27:28 +0000]
Remove BreakVolumeCallBacks prototype

BreakVolumeCallBacks was a dead function that was removed from viced.
Remove the prototype for it.

Change-Id: I12a4d69719163d3e7be7dcae6f39df17b245c807
Reviewed-on: http://gerrit.openafs.org/1628
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agovos: correct syncvldb -verbose server byte order
Andrew Deason [Tue, 9 Mar 2010 20:48:36 +0000]
vos: correct syncvldb -verbose server byte order

'vos syncvldb -verbose' outputs the before/after VLDB entries for
altered entries, but the 'after' output shows server addresses in NBO.
EnumerateEntry expects server IPs to be in NBO, so correct one location
where they were passed in HBO.

Change-Id: I332fe83b45b2b595e091c8eb9bdc57d89d5e36a8
Reviewed-on: http://gerrit.openafs.org/1550
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agovldb_check man page should say -vheader, not -pheader
Russ Allbery [Thu, 18 Mar 2010 20:18:27 +0000]
vldb_check man page should say -vheader, not -pheader

The option was given correctly in SYNOPSIS but not in the OPTIONS section.
Thanks, Rod Widdowson.

FIXES 126771

Change-Id: Ibd9694c066b6750ad04273c22e66c84fb7b4a1c6
Reviewed-on: http://gerrit.openafs.org/1589
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agomake tryevalfakestat really not block
Derrick Brashear [Tue, 9 Mar 2010 19:13:50 +0000]
make tryevalfakestat really not block

turns out this VerifyVCache can end up hitting other lockers. move it out
of the try path.

Change-Id: I073318a44b4da519413905b677fd439f1edd6c54
Reviewed-on: http://gerrit.openafs.org/1547
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoviced remove dead BreakVolumeCallBacks function
Derrick Brashear [Mon, 15 Feb 2010 21:34:43 +0000]
viced remove dead BreakVolumeCallBacks function

this is no longer used. trash it.

Change-Id: I0ad5aa203924c6a16afd68bc8ef55663951917c3
Reviewed-on: http://gerrit.openafs.org/1315
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agovos: Avoid LWP stack overflow error on SIGINT
Andrew Deason [Wed, 10 Mar 2010 20:15:58 +0000]
vos: Avoid LWP stack overflow error on SIGINT

vsproc's method of longjmp'ing out of a signal handler can thoroughly
confuse LWP. At the very least, the information on our stack becomes
incorrect, since we're no longer using the stack supplied by LWP. At the
very least, we seem to (almost) always fail the sanity check checking
for stack overflow. To prevent the test from happening, NULL the stack
pointer before the longjmp so we can attempt recovery.

FIXES 33360

Change-Id: Ie910cb1cc8564ac119c3b751fd8295bf312a3ce7
Reviewed-on: http://gerrit.openafs.org/1559
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agovos: Use IOMGR_SoftSig for signals
Andrew Deason [Wed, 10 Mar 2010 17:58:04 +0000]
vos: Use IOMGR_SoftSig for signals

When vsprocs tries to longjmp from the signal handler, use IOMGR_SoftSig
first, so sleeping processes are woken back up. Without this, IOMGR can
bail out since it finds no processes READY when we attempt to do
anything with RX.

Change-Id: I9089bc4d003786d4a2205cd97f722fbf85fd1aa8
Reviewed-on: http://gerrit.openafs.org/1558
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agovos: Mark longjmp-used variables as 'volatile'
Andrew Deason [Wed, 10 Mar 2010 00:07:18 +0000]
vos: Mark longjmp-used variables as 'volatile'

vsprocs tries to do error recovery by calling longjmp from a signal
handler. Although this is quite error-prone since we call a ton of
non-async-signal-safe functions, make it a bit more likely to work by
marking variables that are used after the longjmp as volatile. This
reduces how often (depending on the platform) these values will be
completely worthless after a longjmp since they were cached in a
register or similar.

FIXES 125535

Change-Id: I8566f8cffde6cfdffd99a11d637645494e0a0514
Reviewed-on: http://gerrit.openafs.org/1557
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix strict aliasing problems or add -fno-strict-aliasing
Russ Allbery [Mon, 22 Mar 2010 22:00:39 +0000]
Fix strict aliasing problems or add -fno-strict-aliasing

Create a new CFLAGS_NOSTRICT Autoconf substitution variable which
is set to -fno-strict-aliasing if we're using gcc to compile.  Add
@CFLAGS_NOSTRICT@ to the C compiler flags for source files that have
significant strict-aliasing issues.

Fix minor strict-aliasing issues elsewhere in the tree by using memcpy
to copy the data into a properly typed variable.

Change-Id: I43afdb5e33e06cb249b7db385a65daf8d2133a19
Reviewed-on: http://gerrit.openafs.org/1617
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUse AC_USE_SYSTEM_EXTENSIONS
Andrew Deason [Mon, 15 Mar 2010 17:41:11 +0000]
Use AC_USE_SYSTEM_EXTENSIONS

Instead of defining various symbols like _XOPEN_SOURCE, _BSD_SOURCE, and
the like, just use autoconf's AC_USE_SYSTEM_EXTENSIONS to define all of
the appropriate symbols for us. Deal with some fallout by removing some
of the existing defines.

Change-Id: I1c1968c89cc2dfda1293fd2566dac8e266325a72
Reviewed-on: http://gerrit.openafs.org/1582
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoaix mount failure unlock and seterror
Derrick Brashear [Fri, 19 Mar 2010 00:17:02 +0000]
aix mount failure unlock and seterror

set an error usefully and drop the vfs lock

Change-Id: I9d901b50722c09e1b131077f0b19e2831e6a44c8
Reviewed-on: http://gerrit.openafs.org/1590
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoupdate link order
Derrick Brashear [Wed, 24 Feb 2010 19:16:48 +0000]
update link order

librx needs libsys on irix to get afs_syscall
libsys needs librx for xdr_mumble for rmtsys

Change-Id: I2e4d9771807546c14f8b16b8805c222d79aab8c1
Reviewed-on: http://gerrit.openafs.org/1386
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoXDR: Stop the madness
Simon Wilkinson [Thu, 18 Feb 2010 00:04:22 +0000]
XDR: Stop the madness

We currently attempt to align our XDR implementation with what may
be provided by the host system. This leads to a huge amount of parameter
fudging, and general pain and misfortune. However, the only place that
we still actually use the system XDR is for UKERNEL builds.

Change this so that we use our XDR everywhere. Fix all of our type and
function definitions so that they're standard. Remove the warning
inhibitions.

Change-Id: I53f4539e50eacb4e0691d8d3d6546bbfb7438358
Reviewed-on: http://gerrit.openafs.org/1340
Reviewed-by: Chaz Chandler
Tested-by: Chaz Chandler
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>

14 years agoUse sigset_t and sigfillset instead of memset
Russ Allbery [Mon, 22 Mar 2010 19:56:09 +0000]
Use sigset_t and sigfillset instead of memset

Rather than using an arbitrary array memset to ones as our signal
mask, use the POSIX sigfillset function and eliminate the static
variable.  Fixes strict aliasing errors with --enable-checking and
gcc 4.4.3 on Linux x86.

Change-Id: Ic3e0499d03657d94f60808ed12e090dc62cce6fc
Reviewed-on: http://gerrit.openafs.org/1616
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoMove non-executable stack assembly code to end of file
Russ Allbery [Mon, 22 Mar 2010 19:42:48 +0000]
Move non-executable stack assembly code to end of file

The non-executable stack annotation used for Linux works by adding
an additional section to the generated object.  The annotation added
in 9bfd03d723a9cf17673f40513a7adde1d503bcbc was added to the beginning
of each assembly file.  This caused build failures on Linux s390
because the remainder of the assembly code was then put in that
section, which was discarded during linking.

Add the annotation to the end of each assembly file instead, following
the instructions at:

    http://www.gentoo.org/proj/en/hardened/gnu-stack.xml

Change-Id: I5bd2d8d0ac31932b59757dcec0a942c459d61cac
Reviewed-on: http://gerrit.openafs.org/1615
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agomultibreak callbacks add host marking
Derrick Brashear [Sat, 20 Mar 2010 14:59:20 +0000]
multibreak callbacks add host marking

to deal with refcounts, we have to mark hosts in a way other than holds.
do so. all other h_Enum callers don't use this feature.

FIXES 126497

Change-Id: I0fc008495b93d2c361d476c7fcb6b355c0dab825
Change-Id: I61128261b2e8c64fafbf7425d6a65dd48fd7e177
Reviewed-on: http://gerrit.openafs.org/1599
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agosalvage variable initialization
Derrick Brashear [Sun, 21 Mar 2010 17:49:21 +0000]
salvage variable initialization

root vnode creation change caused a new warning i missed. fix it now,
set rootvnode to NULL

Change-Id: I06fe7a60f2fcc48c498249142220f65291188baa
Reviewed-on: http://gerrit.openafs.org/1610
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoaix vfs table entry in rc script
Derrick Brashear [Sun, 21 Mar 2010 17:48:48 +0000]
aix vfs table entry in rc script

add an entry to the aix vfs table so umount works

Change-Id: I29a27ca350b948da0283ae09df0acd30eb6384c4
Reviewed-on: http://gerrit.openafs.org/1611
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoCreate missing root directory when ORPH_ATTACH
Andrew Deason [Wed, 3 Feb 2010 19:02:23 +0000]
Create missing root directory when ORPH_ATTACH

When we are salvaging with ORPH_ATTACH, orphans are normally attached to
a volume's root directory. If the volume is missing a root directory,
however, nothing is attached, and the volume can appear empty or
unusable.

So, to make it possible to get a useful volume out of a volume that lost
(only) its root directory, create a new root dir, and attach orphans to
that root.

FIXES 94658

Change-Id: I946a60485b5793952707f44ac369ee243e8dc076
Reviewed-on: http://gerrit.openafs.org/1235
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agocomment assumptions in lih0_r
Derrick Brashear [Sat, 20 Mar 2010 14:40:32 +0000]
comment assumptions in lih0_r

previously, we checked for  (!held && !h_OtherHolds_r(host))
now, we want to confirm only we hold it, so comment that that's how
this works

Change-Id: I98a65fbb4f2d0532054c71699dc2168e4592668b
Reviewed-on: http://gerrit.openafs.org/1598
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoaix krb5 error message handling
Derrick Brashear [Sun, 21 Mar 2010 16:49:34 +0000]
aix krb5 error message handling

handle krb5 error messages for aix in aklog and lam plugin

Change-Id: Iac96dc62e7889d375db111d5c96d86cf09715ab6
Reviewed-on: http://gerrit.openafs.org/1609
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agopanic prototype for aix 6
Derrick Brashear [Sun, 21 Mar 2010 15:42:15 +0000]
panic prototype for aix 6

aix does need a prototype for the lame version of the function

Change-Id: I636b734bb725c425b2b4c6e4ae3e9473e087c21d
Reviewed-on: http://gerrit.openafs.org/1608
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoDon't count root session keyrings against quota
Simon Wilkinson [Wed, 17 Mar 2010 11:56:12 +0000]
Don't count root session keyrings against quota

AFS PAM modules can call setpag() as root, regardless of the UID
being authenticated. This leads to the session keyring being created
using roots quota - on some systems (RHEL5) this quota is both small,
and of a fixed size.

Modify our keyring allocation code so that when a keyring is created
by root, we don't do any quota checks.

Change-Id: I2ee151ec1166a78475047bffd2c1d31f45e8dbdf
Reported-by: Rainer Toebbicke <rtb@pclella.cern.ch>
Reviewed-on: http://gerrit.openafs.org/1577
Tested-by: Rainer Toebbicke <rtb@pclella.cern.ch>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agomacos fsevents hinting
Derrick Brashear [Thu, 18 Mar 2010 19:27:35 +0000]
macos fsevents hinting

add support for faking it. no exported interface exists, sadly.
currently does only authentication events, and is best-effort only,
however for people who get tokens after viewing directories in finder,
this is a drastic improvement.

also adds needed setting to afssettings plist

FIXES 23781

Change-Id: I46d5a6cf103c30a2134decccc929e1ef85a26726
Reviewed-on: http://gerrit.openafs.org/451
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoafsadminutil: translate krb5 error messages on Windows
Jeffrey Altman [Sat, 6 Mar 2010 22:32:57 +0000]
afsadminutil: translate krb5 error messages on Windows

util_AdminErrorCodeTranslate() is used to translate error
code messages within the libadmin library set and is used
by translate_et.  This has in the past not translated
krb5 error codes.

This patchset conditionally adds support for using
krb5_get_error_message() or error_message() on the Windows
platform if KFW is installed.  This is accomplished by
adding new functions to afsutil.lib:

  initialize_krb5()
  fetch_krb5_error_message()

which are used within util_AdminErrorCodeTranslate()
only if AFS_KRB5_ERROR_ENV is defined.

Support for Unix is not provided at the present time
because doing this "right" will lead to a dependence on
kerberos libraries from this library, which we might want
to avoid.

Change-Id: I7caf7b8e41cfd806f4defc175aa45afb165ec244
Reviewed-on: http://gerrit.openafs.org/1531
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agovolume_inline.h does not need sys/file.h
Andrew Deason [Fri, 19 Mar 2010 14:31:04 +0000]
volume_inline.h does not need sys/file.h

src/vol/volume_inline.h does not need sys/file.h; at one point, it was
using macros from sys/file.h for locking constants, but now we use the
lwp/lock.h constants. So, include that instead. Also, only include it
for DAFS, since we only use the constants in the DAFS case. Thanks,
Jeffrey Altman.

Change-Id: I114b438d7fb1fbb3a35bdfa0717ac334c7f80355
Reviewed-on: http://gerrit.openafs.org/1596
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agomacos uninstall redux
Derrick Brashear [Fri, 19 Mar 2010 05:13:26 +0000]
macos uninstall redux

the rest of the uninstall changes. git add, sigh

Change-Id: I69e4f4a870e08b1796b4546776e373f0a82e0e8e
Reviewed-on: http://gerrit.openafs.org/1594
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoupdate macos uninstaller
Derrick Brashear [Fri, 19 Mar 2010 04:57:13 +0000]
update macos uninstaller

make the uninstaller cope with the new receipts format and location

FIXES 125634

Change-Id: I6cf0cd3e979a34115f391477657ec37f0c3d8faa
Reviewed-on: http://gerrit.openafs.org/1593
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoVOL_LOCK needed when traversing DiskPartitionList
Dan Hyde [Tue, 2 Feb 2010 15:37:47 +0000]
VOL_LOCK needed when traversing DiskPartitionList

VLockPartition sets VOL_LOCK, opens (perhaps creating) the lock file
for a partition, and flock's it.  VUnlockPartition, sets VOL_LOCK, and
closes the lock file fd.

VLockPartition is called from the salvager.  Nothing ever calls
VUnlockPartition.

VPFullUnlock is called every 30 seconds, does NOT set VOL_LOCK, and
happily closes any lock file fd it finds, breaking any lock set with
flock.

Other routines use the VOL_LOCK when traversing DiskPartitionList.

Change-Id: I683547f574b1f760e72014f5d44ce3987f07b5df
Reviewed-on: http://gerrit.openafs.org/1213
Reviewed-by: Dan Hyde <drh@umich.edu>
Tested-by: Dan Hyde <drh@umich.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoCatch up with FBSD80's removal of thread argument to VFS calls
Ben Kaduk [Wed, 17 Mar 2010 05:55:41 +0000]
Catch up with FBSD80's removal of thread argument to VFS calls

FreeBSD SVN rev 191990 removed the thread argument to
filesystem-dependent VFS calls.  Curthread is always assumed.
There is a __FreeBSD_version bump that we could check if
we felt like being precise, but FBSD80_ENV is probably good enough.

Change-Id: I4534f01999b61eaeaa014c41473c693e6d432fef
Reviewed-on: http://gerrit.openafs.org/1587
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>

14 years agoaix vnode hold simplification
Derrick Brashear [Mon, 15 Mar 2010 17:15:34 +0000]
aix vnode hold simplification

instead of special-casing aix's AFS_FAST_xxx *and* calling
VREFCOUNT_INC for AIX, make it all consistent; side effect, remove
now-superfluous AIX ifdef'd code

Change-Id: Ic6a91429aad26e17fd9e12884ba0eba86564c377
Reviewed-on: http://gerrit.openafs.org/1572
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoregain glock on storedata error exit
Derrick Brashear [Wed, 17 Mar 2010 18:25:38 +0000]
regain glock on storedata error exit

if we bomb out with EFBIG, we must regain the GLOCK before returing

Change-Id: I3aec92f90abd665d86dcf413dad0e9cbb251a0af
Reviewed-on: http://gerrit.openafs.org/1584
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agokill apsl afssettings and fstab
Derrick Brashear [Wed, 17 Mar 2010 17:23:30 +0000]
kill apsl afssettings and fstab

replace both

afssettings with something patterned from webdav's (BSD-licensed)
mount program with general plist reading code. the lists of
valid oid objects of course have to be the same. eject old
darwins. add the new one.

fstab with something from freebsd umount

Change-Id: I28f6765475314b9b78102c762daec19cda4988c3
Reviewed-on: http://gerrit.openafs.org/1583
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoIncrease the maximum number of sysnames
Evan Broder [Wed, 4 Nov 2009 04:50:39 +0000]
Increase the maximum number of sysnames

Change-Id: I8438ca19649730260370d8b00fb0157e808abe31
Reviewed-on: http://gerrit.openafs.org/778
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoDAFS: Replace partition locks with volume locks
Andrew Deason [Fri, 19 Feb 2010 23:13:01 +0000]
DAFS: Replace partition locks with volume locks

In DAFS, replace uses of the VLockPartition_r partition-level locks with
the approprivate VLockVolume*NB volume-level locks (and sometimes
FSYNC_VerifyCheckout). This allows for greater parallelization of
volserver attachment / volume creation, for volume operations to occur
during salvages, and for multiple salvages on a single partition to
occur simultaneously.

More architectural details of volume-level locks can be found in the
changes to doc/arch/dafs-overview.txt.

Change-Id: I4e8ef4c864002d7e7c976691824c53dfa9cfaf91
Reviewed-on: http://gerrit.openafs.org/1406
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd code for locking individual volumes on disk
Andrew Deason [Fri, 19 Feb 2010 23:02:08 +0000]
Add code for locking individual volumes on disk

This adds the necessary APIs and associated changes to lock (on disk) an
individual volume on a particular partition. Nothing yet calls these new
functions.

Change-Id: Ibfa00293e7411f3f48eabdecb13b7e80e126a1ff
Reviewed-on: http://gerrit.openafs.org/1405
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoAvoid panic on shutdown with memcache and INVARIANTS
Ben Kaduk [Tue, 16 Mar 2010 21:07:04 +0000]
Avoid panic on shutdown with memcache and INVARIANTS

When running with memcache, the filesystem cache is not initialized,
so the file-local struct vnode *volumeVnode is never set to non-NULL.
However, shutdown_cache() unconditionally calls vrele(volumeVnode),
which triggers a KASSERT that the argument to vrele() is non-NULL.
For certain kernel configurations, this results in a panic.
Change this so that vrele() is only conditionally called if the
volumeVnode is non-NULL.

Change-Id: I80235f0d45ae11f26e9a09854bb34439f89bbb40
Reviewed-on: http://gerrit.openafs.org/1576
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAllocate and free backing store for event mutices
Ben Kaduk [Thu, 11 Mar 2010 05:13:12 +0000]
Allocate and free backing store for event mutices

Actually get memory for the event mutex.  With this and a locking
tweak, afsd actually starts (with memcache; the UFS cache still
has some locking issues).
Note that struct mtx is small enough that we may want to just
include it inline in afs_event_t and avoid having to do a separate
allocation/free step.  However, Derrick wants to merge the FBSD and
DARWIN versions of this file, so stick with the more compatible
version for now.
I find that without the memset(), mtx_init() will (sometimes?) complain
that the mutex is already initialized.  The glock should ensure
serialization here, though, so that we only allocate and initialize
one mutex per event.
Also remove an unnecessary cast while here.

Change-Id: Ib304f4301a478a82f0fb8c9ae3bfee98a2a28acd
Reviewed-on: http://gerrit.openafs.org/1560
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agorx nat event connection reference
Derrick Brashear [Mon, 15 Mar 2010 18:31:49 +0000]
rx nat event connection reference

hold a conn ref for the nat ping event. don't renew if the connection
is being garbage-collected.

Change-Id: I45ebf7b8d0362e409094666f186e6b4d58cc906a
Reviewed-on: http://gerrit.openafs.org/1573
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agogrowlagent: remove generated Makefile with make distclean
Marc Dionne [Tue, 16 Mar 2010 01:34:28 +0000]
growlagent: remove generated Makefile with make distclean

Add the growlagent Makefile to the list that gets cleaned with
the distclean target.

Change-Id: I6c3385f3b839c436efb50d0fc7239c181e027be6
Reviewed-on: http://gerrit.openafs.org/1575
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoRemove return of value for afs_MarinerLogFetch()
Antoine Verheijen [Mon, 15 Mar 2010 19:49:31 +0000]
Remove return of value for afs_MarinerLogFetch()

afs_MarinerLogFetch(), a void routine, attempts to return a value.
While gcc (amongst others) merely issues a warning about this, the
Sun Studio C compiler gets cranky (at least on x86) and treats it as
a hard error, thereby aborting the build. Since there actually is no
value to return, this update simply removes the attempt.

Change-Id: Ic89fb05380a25a433f9c3b9fa57962f215348d95
Reviewed-on: http://gerrit.openafs.org/1574
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agofreebsd per-event mutexes
Derrick Brashear [Wed, 10 Mar 2010 07:03:25 +0000]
freebsd per-event mutexes

use the same system for event mutexes macos does. this time for sure.

Change-Id: I18be653607490ba42f40a0b069460ece2f6ab416
Change-Id: I7e0a2f6042ef7f31612072c6625579de42b17f9b
Reviewed-on: http://gerrit.openafs.org/1554
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agovlserver: make rxinfo threadsafe
Andrew Deason [Tue, 9 Feb 2010 19:03:06 +0000]
vlserver: make rxinfo threadsafe

The vlserver has a function 'rxinfo' used for printing out information
about an RX call for logging purposes, which used a static string.
Change it to use a caller-passed buffer, so it is safe to use in
multiple threads.

Change-Id: I186010792e743bc9676ddd5b4c99f011b64988e6
Reviewed-on: http://gerrit.openafs.org/1545
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Dan Hyde <drh@umich.edu>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoafsdb lookup shouldn't leak memory on realname lookup
Derrick Brashear [Mon, 8 Mar 2010 20:58:42 +0000]
afsdb lookup shouldn't leak memory on realname lookup

when looking up the "real" cell name, avoid leaking memory. the strdup
is inside a loop and would leak memory for each host returned above one.

Change-Id: I36cc9bd27ddc831121f47046daaab11f752012fe
Reviewed-on: http://gerrit.openafs.org/1538
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agosquash warning in db_verify
Michael Meffie [Sun, 28 Feb 2010 18:02:40 +0000]
squash warning in db_verify

Fix warning from the prdb_verify -rebuild with
supergroups fix, fa2536c02cf26f7db30bf623e95f42be88138d14

Change-Id: I584cba07287660c9e560a2ba931545cbc5b4843f
Reviewed-on: http://gerrit.openafs.org/1570
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: warnings removal for afskfw.c
Jeffrey Altman [Sat, 13 Mar 2010 16:47:51 +0000]
Windows: warnings removal for afskfw.c

Use StrSafe string manipulation functions in place of most
instances of strcpy, strcat, sprintf, etc.  With the use
of StringCbCopy, StringCbCat, StringCbPrintf, etc. there
is no longer a need to manually assign a NUL to the end
of a C string buffer as was required with strncpy or
strncat.

There is one strcpy instance remaining due to the inability
to know what the length of the destination buffer.  The API
needs to be altered to make the destlen available and that is
not an appropriate change for this patchset.  A deprecated
warning is a reminder to revisit this in the future.

Several int to unsigned int type changes to avoid signed
vs unsigned warnings.

Shuffle the order of header files to avoid macro
redefinition warnings.

LICENSE MIT

Change-Id: I4b5d15b60918cc8dc6ab205f1a7d45e17d14de43
Reviewed-on: http://gerrit.openafs.org/1567
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: afskfw - conditionalize use of krb5_get_error_message for KFW 3.1 and earlier
Jeffrey Altman [Sat, 6 Mar 2010 22:30:17 +0000]
Windows: afskfw - conditionalize use of krb5_get_error_message for KFW 3.1 and earlier

KFW 3.1 is supported by OpenAFS but does not contain krb5_get_error_message
or krb5_free_error_message.  As a result it must be loaded at run-time
and conditionally used.

LICENSE MIT

Change-Id: I803b4af726605dc49baf2c2d45fae3ecafe2ccf9
Reviewed-on: http://gerrit.openafs.org/1529
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: netidmgr - conditionalize use of krb5_get_error_message for KFW 3.1 and...
Jeffrey Altman [Sat, 6 Mar 2010 22:32:22 +0000]
Windows: netidmgr - conditionalize use of krb5_get_error_message for KFW 3.1 and earlier

KFW 3.1 is supported by OpenAFS but does not contain krb5_get_error_message
or krb5_free_error_message.  As a result it must be loaded at run-time
and conditionally used.

LICENSE MIT

Change-Id: Ic2ad16bb5c2d905e30ec814951b5253e2ef888da
Reviewed-on: http://gerrit.openafs.org/1530
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agomacos dropbox fix for finder
Derrick Brashear [Thu, 11 Mar 2010 17:10:38 +0000]
macos dropbox fix for finder

sadly this can mean we lie and say delete will work when it will fail, but
finder looks for KAUTH_VNODE_DELETE_CHILD along with
KAUTH_VNODE_ADD_SUBDIRECTORY and KAUTH_VNODE_ADD_FILE, not as one-offs.

Change-Id: I4079b89e188992ee33594cad5bd15f7bf6106203
Reviewed-on: http://gerrit.openafs.org/1561
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agodkms configure correctly
Derrick Brashear [Tue, 9 Mar 2010 21:51:56 +0000]
dkms configure correctly

push the correct configure options for dkms

Change-Id: I18e33c693fa4c32e39cee08844312e67cb280443
Reviewed-on: http://gerrit.openafs.org/1551
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoSquash pthreaded vos warnings
Andrew Deason [Wed, 10 Mar 2010 16:16:04 +0000]
Squash pthreaded vos warnings

Trying to build vos in src/tvolser can produce a warning, at least on
amd64_linux26, since we cast to an int of the wrong size in SendFile and
ReceiveFile. Use intptr_t like we do everywhere else instead.

Change-Id: Ic624bf90ab7338b63f8177b762e1deddbe7fb73d
Reviewed-on: http://gerrit.openafs.org/1556
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoDon't always use the local cell for db clients
Simon Wilkinson [Wed, 10 Mar 2010 15:40:50 +0000]
Don't always use the local cell for db clients

Commit d008089a79ef268bbca91d660a840f32cb416865 broke things so that
we were always trying to use the local cell, rather than the one specified
by the user. Fix this so that the command line cell is used, unles -localauth
is specified, which restores the existing behaviour.

FIXES 126716

Change-Id: I2ce34e764780d5a22c67474d5ae1076d52b04113
Reviewed-on: http://gerrit.openafs.org/1555
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoUpdate RPM CellServDB
Simon Wilkinson [Tue, 9 Mar 2010 22:17:05 +0000]
Update RPM CellServDB

Update the CellServDB in the RPM packaging to 2010-02-28

Change-Id: I03d062a6c9b53edd6865932df5a93b42cd46e708
Reviewed-on: http://gerrit.openafs.org/1552
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoudebug: Fix byte ordering of last yes host
Andrew Deason [Fri, 5 Mar 2010 23:07:47 +0000]
udebug: Fix byte ordering of last yes host

Udebug gets the last 'yes' host in HBO, but afs_inet_ntoa wants it in
NBO. So convert it to NBO.

Change-Id: I5524d8086d5ac08875306fee923cb297c971cda8
Reviewed-on: http://gerrit.openafs.org/1549
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agovldb_check: do not ntohl u_chars
Andrew Deason [Tue, 9 Mar 2010 17:43:42 +0000]
vldb_check: do not ntohl u_chars

vldb_check was ntohl'ing fields like serverNumber when reading in a VL
entry. Since this is a u_char, ntohl'ing will just always result in 0,
not the actual value. Remove the ntohls so we read in VL data correctly.

FIXES 126661

Change-Id: If5117e1750d6dacd9bbe18bc936e0a1ba3d44340
Reviewed-on: http://gerrit.openafs.org/1548
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd FSYNC_VerifyCheckout
Andrew Deason [Fri, 19 Feb 2010 23:04:29 +0000]
Add FSYNC_VerifyCheckout

Add the function FSYNC_VerifyCheckout, which can be used to verify that
a previous checkout of a volume is still known by the fileserver, and
hasn't been forgotten about (by e.g. the fileserver restarting).

Change-Id: Ie3ec63d155fe16ca4929b370bbe55850075cec83
Reviewed-on: http://gerrit.openafs.org/1404
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd DAFS documentation overview for developers
Andrew Deason [Tue, 23 Feb 2010 21:43:11 +0000]
Add DAFS documentation overview for developers

Add some developer documentation for DAFS. This isn't comprehensive or
extremely detailed, but is intended to provide a larger-picture overview
of some of the pieces of DAFS. More detailed docs are intended to exist
in source comments (doxygen and such), and should already be there for
the most part.

Change-Id: I167b52c3bfb9e6b4b7111b3548ca8b1dafe305ea
Reviewed-on: http://gerrit.openafs.org/1376
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoAdd VLockFileReinit
Andrew Deason [Fri, 19 Feb 2010 22:48:30 +0000]
Add VLockFileReinit

Add a VLockFile function, VLockFileReinit, to close all locks on that
particular lock file.

Change-Id: Ie1e4af21a486fb0451b6d613117027a522c9bb5a
Reviewed-on: http://gerrit.openafs.org/1358
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoVLockFile: add a couple of asserts
Andrew Deason [Fri, 19 Feb 2010 22:48:06 +0000]
VLockFile: add a couple of asserts

Add a couple of asserts to make some mistakes very obvious, such as
passing in an invalid 'locktype' or unlocking more times than locking.

Change-Id: Ie6e707ea515d5a6527dedc8875f0a4694b7b93c9
Reviewed-on: http://gerrit.openafs.org/1357
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>