openafs.git
10 years agoviced: Set HWHO_INPROGRESS in CheckHost_r
Andrew Deason [Fri, 4 Mar 2011 17:35:06 +0000]
viced: Set HWHO_INPROGRESS in CheckHost_r

When we are probing a host in CheckHost_r, set the HWHO_INPROGRESS
flag on the host, so other threads know that the host is locked while
we are waiting for a probe response, and the h_threadquota mechanism
can work correctly.

Change-Id: I37e3b37ea98d8d42578bf85a3b5aaaff4c4a7331
Reviewed-on: http://gerrit.openafs.org/4126
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoWindows: mp target trailing dot not part vol name
Jeffrey Altman [Fri, 4 Mar 2011 16:04:40 +0000]
Windows: mp target trailing dot not part vol name

Instead of passing "root.cell." into cm_FreelanceAddMount
pass in "root.cell" and add the trailing dot within the function.

Change-Id: I5d27c6c34a3197a451491a0bbdf6c854394ce572
Reviewed-on: http://gerrit.openafs.org/4124
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

10 years agoWindows: avoid use of cm_buf for MPs and Symlinks
Jeffrey Altman [Wed, 2 Mar 2011 19:06:48 +0000]
Windows: avoid use of cm_buf for MPs and Symlinks

In the Windows cache manager, the symlink and mount point
target strings are stored in the cm_scache_t mountPointString
and are not accessed out of the cm_buf_t for offset zero
except when populating the mountPointString.  As a result,
every mountpoint and symlink object that is read into the cache
wastes a cm_buf_t which could otherwise be used to store
additional file or directory data.

Add cm_GetData() function which is similar to cm_GetBuffer()
except that it reads data from the file server into an arbitray
memory location instead of a cm_buf_t object.  Use cm_GetData()
to read directly into the cm_scache_t object.

In addition, further optimize the communication with the
file server by using cm_GetData() to perform a RXAFS_FetchData
RPC to obtain both the target string and the status information
instead of RXAFS_FetchStatus which only returns the status
information in cases where there are no outstanding callback
registrations on the object.  RXAFS_FetchStatus is still used
when a callback is active in order to obtain access permissions
for new users.

Change-Id: I4d797479624f2e29121b16d3aa381296a57aeaa6
Reviewed-on: http://gerrit.openafs.org/4111
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

10 years agovol: Check for blank vnode in VAllocVnode_r
Andrew Deason [Fri, 25 Feb 2011 22:58:30 +0000]
vol: Check for blank vnode in VAllocVnode_r

When we alloc a vnode in VAllocVnode_r, we look up that vnode in the
vnode cache, to see if a vnode struct already exists for it. If it
doesn't, we check the vnode index to ensure that the vnode actually is
not in use (among other things). However, we do not perform the same
check for a vnode already in the cache. Add this check, to make sure
that we don't allocate an already-used vnode number, even if the
bitmap is screwed up.

Change-Id: I63b3aa752d359a2ff8282b193e658d74d6b9719c
Reviewed-on: http://gerrit.openafs.org/4060
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoDAFS: VnLock after VnWaitQuiescent in VAllocVnode
Andrew Deason [Fri, 25 Feb 2011 22:01:32 +0000]
DAFS: VnLock after VnWaitQuiescent in VAllocVnode

In VAllocVnode, we write-lock the newly-allocated vnode. In DAFS,
however, we need to VnWaitQuiescent_r before VnLock'ing, since VnLock
in DAFS just sets the writer tid/pid. So, in VAllocVnode, move the
VnLock call to after we wait for quiescence, so we don't stomp over
the vnode when someone else has it write-locked.

Change-Id: Ib234634dba9d09eea877bc91660ea3a8a4e2b746
Reviewed-on: http://gerrit.openafs.org/4059
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoDAFS: Wait for exclusive ops in VFreeBitMapEntry_r
Andrew Deason [Fri, 25 Feb 2011 20:43:09 +0000]
DAFS: Wait for exclusive ops in VFreeBitMapEntry_r

VAllocBitmapEntry_r puts the volume in an exclusive state and drops
VOL_LOCK when traversing the volume bitmap and updating the bitmap.
So, VFreeBitMapEntry_r must ensure the volume is not in an exclusive
state, to make sure that VAllocBitmapEntry_r is not updating the
bitmap at the same time. Do so, by waiting for the volume to come out
of exclusive state at the beginning of VFreeBitMapEntry_r.

Change-Id: I5fdd344e4d9d12451fd65a767fa5672c8be70a39
Reviewed-on: http://gerrit.openafs.org/4058
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agovol-salvage: VOL_DONE deleted volumes
Andrew Deason [Wed, 2 Mar 2011 20:11:43 +0000]
vol-salvage: VOL_DONE deleted volumes

When the salvager deletes a volume (because it is an invalid RO clone,
or because there is no data associated with the volume), we should
inform the fileserver that the volume is gone. Otherwise, the volume
in the fileserver can get put into an error state (in DAFS) when it
tries to attach the volume, preventing anything from creating or using
that volume.

Change-Id: Iae7763b752a2bab7a529dd327d034fdb9e18664a
Reviewed-on: http://gerrit.openafs.org/4118
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoDAFS: Clear salvage stats on VOL_DONE
Andrew Deason [Wed, 2 Mar 2011 21:39:51 +0000]
DAFS: Clear salvage stats on VOL_DONE

When we VOL_DONE a volume, the volume has been deleted, so the salvage
stats/information are no longer relevant. Clear them out, so we don't
think the volume is still salvaging.

Change-Id: I5dbde1609ba7659203fb1904571871d6ffc66539
Reviewed-on: http://gerrit.openafs.org/4120
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

10 years agoDAFS: Allow LEAVE_OFF for DELETED volumes
Andrew Deason [Wed, 2 Mar 2011 21:02:40 +0000]
DAFS: Allow LEAVE_OFF for DELETED volumes

When a volume is VOL_STATE_DELETED, it effectively does not exist to
other programs over FSSYNC. So, do not prevent someone from issuing a
FSYNC_VOL_LEAVE_OFF for a VOL_STATE_DELETED volume.

Change-Id: Ifb8f5437c7f6888bc06968297d841072d1f3316a
Reviewed-on: http://gerrit.openafs.org/4119
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

10 years agovol-salvage: calloc volume summary structs
Andrew Deason [Wed, 2 Mar 2011 20:10:33 +0000]
vol-salvage: calloc volume summary structs

Calloc volume summary structs instead of malloc'ing them, in
vol-salvage.c. This way, new fields added to struct VolumeSummary will
be known to be zeroed by default, without needing to update all of the
allocating callers.

Change-Id: I8c647cd9dec7aaf14183452126049323859ac7a3
Reviewed-on: http://gerrit.openafs.org/4117
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

10 years agoviced: Check vnode length on read and write
Andrew Deason [Thu, 3 Mar 2011 22:02:47 +0000]
viced: Check vnode length on read and write

When reading or writing a file vnode, check that the length of the
vnode in the vnode index matches the size of the on-disk file
containing the data for the file. If it does not match, take the
volume offline (and for DAFS, demand-salvage it).

Change-Id: I20e02cd84c8425cf0835c104a8e695a0cb6665d9
Reviewed-on: http://gerrit.openafs.org/4121
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agorpm: fix ChangeLog filename in doc rpm
Michael Meffie [Fri, 4 Mar 2011 01:22:54 +0000]
rpm: fix ChangeLog filename in doc rpm

Fix an rpmbuild error introduced in commit 8d157961.

Change-Id: I3b74d2602b74d62f64c0cbd01cde5f63e73259f6
Reviewed-on: http://gerrit.openafs.org/4122
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agovol-salvage: Fix AskOnline error message
Andrew Deason [Wed, 2 Mar 2011 20:13:25 +0000]
vol-salvage: Fix AskOnline error message

Change-Id: I7d43588b548c81fdeb7b8b8630ddd9a81f8c49dd
Reviewed-on: http://gerrit.openafs.org/4116
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoGive a default reason in *sync-debug
Andrew Deason [Wed, 2 Mar 2011 19:12:25 +0000]
Give a default reason in *sync-debug

If no -reason is given for fssync-debug calls, we currently just
transmit garbage to the fileserver or salvageserver. Instead, give a
default (the *_WHATEVER constant), so we do something consistent.

Change-Id: I8fb134c8b16a1fca1b1ed804241d0b232e7e2a7c
Reviewed-on: http://gerrit.openafs.org/4115
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agoTidy up assorted clean targets
Simon Wilkinson [Tue, 1 Mar 2011 18:03:03 +0000]
Tidy up assorted clean targets

Improve assorted clean targets so that they properly clean up all of
the default build products.

Add rxosd to the list of directories to clean

Change-Id: Id4987ec00654d7b3bd3b42eddefbcc50b5bdb03e
Reviewed-on: http://gerrit.openafs.org/4114
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agotests: Remove errant rxgk build rule
Simon Wilkinson [Tue, 1 Mar 2011 16:37:32 +0000]
tests: Remove errant rxgk build rule

A reference to tests/rxgk slipped in to an earlier commit. Remove it
as OpenAFS doesn't have rxgk in its tree yet

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

10 years agoauth: Add GetAllKeys function
Simon Wilkinson [Tue, 1 Mar 2011 14:23:47 +0000]
auth: Add GetAllKeys function

Add support for a GetAllKeys function that can be used to list all
of the keys in a configuration directory.

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

10 years agokernel crypto: Tidy up includes
Simon Wilkinson [Tue, 1 Mar 2011 14:35:35 +0000]
kernel crypto: Tidy up includes

Don't include the whole of afsincludes.h when building our kernel
crypto interface, as it can lead to symbol collisions on Fedora 10 and
later.

Instead, just include rx/rx.h, which is sadly required to get an
osi_Assert prototype, and explicitly prototype our osi_readRandom()
function

Change-Id: I55d03d76ac0cc8f490aa30f6986115cefae8f427
Reviewed-on: http://gerrit.openafs.org/4101
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agotweak uvldb-making function
Derrick Brashear [Tue, 1 Mar 2011 21:43:10 +0000]
tweak uvldb-making function

in order to properly simulate a uvldb, swap in the right fields,
and mark it correctly.

Change-Id: I143784c0ca137e36ce6f7eddb54db3d9ac85bd37
Reviewed-on: http://gerrit.openafs.org/4107
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agorx: cancel growmtu event on resetcall
Derrick Brashear [Wed, 2 Mar 2011 13:12:38 +0000]
rx: cancel growmtu event on resetcall

attempt at fixing issue reported by Ryan Underwood.

Change-Id: I0d90fc4c517a3892564abd98d94a948741e1a394
Reviewed-on: http://gerrit.openafs.org/4108
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoptuser/hpr: Don't check for a KeyFile
Simon Wilkinson [Tue, 1 Mar 2011 14:01:46 +0000]
ptuser/hpr: Don't check for a KeyFile

ptuser and viced's hpr were checking for a KeyFile before calling
ClientAuthSecure. If a KeyFile doesn't exist, then they would display
a warning message, and use an rxnull connection.

However, ClientAuthSecure will return a rxnull connection if it can't
find a KeyFile. So, simplify all of this to just use ClientAuthSecure,
which knows better than we do what keys are usable and which aren't.

Change-Id: I14b6170ec49e0ca85bc371d3bdfa04aecf39f150
Reviewed-on: http://gerrit.openafs.org/4100
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoptserver: Always set up Ubik security
Simon Wilkinson [Tue, 1 Mar 2011 13:59:19 +0000]
ptserver: Always set up Ubik security

ptserver was checking for the existence of a suitable KeyFile before
setting up Ubik's security classes. This is uneccessary, because the
behaviour of the afsconf_* functions when a KeyFile doesn't exist
is the same as Ubik's default mechanisms.

So, simplify (and future proof) the code by removing the KeyFile check.

Change-Id: I03df04e99ca4c043c15fc5f5701f8438912a7633
Reviewed-on: http://gerrit.openafs.org/4099
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoauth: Add Ktoken.xdr.c to the clean rule
Simon Wilkinson [Tue, 1 Mar 2011 00:13:00 +0000]
auth: Add Ktoken.xdr.c to the clean rule

Ktoken.xdr.c was being built, but not cleaned. Fix this by adding it
to the clean rule.

Change-Id: I8a8a1de86fa28cc4280a08cb24770949b236ffdf
Reviewed-on: http://gerrit.openafs.org/4098
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agolibafscp: a library for "clientless" operations
Chaskiel Grundman [Fri, 2 Jul 2010 18:08:23 +0000]
libafscp: a library for "clientless" operations

libafscp provides the ability to accomplish many of the functions of an AFS
client without a running afsd cache manager.  It is being introduced into
the OpenAFS source tree in order to improve the capabilities of several
utilities but may have additional benefits for testing clients and servers
and for use on platforms which do not have afsd support.

Change-Id: I24ee9416662c15b2d267317cea6fe0b7439ee022
Change-Id: I61037736e6edd01106b5b5ed982b211c16e1e7d9
Reviewed-on: http://gerrit.openafs.org/2371
Reviewed-by: Chaz Chandler <clc31@inbox.com>
Tested-by: Chaz Chandler <clc31@inbox.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agovolser: Rename putshort and putint32
Simon Wilkinson [Tue, 1 Mar 2011 00:11:01 +0000]
volser: Rename putshort and putint32

dumpstuff.c defines macros for putshort and putint32. However, the
name 'putshort' conflicts with a macro defined on Linux in resolv.h
(which is included by roken.h)

Just rename putshort to afs_putshort and putint32 to afs_putint32 to
solve this problem

Change-Id: Ib58cb7d8e606199c3f6a88be68e81f36c17d2df4
Reviewed-on: http://gerrit.openafs.org/4097
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoroken: Fix out-of-tree libroken builds
Simon Wilkinson [Tue, 1 Mar 2011 00:08:12 +0000]
roken: Fix out-of-tree libroken builds

The libroken configuration script is supposed to support using a
libroken which is installed out of the OpenAFS tree, but which isn't
in the standard search paths, by using --with-roken=/path/to/base

This didn't previously work. Fix this so that it works correctly,
and also fix a few problems with libafshcrypto, which assumed that
LDFLAGS_roken would always be -L$(TOP_LIBDIR)

Change-Id: I1219692f601a621e6c08ae26516136ed0cc03845
Reviewed-on: http://gerrit.openafs.org/4096
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agoFix grammar in configure check description
Simon Wilkinson [Sun, 27 Feb 2011 11:43:11 +0000]
Fix grammar in configure check description

"checking for kernel module build works"
    -> "checking if kernel module build works"

Change-Id: Ie87a31d7ccf984744d0cd65b63160852c7a8d1bd
Reviewed-on: http://gerrit.openafs.org/4094
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agoRevert "LWP: remove ucontext header from preempt module"
Andrew Deason [Mon, 28 Feb 2011 20:03:46 +0000]
Revert "LWP: remove ucontext header from preempt module"

This reverts commit fbac809a46376fcf60d3dcedc0be962c43d9c74e.

The ucontext header is only included in lwp.h for platforms that use
ucontext as a means for context-switching in LWP. The preempt module
needs the ucontext header for signal handling on some platforms (at
least Solaris). So, ucontext.h may not be included by lwp.h on these
platforms, if that platform does not use ucontext for LWP
context-switching. So we need to explicitly include ucontext.h in
preempt.c.

Change-Id: Ie08f20c7375d6ff1b185f64da70c983dbe19ac47
Reviewed-on: http://gerrit.openafs.org/4095
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoRevert "Make osi_fetchstore.c protocol independent"
Simon Wilkinson [Mon, 28 Feb 2011 14:17:28 +0000]
Revert "Make osi_fetchstore.c protocol independent"

This reverts commit 951612f4508b0c2ace4676f263df8dd4b566dd44.

In testing, this change causes RXAFS_EndStoreData to intermittently
fail with an RX_CC_UNMARSHALL error code. The error is returned
when the first 32bit word is read from the RX stream from the server.
Before this happens, the call is not in an error state.

As this problem makes the cache manager unusable for other
development, back the changeset out for now.

Change-Id: If8268faa7bee2651273d7fbb0e235ddb02d6284b
Reviewed-on: http://gerrit.openafs.org/4093
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

10 years agoarm darwin update
Derrick Brashear [Sun, 27 Feb 2011 02:55:19 +0000]
arm darwin update

some stuff that got lost from the last batch

Change-Id: Id892a8fce7c90a07c359d77282c557a0a9b41cd2
Reviewed-on: http://gerrit.openafs.org/4064
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agoLWP: remove ucontext header from preempt module
Derrick Brashear [Sun, 27 Feb 2011 02:51:50 +0000]
LWP: remove ucontext header from preempt module

it's already included by header. don't include it again.

Change-Id: I97c85dd10db94e0a50133b922adb6d0b0b193cf7
Reviewed-on: http://gerrit.openafs.org/4076
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agoavoid unneeded rebuilds due to component version
Derrick Brashear [Sun, 27 Feb 2011 02:44:37 +0000]
avoid unneeded rebuilds due to component version

if the component version file does not change, don't touch it
and force a rebuild

Change-Id: I8f864b0bdc56d04451e961fdeeb90c3bc6731d2b
Reviewed-on: http://gerrit.openafs.org/4075
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agogenerated mode: fix result
Derrick Brashear [Sun, 27 Feb 2011 02:42:40 +0000]
generated mode: fix result

don't leave build results which will interfere with the next phase around

Change-Id: If7e5f4773b7c79f7deceb88d7393cbb65a220bd5
Reviewed-on: http://gerrit.openafs.org/4074
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agoDOC: Add a missing quote in the QuickStart Guide
Jason Edgecombe [Sat, 26 Feb 2011 22:18:25 +0000]
DOC: Add a missing quote in the QuickStart Guide

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

10 years agoLINUX: Include key-related headers in osi_compat.h
Andrew Deason [Thu, 17 Feb 2011 17:57:53 +0000]
LINUX: Include key-related headers in osi_compat.h

Include keyring-related headers in osi_compat.h, so we get the proper
types defined for keyring-related functions. Also only define
keyring-related functions if we have keyring support.

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

10 years agoLinux: Reduce key_alloc flags confusion
Anders Kaseorg [Tue, 22 Feb 2011 23:18:17 +0000]
Linux: Reduce key_alloc flags confusion

KEY_ALLOC_IN_QUOTA should be 0, not 1.  Fortunately this was
overridden by the earlier correct definition in osi_compat.h.

Change-Id: I91a3b16dca0af182ddc3441437be781e689645a7
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/4033
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoauth: Rework PickClientSecObj
Simon Wilkinson [Fri, 25 Feb 2011 01:30:02 +0000]
auth: Rework PickClientSecObj

When called in localauth mode, this function was using
afsconf_GetLatestKey to check that the machine has a key file. However,
the ClientAuth and ClientAuthSecure functions then go on to do exactly
the same thing.

Instead, pick up on ClientAuth returning a rxnull security layer, and
trigger the NOTFOUND error based on that, rather than on the absence of
an old-style key file.

Change-Id: Ifb2d3a98bca5d1d67e303dcfeab1bb6f1efdc570
Reviewed-on: http://gerrit.openafs.org/4053
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoauth: Fix use of expires in PickClientSecObj
Simon Wilkinson [Fri, 25 Feb 2011 01:28:30 +0000]
auth: Fix use of expires in PickClientSecObj

The expires pointer was being zeroed in PickClientSecObject, rather
than zeroing the value pointed to. This meant that we would never
return any expiry time for the selected token.

Change-Id: I9d8e29cdd0c14a1e839a6719390e7f690493f56c
Reviewed-on: http://gerrit.openafs.org/4052
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agoauth: Correctly write empty keyfiles
Simon Wilkinson [Fri, 25 Feb 2011 01:23:38 +0000]
auth: Correctly write empty keyfiles

The new key handling code was creating empty keyfiles that were 0
bytes in length. The correct format for an empty keyfile is a file
containing a single 0 word (the number of keys in the file). Update
the code to write this form of empty KeyFile.

Change-Id: I93bf23f6044a70a74f52b94c4656cbd4bc4fc35b
Reviewed-on: http://gerrit.openafs.org/4051
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoauth: GetLatestKey should allow NULL return values
Simon Wilkinson [Fri, 25 Feb 2011 01:21:38 +0000]
auth: GetLatestKey should allow NULL return values

Existing callers in the code use
afsconf_GetLatestKey(dir, NULL, NULL) to check for the existence of
a key file. We need to permit NULL values for the return pointers
to this function.

Also update the tests to check for this behaviour.

Change-Id: I94e74138ddeed8d167c1e6f12e297411c638e1b9
Reviewed-on: http://gerrit.openafs.org/4050
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agotests/auth: Refactor common code
Simon Wilkinson [Thu, 24 Feb 2011 13:52:40 +0000]
tests/auth: Refactor common code

Pull the common code for creating a configuration directory out of
the keys and superuser tests into a single file. This both cleans up
the existing tests, and makes it easier to add new ones.

Change-Id: I08058117e08da3a3baf750b3b14ef6780f942206
Reviewed-on: http://gerrit.openafs.org/4049
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agoman-pages: add generated vos*.pod to clean rule
Jeffrey Altman [Fri, 25 Feb 2011 15:32:37 +0000]
man-pages: add generated vos*.pod to clean rule

9ec343cf4292e178fa1e4a9757232dc983ea9ba3 failed to add the
newly generated vos_addsite.pod, vos_copy.pod, and vos_zap.pod
to the clean rule.

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

10 years agoLinux: install_session_keyring: key_alloc flags are unsigned long
Anders Kaseorg [Wed, 23 Feb 2011 00:18:30 +0000]
Linux: install_session_keyring: key_alloc flags are unsigned long

Change-Id: I3bdecd77e06928fd22cf0cf6bd92af2dccf62896
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/4034
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoMacOS: aklog auth plugin
Derrick Brashear [Mon, 14 Feb 2011 05:20:40 +0000]
MacOS: aklog auth plugin

the AuthorizationPlugin subsystem replaced the old loginplugin
method. As it is now usable for us, provide a plugin which can take
advantage of it.

LICENSE BSD

Change-Id: I66de192c6028c195c3bb6809c451281d9937fb26
Reviewed-on: http://gerrit.openafs.org/3939
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agolwp: test for working swapcontext() and friends
Chas Williams (CONTRACTOR) [Sat, 19 Feb 2011 15:19:24 +0000]
lwp: test for working swapcontext() and friends

The USE_UCONTEXT was a temporary fix until someone wrote a reasonable
test of the user context swapping functions.  While these are present
on many operating systems, they simply aren't complete.  This test
correctly fails on IRIX, MacOS and some versions of Linux (in particular,
ppc 32-bit binaries on a 64-bit processor).

Change-Id: Ie2f340d661002c8f3c78dddbaf755257cb4ca286
Reviewed-on: http://gerrit.openafs.org/4018
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agovutil.c: use OS_XXX rather than afs_XXX
Rod Widdowson [Sat, 22 Jan 2011 16:25:42 +0000]
vutil.c: use OS_XXX rather than afs_XXX

This checkin replaced the use of afs_open/close with OS_OPEN/OS_CLOSE

Change-Id: Ie0f4edc90cf584112a54a5f8a1676014cc15eeac
Reviewed-on: http://gerrit.openafs.org/3741
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agonamei_ops.c use OS_XXX rather than afs_XXX
Rod Widdowson [Thu, 3 Feb 2011 11:44:12 +0000]
namei_ops.c use OS_XXX rather than afs_XXX

This checkin removes all uees of afs_open and replaces them with
OS_OPEN.  It converts direct call to read/write/close to OS_XXX

The exception is afs_stat which is left in place as this is unix
only and rerquires separate handling.

Change-Id: Iaab6cb57b6f4b5a131fb77d64d794893f795b59c
Reviewed-on: http://gerrit.openafs.org/3888
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agorx: Reset fd_set in LWP rxi_Sendmsg
Andrew Deason [Mon, 21 Feb 2011 18:39:48 +0000]
rx: Reset fd_set in LWP rxi_Sendmsg

When we select() on the socket fd in rxi_Sendmsg, we do not reset the
fd_set, and just use the same memory for any necessary subsequent
select()s. However, if the select returned on EINTR, the fd_set may be
cleared, and so we may try to select() on an empty fd_set forever. To
be sure that we don't do that, reset the fd_set to the socket fd every
time.

Change-Id: I5273351c70e593ad1b7849f4f56de1fcb12d1bbf
Reviewed-on: http://gerrit.openafs.org/4028
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

10 years agoMacOS: don't install growlagent into prefpanes dir
Derrick Brashear [Wed, 16 Feb 2011 17:18:58 +0000]
MacOS: don't install growlagent into prefpanes dir

we have more than one tool now. don't misinstall into the
prefpanes directory

Change-Id: I9fecc4d448edee54292a5c809caf7721960188ce
Reviewed-on: http://gerrit.openafs.org/3963
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agocmd: Fix objdir builds
Andrew Deason [Mon, 21 Feb 2011 20:13:22 +0000]
cmd: Fix objdir builds

Commit 8eca6a1153eb7768c2f29ea2d48f01f6988cbfe3 broke objdir builds by
not specifying ${srcdir} for cmd.c. Fix that.

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

10 years agobudb: Fix objdir builds
Andrew Deason [Mon, 21 Feb 2011 20:56:48 +0000]
budb: Fix objdir builds

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

10 years agoFix budb build rules for tbudb and WINNT
Andrew Deason [Mon, 21 Feb 2011 19:49:59 +0000]
Fix budb build rules for tbudb and WINNT

Commit 0d0b5048a5b68d4079b13609775f9234183d1947 only fixed the budb
Makefile.in. Make the analagous changes to tbudb/Makefile.in and
NTMakefile.

Change-Id: I4fa00e630aafcfa9d4d41a1948f3eae750900526
Reviewed-on: http://gerrit.openafs.org/4029
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoHPUX: Fix osi_debug.c includes
Andrew Deason [Sun, 20 Feb 2011 03:14:11 +0000]
HPUX: Fix osi_debug.c includes

osi_debug.c was trying to include fcrypt.h and private_data.h. But the
former is in the rx subdirectory, and the latter is in src/rxkad. So,
specify a more complete path for fcrypt.h, and put src/rxkad in the
include list for osi_debug.c so we can build again.

Change-Id: I5754f56354f40bd3697ac286cb0820041fda0b00
Reviewed-on: http://gerrit.openafs.org/4024
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agobudb: Only have one build rule for budb_errs.c
Simon Wilkinson [Mon, 21 Feb 2011 00:29:33 +0000]
budb: Only have one build rule for budb_errs.c

budb had two build rules that could produce budb_errs.c, but only
one of them also produced budb_client.h. This led to problems with
parallel makes, as depending on which rule fired first, budb_client.h
might, or might not, exist.

Rework all of this so that it's cleaner. Instead of producing two
copies of the error table, just make budb_client.h a static file,
and include the dynamically generated budb_errs.h from it. This
reduces code duplication, and means that we have to run compile_et
one less time.

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

10 years agolibuafs: add UAFS.pic to .gitignore
Marc Dionne [Sun, 20 Feb 2011 14:40:15 +0000]
libuafs: add UAFS.pic to .gitignore

Add UAFS.pic to .gitignore, it's a generated directory.

Change-Id: Ibbd5fa482e96b4d4e39402b5cb2a3cc7356c0662
Reviewed-on: http://gerrit.openafs.org/4022
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agocrypto: return a value from the krb5_init_context stub
Marc Dionne [Sat, 19 Feb 2011 20:11:30 +0000]
crypto: return a value from the krb5_init_context stub

The krb5_init_context stub is declared as returning an int, so
make it return 0 to avoid a warning.

Change-Id: I1e04d6953cf4daed67c7b1de9414113812148931
Reviewed-on: http://gerrit.openafs.org/4019
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoLINUX: Replace dcache.h for fs.h in config tests
Andrew Deason [Fri, 18 Feb 2011 21:49:03 +0000]
LINUX: Replace dcache.h for fs.h in config tests

When detecting if we have certain Linux kernel features, we only
include dcache.h. On some kernel versions (at least 2.4.27),
compilation fails if we include dcache.h directly (due to e.g.
list_head not being defined), which causes false negatives in tests
such as the test for dcache_lock. If we instead include fs.h, which
includes dcache.h, the tests succeed when they should succeed. So, use
fs.h instead of dcache.h.

Change-Id: I43fbbc7e5a952d9effbbac16adb9891c36f729bd
Reviewed-on: http://gerrit.openafs.org/3989
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agolwp: fix the rw test program
Chas Williams (CONTRACTOR) [Sat, 19 Feb 2011 13:26:20 +0000]
lwp: fix the rw test program

We should not need to prototype calloc() anymore and osi_Assert() has
been replaced with assert() apparently.

Change-Id: I3ef6178c589cabcd0637cd88c35d2276833b4590
Change-Id: I0626475f120ff9a373e0251f3c4485c052922747
Reviewed-on: http://gerrit.openafs.org/3991
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agoFBSD: remove prtactive
Ben Kaduk [Sun, 20 Feb 2011 03:41:19 +0000]
FBSD: remove prtactive

It is unused and has been removed by upstream.
Since we don't particularly need it for older versions, remove
it unconditionally.

Change-Id: If209f7d11d5f4aa4ba77f934d865c905761b05ca
Reviewed-on: http://gerrit.openafs.org/4020
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoosconf: pic_regex.o is now regex_pic.o
Simon Wilkinson [Sat, 19 Feb 2011 18:04:43 +0000]
osconf: pic_regex.o is now regex_pic.o

pic_regex.o was renamed as regex_pic.o in
commit 43b8bcf2a7c7dfd855a9f2bf274a93289a4941c6, but osconf.m4's
definied of REGEX_OBJ_PIC wasn't updated at the same time. Fix that.

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

10 years agohcrypto: Use new LWP_CCRULE
Simon Wilkinson [Wed, 16 Feb 2011 21:57:59 +0000]
hcrypto: Use new LWP_CCRULE

Use the new centralised LWP_CCRULE, rather than brewing our own.

Change-Id: I3eda193371c28972a048f3c0c125d10161420fd7
Reviewed-on: http://gerrit.openafs.org/4016
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agoDocument dropbox permissions
Andrew Deason [Thu, 17 Feb 2011 20:33:07 +0000]
Document dropbox permissions

Document the behavior and potential problems with granting 'il' rights
to create dropboxes. Do this in the manpage for 'fs setacl' and
chapter 4 of the User Guide.

Change-Id: Ic4e8ee016290080d78037a5c2c3802ce4e2e342c
Reviewed-on: http://gerrit.openafs.org/3977
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoRedHat packaging: Use %{dist} not %{osver}
Simon Wilkinson [Fri, 18 Feb 2011 00:36:33 +0000]
RedHat packaging: Use %{dist} not %{osver}

There's a standard mechanism for defining a RPMs target
distribution in the Fedora and RedHat worlds. This is to use the
%{dist} macro, and to insert it at the end (not the beginning) of
the release field.

Move over to using this standard mechanism, and modify the build
system to match. Note that this means that RPM names have now
changed slightly.

Change-Id: I5a4f1ad827223f48658f595ac424ab64fe98ed39
Reviewed-on: http://gerrit.openafs.org/3981
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoafsd: Make mountdir check kernel-specific
Andrew Deason [Thu, 17 Feb 2011 21:47:00 +0000]
afsd: Make mountdir check kernel-specific

Checking if the /afs directory exists only makes sense for the kernel
afsd. The libuafs afsd does not care if the mount directory actually
exists on the machine or not, since it may not interact with the mount
directory path on the local machine at all.

So, make the mountdir check code be a new afsd function
(afsd_check_mount), and have it stat() the mount directory only in the
kernels-specific afsd.

Change-Id: Ic0b524e23f518c4f3c9954e6b9614bca984306a3
Reviewed-on: http://gerrit.openafs.org/3980
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoWindows: Change GiveUpAllCallBacks default to On
Jeffrey Altman [Fri, 14 Jan 2011 15:45:06 +0000]
Windows: Change GiveUpAllCallBacks default to On

Change-Id: I2a87f0b22dc1d4d21eae4877f7e367a18bab4283
Reviewed-on: http://gerrit.openafs.org/3660
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

10 years agounix: giveupallcallbacks at shutdown
Derrick Brashear [Wed, 1 Dec 2010 20:23:11 +0000]
unix: giveupallcallbacks at shutdown

just try to give up callbacks at shutdown. at this point if
you're running 1.4.5 or older, you're sad anyway.
Change-Id: I7d9e9f1de45980f064bccaab338499789aa40646
Reviewed-on: http://gerrit.openafs.org/3404
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoubik: Abstract common code in ContactQuorum* functions
Marc Dionne [Sat, 22 Jan 2011 21:04:47 +0000]
ubik: Abstract common code in ContactQuorum* functions

These functions are mostly identical except for the arguments and the
called operation.  Move as much common code as possible to an iterator
function and a return code check function.  The DISK_WriteV case is
treated a bit differently since it can fall back to using DISK_Write.

This reduces code duplication and shoud simplify maintenance and
future changes.  There should be no functional changes.

Change-Id: If2f88c670da47eaad4baa81975ecc307013f5ce8
Reviewed-on: http://gerrit.openafs.org/3970
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agofileserver: dropbox mode shouldn't allow readback from anonymous
Derrick Brashear [Mon, 7 Feb 2011 15:54:51 +0000]
fileserver: dropbox mode shouldn't allow readback from anonymous

if you're writing files as anonymous, don't let them be read back.
things which potentially need to page back in will just have to be
authenticated, or lose.

Change-Id: I71a6096239eb59b40a9df09460e8db160e9342da
Reviewed-on: http://gerrit.openafs.org/3901
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoshlib-build: Add -p option
Andrew Deason [Thu, 17 Feb 2011 18:37:49 +0000]
shlib-build: Add -p option

Add a -p option to shlib-build option to generate "plain" shared
objects. That is, shared objects that are intended to be e.g.
dlopen()'d, and are not intended to be libraries dynamically linked to
from other code. Such shared objects do not need a library name,
version numbers, export lists, etc.

Change-Id: I649c1b697a79936c1d580199291124398b05e56b
Reviewed-on: http://gerrit.openafs.org/3975
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoshlib-build: Fix usage message
Andrew Deason [Thu, 17 Feb 2011 18:28:44 +0000]
shlib-build: Fix usage message

Change-Id: Ieb7181784f736a2295fffbea80da55d6a5c099cd
Reviewed-on: http://gerrit.openafs.org/3974
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoafsd.fuse: Force internal mount dir to /afs
Andrew Deason [Thu, 17 Feb 2011 21:15:06 +0000]
afsd.fuse: Force internal mount dir to /afs

Commit 1f1545dfb708b6f70065da58b44676b8eafef772 made it so the
argument given to -mountdir sets the internal mount directory.
However, afsd.fuse assumes that the mount dir is always /afs
internally. So, use the uafs_setMountDir function to reset the
internal mount dir to "/afs", so afsd.fuse can work with non-/afs
mountpoints.

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

10 years agoUKERNEL: Add uafs_setMountDir
Andrew Deason [Thu, 17 Feb 2011 21:14:41 +0000]
UKERNEL: Add uafs_setMountDir

Replace the function uafs_mountWithDir with uafs_setMountDir, and
adjust the one caller. This allows libuafs users to manually set the
mount dir after e.g. the mount dir is set from afsd options.

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

10 years agoLINUX: Fix osi_compat.h include guard
Andrew Deason [Thu, 17 Feb 2011 17:53:08 +0000]
LINUX: Fix osi_compat.h include guard

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

10 years agoutil: Use foo_pic.o instead of pic_foo.o
Andrew Deason [Wed, 16 Feb 2011 22:24:47 +0000]
util: Use foo_pic.o instead of pic_foo.o

Be more consistent with the rest of the tree, and name PIC object
files with the convention foo_pic.o.

Change-Id: Ib3b9642534c51ffb10fe3c86f779b4e9df6af4c1
Reviewed-on: http://gerrit.openafs.org/3968
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoFix PIC CFLAGS
Andrew Deason [Wed, 16 Feb 2011 21:58:41 +0000]
Fix PIC CFLAGS

Commit 8eca6a1153eb7768c2f29ea2d48f01f6988cbfe3 just used -fPIC to
generate position-independant code. However, the flag to turn on PIC
varies depending on the compiler, and is not always -fPIC. Just use
SHD_CCRULE instead, which will get us the correct PIC flags.

Change-Id: I61d698587cc3959b35ec27abe3c3b19adab5d8f1
Reviewed-on: http://gerrit.openafs.org/3962
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoAdd CCRULE variants for each build type
Simon Wilkinson [Wed, 16 Feb 2011 20:41:02 +0000]
Add CCRULE variants for each build type

Add explicit LWP, PTH and SHD variants of the CCRULE variable for
LWP, pthreaded and shared-library builds respectively. This allows
Makefiles which support building more than one target type to use
these rules directly, rather than brewing their own.

Modify all of the AFS_CCRULE definitions in the build type specific
Makefiles to reference these rules, so we aren't specifying things
twice.

Change-Id: I79bb394cca8971ce71b10ef55b75d5169bf6b80c
Reviewed-on: http://gerrit.openafs.org/3966
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoubik: remove unused OLD_URECOVERY code
Marc Dionne [Sat, 29 Jan 2011 17:31:24 +0000]
ubik: remove unused OLD_URECOVERY code

OLD_URECOVERY is never defined and only serves to preserve unused
code.

Change-Id: Iefc0fcfd177fa134a74cee05b0b45e6bf075ad1c
Reviewed-on: http://gerrit.openafs.org/3969
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agolibuafs: Allow -mountdir to override uafs_Setup
Andrew Deason [Fri, 28 Jan 2011 17:11:20 +0000]
libuafs: Allow -mountdir to override uafs_Setup

For some reason, uafs_Setup accepts a parameter specifying the AFS mount
point, and we effectively ignore any -mountdir option specified in the
string arguments. Allow -mountdir to override the mount point specified
in uafs_Setup, by changing afs_mountDir &co during afsd_mount_afs().

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

10 years agoviced: Enforce lwps limit for -L
Andrew Deason [Mon, 7 Feb 2011 19:13:31 +0000]
viced: Enforce lwps limit for -L

Previously, we only enforced the calculated lwp/thread maximum when
the -p argument was specified. When -L was specified, we set lwps to
128, which can be over the max of (effectively)
MAX_FILESERVER_THREAD-FILESERVER_HELPER_THREADS, depending on the
value of MAX_FILESERVER_THREAD.

Instead, enforce the lwps min/max after all code to set the lwps has
run.

Change-Id: Ia9fc29855e74631509ea558cfe1b17fcf46e900e
Reviewed-on: http://gerrit.openafs.org/3903
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

10 years agorfc3961: Add a kernel rfc3961 implementation
Simon Wilkinson [Mon, 13 Sep 2010 12:54:32 +0000]
rfc3961: Add a kernel rfc3961 implementation

Add the necessary mechanisms to build Heimdal's libkrb5/crypto_*.c in
the kernel. This provides the kernel module with a RFC3961
implementation.

In theory this could also be used to provide a RFC3961 implementation
on top of an EVP-based crypto library in userspace, but at the moment
we're just using Heimdal directly for this.

Change-Id: Ie57391da0dabd2dca8b305e23f0c0faa056a4675
Reviewed-on: http://gerrit.openafs.org/3948
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoImport of code from heimdal
Heimdal Developers [Thu, 27 Jan 2011 12:22:24 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
8ce821c38744b30e226ff024f675668b991b984d (switch-from-svn-to-git-1998-g8ce821c)

New files are:
krb5/crypto-aes.c
krb5/crypto-evp.c
krb5/crypto.c
krb5/crypto.h
krb5/data.c
krb5/keyblock.c
krb5/store-int.c

Change-Id: I511d54e1353a3662babd2d12611fd31b8e3061a5
Reviewed-on: http://gerrit.openafs.org/3947
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoAdd rfc3961 crypto files from Heimdal
Simon Wilkinson [Wed, 17 Nov 2010 21:57:42 +0000]
Add rfc3961 crypto files from Heimdal

Add the Heimdal files which are necessary to produce a kernel rfc3961
implementation to the import list.

Change-Id: If080207cd882b277548f503e5eb139fe9a54f495
Reviewed-on: http://gerrit.openafs.org/3946
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agohcrypto: Add hcrypto EVP support to the Unix CM
Simon Wilkinson [Sun, 12 Sep 2010 17:40:08 +0000]
hcrypto: Add hcrypto EVP support to the Unix CM

This commit adds the files which are necessary to support hcrypto's
EVP interface to the Unix cache manager build. Only a small number
of EVP ciphers and hashes are currently supported -
    * aes_128_cbc
    * aes_256_cbc
    * sha1

Note that the EVP interface is the only supported mechanism to use
the AES cipher - directly calling the underlying crypto functions
is not recommended and may break at any time.

Change-Id: I662073e578b29db1707c6b6433209e75e4db455d
Reviewed-on: http://gerrit.openafs.org/3945
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoUnix CM: Add osi_crypto crypto interface
Simon Wilkinson [Sat, 11 Sep 2010 12:02:49 +0000]
Unix CM: Add osi_crypto crypto interface

Add a new osi file to the cache manager. This file includes functions
which interface hcrypto with the kernel's own cryptography library.

At the moment, the only such function is osi_readRandom which returns
a block of random data from the kernel's PRNG.

Change-Id: Ib728f5bb638ef634efe4822da24bb7cca723983f
Reviewed-on: http://gerrit.openafs.org/3944
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoMakefile whitespace fixes
Andrew Deason [Wed, 16 Feb 2011 15:49:03 +0000]
Makefile whitespace fixes

Some "make"s get tripped up by recipe lines starting with anything but
a tab character. Most of the time we start ours with tabs, but fix a
few instances where they begin with spaces.

Change-Id: I2c17c68deb1b7641ca73e84ec0043b62ce3c54ba
Reviewed-on: http://gerrit.openafs.org/3961
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agovol: Restore inode OS_READ/WRITE
Andrew Deason [Tue, 15 Feb 2011 23:21:49 +0000]
vol: Restore inode OS_READ/WRITE

Commit 335ccb4082657b7d0e4e9af1076356cf115642d2 removed the OS_READ
and OS_WRITE definitions for non-namei code. We need those definitions
to build the pread/pwrite emulation functions, so put them back in.
This allows us to build the inode fileserver backend when we do not
have native positional I/O.

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

10 years agoAutoconf: Add GSSAPI autoconf rules
Simon Wilkinson [Thu, 2 Sep 2010 07:44:27 +0000]
Autoconf: Add GSSAPI autoconf rules

Add rules to autodetect the location of a system's GSSAPI libraries,
using the gssapi.m4 script from rra-c-util 2.6

Change-Id: Idabb8fdb138a2dac6983aa4d5fd8a2f558ee08be
Reviewed-on: http://gerrit.openafs.org/3943
Tested-by: Christof Hanke <christof.hanke@rzg.mpg.de>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoHPUX: Disable positional I/O
Andrew Deason [Mon, 14 Feb 2011 19:53:11 +0000]
HPUX: Disable positional I/O

Some versions of HP-UX have the pread() and pwrite() functions, but
they behave in odd ways; most notably, ignoring the offset argument
when _FILE_OFFSET_BITS is defined to 64.

This is noted in recent gnulib documentation
<http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/posix-functions/pwrite.texi>,
and slightly less clear references to pread() being broken can be
found on the development mailing list for git itself.

It is not completely clear what specific HP-UX versions are affected
by this. An autoconf run-time test may also be insufficient, because
the same binaries should be usable on machines with broken and
non-broken pread() implementations. So, to be safe, disable positional
I/O on HP-UX unconditionally.

Change-Id: I09b8d9c441622c961d1df90fe27eeccaa948f5c4
Reviewed-on: http://gerrit.openafs.org/3949
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoUpdate 1.6 NEWS entry based on 1.6.0pre2 release notes
Russ Allbery [Mon, 14 Feb 2011 20:36:18 +0000]
Update 1.6 NEWS entry based on 1.6.0pre2 release notes

Change-Id: Id795a74910bc881f8e93c8e80b9cb55ff48c3b15
Reviewed-on: http://gerrit.openafs.org/3950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoLinux: Fix RX atomics for kernel mode
Simon Wilkinson [Sun, 30 Jan 2011 19:27:17 +0000]
Linux: Fix RX atomics for kernel mode

Fix a mistake with the definition of rx_atomic_set, and add
the missing declaration of rx_dec_and_read for Linux kernel builds

Change-Id: Ieed7a369670c051abc02d8cc831e8736969fb67a
Reviewed-on: http://gerrit.openafs.org/3942
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years ago1.6.0pre2 release notes
Derrick Brashear [Mon, 14 Feb 2011 16:03:17 +0000]
1.6.0pre2 release notes

add release notes for 1.6.0pre2

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

10 years agoRedHat: Change the defined initdir path to /etc/rc.d/init.d
Jonathan Billings [Fri, 7 Jan 2011 15:44:27 +0000]
RedHat: Change the defined initdir path to /etc/rc.d/init.d

On Red Hat systems, /etc/init.d is a symlink to /etc/rc.d/init.d.  We
should use the actual path for packaging the init scripts, to avoid
any issues with package verification.

Change-Id: I476193b3fd534c8aa70c67970bf2765a30f4c4d5
Reviewed-on: http://gerrit.openafs.org/3625
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

10 years agoAdd PIC variant for libuafs
Andrew Deason [Mon, 13 Dec 2010 19:11:02 +0000]
Add PIC variant for libuafs

Build a libuafs that is built with PIC, so it can be used in shared
libraries on all platforms. Also build PIC variants for libafsutil and
libcmd, since we need them for a PIC libuafs anyway.

Change-Id: I017fa22c3b4dd661123ea92da7b3e5b69ee5c170
Reviewed-on: http://gerrit.openafs.org/3896
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoauth: Rewrite KeyFile handling code
Simon Wilkinson [Sat, 1 Jan 2011 23:41:29 +0000]
auth: Rewrite KeyFile handling code

Extend the KeyFile API so that we can support arbitrary numbers of
different key types, each with their own key version numbers and
sub types. Completely rewrite the KeyFile implementation with this
in mind, but implement all of the "old" API in terms of the new one.

Given that the existing KeyFile is modified by third party programs,
we retain that as the storage location for all afsconf_rxkad keys.
Only keys with a type of 1, or above are stored in the new extended
keyfile.

Change-Id: I903a1de938544541a1bfecedb2a039ba24bdfdbc
Reviewed-on: http://gerrit.openafs.org/3772
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoWindows: Release Notes updates for 1.6pre2
Jeffrey Altman [Sun, 13 Feb 2011 02:10:44 +0000]
Windows: Release Notes updates for 1.6pre2

A fairly thorough review of all sections to ensure that the information
is up to date.

Significant reformatting caused by XML editor.

Change-Id: Iad988b91091a02a7b5de2a1d1fae052fc5ee897f
Reviewed-on: http://gerrit.openafs.org/3936
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

10 years agoLinux: 2.6.38: dentry->d_count is not an atomic
Marc Dionne [Thu, 3 Feb 2011 02:55:27 +0000]
Linux: 2.6.38: dentry->d_count is not an atomic

d_count is now an int protected by the dentry's d_lock.
Take the lock when we use it, instead of using an atomic_*
function.

Change-Id: Ib70e4a5315cc343518fa983e47bc7ff925acfc7f
Reviewed-on: http://gerrit.openafs.org/3883
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

10 years agoWindows: ChangeLog updates for 1.6.pre1
Jeffrey Altman [Sat, 12 Feb 2011 19:24:02 +0000]
Windows: ChangeLog updates for 1.6.pre1

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

10 years agoWindows: Fix GetIoctlHandle path construction
Jeffrey Altman [Sat, 12 Feb 2011 16:52:12 +0000]
Windows: Fix GetIoctlHandle path construction

GetIoctlHandle() is used to construct the magic pioctl file
path used to initiate pioctl operations with the cache manager.
The first error introduced double directory separators.  The
second error was testing an uninitialized value which could
have resulted in a missing directory separator.

Change-Id: I4e863b854ea12b69858be712455dc6b6a0d36c39
Reviewed-on: http://gerrit.openafs.org/3925
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

10 years agoWindows: Fix symlink and mount point make \\afs\xxx handling
Jeffrey Altman [Sat, 12 Feb 2011 16:45:15 +0000]
Windows: Fix symlink and mount point make \\afs\xxx handling

When processing a request to make a symlink or a mount point
in the afs root volume (\\AFS) the smb redirector will fail
the request because a server name by itself is not a valid path.
Therefore, we insert the "all" share component to refer to the
root volume as a valid path.  \\AFS\foobar becomes \\AFS\all\foobar.

A recent change stripped the trailing slash from the string
returned by Parent().  This broke the test that determines
whether or not the provided path that failed the IsAFS() test
is in fact referring to the \\AFS server and requires the insertion
of the "all" share name.

This patchset permits the test to work with \\AFS or \\AFS\
and removes extraneous directory separators from the generated
path containing the "all" share.

Change-Id: Ia3b28d83302d9737bd149b4a22bc3ee3a6c8da46
Reviewed-on: http://gerrit.openafs.org/3924
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

10 years agoutil: Actually install thread_pool_types.h
Simon Wilkinson [Wed, 9 Feb 2011 19:37:18 +0000]
util: Actually install thread_pool_types.h

The action portion of the rule for thread_pool_types.h was missing,
so the file was never installed. As that file is a dependency for the
whole of the util directory, it would result in util being completely
rebuild with every make invocation.

Add the missing installation rule, so we don't rebuild quite so often!

Change-Id: Idb201c239b6b37a25567cf231059ef05536fc258
Reviewed-on: http://gerrit.openafs.org/3921
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>