openafs.git
13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 years agoscout: restore parallel make
Marc Dionne [Wed, 9 Feb 2011 22:06:00 +0000]
scout: restore parallel make

Restore the + in the scout Makefile section, lost with commit
4a6a00d6.
Lets scout benefit from a parallel make and avoids a warning.

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

13 years agoubik: always prefer a dirty cache page for write transactions
Marc Dionne [Fri, 28 Jan 2011 00:07:32 +0000]
ubik: always prefer a dirty cache page for write transactions

If a write transaction is running concurrently with a read transaction,
a DRead in the write transaction may return a clean cache page brought
in by the read transaction, instead of a previously written dirty page
from the same transaction.  This can result in loss of the written data.

Fix by making sure there is not a dirty version of the requested page
before returning a clean one.

Bug spotted by Jeffrey Hutzelman.

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

13 years agoEarly dispose of replies in rx_Multi
Rainer Toebbicke [Thu, 27 Jan 2011 14:03:57 +0000]
Early dispose of replies in rx_Multi

Handles replies as soon as they arrive in rx_Multi, limiting
strain on RX packet queues on massive rx_Multi loops.

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

13 years agoevalmountdata null pointer before use
Derrick Brashear [Mon, 31 Jan 2011 16:04:08 +0000]
evalmountdata null pointer before use

volnamep can be used uninitialized. fix that.

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

13 years agoLinux: 2.6.38: deal with dcache_lock removal
Marc Dionne [Sat, 29 Jan 2011 01:59:17 +0000]
Linux: 2.6.38: deal with dcache_lock removal

dcache_lock is gone in 2.6.38, and some of the vfs locking rules
have changed.

Of interest for openafs:
- inode->i_lock protects the d_alias list
- dentry->d_lock protects d_unhashed()

Add a new configure test for dcache_lock, and replace its use by
the appropriate new lock(s).

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

13 years agoLinux: 2.6.38: Adjust for permission inode operation changes
Marc Dionne [Sat, 29 Jan 2011 00:41:32 +0000]
Linux: 2.6.38: Adjust for permission inode operation changes

The permission i_op has a new signature with a flags argument, and
must now deal with RCU path walking.
- Fix existing configure test for this i_op, it succeeds when it
shouldn't
- Add a new configure test for the new signature
- Make our permission i_op "RCU-walk aware" - return ECHILD if
called in that mode

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

13 years agoLinux: allow compile flags to be passed to AC_CHECK_LINUX_BUILD
Marc Dionne [Sat, 29 Jan 2011 00:03:39 +0000]
Linux: allow compile flags to be passed to AC_CHECK_LINUX_BUILD

Some linux autoconf tests require particular compile flags such as
-Werror.  Add a parameter to the AC_CHECK_LINUX_BUILD macro that
lets the caller pass in any needed special flags.

Adapt a few existing tests that were still using AC_TRY_KBUILD
directly.

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

13 years agoConvertROtoRW: Use old copyDate for creationDate
Andrew Deason [Thu, 3 Feb 2011 21:40:48 +0000]
ConvertROtoRW: Use old copyDate for creationDate

When we convert an RO volume to an RW, currently we just copy the
copyDate and creationDate from the RO metadata into the RW. But the
copyDate and creationDate fields have different meanings for RW and RO
volumes: for ROs, the creationDate is merely the last time the data
was updated from the RW during a release operation.

So, if the copyDate is older than the creationDate, use the copyDate
as the new RW creationDate instead. This will probably not match the
creationDate of the original RW, but it will be closer to it, and it
will more accurately represent the conceptual "created time" of the
new RW.

Doing this can avoid forcing an unnecessary full dump on a subsequent
release of the resultant RW volume, since the creationDate is more
accurate.

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

13 years agoWindows: correct pthread_xxx_init semantics
Jeffrey Altman [Mon, 7 Feb 2011 21:44:09 +0000]
Windows: correct pthread_xxx_init semantics

pthread lock and conditional initialization semantics
do not require that the lock structure be zeroed before
pthread_xxxx_init() functions are called.  Since the Windows
CriticalSection initialization does require that the memory
be zeroed, the pthread_xxxx_init() functions must zero the
memory just in case before performing the CriticalSection
initialization.

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

13 years agoafscp: Fix -s option for writes
Andrew Deason [Thu, 27 Jan 2011 19:13:21 +0000]
afscp: Fix -s option for writes

When writing to AFS with afscp, the -s option was sleeping before any
StoreData RPCs actually got issued to the fileserver. Move the sleep
to after we have done one rx_Read/rx_Write, so we sleep after starting
to contact the fileserver, to make sleeping while writing more
consistent with sleeping while reading.

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

13 years agoWindows: remove duplicate advapi32.lib references
Jeffrey Altman [Thu, 3 Feb 2011 00:24:00 +0000]
Windows: remove duplicate advapi32.lib references

advapi32.lib is included in the conlibsdll macro.
No need to include it in the link list twice.

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

13 years agospelling/grammar fixes for manpages
Ken Dreyer [Thu, 3 Feb 2011 20:22:02 +0000]
spelling/grammar fixes for manpages

Several small fixes for spelling and grammar.

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

13 years agospelling/grammar fixes for vos_clone manpage
Ken Dreyer [Wed, 2 Feb 2011 16:49:31 +0000]
spelling/grammar fixes for vos_clone manpage

Small spelling/grammar fixes for the vos_clone manpage.

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

13 years agoRx: Do not stop keepalives on ACKALL receipt
Andrew Deason [Mon, 31 Jan 2011 21:00:09 +0000]
Rx: Do not stop keepalives on ACKALL receipt

We need to still keep sending periodic keepalives after receiving an
ACKALL, since the call is not done yet. ACKALLs can be received when
the peer has received all data from us, well before the call has
finished. This is particularly noticeable for long-lived calls that
have little data transfer, such as AFSVolForward and
AFSVolForwardMultiple.

This reverts commit b1549f29a9515de09d4a64bfb28bf5afdfee2615, which
was intended to be part of a fix for RT 20727.

FIXES 128848

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

13 years agoafsd: Do not check for /afs if -nomount
Andrew Deason [Mon, 31 Jan 2011 17:18:39 +0000]
afsd: Do not check for /afs if -nomount

If -nomount was passed, we don't try to mount /afs. So, there is no
reason to require its existence.

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

13 years agoWindows: No NCBRESET when probing Loopback after start
Jeffrey Altman [Mon, 31 Jan 2011 16:43:39 +0000]
Windows: No NCBRESET when probing Loopback after start

The Netbios NCBRESET command resets all of the Netbios state
associated with the LAN adapter including the name bindings.
In response to a detected LAN adapter IP address change, the
smb_LanAdapterChange() function is called to determine if any
Netbios LAN adapter bindings that were in use or should be in
use by afsd_service were altered.  As part of the check,
lana_GetUncServerNameEx() is called which in turn calls
lana_FindLoopback() which in turn issued a lana_IsLoopback()
for each LAN adapter with the 'reset adapter' flag set to TRUE.

Calling lana_IsLoopback() with 'reset' equal TRUE was fine
when lana_GetUncServerNameEx() was only called from smb_Init(),
but it is not fine when called after the service is processing
calls.  By resetting the adapter the binding of the netbios name
"AFS" (or "<MACHINE>-AFS") is removed and all outstanding calls
are canceled.  If the SMB redirector attempts a reconnect during
the window before NCBADDNAM is called to re-bind the name, a
negative cache entry will be placed in the netbios name lookup
table that will prevent the SMB redirector from connecting to
the client for several minutes.

If the environment is one in which frequent IP address change
events are triggered, it is possible that the SMB redirector
will never be able to reconnect to the service.

This patchset adds a flag, LANA_NETBIOS_NO_RESET, to the
lana_GetUncServerEx interface which permits smb_LanAdapterChange()
to avoid the undesirable reset.  This negative flag was selected
in order to avoid changing the current default behavior as the
lanahelper library is used by out of tree installers and it
is preferred that OpenAFS avoid breaking them unnecessarily.

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

13 years agoevalmountdata: put back colon in .:mount syntax only if we removed it
Derrick Brashear [Mon, 31 Jan 2011 20:07:45 +0000]
evalmountdata: put back colon in .:mount syntax only if we removed it

we looked for a set character (not NULL) at cpos before, instead
of looking for a non-NULL pointer. fix it.

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

13 years agotests: Fix auth/superuser-t.c to work on Linux
Simon Wilkinson [Sun, 30 Jan 2011 20:54:30 +0000]
tests: Fix auth/superuser-t.c to work on Linux

Fix the superuser tests so that they can be run on Linux. This
requires explicitly including sys/wait.h so we can use waitpid,
and changing some initialisation ordering so that we initialise
the RX library before we try and fake an rxkad token.

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

13 years agobozo: Fix linker problem on Linux
Simon Wilkinson [Sun, 30 Jan 2011 18:35:28 +0000]
bozo: Fix linker problem on Linux

Some unconnected changes break the Linux linker when faced with this
library list. librx is included too early, and liblwp isn't included
after the second inclusion of librx. Reorder the library list to fix
this problem, and so it matches the library order in the rest of our
modules.

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

13 years agoWindows: Install rx_atomic.h
Simon Wilkinson [Sun, 30 Jan 2011 19:11:57 +0000]
Windows: Install rx_atomic.h

Install the rx_atomic.h header into the build-wide header directory,
so that modules other than RX can make us of it.

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

13 years agoUnix CM: Move kernel crypto include files
Simon Wilkinson [Fri, 28 Jan 2011 15:20:25 +0000]
Unix CM: Move kernel crypto include files

Move the crypto include files which are used for kernel builds into
the hcrypto directory where they logically belong.

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

13 years agoWindows: out of order locks cm_CheckCBExpiration
Jeffrey Altman [Sun, 30 Jan 2011 04:24:16 +0000]
Windows: out of order locks cm_CheckCBExpiration

The recent refactoring of cm_CheckCBExpiration introduced
a lock ordering error between the cm_scache_t rw lock and the
cm_scacheLock.  This patchset fixes the error by dropping the
cm_scacheLock as each cm_scache_t is being processed.

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

13 years agoaklog: Use correct CFLAGS
Simon Wilkinson [Fri, 28 Jan 2011 15:01:21 +0000]
aklog: Use correct CFLAGS

The aklog Makefile was setting XCFLAGS, but then not actually using them
which meant that we never used the correct include path for the Kerberos
libraries, or defined ALLOW_REGISTER

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

13 years agoDo not compare an FD_t < 0
Rod Widdowson [Fri, 28 Jan 2011 16:49:03 +0000]
Do not compare an FD_t < 0

FD_t is an abstract type.  Invalid file decriptors are == INVALID_FD.
In most places this module does the right thing.  Fix the last
stragglers where it is testing as less than zero.

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

13 years agolinux: 2.6.38: Make d_revalidate RCU-walk aware
Marc Dionne [Tue, 25 Jan 2011 23:18:56 +0000]
linux: 2.6.38: Make d_revalidate RCU-walk aware

Signal to the vfs that we don't support path RCU walk in
d_revalidate.  It will call back in non-RCU mode.

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

13 years agolinux: 2.6.38: New d_op handling
Marc Dionne [Tue, 25 Jan 2011 22:17:21 +0000]
linux: 2.6.38: New d_op handling

In 2.6.38, the super block structure has a new field to hold the
default dentry ops.  The vfs will automatically set it for new
dentries in most cases.

Set s_d_op to our set of operations, and omit setting the dentry
ops where the vfs will already do it (and where new locking rules
prohibit it).

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

13 years agoRX: Avoid retrying calls on busy channels
Andrew Deason [Thu, 2 Dec 2010 23:13:17 +0000]
RX: Avoid retrying calls on busy channels

When we receive an RX_PACKET_TYPE_BUSY packet, we currently ignore it.
This is a problem when the server has a long-running call on that same
call channel that we don't know about, since we will then keep
retrying the call on the same channel and keep getting
RX_PACKET_TYPE_BUSY responses.

Try to avoid this by returning the RX_CALL_TIMEOUT error when we get a
BUSY packet and there are other free call channels available on the
conn. When the application gets the error and retries the call, we
avoid using the same call channel again where possible. When all of
the call channels appear busy, we revert to effectively the old
behavior of retrying the call on the same channel until we get an
RX_CALL_DEAD (or similar) error.

FIXES 128671

Change-Id: I29b84aa36dcc856528c30d26811e5d6c4b78a1ca
Reviewed-on: http://gerrit.openafs.org/3431
Tested-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>

13 years agoImport of code from heimdal
Heimdal Developers [Thu, 27 Jan 2011 12:18:44 +0000]
Import of code from heimdal

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

Upstream changes are:

Asanka C. Herath (2):
      Revert use of backslash as an escape for double quote in config strings
      Condition roken's ssize_t definition for compatibility

Love Hornquist Astrand (1):
      don't undefined SLIST

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