Commit Graph

9455 Commits

Author SHA1 Message Date
Derrick Brashear
ad6e19331e macos: fix race in afs_root
same race on PutVCache in afs_root as we had on other platforms,
for instance FreeBSD. use a local variable instead to avoid the race.
additionally, make sure we end up with the root flagged VROOT.

Change-Id: I45ac36f12565320576070fd1c6d1f99ac6db8a63
Reviewed-on: http://gerrit.openafs.org/5278
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-08-15 12:04:26 -07:00
Simon Wilkinson
b88c0482f4 rpm: Update CellServDB
The commit (a5d66d05fa) which updated
our in-tree copies of the CellServDB for the 14th August release
failed to update the copy that's referenced from the rpm spec file.
Update the filename used here so that rpms also get to have an
up to date CellServDB

Change-Id: I2906b0515a1c91f3ea6eb51ec3dcd161675e8060
Reviewed-on: http://gerrit.openafs.org/5285
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2011-08-15 05:28:44 -07:00
Jeffrey Altman
1a0b99e654 Windows: add assertions to cm_scache.c
Change-Id: If9a47c3b1507b5b4aa9c271204ff496c5b0a88a0
Reviewed-on: http://gerrit.openafs.org/5280
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-14 21:52:36 -07:00
Jeffrey Altman
c58ae34f72 Windows: cm_ShutdownSCache corrections
Obtain cm_scache.dirlock, cm_scache.rw and cm_scacheLock
in the correct order.

Do not release cm_scache.rw when it is not held.

Since the cm_scacheLock is being dropped, preserve the value
of scp->allNextp prior to dropping the lock.

Change-Id: I025a8d76f3f7b94ae00bfd4e000750a90d38b343
Reviewed-on: http://gerrit.openafs.org/5279
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-14 21:52:27 -07:00
Jeffrey Altman
020b415be8 Windows: Save Wix config at start if possible
Save the current configuration at the start of the install
process so the user can be presented with a dialog prior
to installation asking whether the existing or saved
configuration should be used or whether a new configuration
should be created.

Change-Id: I4a42ad597a7e1806bbae6d63bf1a2db365e6be8e
Reviewed-on: http://gerrit.openafs.org/5281
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-14 21:51:49 -07:00
Jeffrey Altman
73b91bf0c0 Windows: More interlocked ops for cm_cell flags
Change-Id: I9e5cae6152439af75a9baf85900117ca9b456f40
Reviewed-on: http://gerrit.openafs.org/5274
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-14 19:39:31 -07:00
Jeffrey Altman
f752142827 Windows: Interlocked ops for cm_user flags
Change-Id: I64932b0d15b439614b6bbba0ba875eacb1260832
Reviewed-on: http://gerrit.openafs.org/5273
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-14 19:39:07 -07:00
GCO Public CellServDB
a5d66d05fa CellServDB update 14 Aug 2011
Change-Id: I2b18a59001c4a5fe041e977ee0321cfafb22fa91
Reviewed-on: http://gerrit.openafs.org/5270
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-14 15:51:38 -07:00
Jeffrey Altman
b97383c1e6 Windows: cm_FindServerByUuid correct lock acquisition
Obtain cm_serverLock when 'locked' is FALSE instead
of when TRUE.

Change-Id: I427fa849ff34734a2dd11d06f42bc709bb70a74e
Reviewed-on: http://gerrit.openafs.org/5268
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-14 15:26:07 -07:00
Jeffrey Altman
c20010850e Windows: prevent cm_server races
Use interlocked operations to modified the flags field.

Close a race in cm_NewServer() which can result in multiple
cm_server objecs being created for the same addr/port/type
tuple.

Change-Id: Ia26e21e1f007875ce316d2ae45a1fbf6fed835f9
Reviewed-on: http://gerrit.openafs.org/5266
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-08-14 11:34:07 -07:00
Garrett Wollman
10d2734180 libafs: don't call afs_PutDCache(NULL) in afs_GetDownD()
It's possible for an eviction candidate to be omitted by the small
for loop (around line 670), leaving its reference in victimDCs
set to NULL.  In the big for loop that follows, don't call
afs_PutDCache() when we hit one.

Change-Id: Ib0891636a3479bf97cdeab823189e659cb261aa6
Found-by: clang static analyzer with help from AFS_NONNULL
Reviewed-on: http://gerrit.openafs.org/5260
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-08-13 19:08:43 -07:00
Garrett Wollman
5c0e92a159 libafs: don't free a null pointer in an unlikely error condition
It is extremely unlikely that we will ever fail to allocate two
bytes in SRXAFSCB_GetCellServDB() to hold the empty-string return
value for the case where the specified cell can't be found.  But
that would result in freeing a null pointer, so check for it.

Change-Id: I47a296148e231b0ef20ecd18b8458b912f22a58c
Found-by: clang static analyzer with the help of AFS_NONNULL
Reviewed-on: http://gerrit.openafs.org/5261
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-08-13 19:07:45 -07:00
Garrett Wollman
ee56107d4d libafs: don't free the NULL we get from a failed allocation
In extractPioctlToken(), if we fail to allocate space for
token_opaque_val, don't immediately pass the null pointer
to osi_Free on the error exit path.

Change-Id: Ic95e178cfbc1b1bbcb18701c0bbd5221426342ee
Found-by: clang static analyzer with help from AFS_NONNULL
Reviewed-on: http://gerrit.openafs.org/5262
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-08-13 19:07:21 -07:00
Jeffrey Altman
5b40c5f529 Windows: Insert Server Reference List changes
When inserting a new cm_serverRef_t object into a server list
perform the following operations:

1. take advantage of the fact that the cm_serverLock is held
   exclusively to purge the list of any deleted entries that
   could not be removed previously.

2. check to ensure that the item that is being added does not
   already exist in the list.  If it does, discard it.

Change-Id: Ibabfc3b2e1b716f2a0cc664a4667bc9219fde09c
Reviewed-on: http://gerrit.openafs.org/5258
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-08-13 19:06:52 -07:00
Jeffrey Altman
8f446c7463 Windows: Fix cm_serverRef ref counts
Use Interlocked operations consistently

Simplify cm_ServerInsertList().  It no longer increments the
refCount on the serverRef object.  Instead it leaves the refCount
as is.  Its the caller's responsibility to add a reference if
required.

Add reference counts and hold locks in places where the
volume server list was used unprotected.

Change-Id: Ie65cdca4461e84c675e8a29e22cef3e15679fda7
Reviewed-on: http://gerrit.openafs.org/5248
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-08-13 06:09:26 -07:00
Jeffrey Altman
578db3bbec Windows: remove unused variables in fs.c
Change-Id: Ie0f21b84266d77d0c92244d5c8a6958d9bfe7e71
Reviewed-on: http://gerrit.openafs.org/5247
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2011-08-13 06:08:33 -07:00
Derrick Brashear
145a8490c7 aklog: attempt to warn about needed weak crypto switch for Lion
Lion's Kerberos is rather unfortunate. deal with the multitude of
missing functionalities by hardcoding this case here.

Change-Id: I95f9136cecb476f70fe694847a518eabd2d1ef44
Reviewed-on: http://gerrit.openafs.org/5240
Tested-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-08-13 06:01:40 -07:00
Derrick Brashear
ef3ef19921 redhat: update dkms config
make the dkms config properly name the version. remove no-longer-needed
disconnected option for configure

FIXES 130170

Change-Id: Id71d46381c8fbade3ea72c581911447fe6ade395
Reviewed-on: http://gerrit.openafs.org/5246
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2011-08-13 05:58:48 -07:00
Simon Wilkinson
bb25bdfcb0 dir: Protect against circular hash chains
The dir package didn't protect against circular hash chains when
performing directory lookups. A corrupt directory could therefore
cause a client or a fileserver to go into an endless loop if that
directory contained a loop in its hash chain pointers.

Fix this by exiting the lookup if the hash chain has more elements
than the total number of entries in a directory. This maximum number
of entries is taken as being (number of entries per page) * (max
number of pages), which is considerably more than the real maximum
value.

Change-Id: I9e281571f3b01bd8de346ee5418df38b2f5edaa1
Reviewed-on: http://gerrit.openafs.org/5242
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-08-13 05:56:31 -07:00
Simon Wilkinson
d1946ffe9b libafs/dir: Verify directory pathnames
Provide a new routine, afs_dir_GetVerifiedBlob() which will ensure
that the pathname contained within a directory blob is correctly
terminated before returning it to the caller. For the purposes of this
function, correct termination is defined as having a terminating
\0 character within the same directory page as the blob itself.

Change-Id: I4b3bbb95cb49645a8ac52e6061f9e24f89924831
Reviewed-on: http://gerrit.openafs.org/5241
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-08-13 05:56:20 -07:00
Jeffrey Altman
6f725c4415 Windows: ChangeLog for 1.6.0 (final)
Change-Id: Idd457c7ea4617f9d698d07359f750df25bab4c7c
Reviewed-on: http://gerrit.openafs.org/5239
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-08-12 15:05:18 -07:00
Garrett Wollman
e3148c6bfa FBSD: coalesce three assignments to the same variable
Change-Id: Iadc9652c03a2d3453addab759c9f8f0048929e2b
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-12 12:36:28 -07:00
Michael Meffie
cbdca2996a volser: log host address of caller in extra logging
When the volserver is running with extra logging (-log),
log the address of the host running vos in addition
to the user name.

Change-Id: I040be71a84dede255e43c30dd7d8ae56f767f721
Reviewed-on: http://gerrit.openafs.org/5234
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-12 08:27:15 -07:00
Derrick Brashear
a3b4cd3c73 viced: avoid aborting on host table exhaustion
if we exhaust the host table, instead of aborting, return VBUSY at
the client, to defer until hopefully hosts are freed.

Change-Id: Ie8b026992bdde1b46117e6f592f9cf0ea4c85a7e
Reviewed-on: http://gerrit.openafs.org/5181
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-08-11 20:18:24 -07:00
Garrett Wollman
8a25d1a1de rx: make queue macros easier to follow
Nothing depends on the queue-manipulation macros having the expression
nature, so make them proper statements and unpack the comma-expressions
to make it easier to read and understand how they work.  This should
not change the object code.

Change-Id: Icf14537f902768429aa27f67f8acfe39ac996214
Reviewed-on: http://gerrit.openafs.org/5200
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-11 18:42:18 -07:00
Derrick Brashear
d18ff03b59 macos: axe static vfs_fsentry
for whatever reason, lion 32 bit doesn't like it when this is static.
fine, so it's not static now.

Change-Id: Ia9fe6d96615c7fa816f4a88b794faa6ee7e1d010
Reviewed-on: http://gerrit.openafs.org/5206
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-08-11 11:50:04 -07:00
Jeffrey Altman
7ab3405812 Windows: Interlocked operations for cm_buf
cm_buf flags and qFlags

Separate flags and qFlags in the cm_buf structure to improve
performance.

Change-Id: I3d9504827cb74f8770e344cea1c06a6e786785b3
Reviewed-on: http://gerrit.openafs.org/5197
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-08-10 23:16:47 -07:00
Jeffrey Altman
4876a416d2 Windows: Interlocked for cm_buf cmFlags
Change-Id: I7ed2847afdcbc94c9023c6686d3c81f7863d7f61
Reviewed-on: http://gerrit.openafs.org/5196
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-08-10 23:15:54 -07:00
Jeffrey Altman
8661c9b671 Windows: fix tptserver director creation
Change-Id: Ifc2433068e1811633f4ac80d3b4a2a9d16226f16
Reviewed-on: http://gerrit.openafs.org/5195
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-08-10 23:15:13 -07:00
Jeffrey Altman
cbd075a360 Windows: Interlocked ops for cm_volume
Use Interlocked operations for protection of cm_volume flags and
qFlags as well as cm_vol_state flags.

Change-Id: I1a062a5c49d793162b83b9f4f3c32185ae596369
Reviewed-on: http://gerrit.openafs.org/5194
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-08-10 23:14:51 -07:00
Jeffrey Altman
75297d4439 Windows: Interlocked ops for cm_scache
Use Interlocked operations for cm_scache flags and mask field
changes.

Change-Id: Ice87dc5de395b54e7e30e362d2e72caa9062120e
Reviewed-on: http://gerrit.openafs.org/5193
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-08-10 23:14:12 -07:00
Jeffrey Altman
deb8c893c2 Windows: Interlocked ops for cm_cell
Use Interlocked operations for cm_cell flag updates.

Change-Id: I45c0a39ea935db2c231a30ecb02963f35b6d734c
Reviewed-on: http://gerrit.openafs.org/5192
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-08-10 23:13:32 -07:00
Jeffrey Altman
ec1295d11b Windows: implement InterlockedAnd/Or for X86 Debug
Change-Id: I56b3f9534daf0cd152eeea293b1a357d062b9166
Reviewed-on: http://gerrit.openafs.org/5191
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-08-10 23:12:38 -07:00
Jeffrey Altman
3993b215af Windows: correct prototype for ChangeList fs_acl.h
Change-Id: I63e3b37bd4348da0789dfa78599e513753f34a62
Reviewed-on: http://gerrit.openafs.org/5190
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-08-10 23:12:15 -07:00
Jeffrey Altman
6691ff6dac Windows: make osi_Log macro safe for if..else
wrap the osi_Log macro's internal if statement with
a do {...} while(0) block in order to ensure that
it is safe for use in if..else controls without bracing.

Change-Id: Ica7bb95dfb1c0285a925771a9b659f85ec0e075f
Reviewed-on: http://gerrit.openafs.org/5189
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-08-10 23:11:51 -07:00
Garrett Wollman
833010acac stds.h: __nonnull__ has four underscores
Compile-testing AFS_NONNULL doesn't prove anything until something
actually uses it.  Fix 342be35354
to use the spelling that the compilers actually support.

Change-Id: I4a6b965d459a90a1832f2e813e886c15d3477962
Reviewed-on: http://gerrit.openafs.org/5198
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-08-10 20:49:23 -07:00
Derrick Brashear
e8607d8d25 macos: reset next vcache pointer after reacquiring xvcache
dropping the xvcache lock means that things can change out from under
us. in case they do, reset the next vcache pointer before looping

Change-Id: I71be39a2f2986804257c50b1d5b7d557b58a3573
Reviewed-on: http://gerrit.openafs.org/5184
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-08-10 10:49:01 -07:00
Garrett Wollman
7d0cd1393f FBSD: catch up with the disappearance of VOP_GETVOBJECT
The vnode operation VOP_GETVOBJECT disappeared in FreeBSD 6.0, an
embarrassingly long time ago.  Six years ago, a kluge was added
to emulate its behavior, but it did not correctly emulate the
return value of the old VOP implementation.  As a result,
osi_VM_StoreAllSegments() could never actually do anything.  Since we
don't support FreeBSD before 8.0, remove all references to VOP_GETVOBJECT
and examine vp->v_object directly instead.

This has the result that osi_VM_StoreAllSegments() will actually do
something now, which may not be desirable.  (Previously, if somehow
the vnode had no associated VM object, it would crash, and otherwise
it would do nothing at all.)

Change-Id: Ifdad92ae8e393e85c3f97907af7119ce342b25dd
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5183
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-10 10:48:39 -07:00
Garrett Wollman
342be35354 stds.h: introduce AFS_NONNULL
AFS_NONNULL wraps the GCC/Clang function attribute __nonnull__, which
tells the compiler and the static analyzer that the pointer arguments
to a function (or specific ones, if provided) cannot be null.  Note
that GCC has only limited support for warning about violations of these
constraints.

Usage examples:
int myfunc(struct foo *a, bar_t, struct baz *c) AFS_NONNULL((1));

tells the compiler that the first argument cannot be null (but the
third one can).

int myfunc2(struct foo *a, bar_t, struct baz *c) AFS_NONNULL();

tells the compiler that both pointer arguments cannot be null.

Change-Id: Id81f0c382a6a3bdd9bf9c716eb4091b433129d69
Suggested-by: Simon Wilkinson, comment on change Ic8751737 (#5180)
Reviewed-on: http://gerrit.openafs.org/5182
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-10 10:48:17 -07:00
Andrew Deason
2cd9d0536b volinfo: Include nfs.h
nfs.h is required for various types used in vol-info.c. Include it. On
namei this header gets pulled in indirectly via other means, but on
inode it does not (and we shouldn't be relying on such anyway).

Change-Id: If917f8c3b0382572d2146450116399498257ffc7
Reviewed-on: http://gerrit.openafs.org/5185
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-10 10:48:01 -07:00
Simon Wilkinson
a868209c4a aklog: Add -config option
Add the -config option to aklog so that a different configuration
directory location can be specified on the command line for testing
purposes.

Change-Id: Ic5f8d778304a43c823e53bf1855a3e6bf426f80c
Reviewed-on: http://gerrit.openafs.org/5170
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-09 20:55:21 -07:00
Simon Wilkinson
8b60082c1f pts: Add the -config option
Add the -config option to all pts commands, so that the user can set
the location of the configuration directory to use. This is primarily
provided for testing purposes, to make it simpler to build fake AFS
cells with configuration in non-standard locations.

Change-Id: I90c9c95cbf99b3853bfbe93dab1ab71c3ae7e228
Reviewed-on: http://gerrit.openafs.org/5103
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-09 20:54:51 -07:00
Marc Dionne
784a410d0f venus depends on libafsauthent
Add an explicit dependency on libafsauthent for src/venus, since it
is needed to build afsio.  This can cause parallel builds to fail.

Change-Id: Ifda59983cda0711e9e1568d5a6be25e6ea934eee
Reviewed-on: http://gerrit.openafs.org/5171
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-08-09 20:54:36 -07:00
Marc Dionne
d28188382b pam: fix unused but set warnings
Fix a few cases of set but unused variables.

Change-Id: I0a3e0906dbc708e2449121f3de1726d7055efc27
Reviewed-on: http://gerrit.openafs.org/5173
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-08-09 20:54:05 -07:00
Marc Dionne
4b4a52b314 volser: flag unused variable
nearInode can be unused, flag it as such to prevent warnings and
keep enable_checking happy.

Change-Id: Ic79d101380b79c3c3d90c4c4f949abe7c3f476ff
Reviewed-on: http://gerrit.openafs.org/5172
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-08-09 20:53:58 -07:00
Garrett Wollman
bf4b2fd3e2 bos: don't dereference a null pointer when printing an error message
The parameter we are interested in is at MRAFS_OFFSET + 17, not
MRAFS_OFFSET + 13.

Change-Id: Ib856ff40c5949cde95a2b277cd44253b87c3c2a4
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5178
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-09 20:53:43 -07:00
Garrett Wollman
7fe4125fe3 dir/vol: Die() really does
Die() is an abort routine shared by the dir and vol modules.  Move its
prototype into dir.h to ensure that its declaration matches its three
different definitions, and add an AFS_NORETURN annotation so that the
static analyzer knows that it aborts.

Change-Id: If01f35fe796708f6187b9767497a32458888ec1c
Reviewed-on: http://gerrit.openafs.org/5177
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-09 20:52:56 -07:00
Garrett Wollman
9b0f53b2bf vos: eliminate unnecessary global variables
tserver is used by three different functions but not shared by them;
make it private to each one to improve static analysis.  tconn is
not used by anything, so just delete it.

Change-Id: Ic9fc4add66dbbb02170846154e44d261dcc6b061
Reviewed-on: http://gerrit.openafs.org/5176
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-09 09:07:40 -07:00
Garrett Wollman
292b375e39 volser: let it be known that Abort() really aborts
The compiler and static checkers can do a better job if they know that
certain functions never return.  Tell it that common.c:Abort() is such
a function.  While we're at it, let volser_internal.h provide the
declarations for this function (Log() was already there).  This makes
volser parallel to the way the same functions are declared in vol.

Change-Id: I8b684bf96866edfc9edaae126d789d245a8d2356
Reviewed-on: http://gerrit.openafs.org/5175
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-09 09:07:08 -07:00
Garrett Wollman
ae6a392948 kdb: don't dereference a null pointer on corrupt database
When iterating through the database, kdb would dereference a
null pointer if it encountered an error retrieving the value
or if the value was not the right length, in code that was clearly
cut-and-pasted from the other branch of an "if" statement where a
specific entry was requested on the command line.  Print the name
of the entry with the problem as was apparently intended.

Change-Id: Idc2d3c9b6049e5d3b0eb302353a68bcfdad6a90d
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5174
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-08-09 09:06:49 -07:00