Commit Graph

8790 Commits

Author SHA1 Message Date
Marc Dionne
9d547f2485 src/afs: Set but unused variables warning fixes
Fix a few simple cases of set but unused variables under src/afs.

Change-Id: I78964b7128590d5db1f2c01dd7157c23966c26a0
Reviewed-on: http://gerrit.openafs.org/4491
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-04-27 04:56:19 -07:00
Andrew Deason
9b405a7b08 Fix --without-krb5
Currently, specifying --without-krb5 causes the AM_CONDITIONAL
KRB5_USES_COM_ERR to not be defined, which makes configure refuse to
run successfully. Fix this by forcing KRB5_USES_COM_ERR to always be
false if we are running explicitly without krb5.

Change-Id: I96274847a3dbbb8436ef04f24476606cb15c6618
Reviewed-on: http://gerrit.openafs.org/4576
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-04-27 04:55:53 -07:00
Simon Wilkinson
5562fbd304 Rewrite asetkey to support extended key types
Rewrite the asetkey binary so that it can support managing extended
key files.

Change-Id: Iad53e8cd4c193d8410d5f85d46d72629399b3189
Reviewed-on: http://gerrit.openafs.org/4574
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-27 04:55:01 -07:00
Chaz Chandler
675bd1007d afsio: remove unnecessary reference to malloc.h
Fixes breakage on freebsd for missing malloc.h, reported by GAWollman,
and, since roken.h already includes stdlib.h to pull in malloc, is no
longer necessary

Change-Id: Ie7785198124fe0dee394d7c15f032f0dadb6db8c
Change-Id: I1d5947155ba33de61d8fd23197e11c51e4791935
Reviewed-on: http://gerrit.openafs.org/4578
Reviewed-by: Chaz Chandler <clc31@inbox.com>
Tested-by: Chaz Chandler <clc31@inbox.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-26 19:14:26 -07:00
Marc Dionne
e9ac2cdf01 ubik: add uvote_HaveSyncAndVersion
Add a new function uvote_HaveSyncAndVersion() that combines the
logic from uvote_GetSyncSite and uvote_eq_dbVersion, without
releasing the vote lock in between.  Make use of it in
urecovery_AllBetter.

Change-Id: Ia44337da0f4335bd312cd686904f633ac19f1b63
Reviewed-on: http://gerrit.openafs.org/4526
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-26 17:37:02 -07:00
Marc Dionne
9020e6e2f0 ubik: Defer updateUbikNetworkAddress until after RX startup
The beacon package initialization has been moved to precede starting
RX services, but the broadcast of addresses to other servers should
be deferred until after RX is started.

Make updateUbikNetworkAddress an exported function and call it
from the general initilization sequence.

Change-Id: I903398ed275f460cc8373340eed9dac6a560e1da
Reviewed-on: http://gerrit.openafs.org/4525
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-26 17:36:47 -07:00
Marc Dionne
89cdb34920 ubik: locking in recovery.c
Locking changes in recovery.c:
- In urecovery_Initialize, hold the DB lock over ReplayLog
and InitializeDB
- Hold the DB lock over larger portions of urecovery_interact.
Some values which should be protected were examined and modified
without holding any locks.
- In the early part of urecovery_interact, only take the DB lock
when it's really needed, now that some values are protected by other
locks.
- DoProbe is now called without the DB lock, so it doesn't need to
drop and re-aquire it.

Change-Id: I1899b672687f0ab0eb59c74ff802750cdc377ae6
Reviewed-on: http://gerrit.openafs.org/4524
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-26 17:36:33 -07:00
Marc Dionne
44801d157e ubik: always hold DB lock for urecovery_ResetState()
ubik_ResetState requires callers to hold the DB lock, since it modifies
urecovery_state.  All callers of ubeacon_AmSyncSite outside of the beacon
package hold the DB lock, but calls from the beacon thread do not, and
can't block on getting the DB lock if we're sync site.

Add a beacon internal version of ubeacon_AmSyncSite that skips the
call to ResetState, and have the callers take the DB lock and call
ResetState themselves if needed.  They can take the lock in this case
because we know we're not the sync site.  Refactor the exported
ubeacon_AmSyncSite in terms of this new function.

Change-Id: I88b231010dd52adf6e43a17802e83d12568afc6b
Reviewed-on: http://gerrit.openafs.org/4490
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-26 17:36:18 -07:00
Marc Dionne
b2e6b426e6 ubik: set UBIK_RECLABELDB before propagating version
Quoting Jeffrey Hutzelman:

In udisk_commit(), when committing the first write transaction
after becoming sync site, the database is relabelled.  In this
case, the UBIK_RECLABELDB recovery state bit should be set before
propagating the label change to other servers, rather than after.

This is because ContactQuorum_DISK_Setversion() will
release the database lock, at which point the recovery state may
be cleared by urecovery_ResetState() running in another thread.
It is important that a relabelling which occurs before recovery
state is cleared not result in the UBIK_RECLABELDB recovery state
bit being set after; otherwise, the server may fail to correctly
relabel the database the next time it becomes sync site.

Change-Id: I9753a24c84cf45cdbb11a1d8b7ab262fbe487204
Reviewed-on: http://gerrit.openafs.org/4489
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-26 17:30:38 -07:00
Marc Dionne
a6091cacd8 ubik: remote: fix DB lock usage
Many of the RPC functions in the remote package have a similar
prologue that makes use of ubik_currentTrans before taking the
DB lock.  Take the lock earlier, and rely on the ubik_dbase global
instead of the dbase pointer in ubik_currentTrans.

In GetVersion, take the lock earlier to cover the call to
ubeacon_AmSyncSite.

Change-Id: Ib8480163f2cab2a6ff6a6462cb67fce02f3e8094
Reviewed-on: http://gerrit.openafs.org/4488
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-26 17:30:14 -07:00
Derrick Brashear
a33f77b6e1 macos: further next version support
try to optimize out things which will be missing

Change-Id: Ibee45ae75fa0a5cbdad9eb7a83b12cfaba85b201
Reviewed-on: http://gerrit.openafs.org/4569
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-04-26 10:46:30 -07:00
Ben Kaduk
352c3e366c Rename libcom_err to libafscom_err
We no longer provide a compatible libcom_err, and in fact
we renamed the symbols in our libcom_err several years ago
to reflect this fact.
When we build on a system where KRB5_LIBS includes
-lkrb5 -lcom_err , the new Unix build system will pick up
our libcom_err (as $(AFS_LDFLAGS) is the first argument in
AFS_LDRULE and pulls in a linker search path for our libcom_err)
which does not provide all the needed symbols for libkrb5.

Fully rename our libcom_err away to avoid these conflicts.

FIXES 128640

Change-Id: Ifdd677609f432d42252b1716fc5e8755f3a44640
Reviewed-on: http://gerrit.openafs.org/3547
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-04-26 07:50:11 -07:00
Marc Dionne
a8c46e5010 Linux: cleanup aio support
Code that called directly into the aio operations (ex: readv/writev)
would bypass the AFS specific operations found in afs_linux_read
and afs_linux_write.

Rework the handlers:
- For newer kernels with aio, let the kernel use its default read
and write operations, and define the aio_read and aio_write operations,
with the AFS specific bits, calling into generic_file_aio_read/write.
The kernels default read/write operations are just wrappers around the
aio versions.
- For older kernels, leave things as is, pointing read and write to
afs_linux_read/write

Change-Id: I2a12c6716dc1974683c2582eb9ada5f841067dd9
Reviewed-on: http://gerrit.openafs.org/4563
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-04-26 07:33:11 -07:00
Simon Wilkinson
e1414be76b cmd: Split up dispatch function
Split up the command line parsing behaviour out of the cmd_Dispatch
function, and into a function of its own - cmd_Parse. This lets servers
which only have a single "syntax" installed just parse, without needing
to go through a dispatch function, and all of the control flow
complexity that requires.

Change-Id: Ic4325bf933ee5b28cb80db36ef9b2b5fb6763f41
Reviewed-on: http://gerrit.openafs.org/4541
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 21:52:51 -07:00
Simon Wilkinson
898d84cefe cmd: Add an option to disable abbreviations
Add an option to completely disable the matching of abbreviations
when parsing command line options.

Change-Id: Ic3babf584c21f389503c9c69670d400d54a6f4a6
Reviewed-on: http://gerrit.openafs.org/4540
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 21:52:10 -07:00
Simon Wilkinson
616a835ad2 cmd: Add function to disable positional commands
Add a new cmd_DisablePositionalCommands function which can be used
to completely disable positional commands, for functions which have
no desire to make use of them.

Change-Id: I5646e9976e544f06902ea6f85043a6330b1ac2fe
Reviewed-on: http://gerrit.openafs.org/4539
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 21:51:36 -07:00
Simon Wilkinson
376e24b2ee cmd: Add some tests to the test suite
Add some tests for the command library to the integrated test
suite in tests. These are far from complete, and are mainly there
to ensure that we don't break any of this functionality when modifying
the library.

Change-Id: Ib6fbdca114c005c32c5ba8c41f9e350ca67e1fb8
Reviewed-on: http://gerrit.openafs.org/4538
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 21:51:09 -07:00
Simon Wilkinson
0631fb7567 cmd: Make the original test suite build
Make the original, command line driven, test suite build again

Change-Id: I57f0ebb5b1d13acf0809c7fa005e3556e3edb798
Reviewed-on: http://gerrit.openafs.org/4537
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 21:50:35 -07:00
Andrew Deason
5cd4282758 pam: Fix password torching const-ness
In some code branches, the PAM code "torches" a password by zeroing
it. However, it does this through a const pointer which we otherwise
know is not actually const. Make sure we get better type checking by
doing this through a non-const pointer.

Change-Id: Ibdb4c7b98baf964a8efdf0e8a9882f8ab29e22af
Reviewed-on: http://gerrit.openafs.org/4554
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 21:49:59 -07:00
Andrew Deason
94a9b2afd8 pam: Password is const in setcred
afs_setcred.c gets the "password" pointer from pam_get_data, which
always gives a const pointer (unlike pam_get_item used in afs_auth.c
&c, which sometimes gives a const or not-const pointer, depending on
the PAM implementation).

So, declare password const, to get better type checking.

Change-Id: Ic34ffa54bf0bcc19c8ed3cddc9ee1384ee2dd8f0
Reviewed-on: http://gerrit.openafs.org/4553
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 21:49:46 -07:00
Jeffrey Altman
8836c7ca6a Windows: afskfw return error if krb5 not loaded
If the Kerberos v5 library cannot be loaded (pkrb5_init_context
equal to NULL) return a reasonable error code instead of
returning success and doing nothing.

Change-Id: I8f77b51089d8c2a147fc9edc575dc92cd254a876
Reviewed-on: http://gerrit.openafs.org/4560
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-04-25 21:46:58 -07:00
Jeffrey Altman
55768cb94c Windows: build afskfw.c without leashw32.dll
remove our dependency on mit kfw leashw32.dll

Change-Id: Ifd66d77d527de27258b041e128165f234fd79ee6
Reviewed-on: http://gerrit.openafs.org/4559
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-04-25 21:46:46 -07:00
Jeffrey Altman
c22155f68c Windows: avoid preprocessor symbols redefinitions
In afskfw.h avoid preprocessor symbol redefinitions when
RD_AP_TIME or INTK_BADPW are already defined.

Change-Id: Iccc02abf1cfd7a7941494085c1c935e89f415801
Reviewed-on: http://gerrit.openafs.org/4558
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-04-25 21:46:35 -07:00
Jeffrey Altman
de1d75da0d Windows: NPLogonNotify provide password in all cases
When calling KFW_AFS_get_cred() from NPLogonNotify()
always provide the user password.  Do not count on a
credential cache existing from a previous call.

Change-Id: Ie94229a5b708ced2c3965f7bb333a67ee4d629d5
Reviewed-on: http://gerrit.openafs.org/4557
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-04-25 21:46:18 -07:00
Jeffrey Altman
df85c8095b windows: improved logging from NPLogonNotify
Improve the detail and formatting of the windows event log
entries.

Change-Id: I088f6d35afb91e146e8e6030f29dec39301b020b
Reviewed-on: http://gerrit.openafs.org/4556
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-04-25 21:46:09 -07:00
Simon Wilkinson
63fd8a3e5b cmd: Cleanup
Some assorted cleanup on cmd.c - don't cast NULL or malloc, and
wrap some comment lines better.

Change-Id: I43a757ec5a9c9b29a99b5a6490cf5e2f44489c90
Reviewed-on: http://gerrit.openafs.org/4536
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 19:12:56 -07:00
Marc Dionne
3ea39166d6 pam: Clear up PAM_CONST related warnings on Linux
Commit 78d1f8d8 expanded the use of PAM_CONST and introduced many
new warnings on Linux where pam expects "const" arguments.

This clears up the warnings by doing the following:
- Cast "user" to char * when kalling ka* functions
- Change the signature of pam_afs_prompt and pam_afs_printf to use
PAM_CONST
- Use a separate non-const password pointer for pam_afs_prompt

Change-Id: I460e1d1ca763f0aea5edcdaa208b9d4b8299ded0
Reviewed-on: http://gerrit.openafs.org/4487
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 19:07:40 -07:00
Simon Wilkinson
3cb97cdaa8 Linux: Restrict # of cbrs we allocate at once
With commit a309e27463, we changed the
number of CBRs that we allocate in a chunk from 300 to 1024. However,
this change takes the amount of memory requried to allocate a chunk
of CBRs above PAGE_SIZE on Linux. This changes the allocator that we
use from kmalloc to vmalloc. Whilst we can, and do, prevent kmalloc
from flushing filesystem pages when we invoke it, we don't have a
similar level of control over vmalloc.

In one reported case, clients deadlock whilst attempting to allocate
this memory, in a call stack that looks something like:

  afs_Daemon -> afs_ShakeLooseVCaches -> osi_TryEvictVCache
      -> afs_FlushVCache -> afs_QueueVCB -> afs_AllocCBR
      -> osi_linux_alloc -> ... -> __vmalloc_node -> ...
      -> try_to_free_pages

This is probably because we end up deadlocking in the writeback
invoked by try_to_free_pages, likely due to locks which are held
by ShakeLooseVCaches.

As a quick fix for the problem, make sure that the memory we
allocate always fits within a page, so we always use kmalloc for
it.

FIXES 129751

Change-Id: I8b5be06ed62764b67f99792df66e9cb0f8941fd6
Reviewed-on: http://gerrit.openafs.org/4510
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 13:39:53 -07:00
Andrew Deason
211e906c86 viced: Release all hosts in h_Enumerate*
h_Enumerate and h_Enumerate_r were not releasing all of the holds they
obtained when the callback function caused the enumeration to bail
early. Correct them so all host holds are released.

Change-Id: I6f405fad3d2767c9e0b3567c40cbbd1de8ac26aa
Reviewed-on: http://gerrit.openafs.org/4530
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 13:39:17 -07:00
Andrew Deason
8b07814e03 viced: Print a warning when using a deleted client
We should never get a deleted client back from GetClient. Log a
message if we do, to explain why access may suddenly appear to fail,
and assist in determining why.

Note that we still try to service the request, since the accessing
user may still have enough access to do whatever was requested.

Change-Id: Ie1d0c2d8a33a68a760704bfff9f268c6c507118f
Reviewed-on: http://gerrit.openafs.org/4529
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 13:38:54 -07:00
Andrew Deason
484b5b4cf4 viced: Force valid host enumeration flags
Make sure that the callback functions for h_Enumerate and
h_Enumerate_r give us back valid flags values by aborting if they
return an invalid value.

Change-Id: Id34b461d5452ac318a1714b6c3ffdaf41015995c
Reviewed-on: http://gerrit.openafs.org/4528
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 13:38:44 -07:00
Andrew Deason
5b9d427141 viced: Fix host enumeration flags
Do not give uninitialized flags values to h_Enumerate callback
functions. In fact, do not give a flags value to h_Enumerate or
h_Enumerate_r callback functions at all, since they are not actually
used.

Fix host enumeration callback functions to just return 0 or the
relevant flags, instead of basing the return value off of the given
flags value. Update MultiBreakVolumeCallBack_r to use the correct
return values, since it currently tries to use the old meanings of the
host enumeration return values.

FIXES 129376

Change-Id: Ibb01ce62411602a9f83f437125fb87a7a84160b4
Reviewed-on: http://gerrit.openafs.org/4527
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 13:38:28 -07:00
Jeffrey Altman
ebf5329e8c Windows: remove trailing whitespace
remove trailing whitespace from

  NTMakefile
  *.h
  *.c
  *.cpp
  *.idl
  *.def
  *.txt
  *.htm

Change-Id: I948a7511a20d0ad522b647b788536f9b6f5dda16
Reviewed-on: http://gerrit.openafs.org/4548
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 08:19:14 -07:00
Simon Wilkinson
d7b1e6a1ad autoconf: Add required headers to net/if.h test
On Darwin, net/if.h is only usable if sys/socket.h is included first.
Do so, to stop autoconf from warning about this test.

Change-Id: I9e7a2642cce86c5ad6ebb3ae3cb60401dd9c26cf
Reviewed-on: http://gerrit.openafs.org/4535
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 07:29:15 -07:00
Simon Wilkinson
ce256d5864 Windows: Remove duplicate file
The 'Streamfiles.txt' file had been committed with both that name,
and an all lower case name. This makes git very sad on systems with
case insensitive filenames.

Change-Id: I0284415649d7568f9834ccd4d2c6a1627d309fed
Reviewed-on: http://gerrit.openafs.org/4550
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-04-25 06:01:01 -07:00
Jonathan A. Kollasch
da3ee81396 Fix build of user-space on nbsd50 and greater
Change-Id: I7b2fef051da7c5ff820e9ecb1fe77b8d8d9e011a
Reviewed-on: http://gerrit.openafs.org/4509
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-23 20:51:40 -07:00
Jonathan A. Kollasch
9fd238ea05 Add nbsd60 param files and autoconf logic
Change-Id: I7fa40455315325f75d0fb754fc23620f12fd634a
Reviewed-on: http://gerrit.openafs.org/4512
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-21 22:29:41 -07:00
Andrew Deason
bdb08420ba Revert "aklog: Return token when performing 524 conversion"
This reverts commit 65186d8390, which
was mistakenly merged to the wrong branch.

Change-Id: I3b2bf874cca15b4248978575213eae21ece2207f
Reviewed-on: http://gerrit.openafs.org/4519
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-21 21:49:35 -07:00
Andrew Deason
1b37cc8942 libafs: Initialize _settok_tokenCell primary flag
Always set the *primary flag to something in _settok_tokenCell.
Otherwise, the lag may be unset, as it is not required to be
initialized by all callers.

Change-Id: I78c775f8cd70f74f6a344094a6a677cbc74f3281
Reviewed-on: http://gerrit.openafs.org/4521
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-21 21:49:20 -07:00
Jeffrey Altman
ce77b0e572 Windows: change thyper to offset and fix error
In cm_ReadMountPoint and cm_HandleLink the variable 'thyper'
represets the 'offset' at which cm_GetData should fetch data.
Rename 'thyper' to 'offset' and fix a coding error caused by
misinterpreting the variable purpose.

Change-Id: If60669d850f4bfba2aae6e4aaf642f7ec6f920b2
Reviewed-on: http://gerrit.openafs.org/4501
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>
2011-04-21 18:17:48 -07:00
Simon Wilkinson
b178496063 Darwin CM: afs_IsDynrootFid takes a fid ...
... not a vcache.

Change-Id: Iff1f33f32ec0d208ff80a4c7bcc1ce1b3dccd9a3
Reviewed-on: http://gerrit.openafs.org/4511
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-21 13:17:59 -07:00
Andrew Deason
65186d8390 aklog: Return token when performing 524 conversion
We weren't actually returning a token and username from
rxkad_get_converted_token. Do so.

This is a 1.6-specific change. This issue was fixed on master when
aklog was changed to use the new SetTokenEx family of pioctls in
commit 53837416cb.

Change-Id: I4c85c03be00c45fdae5657554dcd85b3a6301b23
Reviewed-on: http://gerrit.openafs.org/4513
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-21 13:09:54 -07:00
Derrick Brashear
7ff99d1eee afsio: fix objdir build
use the relative path for afsio.c
use objdir path for generated files

Change-Id: I3b16108eacd949bcb1ddc2224961e87bce9999bb
Reviewed-on: http://gerrit.openafs.org/4508
Reviewed-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Tested-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-21 07:51:57 -07:00
Marc Dionne
fe8897015c Unused variable warning fixes
Fix several simple cases of unused variables.

Change-Id: I6e61ea625c6bcef7b0bc70c61909f22d1f8dd9a7
Reviewed-on: http://gerrit.openafs.org/4504
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-20 21:26:00 -07:00
Jonathan A. Kollasch
8588f4a9cc Allocate system type ID numbers for i386_nbsd60 and amd64_nbsd60
Change-Id: I1860fbacb0d41a3d13b73b4248b920e17b731184
Reviewed-on: http://gerrit.openafs.org/4506
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-20 21:25:29 -07:00
Jonathan A. Kollasch
507c481a0a Make whitespace consistent in NetBSD system type ID number section
Change-Id: If3835225bb85fd7469cd817dc48bc52f841081b7
Reviewed-on: http://gerrit.openafs.org/4505
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-20 21:25:07 -07:00
Marc Dionne
c721bff503 adminutil: parallel build fixes
Rearrange the Makefile to make it more parallel build proof.
Add some dependencies on the header files, and avoid rules
with 2 targets.

Change-Id: I267f25504137d58dd1a335eccb7c9b138a7c66ab
Reviewed-on: http://gerrit.openafs.org/4497
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-19 19:18:23 -07:00
Simon Wilkinson
a1eed135d2 FreeBSD: Don't ignore Makefile
The file src/packaging/FreeBSD/Makefile is part of the repository,
and so shouldn't be excluded by .gitignore (the exclusion is inherited
from the top level). So, restore it with .gitignore in this directory.

Change-Id: I841e67aba707fd7193ba0d15a11f969ffd55829c
Reviewed-on: http://gerrit.openafs.org/4495
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-04-19 08:26:28 -07:00
Derrick Brashear
f4ae9ef653 libafscp: add lock support
add support for locking as well as for tracking callbacks so a
lock break can be detected

Change-Id: Iff36c6528fc55cf250bc27d49af80123d7ecece3
Reviewed-on: http://gerrit.openafs.org/4476
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-04-19 08:08:38 -07:00
Jeffrey Altman
04950bec1b Windows: avoid race when writing mountPointString
cm_GetData() drops the cm_scache_t rw lock which permits other
threads to access the data while it is in an inconsistent state.
Avoid the race by using a stack allocated temporary buffer to
receive the data from cm_GetData().  Only copy the data into
the mountPointStringp buffer under the rwlock.

Change-Id: Ica853976b1094be1087e49c22d878f8ae7fca03a
Reviewed-on: http://gerrit.openafs.org/4498
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-04-19 07:03:10 -07:00