openafs.git
13 years agoAdd explicit libafsauthent dependency for aklog
Chaz Chandler [Thu, 25 Nov 2010 05:43:28 +0000]
Add explicit libafsauthent dependency for aklog

Prevents occasional failures with parallel builds by ensuring
libafsauthent is built before aklog, which needs it.

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

13 years agoaklog weak warning
Derrick Brashear [Mon, 1 Nov 2010 02:21:19 +0000]
aklog weak warning

make aklog guess when you need to enable weak crypto

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

13 years agoubik: Log a message when we replay the trans log
Andrew Deason [Wed, 24 Nov 2010 15:03:19 +0000]
ubik: Log a message when we replay the trans log

It can be helpful to know that an interrupted transaction was replayed
on startup, and this should be rare. So log a message when that
happens, indicating what db version we replayed to.

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

13 years agoubik: Replay the transaction log label correctly
Andrew Deason [Wed, 24 Nov 2010 14:36:05 +0000]
ubik: Replay the transaction log label correctly

Commit eec0d94f519b3e27f255b9b7a637df043951424e fixed the transaction
replay log code to correctly identify valid transaction logs on
little-endian systems, but missed ntohl'ing the database label read in
a LOGEND opcode. Fix that, so the database is labelled correctly when
replayed from a transaction log.

And while we're here, actually pass a struct ubik_version* to
adbase->setlabel, to make it a little more clear what's happening.

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

13 years agoauth: Allow identities in the UserList
Simon Wilkinson [Wed, 15 Sep 2010 10:17:14 +0000]
auth: Allow identities in the UserList

Extend the userok interface provided by the auth library to permit the
addition, deletion and inspection of identities within the UserList.

A number of additional functions are added, as direct replacements for
their Kerberos v4 only counterparts - these are:
 *) afsconf_DeleteIdentity
 *) afsconf_GetNthIdentity
 *) afsconf_AddIdentity
 *) afsconf_SuperIdentity

In addition, a new function is added to allow the status of any given
identity to be queried
 *) afsconf_IsSuperIdentity

New form identities are stored within the same UserList file as
Kerberos v4 identities. We take advantage of the fact that the current
code skips any entry with a leading whitespace. Identities are stored as
a single line, with a leading space, followed by the integer
representation of their type (0 for Kerberos 4, 1 for GSSAPI), followed
by the base64 encoded representation of their exported name, followed by
the display name of the identity. Each field is whitespace separated.

For example:
 1 BAEACwYJKoZIhvcSAQICAAAAEHN4d0BJTkYuRUQuQUMuVUs= sxw@INF.ED.AC.UK
is the representation of the GSSAPI identity "sxw@INF.ED.AC.UK"

An addition to the test suite is also provided which will test all of
the existing, and new super user manipulation functions.

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

13 years agoCache bypass: Only compile bypass code for the Linux kernel
Marc Dionne [Tue, 23 Nov 2010 23:39:33 +0000]
Cache bypass: Only compile bypass code for the Linux kernel

Only compile the afs_bypasscache.c code if AFS_LINUX24_ENV is set,
since it's currently the only case where the code is actually used.
Only sections that caused problems for UKERNEL were previously
ifdef'ed.

Besides making the code cleaner, the main effect of this change
is to prevent compiling most of the bypass code for UKERNEL where
it isn't currently used.

If support for bypass is added for other platforms eventually, the
code here would need to be reworked anyway, ideally abstracting out
and moving any OS specific bits into the platform subdirectories.

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

13 years agoCache bypass: remove ifdefs under src/afs/LINUX
Marc Dionne [Tue, 23 Nov 2010 23:21:16 +0000]
Cache bypass: remove ifdefs under src/afs/LINUX

Compile cache bypass code unconditionally under src/afs/LINUX
since it is now always enabled.  Also remove syslog messages
about a "cache bypass patched module" when loading and unloading
the module.

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

13 years agoCache bypass: Remove AFS_KMAP_ATOMIC
Marc Dionne [Tue, 23 Nov 2010 22:50:25 +0000]
Cache bypass: Remove AFS_KMAP_ATOMIC

Since AFS_KMAP_ATOMIC is defined unconditionally, remove the ifdefs
and the code for the !AFS_KMAP_ATOMIC case.  We probably don't want
to support this feature on a kernel old enough not to have kmap_atomic.
This should exist on all 2.6 and even 2.4 linux kernels.

This simplifies the code for maintenance and later changes.

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

13 years agorx: add rx_opaque and rx_identity exports
Jeffrey Altman [Wed, 24 Nov 2010 12:29:12 +0000]
rx: add rx_opaque and rx_identity exports

rx_opaque_new                           @289
rx_opaque_alloc                         @290
rx_opaque_populate                      @291
rx_opaque_copy                          @292
rx_opaque_freeContents                  @293
rx_opaque_zeroFreeContents              @294
rx_opaque_free                          @295
rx_opaque_zeroFree                      @296
rx_identity_match                       @297
rx_identity_populate                    @298
rx_identity_copy                        @299
rx_identity_copyContents                @300
rx_identity_new                         @301
rx_identity_freeContents                @302
rx_identity_free                        @303

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

13 years agoUpdate the man pages pod source adding text to discourage use of
Steve Simmons [Tue, 31 Aug 2010 23:21:50 +0000]
Update the man pages pod source adding text to discourage use of
uss.  Usually the text added was a copy of a CAUTION section that
had already been added in a few places. This change applies it
consistently across all uss-related man pages. In pod1/afs.pod that
text would be excessively wordy; a briefer note is used there to
direct the reader to the full text.

This is a partial fix for RT bug #128018. It does not fully close
the bug; the AFS Administrators Guide needs to be updated as well.

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

13 years agoImport of code from heimdal
Heimdal Developers [Wed, 24 Nov 2010 10:59:06 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
5b91f58f350c92fb9eacd1ebac558381b0b8deac (switch-from-svn-to-git-1705-g5b91f58)

Upstream changes are:

Simon Wilkinson (1):
      hcrypto: Remove getarg.h include from validate.c

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

13 years agoWindows: build src/rx/tests
Jeffrey Altman [Thu, 18 Nov 2010 03:39:12 +0000]
Windows: build src/rx/tests

Now that we have roken integrated build src/rx/tests as a
standard part of the build.

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

13 years agoImport of code from heimdal
Heimdal Developers [Wed, 24 Nov 2010 10:35:48 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
9fc90e01b55966b6a3e5a161b4806a5171af789d (switch-from-svn-to-git-1704-g9fc90e0)

Upstream changes are:

Simon Wilkinson (1):
      roken: Remove multiple prototype for hstrerror

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

13 years agoWindows: indicate that roken is a dynamic library for roken.h
Jeffrey Altman [Wed, 24 Nov 2010 10:24:43 +0000]
Windows: indicate that roken is a dynamic library for roken.h

Since the windows build of roken is a dynamic library we must
define ROKEN_LIB_DYNAMIC so that roken.h will specific the
correct values of ROKEN_LIB_VARIABLE, ROKEN_LIB_CALL, and
ROKEN_LIB_FUNCTION.

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

13 years agoWindows: roken getopt renamed to rk_getopt, vars exported
Jeffrey Altman [Wed, 24 Nov 2010 05:44:52 +0000]
Windows: roken getopt renamed to rk_getopt, vars exported

Since the function was renamed, modify the export list
Add rk_optarg, rk_optind, rk_opterr.

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

13 years agoImport of code from heimdal
Heimdal Developers [Wed, 24 Nov 2010 09:45:03 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
f317b91b1b4b8d030fc2ab188b6aa526e9e7cb84 (switch-from-svn-to-git-1703-gf317b91)

Upstream changes are:

Jeffrey Altman (1):
      roken: Prototype getopt

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

13 years agoImport of code from heimdal
Heimdal Developers [Wed, 24 Nov 2010 08:14:40 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
0cc7b890e2632a7cb26517825deb802f79e838f8 (switch-from-svn-to-git-1702-g0cc7b89)

Upstream changes are:

Asanka C. Herath (3):
      Annotate exported variables in getopt.c
      Windows: Support building roken as a DLL
      Declarations for getopt externs

Simon Wilkinson (1):
      roken: getopt should include roken.h

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

13 years agoroken: modify build configuration to permit Windows to work
Jeffrey Altman [Wed, 24 Nov 2010 05:44:02 +0000]
roken: modify build configuration to permit Windows to work

When building roken the library must be built with different
ROKEN_LIB_xxx macro values than when the library is being
linked against.   In particular, ROKEN_LIB_VARIABLE needs to
be exported when building and imported when linking.

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

13 years agorxkad: rename bswap32 to octetswap32
Jeffrey Altman [Tue, 23 Nov 2010 17:18:38 +0000]
rxkad: rename bswap32 to octetswap32

In bg-fcrypt.c the bswap32 macro has a name conflict with roken.
Rename it to octetswap32.

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

13 years agorxkad: fix bg-fcrypt to work with roken
Jeffrey Altman [Tue, 23 Nov 2010 17:11:46 +0000]
rxkad: fix bg-fcrypt to work with roken

On Windows, roken.h defines iov_len as len and iov_base as buf
so that it can use _WSABUF as the iovec structure.  This has negative
consequences when there are local variables iov_len and iov_base
as the same time as there are variables len and buf.  This was the
case in bg-fcrypt rxkad_EncryptPacket and rxkad_DecryptPacket.
As a result, rxkad compiled cleanly but did the wrong thing.
This patchset renames iov_len to ilen and iov_base to ibase in order
to avoid this issue.

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

13 years agoroken: Add the strsep function
Simon Wilkinson [Tue, 23 Nov 2010 11:31:27 +0000]
roken: Add the strsep function

Add the strsep function (as rk_strsep) to the OpenAFS roken build.
This function is required by Windows, and is now checked for on Unix.

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

13 years agoImport of code from heimdal
Heimdal Developers [Tue, 23 Nov 2010 11:22:51 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
bd78baf668eca011257f05fef8334e0967500456 (switch-from-svn-to-git-1696-gbd78baf)

New files are:
roken/strsep.c

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

13 years agoImports: Import heimdal:lib/roken/strsep.c
Simon Wilkinson [Tue, 23 Nov 2010 11:10:32 +0000]
Imports: Import heimdal:lib/roken/strsep.c

Add Heimdal's roken strsep implementation to the list of files
to import into our repository.

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

13 years agoroken: Add base64 functions to libroken
Simon Wilkinson [Sun, 21 Nov 2010 10:09:42 +0000]
roken: Add base64 functions to libroken

Install the base64.h header, and add the base64_encode and
base64_decode functions to the library

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

13 years agorx: Store identity type in rx_identity_new
Simon Wilkinson [Mon, 22 Nov 2010 14:21:28 +0000]
rx: Store identity type in rx_identity_new

rx_identity_new was failing to record the type of the identity,
resulting in all identities being marked as Kerberos v4.

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

13 years agorx: Rework identity copying
Simon Wilkinson [Sun, 21 Nov 2010 10:16:26 +0000]
rx: Rework identity copying

Change the behaviour of the rx_identity_copy function so that it
copies the whole identity, not just the contents. Add a new function
rx_identity_copyContents which just copies the contents of an identity
into an existing identity structure.

This restores symmetry with the free and freeContents functions.

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

13 years agoFBSD: close race in afs_root
Ben Kaduk [Sat, 6 Nov 2010 04:02:31 +0000]
FBSD: close race in afs_root

Previously, we called afs_PutVCache(afs_globalVp) directly.  This
is unsafe because PutVCache acquires locks which can sleep, losing
the serialization of the GLOCK.  In rare circumstances, this can
result in two threads simultaneously making that call, and the
second one would panic in vputx() with a negative refcount.
Close the race by using a local variable for the afs_PutVCache()
calls, applying the change to afs_globalVp before dropping the GLOCK.
While here, fix up other race conditions.

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

13 years agoImport of code from heimdal
Heimdal Developers [Mon, 22 Nov 2010 23:17:18 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
bd78baf668eca011257f05fef8334e0967500456 (switch-from-svn-to-git-1696-gbd78baf)

Upstream changes are:

Jeffrey Altman (1):
      Windows: Include winsock2.h before ws2tcpip.h

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

13 years agoredhat init script fix missing space
Derrick Brashear [Mon, 22 Nov 2010 16:36:55 +0000]
redhat init script fix missing space

the if [] needed a space before the ]. fix it.

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

13 years agouserok: Allow NULL components in kerberosSuperUser
Simon Wilkinson [Mon, 13 Sep 2010 07:24:12 +0000]
userok: Allow NULL components in kerberosSuperUser

Modify kerberosSuperUser so that it can support callers passing NULL,
rather than just empty, instance and cell strings

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

13 years agoWindows: update nsis installer for hcrypto and roken
Jeffrey Altman [Mon, 22 Nov 2010 05:05:00 +0000]
Windows: update nsis installer for hcrypto and roken

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

13 years agoWindows: update wix installer for afsroken.dll
Jeffrey Altman [Mon, 22 Nov 2010 05:04:23 +0000]
Windows: update wix installer for afsroken.dll

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

13 years agouse intptr_t instead of ifdef
Christof Hanke [Mon, 22 Nov 2010 07:39:11 +0000]
use intptr_t instead of ifdef

Remove another ifdef AFS_64BITUSERPOINTER_ENV from the code.

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

13 years agouse computed values in src/gtx/curseswindows.c
Christof Hanke [Sun, 21 Nov 2010 19:09:23 +0000]
use computed values in src/gtx/curseswindows.c

compiling failed, because of -Wunused-value.
Use the return code of wstandout and wstandend and pass
it upwards.

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

13 years agoImports: Add reporting of new and removed files
Simon Wilkinson [Sat, 20 Nov 2010 10:25:06 +0000]
Imports: Add reporting of new and removed files

Make the commit message produced by import-external-git.pl also report
which files the script added and removed. Whilst this information is
available from the patch itself, having it in the commit message makes
it much easier to tell what happened when reviewing history through
git log.

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

13 years agohcrypto: Cleanup all build products
Simon Wilkinson [Tue, 2 Nov 2010 09:46:05 +0000]
hcrypto: Cleanup all build products

make clean in hcrypto was missing rand-fortuna_lwp.o. Fix that.

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

13 years agouse proper 64bit casting for pointer-math
Christof Hanke [Fri, 19 Nov 2010 20:30:21 +0000]
use proper 64bit casting for pointer-math

building with "./configure --enable-checking --enable-supergroups"
fails, because on 64bit, the casting in map.c gives a warning.
Just add another ifdef and cast according to the size of a pointer.

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

13 years agoremove unnecessary dependency
Christof Hanke [Sun, 21 Nov 2010 11:13:34 +0000]
remove unnecessary dependency

fms in bu_utils is not using curses at all.
Just remove the dependency from the Makfile

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

13 years agoadd src/roken/roken.h to src/roken/.gitignore
Jeffrey Altman [Sat, 20 Nov 2010 21:53:31 +0000]
add src/roken/roken.h to src/roken/.gitignore

roken.h is a generated file.  Add it to .gitignore

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

13 years agoWindows: permit aklog to build with krb4 support and roken
Jeffrey Altman [Sat, 20 Nov 2010 21:26:22 +0000]
Windows: permit aklog to build with krb4 support and roken

aklog.c defined S_ISDIR() which is now defined by roken.h

krb4 declared the types uid_t and gid_t which are defined by roken.h.
There is no mechanism to disable the declarations within the krb4
header (conf-pc.h) even those the declarations were never required
by the Kerberos v4 DLL.  The patchset hacks the in tree local copy
of the kfw\inc\krb4\conf-pc.h header to avoid the conflict.

There is still an annoying warning due to kfw\inc\krb4\krb.h
providing a conflicting prototype for gettimeofday() but the
function is not used within aklog so there is no harm from it.

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

13 years agoWindows: Have get/free addrinfo and nameinfo functions
Jeffrey Altman [Sat, 20 Nov 2010 21:03:31 +0000]
Windows: Have get/free addrinfo and nameinfo functions

roken defines replacements for getaddrinfo, freeaddrinfo,
getnameinfo, and freenameinfo which are provided by winsock.
Add HAVE_xxxx macros as required to prevent roken substitution
from taking place.

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

13 years agoWindows: Add hcrypto to the msi installer
Jeffrey Altman [Fri, 19 Nov 2010 17:45:50 +0000]
Windows: Add hcrypto to the msi installer

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

13 years agoWindows: more libroken fixes
Jeffrey Altman [Sat, 20 Nov 2010 16:47:11 +0000]
Windows: more libroken fixes

param.i386_w2k and param.i386_nt40 were not updated for libroken
as part of e2b4fde0b5850e42cb0ed00852f581fb7d24f8ff

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

13 years agoWindows: conditionally set tray icon state
Jeffrey Altman [Fri, 19 Nov 2010 05:07:36 +0000]
Windows: conditionally set tray icon state

If the checkbox IDC_TRAYICON is not present in the dialog,
do not attempt to use its value as a setting for
Config_SetTrayIconFlag().

FIXES 128591

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

13 years agomore rx/tests cleanups
Jeffrey Altman [Thu, 18 Nov 2010 03:33:48 +0000]
more rx/tests cleanups

Include roken.h, always reference rx headers with rx prefix,
add a resource file for Windows, remove warnings from testclient
and testserver.  add a .gitignore file.

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

13 years agorxgen: add *TranslateOpcode functions to XDR code
Felix Frank [Fri, 12 Nov 2010 23:10:31 +0000]
rxgen: add *TranslateOpcode functions to XDR code

Administrative commands and server binaries can benefit from the
ability to translate RPC OpCode numbers to proper function names.

For this purpose, rxgen now emits the function

char *PKGTranslateOpCode(int)

where PKG is replaced by the respective package prefix.

The function is generated in the exact same way that ExecuteRequest is.
This way, the right optimization (array storage vs. generated case
statement) according to the respective sparseness of OpCodes in the
different RX packages is maintained.

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

13 years agodoc: Do not process .in files for html
Andrew Deason [Fri, 12 Nov 2010 16:32:57 +0000]
doc: Do not process .in files for html

We do not want to process .pod.in files when generating HTML versions
of the man pages. Change the filename filtering logic to only accept
.pod files, so we'll also skip over all other stuff we don't want,
like CVS or fragments directories.

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

13 years agoUse hcrypto for kernel md5
Simon Wilkinson [Sat, 24 Apr 2010 14:43:59 +0000]
Use hcrypto for kernel md5

Use the hcrypto code for kernel md5 too.

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

13 years agoRemove local crypto
Simon Wilkinson [Thu, 15 Apr 2010 17:40:31 +0000]
Remove local crypto

This change removes all of the local crypto use in userspace, in
favour of using our shiny new afshcrypto library.

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

13 years agoReplace bits of libutil with libroken
Simon Wilkinson [Sat, 30 Oct 2010 23:52:06 +0000]
Replace bits of libutil with libroken

Replace all of the bits of libutil that were originally culled
from libroken with libroken originals.

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

13 years agohcrypto: Use system wide libroken
Simon Wilkinson [Sat, 30 Oct 2010 14:27:51 +0000]
hcrypto: Use system wide libroken

Use the system wide libroken, rather than building our own bits
locally, for libafshcrypto.

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

13 years agoBuild: Fix broken bracketing in shared Makefile
Simon Wilkinson [Mon, 1 Nov 2010 09:03:43 +0000]
Build: Fix broken bracketing in shared Makefile

There was a stray ( in the shared library build system. We hadn't
noticed this, as the only place that uses the shared makefile and
produces binaries is the hcrypto test suite that isn't built by
default.

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

13 years agoWindows: build tsalvaged on Windows
Jeffrey Altman [Thu, 12 Aug 2010 15:15:58 +0000]
Windows: build tsalvaged on Windows

Build the pthreaded salvage server on Windows.
(This work is not yet complete.)

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

13 years agoWindows: build tptserver on Windows
Jeffrey Altman [Thu, 12 Aug 2010 15:12:51 +0000]
Windows: build tptserver on Windows

Build the pthreaded ptserver on Windows

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

13 years agoWindows: build tubik
Jeffrey Altman [Thu, 12 Aug 2010 15:11:25 +0000]
Windows: build tubik

Build the pthreaded ubik library on Windows

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

13 years agoLinux: define llseek operations
Marc Dionne [Fri, 5 Nov 2010 21:30:02 +0000]
Linux: define llseek operations

With kernel 2.6.37 it is now mandatory to define the llseek operation
for files and directories.  If these are not defined, no_llseek is
called, and any attempt to seek returns ESPIPE.

Most file systems use generic_file_llseek, but it seems safer to use
default_llseek which is what the vfs used to call for us by default.
In 2.6.37 these two functions are actually functionally identical.

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

13 years agoWindows: add roken.h to src/roken cleanup list
Jeffrey Altman [Thu, 18 Nov 2010 05:58:08 +0000]
Windows: add roken.h to src/roken cleanup list

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

13 years agoWindows: Add CODESIGN_OTHER option to make signtool rules
Jeffrey Altman [Thu, 18 Nov 2010 02:42:00 +0000]
Windows: Add CODESIGN_OTHER option to make signtool rules

Some organizations may need to pass additional parameters to
signtool.exe.  Add the optional CODESIGN_OTHER value to permit
arbitrary additional parameters to be specified.

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

13 years agovolser: remove unused yesprompt function
Jeffrey Altman [Mon, 15 Nov 2010 19:47:22 +0000]
volser: remove unused yesprompt function

In src/volser/vsprocs.c is an unused function, yesprompt.
Get rid of it.

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

13 years agoConvert from using nvldbentry to uvldbentry
Jeffrey Altman [Sun, 6 Jun 2010 15:03:44 +0000]
Convert from using nvldbentry to uvldbentry

The support routines relied upon by vos use the older nvldbentry
data structures which do not include the UUID for the server.
This patchset updates the code to use the uvldbentry structure
so that a future patchset can make use of UUID values when available.

Any functions from vsprocs.c which are referenced by vos.c are
considered public.  This includes all of the VL_xxxx, UV_xxxx
and Lp_xxxx functions, the EnumerateEntry, SubEnumerateEntry, and
host mapping functions.  For any which references an nvldbentry as a
parameter a new 'U' version is created that accepts a uvldbentry.
These new 'U' functions are then used throughout vos.c and the internal
routines.

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

13 years agolibroken: Build on windows
Simon Wilkinson [Sat, 30 Oct 2010 14:17:09 +0000]
libroken: Build on windows

A minimal change set to get libroken to build on Windows. Sadly,
libroken contains definitions for a number of platform compatibility
macros which were previously scattered throughout the windows code.
These scattered macros have to be removed in order to build libroken.

The impact of this removal is that a very large number of files
throughout the tree require the addition of "roken.h" to pick up the
new compatibility code. The bulk of this change is adding these
includes.

In addition, some of the added includes add roken dependencies to the
Unix build. So, also add libroken to the build rules in affected Unix
Makefiles.

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

13 years agoAdd snprintf to roken for Unix builds
Simon Wilkinson [Wed, 17 Nov 2010 12:43:07 +0000]
Add snprintf to roken for Unix builds

vsyslog on AIX (added to rokenafs by commit
f21fbf6b9ce1dfcb0ea1ef52c686d1370c810609) requires rk_*printf,
add them to the libroken build.

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

13 years agoroken build vsyslog
Derrick Brashear [Tue, 16 Nov 2010 19:04:30 +0000]
roken build vsyslog

in order to make aix happy, build vsyslog if we have it.

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

13 years agoImport of code from heimdal
Heimdal Developers [Mon, 15 Nov 2010 20:35:31 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
387b0fa7baf724cc260559ff8774c04e0e8f7487 (switch-from-svn-to-git-1676-g387b0fa)

Upstream changes are:

Andrew Tridgell (1):
      heimdal: fixed a shadowed variable warning for error_message

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

13 years agoUse afs_foff_t for file offsets
Andrew Deason [Wed, 10 Nov 2010 15:11:47 +0000]
Use afs_foff_t for file offsets

Some callers in vol and volser were not using afs_foff_t for file
offsets for calls to STREAM_ASEEK, FDH_TRUNC, FDH_PREAD, or
FDH_PWRITE. Most notably, in code for volume cloning, purging, and
dumping operations. Fix them to use afs_foff_t to prevent errors when
dealing with large special files.

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

13 years agoimport vsyslog from roken for AIX
Derrick Brashear [Mon, 15 Nov 2010 20:28:00 +0000]
import vsyslog from roken for AIX

AIX wants vsyslog. pull it in

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

13 years agoLinux: Fix prototypes for afs_xsetgroups and sys_setgroupsp and friends
Anders Kaseorg [Sat, 6 Nov 2010 07:17:17 +0000]
Linux: Fix prototypes for afs_xsetgroups and sys_setgroupsp and friends

Fixes some “warning: function declaration isn’t a prototype”, and
makes the prototypes consistent with the corresponding definitions.

Change-Id: I7dce475800b585c3cc8a735d0a2f92ca339c9fac
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3278
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRXOSD and VICEP-ACCESS fields and bits in afs.h
Hartmut Reuter [Fri, 5 Nov 2010 10:31:28 +0000]
RXOSD and VICEP-ACCESS fields and bits in afs.h

struct vcache gets two new fields:
int protocol
        which in the lower 16 bits contains the protocol number
                1 classical rx-fileserver,
                2 rxosd,
                4 direct access to visible vicep partitions.
void *vpacRock
        which for visible files in a vicep-partition contains
        a pointer to a struct known only inside afs_vicep.c
        which contains the pointer to the open file and other
        information.

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

13 years agoLinux: Fix prototypes for sys_setgroups_stub and sys32_setgroups_stub
Anders Kaseorg [Sat, 6 Nov 2010 07:15:06 +0000]
Linux: Fix prototypes for sys_setgroups_stub and sys32_setgroups_stub

Fixes “warning: function declaration isn’t a prototype”.

Change-Id: Idfff2a19496ee7d848800c3b913d779e52187021
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3277
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoubik: Record the last write tid in writeTidCounter
Andrew Deason [Wed, 1 Sep 2010 20:10:56 +0000]
ubik: Record the last write tid in writeTidCounter

ubik is currently tracking writeTidCounter for write transactions
separately from regular transactions (assigned from tidCounter).
Specifically, tidCounter is incremented twice for each transaction,
but writeTidCounter is incremented twice only for write transactions.
As a result, writeTidCounter and tidCounter tend to drift far apart.

This is a problem, since the tid for DISK_* calls uses the transaction
id of the current transaction (based on tidCounter), and VOTE_Beacon
uses writeTidCounter for its transaction id. So, in effect, the tid in
VOTE_Beacon is completely bogus and unrelated to the transaction id of
the actual current write transaction. This can cause valid write
transactions to become invalidated when tidCounter becomes negative,
since VOTE_Beacon will send a positive tid, and if there is a current
in-flight write transaction with a negative tid, SVOTE_Beacon will
deem the transactions inequal and will abort the write transaction.

So instead, record the transaction id counter for the last write
transaction in writeTidCounter. This way, when we call VOTE_Beacon, we
will use the correct transaction id counter for the current write
transaction, and SVOTE_Beacon on the remote site will not invalidate
the transaction.

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

13 years agoavoid requeueing callbacks during shutdown
Derrick Brashear [Thu, 11 Nov 2010 23:48:18 +0000]
avoid requeueing callbacks during shutdown

when linux calls osi_linux_free_inode_pages we can try to queue a vcb.
this is foolish as we are shutting down. so, don't.

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

13 years agoafscp: Add -s option
Andrew Deason [Wed, 10 Nov 2010 21:35:17 +0000]
afscp: Add -s option

Add an -s option to afscp, to specify an amount of time to sleep in
the middle of a read or write operation. This can be helpful in
simulating a slow client.

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

13 years agoLockless path through afs_linux_dentry_revalidate
Rainer Toebbicke [Tue, 9 Nov 2010 02:59:09 +0000]
Lockless path through afs_linux_dentry_revalidate

Permit a popular path through afs_linux_dentry_revalidate to pass without
taking a lock which it actually does not need. This affects multi-core
software-build nodes in particular, where serialization and high stat() counts
restricts useful processing to a single core.

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

13 years agoviced: Add options for interrupting clients
Andrew Deason [Tue, 12 Oct 2010 22:46:36 +0000]
viced: Add options for interrupting clients

Add the -offline-timeout and -offline-shutdown-timeout options to the
fileserver, to implement interrupting clients accessing volumes we are
trying to take the volume offline. Document the new options.

Currently this is only implemented for read operations. Implementing
this for write operations and callback breaks will require more work.

This also removes the VGetVolumeTimed interface from the volume
package, since the fileserver was the only user and with this change
the fileserver now uses the VGetVolumeWithCall interface.

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

13 years agovol: Interrupt RX calls accessing offlining vols
Andrew Deason [Fri, 29 Oct 2010 16:29:37 +0000]
vol: Interrupt RX calls accessing offlining vols

When we are waiting for a volume to go offline, only wait a certain
amount of time for it to go offline before we interrupt all RX calls
associated with that volume. This amount of time is configurable in
the new offline_timeout and offline_shutdown_timeout volume package
option fields.

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

13 years agovol: Add interfaces for registering RX calls
Andrew Deason [Fri, 29 Oct 2010 16:14:49 +0000]
vol: Add interfaces for registering RX calls

Add VGetVolumeWithCall and VPutVolumeWithCall, to associate RX calls
with volume heavyweight references. Also add the interrupt_rxcall
field to the volume package options structure.

This also adds the VIsGoingOffline function, so a caller can tell when
a volume is going offline.

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

13 years agovol: Add VGetVolumeTimed
Andrew Deason [Wed, 27 Oct 2010 22:34:40 +0000]
vol: Add VGetVolumeTimed

Replace the VGetVolumeNoWait interface with the more general
VGetVolumeTimed interface, which allows for waiting for offlining
volume for arbitrary amounts of time (instead of just "waiting
forever" or "not waiting at all"). Also add VOL_CV_TIMEDWAIT and
VTimedWaitStateChange_r as necessary to implement this.

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

13 years agoWindows: ktc_ListTokensEx stub assignment error
Jeffrey Altman [Sun, 14 Nov 2010 05:00:22 +0000]
Windows: ktc_ListTokensEx stub assignment error

Improper use of == instead of the intended = within
ktc_ListTokensEx.

Change-Id: Id8b49ef91d83000c0685a37bab4a2ca44fc037b4
Reviewed-on: http://gerrit.openafs.org/3304
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: clean token.h/token.xdr.c from src/auth
Jeffrey Altman [Sun, 14 Nov 2010 04:58:46 +0000]
Windows: clean token.h/token.xdr.c from src/auth

The new token interface generates token.h and token.xdr.c
from token.xg in the src/auth directory.  Add the missing
clean target for these files.

Change-Id: Ic689a5cad3643b450963f10abee725e0010f1e15
Reviewed-on: http://gerrit.openafs.org/3303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoviced: Allow checkout of VOL_STATE_DELETED volumes
Andrew Deason [Thu, 30 Sep 2010 17:39:22 +0000]
viced: Allow checkout of VOL_STATE_DELETED volumes

The fileserver allows nonexistent volumes to be checked out. Since
VOL_STATE_DELETED volumes conceptually do not exist, we should also
allow them to be checked out.

Change-Id: Ibc0f761569b339579acff03a3cbd9f795f783e0a
Reviewed-on: http://gerrit.openafs.org/2873
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agodoc: Fix fileserver synopsis
Andrew Deason [Fri, 12 Nov 2010 16:03:43 +0000]
doc: Fix fileserver synopsis

The fileserver synopsis was missing the leading 'fileserver' before
the options list. This causes the options list to not be interpreted
as POD, and so you get a lot of ugly unprocessed POD markup in the man
page. Fix that.

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

13 years agoUse port in ugen_ClientInit
Hartmut Reuter [Thu, 11 Nov 2010 15:12:18 +0000]
Use port in ugen_ClientInit

Use the port information in ugen_ClientInit also if no server was
specified and info.hostAddr[i].sin_port is not set.

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

13 years agoafscp: Always show fetch/store errors
Andrew Deason [Wed, 10 Nov 2010 21:21:07 +0000]
afscp: Always show fetch/store errors

When we get an error from a fetch or store operation, show what the
error was, instead of just saying "some network error occured".

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

13 years agovos release: Avoid full dump on all sites
Andrew Deason [Thu, 11 Nov 2010 20:45:04 +0000]
vos release: Avoid full dump on all sites

Commit 9fed169b1c5c823fd96cea94daf712b2cf06c901 attempts to remove any
remote RO site that has RO_DONTUSE set. However, we set RO_DONTUSE on
all sites earlier in the release process if this is a full release,
resulting in all sites getting a full dump.

Correct this by remembering in 'origflags' what flags each site has
before we messed with the vldb entry.

Thanks to Mike Meffie.

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

13 years agoFix util test dependencies
Andrew Deason [Thu, 29 Jul 2010 22:02:38 +0000]
Fix util test dependencies

The test programs in tests/util did not depend on libutil.a or
libtap.a. So, if libutil.a changed, they were not relinked. Add the
dependencies so correcting a part of libutil will cause the tests to
actually reflect the change.

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

13 years agoviced: fix missing host lock in h_Enumerate
Michael Meffie [Thu, 11 Nov 2010 17:17:05 +0000]
viced: fix missing host lock in h_Enumerate

The global host lock must be held over h_Release_r. Fix the
the case in h_Enumerate where h_Release_r is called without
the global host lock held.

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

13 years agosalvager: Do not break cbks when salvaging parts
Andrew Deason [Wed, 29 Sep 2010 16:48:44 +0000]
salvager: Do not break cbks when salvaging parts

When salvaging whole partitions / whole servers, the fileserver is
assumed to not be running. So only break callbacks if we are salvaging
a single volume. If we are salvaging a whole partition, do not tell
the fileserver to break callbacks on changed volumes, since the
fileserver will not be around and we will just hang.

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

13 years agovol: make namei_ListAFSSubDirs deal with multiple/bad linktables
Tom Keiser [Thu, 14 Oct 2010 05:24:03 +0000]
vol: make namei_ListAFSSubDirs deal with multiple/bad linktables

The salvager ends up deadlocking when multiple linktables exist
in the same volume group special directory.  The issue is that we
open and flock all discovered linktables, but only close out the
last one found.  Consequently, when our child scans the linktables
again, we deadlock against the locked and leaked descriptor(s) our
parent left around before forking.

While we have so far been unable to root-cause the actual creation
of spurious linktables, this patch will at least stop the salvager
from deadlocking against itself when this occurs.

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

13 years agoLinux: use DEFINE_MUTEX for afs_linux_alloc_sem on newer kernels
Alejandro R. Sedeño [Fri, 5 Nov 2010 21:24:43 +0000]
Linux: use DEFINE_MUTEX for afs_linux_alloc_sem on newer kernels

DECLARE_MUTEX is gone as of 2.6.37; afs_global_lock switches from
DECLARE_MUTEX to DEFINE_MUTEX at 2.6.16, so do the same here.

Change-Id: If2ea5e1d3b5406c631cade1128425b5be79ffd4a
Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3273
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoCache bypass: make readpage deal with reads at end of file
Marc Dionne [Sun, 7 Nov 2010 18:14:55 +0000]
Cache bypass: make readpage deal with reads at end of file

When a file's size is an exact multiple of the page size, the vfs
will issue a readpage for an extra page at the end, for which there
is no data.  Deal with it here instead of letting it trickle down
to the background daemon, which will issue an unnecessary read to the
server, and maybe get confused because there is no data.

Change-Id: If86ed785c4e9d50edb1a960142f726fa869c50fc
Reviewed-on: http://gerrit.openafs.org/3281
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agovolser: Do not FSYNC_VOL_DONE temporary volumes
Andrew Deason [Thu, 30 Sep 2010 16:34:59 +0000]
volser: Do not FSYNC_VOL_DONE temporary volumes

Currently, the volserver just looks at the destroyMe field in a volume
header to see if it should tell the fileserver a volume has been
deleted (FSYNC_VOL_DONE opcode). However, temporary volumes created by
the volserver (such as new volumes or clones) have destroyMe set, but
are obviously not deleted, and so the fileserver should just be told
FSYNC_VOL_LEAVE_OFF about these volumes instead.

With commit bb9caf9822a53ad07cd3a5d6cea7f6b7eeeedd59, FSYNC_VOL_DONE
and FSYNC_VOL_LEAVE_OFF actually do different things, so this does
make a difference.

Note that this commit slightly changes the meaning of the
vp->needsPutBack field. Now it must be set to VOL_PUTBACK_DELETE to
tell the fileserver that the volume has been deleted, and set to
VOL_PUTBACK if it just needs to be given back to the fileserver.

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

13 years agoCache bypass: adjust read size for non-contiguous readpages
Marc Dionne [Sun, 7 Nov 2010 18:35:36 +0000]
Cache bypass: adjust read size for non-contiguous readpages

The bypass code's readpages does deal with a non-contiguous list
of pages, but it doesn't adjust the size of the read it requests
from the background daemon accordingly.  As a result we'll ask the
server for pages we were not asked to read.

Change-Id: I5468a4a68f4f415961298144f5bb581faeda540a
Reviewed-on: http://gerrit.openafs.org/3282
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

13 years agorxperf: use parallel connections
Jeffrey Altman [Mon, 8 Nov 2010 16:07:14 +0000]
rxperf: use parallel connections

When the number of threads exceeds RX_MAXCALLS allocate additional
rx connection objects.

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

13 years agoRX: rxi_PrepareSendPacket drops call lock; WaitforTQ required
Simon Wilkinson [Sat, 6 Nov 2010 19:18:14 +0000]
RX: rxi_PrepareSendPacket drops call lock; WaitforTQ required

Since rxi_PrepareSendPacket drops the call->lock during
processing the caller must perform a rxi_WaitforTQ prior
to manipulating the transmit queue.

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

13 years agovol: Do not give back not-checked-out vols
Andrew Deason [Fri, 5 Nov 2010 21:48:28 +0000]
vol: Do not give back not-checked-out vols

VAttachVolumeByName_r has logic to give back a volume over FSSYNC if
we checked out a volume but failed to attach it for whatever reason.
However, the logic used for determining if the volume was checked out
or not is a bit inaccurate (even moreso than the comments imply),
potentially causing us to VOL_ON volumes that don't exist at all.

Instead of trying to guess based on various conditions whether or not
we checked out the volume, keep track of a variable that is only set
when we actually checkout the volume from the fileserver. Then only
give back the volume if it is set.

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

13 years agoCache bypass: release and unlock pages when we get 0-length reply
Marc Dionne [Sun, 7 Nov 2010 20:06:16 +0000]
Cache bypass: release and unlock pages when we get 0-length reply

In some cases, such as reading past the end of file as known to the
server, fetchdata will get a 0 length reply.  Deal gracefully by
unlocking and releasing any pages reserved by readpages.  Failure
to do so here leads to deadlocks later as we can exit with some pages
still locked.

Change-Id: Ic9e496c8c64d5e94f2cf9976d160ef5873f27249
Reviewed-on: http://gerrit.openafs.org/3283
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agorx: Reorganise includes
Simon Wilkinson [Fri, 1 Oct 2010 08:36:06 +0000]
rx: Reorganise includes

RX files were including the same header set in three different places,
once for user-land builds, once for kernel builds and once for ukernel.
The duplication was a bit pointless, and really frustrating when adding
new headers. So, reorganise the includes so that we only list headers
that are used in all three builds in one location.

Also take the opportunity to indent the #ifdefs so that it is clear
what is going on, and to remove some more of AFS_OSF_ENV and
AFS_AUX_ENV from kernel builds.

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

13 years agoWindows: fix keystroke delay in waitkey
Michael Meffie [Fri, 5 Nov 2010 12:27:37 +0000]
Windows: fix keystroke delay in waitkey

Fix the keystroke delay in the pthreaded wait for key
function.

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

13 years agoavoid private stdio fields in waitkey
Michael Meffie [Thu, 4 Nov 2010 13:26:25 +0000]
avoid private stdio fields in waitkey

Use the stdio_ext functions provided by solaris and glibc
instead of directly accessing private stdio FILE structure
members. This is needed for 64-bit solaris builds and is more
portable in general since the FILE structure is meant to be
opaque.  Remove the duplicated code in the pthreaded butc
package.

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

13 years agoDAFS: Do not let VScheduleSalvage_r free vp
Andrew Deason [Fri, 5 Nov 2010 19:34:05 +0000]
DAFS: Do not let VScheduleSalvage_r free vp

In VScheduleSalvage_r, we were calling VCancelReservation_r, which has
the possibility of free'ing vp. Since we still use vp after doing this
(and since we're already inside VCancelReservation_r to begin with),
we must not free vp. Instead, just decrement nWaiters without
triggering any of the dtor code in VCancelReservation_r. This is safe
as long as all VScheduleSalvage_r callers ensure that they check to
free the vp if necessary, which they all do.

Thanks to Derrick Brashear.

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