]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
14 years agoWindows: afslogon network provider debug registry value
Jeffrey Altman [Sun, 28 Aug 2011 16:03:53 +0000 (12:03 -0400)]
Windows: afslogon network provider debug registry value

create a new TransarcAFSDaemon\NetworkProvider "Debug" value
to be used for activating the network provider debugging.
The overlapping use of TransarcAFSDaemon\Parameters "TraceOption"
is just too confusing.

Permit both methods to be used.

Change-Id: I4ba233b38bda547af35aa4b363edc819bcc3792c
Reviewed-on: http://gerrit.openafs.org/5316
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: afslogon NPLogonNotify exit on KTC_NOCM
Jeffrey Altman [Sun, 28 Aug 2011 16:02:14 +0000 (12:02 -0400)]
Windows: afslogon NPLogonNotify exit on KTC_NOCM

If the service has started but is not responding to pioctls,
permit the NPLogonNotify() routine to exit.

Change-Id: I1ed4ac7a7fed5d86d607ecfd5e027f62ec26a82f
Reviewed-on: http://gerrit.openafs.org/5315
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: afslogon.dll is not a file system interface
Jeffrey Altman [Fri, 26 Aug 2011 17:57:15 +0000 (13:57 -0400)]
Windows: afslogon.dll is not a file system interface

Do not return a file system network type that corresponds
to a real file system inter since afslogon is in fact not
associated with a file system interface.  We can't return
WNNC_NET_NONE (0) because that prevents NPLogonNotify()
from being executed.  However, if we return an in use
file system value that can confuse the system when the
actual file system's network provider is also installed.

Change-Id: I845bc633f17f21946ce7de796d66c0bb429005cd
Reviewed-on: http://gerrit.openafs.org/5313
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: torture error reporting
Jeffrey Altman [Fri, 26 Aug 2011 13:36:04 +0000 (09:36 -0400)]
Windows: torture error reporting

When LeaveThread() is called and GetLastError() has already
been called, pass the last error value to LeaveThread().  Otherwise,
the GetLastError() call in LeaveThread() may return an inaccurrate
result.

Change-Id: Ia8ac1fd827ab8fb47aea0b527acd3c7f7070e873
Reviewed-on: http://gerrit.openafs.org/5312
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafs: crash in a more useful way if nchunks is zero
Garrett Wollman [Tue, 9 Aug 2011 03:59:17 +0000 (23:59 -0400)]
libafs: crash in a more useful way if nchunks is zero

In afs_CacheStoreDCaches(), if the parameter nchunks is zero, the
main loop will not execute, leaving the XSTATS pointer unchanged,
which will result in a null dereference in XSTATS_END_TIME.  Instead
assert that nchunks is nonzero, which will help the static analyzer
and will also generate a more useful panic message should this
error ever be encountered in operation.

There is presently only one call site, and it may be the case that this
condition can never be triggered.

(While in the neighborhood, also avoid dereferencing tdc immediately
before testing whether it is null.)

Change-Id: Idf68f1306d3e09771425c62df139c1de11806c22
Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5179
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agolibafs: FillStoreStats doesn't need to be global; avoid pass-by-pointer
Garrett Wollman [Thu, 11 Aug 2011 01:52:44 +0000 (21:52 -0400)]
libafs: FillStoreStats doesn't need to be global; avoid pass-by-pointer

FillStoreStats is only used in afs_fetchstore.c, so make it static.
Parameter xferStartTime is an osi_timeval, which should be small
enough to pass by value, so do so.

Change-Id: Ic47eae8babb3b7cadbbbca2f10e2e070e2457590
Reviewed-on: http://gerrit.openafs.org/5199
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agodoc: missing $DBTOEPUB variable in the Makefile
chas williams - CONTRACTOR [Sat, 13 Aug 2011 14:29:31 +0000 (10:29 -0400)]
doc: missing $DBTOEPUB variable in the Makefile

Change-Id: I623859ae58fea6a602221ca5d111605004b4a27f
Reviewed-on: http://gerrit.openafs.org/5256
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agoihandle: Fix IH_REALLYCLOSE for positional I/O
Andrew Deason [Wed, 24 Aug 2011 17:48:19 +0000 (12:48 -0500)]
ihandle: Fix IH_REALLYCLOSE for positional I/O

Currently, ih_fdclose (which is called by IH_REALLYCLOSE), goes
through every FD_HANDLE_OPEN FdHandle_t and closes it. If it finds
handles that are FD_HANDLE_INUSE, it skips those and sets a flag on
the parent IHandle_t. For non-positional I/O, any future opens cannot
use these _INUSE handles, since _INUSE handles cannot be reused, and
the handle will be actually closed when it is FDH_CLOSE'd.

For positional I/O, the situation is different. Multiple threads can
use the same _INUSE FdHandle_t, and so there is nothing currently
stopping a thread from IH_OPEN'ing an ihandle that has been
IH_REALLYCLOSE'd, and getting back an FdHandle_t that existed before
the IH_REALLYCLOSE was issued. This is important, since IH_REALLYCLOSE
is used on files that are deleted, and future IH_OPENs for the same
inode must not use the cached file descriptor. Getting this wrong can
cause data loss, since it can cause us to read from or write to a file
descriptor referring to a deleted file, when we instead should open a
new copy of that file.

To fix this, we create a new FdHandle_t state called
FD_HANDLE_CLOSING, which is set in IH_REALLYCLOSE if we encounter an
FD_HANDLE_INUSE FdHandle_t. In IH_OPEN, we always skip
FD_HANDLE_CLOSING handles, so we can never get back a cached file
descriptor from before an IH_REALLYCLOSE call.

Change-Id: I3188a18f7833950cf5454b3ffe4a4ce0c69e234f
Reviewed-on: http://gerrit.openafs.org/5308
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoihandle: Actually assert active fdPs are not AVAIL
Andrew Deason [Wed, 24 Aug 2011 17:30:00 +0000 (12:30 -0500)]
ihandle: Actually assert active fdPs are not AVAIL

FdHandle_t's that are on the linked list for an associated IHandle_t
should not be in the state FD_HANDLE_AVAIL. For the non-PIO case, we
assert that this is the case in ih_open (since we assert that if the
FdHandle_t is not in INUSE state, then it must be in OPEN state).
However, for the PIO case, we were just skipping over any FdHandle_t's
that were in the AVAIL state. These should never exist while on that
linked list, so assert for the PIO case, as well.

In the absence of bugs, there is no functional change here, but it
perhaps makes the ih_open loop easier to understand.

Change-Id: I4e3b3319ae14b7e68a87f5fe172419f5ebf9d2c9
Reviewed-on: http://gerrit.openafs.org/5307
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agoLINUX vcache lock ordering in afs_linux_readdir
Matt Benjamin [Wed, 24 Aug 2011 20:23:37 +0000 (16:23 -0400)]
LINUX  vcache lock ordering in afs_linux_readdir

Normalize shared and exclusive lock operations.  Take the lock
exclusive immediately, since the code assumes a write lock if
the vcache state is in flux or the entry is being fetched, releasing
-write- rather than shared, since we do not hold a shared lock.

Change-Id: Icbffdf21c6fc7929483589e87ffe9131834c79b4
Reviewed-on: http://gerrit.openafs.org/5309
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoroken: no strcasecmp
Derrick Brashear [Thu, 25 Aug 2011 02:53:38 +0000 (22:53 -0400)]
roken: no strcasecmp

we don't provide it, don't map it.

Change-Id: Ifcbb1ec66c374ef8cd6eaddf1954dcd688ae3e9b
Reviewed-on: http://gerrit.openafs.org/5311
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: version 1.6.0001 (aka 1.6.0a)
Jeffrey Altman [Wed, 24 Aug 2011 04:11:44 +0000 (00:11 -0400)]
Windows: version 1.6.0001 (aka 1.6.0a)

Change-Id: I819742abf74cfc90b55c99b7b99f554ef8cc2b7b
Reviewed-on: http://gerrit.openafs.org/5306
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agoWindows: change buf_Find*() signature to accept cm_fid_t
Jeffrey Altman [Tue, 23 Aug 2011 20:02:28 +0000 (16:02 -0400)]
Windows: change buf_Find*() signature to accept cm_fid_t

The buf_Find*() functions require a cm_fid_t to match with the
cm_buf_t objects not a cm_scache_t.  Change the signature so
that the cm_scache_t is not required.  It should be possible to
search for a buffer even if the cm_scache_t is not present in
the cache.

Change-Id: I38835ee86405c4f3f798ad6be8626e6da507109f
Reviewed-on: http://gerrit.openafs.org/5304
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: do not drop lock unnecessarily
Jeffrey Altman [Sun, 21 Aug 2011 04:37:34 +0000 (00:37 -0400)]
Windows: do not drop lock unnecessarily

do not drop cm_serverLock for a cm_PutServer call since
it will only reacquire it.  use cm_PutServerNoLock() instead.

Change-Id: I0e22f8d547a8fa0067cfc918f578b8fe11cc781a
Reviewed-on: http://gerrit.openafs.org/5302
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: cm_serverLock read required not write
Jeffrey Altman [Sun, 21 Aug 2011 04:36:44 +0000 (00:36 -0400)]
Windows: cm_serverLock read required not write

Change-Id: I9e804ddd7de824b2f5ce880e52c08bff6b0615e7
Reviewed-on: http://gerrit.openafs.org/5301
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: Be more efficient when processing locks
Jeffrey Altman [Fri, 19 Aug 2011 01:58:50 +0000 (21:58 -0400)]
Windows: Be more efficient when processing locks

Do not drop the cm_scacheLock only to reacquire it a few lines
later.

Do not manually set the tail of the queue when osi_RemoveHT
does it for us.

Change-Id: I61b2e54a4864760d257dfcd2841c2c15f1ee41fe
Reviewed-on: http://gerrit.openafs.org/5300
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: be explicit when mapping sharing violation
Jeffrey Altman [Fri, 19 Aug 2011 01:57:12 +0000 (21:57 -0400)]
Windows: be explicit when mapping sharing violation

Only one lock acquistion failure should be mapping to
CM_ERROR_SHARING_VIOLATION.  That is CM_ERROR_LOCK_NOT_GRANTED.
Make it clear that is what we are doing.

Change-Id: Ic1933a989a4e8c95a1417679e9bc7cbc4e14dd12
Reviewed-on: http://gerrit.openafs.org/5299
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: Track file server lock count
Jeffrey Altman [Fri, 19 Aug 2011 01:53:45 +0000 (21:53 -0400)]
Windows: Track file server lock count

The fsLockCount field is the lock count reported by the
file server as part of the status info.  Lock acquisition
and releasing does not obtain new status info but we can
estimate what the lock count is by tracking it ourselves
for each of our successful RXAFS_SetLock and RXAFS_ReleaseLock
RPCs and failed RXAFS_ExtendLock RPCs.

Change-Id: Ib5dc5853d82a1292e848bf67d4d9932485177d91
Reviewed-on: http://gerrit.openafs.org/5298
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: remove signed/unsigned mismatch cm_aclent.c
Jeffrey Altman [Tue, 23 Aug 2011 01:12:25 +0000 (21:12 -0400)]
Windows: remove signed/unsigned mismatch cm_aclent.c

Change-Id: I6cf41410d84b96d2fbe9fd8f1602a7aaa2c1797d
Reviewed-on: http://gerrit.openafs.org/5297
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: avoid duplicate volume update queries
Jeffrey Altman [Tue, 9 Aug 2011 18:26:33 +0000 (14:26 -0400)]
Windows: avoid duplicate volume update queries

If multiple volume update queries have stacked up in
cm_UpdateVolumeLocation() and the active query failed,
do not re-issued the blocked queries.  Instead, prevent new
queries for 60 seconds and fail those that blocked during
the active query.

Change-Id: Ic3f55ae08da36900fc8c7a89b6487ae53f381eb3
Reviewed-on: http://gerrit.openafs.org/5296
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: avoid cm_serverLock refcount leak
Jeffrey Altman [Mon, 22 Aug 2011 13:00:47 +0000 (09:00 -0400)]
Windows: avoid cm_serverLock refcount leak

Reviewed-on: http://gerrit.openafs.org/5293
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit add66023a05bf9a380eef34bd4fcc80d343fffad)

Change-Id: I021a7c77c5351914c9450bd7b28c2b6142f18567
Reviewed-on: http://gerrit.openafs.org/5295
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agodir: verified pathnames fallout
Marc Dionne [Sun, 21 Aug 2011 16:02:29 +0000 (12:02 -0400)]
dir: verified pathnames fallout

Fix some issues introduced with the verified directory path names
commit in master:
- In GetVerifiedBlob, the output parameter is set to NULL on entry
and dereferenced later on.
- For Linux, the code in afs_linux_readdir was changed to pass a
DirEntry to GetVerifiedBlob.  This is incorrect, the function still
expects a DirBuffer pointer.
- In afs_dir_IsEmpty, the assignment of ep was removed, leaving
the function to dereference this pointer which was never set.

Change-Id: I9045076ebe636cf68c19487c0d58baebf2de7dd1
Reviewed-on: http://gerrit.openafs.org/5292
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agopod: use /OPTIONS when referring to the local OPTIONS section
chas williams - CONTRACTOR [Sat, 13 Aug 2011 15:01:28 +0000 (11:01 -0400)]
pod: use /OPTIONS when referring to the local OPTIONS section

Change-Id: I889e3a89f5cc68b816a822b6a23db30ac6fe2357
Reviewed-on: http://gerrit.openafs.org/5257
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agodoc: generate admin ref from the pod documentation
chas williams - CONTRACTOR [Sat, 13 Aug 2011 14:18:45 +0000 (10:18 -0400)]
doc: generate admin ref from the pod documentation

a bit convoluted but this generates docbook from the pod documentation and
from that pdf, epub and mobi versions.  we are using variablelist.as.block
since that looks prettier on smaller devices/screen.

Change-Id: I5cd51ef10448373960a0aeed15212bbcf6f44039
Change-Id: Ib222dbfa30e3af644b1dbc6738df1d39cc33c92f
Reviewed-on: http://gerrit.openafs.org/5255
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoDon't fail to build documentation if kindlegen doesn't exist
Russ Allbery [Sun, 24 Jul 2011 23:20:05 +0000 (16:20 -0700)]
Don't fail to build documentation if kindlegen doesn't exist

Check for kindlegen in configure and do nothing in the MOBI build
rule if the binary didn't exist.

This is still a bit of a hack since the rule will run with every
invocation of make.  The target needs to be made conditional.  But
at least this way make all in the documentation directory doesn't
fail.

Change-Id: I57f158929b3907678b9848a60edb9765136f7dbb
Reviewed-on: http://gerrit.openafs.org/5090
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: avoid cm_serverLock refcount leak
Jeffrey Altman [Mon, 22 Aug 2011 13:00:47 +0000 (09:00 -0400)]
Windows: avoid cm_serverLock refcount leak

Change-Id: I4e46750de130557b7d4779f83029b69bc28eaf4b
Reviewed-on: http://gerrit.openafs.org/5293
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agolibafs: don't crash if afs_write() is called with zero-length uio
Garrett Wollman [Sat, 13 Aug 2011 22:34:47 +0000 (18:34 -0400)]
libafs: don't crash if afs_write() is called with zero-length uio

If AFS_UIO_RESID(auio) is zero in afs_write(), we could end up
calling afsio_free(NULL).  Guard the free.  (In the alternative,
perhaps we should just osi_Assert(totalLength > 0) instead?)

Change-Id: Ic218f039e2034b679cb4817a543af2e8307f36f8
Found-by: clang static analyzer with the help of AFS_NONNULL
Reviewed-on: http://gerrit.openafs.org/5259
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: torture test updates
Jeffrey Altman [Tue, 16 Aug 2011 14:49:46 +0000 (10:49 -0400)]
Windows: torture test updates

roken'ize

remove dead code

Change-Id: Id556ded4b3340fac1d58b5407f82d394ab1d18b2
Reviewed-on: http://gerrit.openafs.org/5290
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoAdd NEWS entries for the 1.6.0 final release
Russ Allbery [Tue, 16 Aug 2011 03:20:31 +0000 (20:20 -0700)]
Add NEWS entries for the 1.6.0 final release

The date will be slightly off from when it will be officially announced,
but it should be close enough.

Reviewed-on: http://gerrit.openafs.org/5287
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 361cf11db36db2fc94c7e4961061423fb13e4cf8)

Change-Id: I9e12ab8f0a749de3de1e9843705a294f913a5165
Reviewed-on: http://gerrit.openafs.org/5289
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agorpm: Update CellServDB
Simon Wilkinson [Mon, 15 Aug 2011 09:25:27 +0000 (10:25 +0100)]
rpm: Update CellServDB

The commit (a5d66d05fa0308d505de8bde59442e29be9d04f8) 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

Reviewed-on: http://gerrit.openafs.org/5285
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit b88c0482f445e11d82804fba08e42944b7253200)

Change-Id: I910a3e065576216ffb9d55847f5c2d9bfb174c4c
Reviewed-on: http://gerrit.openafs.org/5288
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoAdd NEWS entries for the 1.6.0 final release
Russ Allbery [Tue, 16 Aug 2011 03:20:31 +0000 (20:20 -0700)]
Add NEWS entries for the 1.6.0 final release

The date will be slightly off from when it will be officially announced,
but it should be close enough.

Change-Id: Icb678bd2da148f59546f5e3d5cfda0251e76bdca
Reviewed-on: http://gerrit.openafs.org/5287
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoPrefer dblatex to docbook2pdf
Russ Allbery [Sun, 24 Jul 2011 23:22:35 +0000 (16:22 -0700)]
Prefer dblatex to docbook2pdf

docbook2pdf, at least in version 0.6.14-1.1 in Debian, dies while
attempting to build the Admin Guide with an error about TeX capacity
exceeded.  dblatex seems to work reliably.  If both are installed,
prefer dblatex to docbook2pdf.

Change-Id: I7cf594c677cde84410bfefacf07cbbf398026ff3
Reviewed-on: http://gerrit.openafs.org/5091
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Russ Allbery <rra@stanford.edu>
14 years agomake openafs 1.6.0
Derrick Brashear [Sun, 14 Aug 2011 02:21:02 +0000 (22:21 -0400)]
make openafs 1.6.0

update version strings for 1.6.0

Change-Id: Icbab545cc4f99356135a829cc995c5eaaa83dd61
Reviewed-on: http://gerrit.openafs.org/5265
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agomacos: fix race in afs_root
Derrick Brashear [Mon, 15 Aug 2011 16:17:06 +0000 (12:17 -0400)]
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.

Reviewed-on: http://gerrit.openafs.org/5278
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit ad6e19331e4f3ec6566dc224f1e1c943a69c62bb)

Change-Id: I74d957ac47e10e7a3ddbcd0cadcd6a69deb7df99
Reviewed-on: http://gerrit.openafs.org/5286
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agomacos: fix race in afs_root
Derrick Brashear [Mon, 15 Aug 2011 16:17:06 +0000 (12:17 -0400)]
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>
14 years agoWindows: Save Wix config at start if possible
Jeffrey Altman [Mon, 15 Aug 2011 04:23:57 +0000 (00:23 -0400)]
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.

Reviewed-on: http://gerrit.openafs.org/5281
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 020b415be8fa357cded6eb4c50454aaa5b0722bf)

Change-Id: I49abfa6d6e7b929e3880686f7dc7bad4175adcba
Reviewed-on: http://gerrit.openafs.org/5284
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: add assertions to cm_scache.c
Jeffrey Altman [Mon, 15 Aug 2011 04:37:31 +0000 (00:37 -0400)]
Windows: add assertions to cm_scache.c

Reviewed-on: http://gerrit.openafs.org/5280
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 1a0b99e654831fe28794f8e0cec2ab94f07ec965)

Change-Id: I5bcce8d961157ebb85049871bd15404d7a5ed94e
Reviewed-on: http://gerrit.openafs.org/5283
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: cm_ShutdownSCache corrections
Jeffrey Altman [Mon, 15 Aug 2011 04:34:00 +0000 (00:34 -0400)]
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.

Reviewed-on: http://gerrit.openafs.org/5279
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit c58ae34f72d25434cd59228806ca59a6ff39a903)

Change-Id: I65f3c4be5436031cdd99d912b0277b54d4033bf6
Reviewed-on: http://gerrit.openafs.org/5282
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agorpm: Update CellServDB
Simon Wilkinson [Mon, 15 Aug 2011 09:25:27 +0000 (10:25 +0100)]
rpm: Update CellServDB

The commit (a5d66d05fa0308d505de8bde59442e29be9d04f8) 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>
14 years agoWindows: add assertions to cm_scache.c
Jeffrey Altman [Mon, 15 Aug 2011 04:37:31 +0000 (00:37 -0400)]
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>
14 years agoWindows: cm_ShutdownSCache corrections
Jeffrey Altman [Mon, 15 Aug 2011 04:34:00 +0000 (00:34 -0400)]
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>
14 years agoWindows: Save Wix config at start if possible
Jeffrey Altman [Mon, 15 Aug 2011 04:23:57 +0000 (00:23 -0400)]
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>
14 years agoWindows: More interlocked ops for cm_cell flags
Jeffrey Altman [Mon, 15 Aug 2011 01:41:47 +0000 (21:41 -0400)]
Windows: More interlocked ops for cm_cell flags

Reviewed-on: http://gerrit.openafs.org/5274
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 73b91bf0c0a86e55d6879573aeadd99a137ebf3b)

Change-Id: I0d79599b22c50523f975d51de4fe2a9eb07c1fdb
Reviewed-on: http://gerrit.openafs.org/5276
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: Interlocked ops for cm_user flags
Jeffrey Altman [Mon, 15 Aug 2011 01:41:19 +0000 (21:41 -0400)]
Windows: Interlocked ops for cm_user flags

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>
(cherry picked from commit f75214282795b23c433b2512b00d24b3e6166b76)

Change-Id: I092a0d74919b1d8ecf62fbb57c5b957f16184a05
Reviewed-on: http://gerrit.openafs.org/5275
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: More interlocked ops for cm_cell flags
Jeffrey Altman [Mon, 15 Aug 2011 01:41:47 +0000 (21:41 -0400)]
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>
14 years agoWindows: Interlocked ops for cm_user flags
Jeffrey Altman [Mon, 15 Aug 2011 01:41:19 +0000 (21:41 -0400)]
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>
14 years agoCellServDB update 14 Aug 2011
GCO Public CellServDB [Sun, 14 Aug 2011 22:43:08 +0000 (18:43 -0400)]
CellServDB update 14 Aug 2011

Reviewed-on: http://gerrit.openafs.org/5270
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit a5d66d05fa0308d505de8bde59442e29be9d04f8)

Change-Id: I511bd54512c30dced28d8a0bc79424a5b82d91cb
Reviewed-on: http://gerrit.openafs.org/5271
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoCellServDB update 14 Aug 2011
GCO Public CellServDB [Sun, 14 Aug 2011 22:43:08 +0000 (18:43 -0400)]
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>
14 years agoWindows: cm_FindServerByUuid correct lock acquisition
Jeffrey Altman [Sun, 14 Aug 2011 22:15:24 +0000 (18:15 -0400)]
Windows: cm_FindServerByUuid correct lock acquisition

Obtain cm_serverLock when 'locked' is FALSE instead
of when TRUE.

Reviewed-on: http://gerrit.openafs.org/5268
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit b97383c1e68a0b94baa8d05b2ab2531f96e7b63c)

Change-Id: I1fb188fa493554dce366cbc4b84a32528486829d
Reviewed-on: http://gerrit.openafs.org/5269
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: prevent cm_server races
Jeffrey Altman [Sun, 14 Aug 2011 04:14:10 +0000 (00:14 -0400)]
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.

Reviewed-on: http://gerrit.openafs.org/5266
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit c20010850e2b43a0b9a6d74357ea6111dbf3409e)

Change-Id: If13f23a921f598db097b391348513a3300d3b10c
Reviewed-on: http://gerrit.openafs.org/5267
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
14 years agoWindows: cm_FindServerByUuid correct lock acquisition
Jeffrey Altman [Sun, 14 Aug 2011 22:15:24 +0000 (18:15 -0400)]
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>
14 years agoWindows: prevent cm_server races
Jeffrey Altman [Sun, 14 Aug 2011 04:14:10 +0000 (00:14 -0400)]
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>
14 years agoWindows: Insert Server Reference List changes
Jeffrey Altman [Sat, 13 Aug 2011 18:35:53 +0000 (14:35 -0400)]
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.

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>
(cherry picked from commit 5b40c5f5294964fc09df2c8332ab63cd2d729264)

Change-Id: I94398476267dda82e82306a87aa0bba6aa41da00
Reviewed-on: http://gerrit.openafs.org/5264
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: Fix cm_serverRef ref counts
Jeffrey Altman [Fri, 12 Aug 2011 23:02:48 +0000 (19:02 -0400)]
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.

Reviewed-on: http://gerrit.openafs.org/5248
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 8f446c7463c9183d59a30343682e31ad9f85b307)

Change-Id: I0ed8ea1551527e0d62e57967da6816415a3b36b5
Reviewed-on: http://gerrit.openafs.org/5254
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafs: don't call afs_PutDCache(NULL) in afs_GetDownD()
Garrett Wollman [Sat, 13 Aug 2011 22:51:02 +0000 (18:51 -0400)]
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.

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>
(cherry picked from commit 10d27341808be41b29fbcc09b8bd7523c3b7a541)

Change-Id: I4ff3ab9a57c1c48be0f7533ab3adb1e4b6ababf9
Reviewed-on: http://gerrit.openafs.org/5263
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 years agoWindows: remove unused variables in fs.c
Jeffrey Altman [Fri, 12 Aug 2011 23:01:56 +0000 (19:01 -0400)]
Windows: remove unused variables in fs.c

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>
(cherry picked from commit 578db3bbecf218e3ab80f4896b7cde4d3975daaa)

Change-Id: I8c334239a888d88422ca65d3372228417d60657a
Reviewed-on: http://gerrit.openafs.org/5253
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agodir: Protect against circular hash chains
Simon Wilkinson [Fri, 15 Apr 2011 18:40:45 +0000 (19:40 +0100)]
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.
(cherry picked from commit bb25bdfcb059fc54a57fd4733ce3184e231ca88d)

Change-Id: I7290dbaad66bccfe3b03a843184464f0681f9429
Reviewed-on: http://gerrit.openafs.org/5250
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafs/dir: Verify directory pathnames
Simon Wilkinson [Sat, 16 Jul 2011 22:30:59 +0000 (23:30 +0100)]
libafs/dir: Verify directory pathnames

Provide a new routine, 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.
(cherry picked from commit d1946ffe9be0031a2daf907f5e96cf0ee7f5e15e)

Change-Id: I69b9465f02417babf9b1d5179197278fac64f192
Reviewed-on: http://gerrit.openafs.org/5249
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoaklog: attempt to warn about needed weak crypto switch for Lion
Derrick Brashear [Fri, 12 Aug 2011 20:54:03 +0000 (16:54 -0400)]
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.

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>
(cherry picked from commit 145a8490c761a0ebf7b3a1cc3017bbe8635f8014)

Change-Id: I0efe2ee18e36f0531de8261e5f032df7de3d7333
Reviewed-on: http://gerrit.openafs.org/5252
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agoredhat: update dkms config
Derrick Brashear [Fri, 12 Aug 2011 22:25:24 +0000 (18:25 -0400)]
redhat: update dkms config

make the dkms config properly name the version. remove no-longer-needed
disconnected option for configure

FIXES 130170

Reviewed-on: http://gerrit.openafs.org/5246
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit ef3ef1992115e6b61a7859fa2295726af0fb9318)

Change-Id: If0bfb3fdf4d8499dfe14435739317f335a4c164e
Reviewed-on: http://gerrit.openafs.org/5251
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafs: Get rx conn ref with afs conn ref
Andrew Deason [Thu, 5 May 2011 16:18:08 +0000 (11:18 -0500)]
libafs: Get rx conn ref with afs conn ref

When we get a reference to an afs_conn with afs_Conn and its variants,
we assume we can use the tc->id rx connection without holding any
locks. However, if tc->forceConnectFS gets set, the tc->id connection
can be destroyed and recreated out from under us. So, to avoid using a
possibly freed rx connection, grab a reference to the rx connection at
the same time as we grab a reference to the afs conn. And also put
back the same reference with afs_PutConn.

(cherry picked from commit 03f0c656c1734b9be4debdf19b8f10771ff4420a)
Reviewed-on: http://gerrit.openafs.org/4625
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: If19a267e23941e3305f4f13cd91a0935d214f1b1
Reviewed-on: http://gerrit.openafs.org/5232
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agolibafs: don't call afs_PutDCache(NULL) in afs_GetDownD()
Garrett Wollman [Sat, 13 Aug 2011 22:51:02 +0000 (18:51 -0400)]
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>
14 years agolibafs: don't free a null pointer in an unlikely error condition
Garrett Wollman [Sat, 13 Aug 2011 23:01:26 +0000 (19:01 -0400)]
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>
14 years agolibafs: don't free the NULL we get from a failed allocation
Garrett Wollman [Sat, 13 Aug 2011 23:12:50 +0000 (19:12 -0400)]
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>
14 years agoWindows: Insert Server Reference List changes
Jeffrey Altman [Sat, 13 Aug 2011 18:35:53 +0000 (14:35 -0400)]
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>
14 years agoWindows: Fix cm_serverRef ref counts
Jeffrey Altman [Fri, 12 Aug 2011 23:02:48 +0000 (19:02 -0400)]
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>
14 years agoWindows: remove unused variables in fs.c
Jeffrey Altman [Fri, 12 Aug 2011 23:01:56 +0000 (19:01 -0400)]
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>
14 years agoaklog: attempt to warn about needed weak crypto switch for Lion
Derrick Brashear [Fri, 12 Aug 2011 20:54:03 +0000 (16:54 -0400)]
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>
14 years ago1.6.0 release notes
Derrick Brashear [Fri, 12 Aug 2011 22:12:33 +0000 (18:12 -0400)]
1.6.0 release notes

add release notes for 1.6.0

Change-Id: Ie1f7c025b45d333c5bd7d17981a7d36e2992107e
Reviewed-on: http://gerrit.openafs.org/5245
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoWindows: ChangeLog for 1.6.0 (final)
Jeffrey Altman [Fri, 12 Aug 2011 20:30:26 +0000 (16:30 -0400)]
Windows: ChangeLog for 1.6.0 (final)

Reviewed-on: http://gerrit.openafs.org/5239
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 6f725c441529ccd1616adeda19c7c0b43dcfd9cb)

Change-Id: I40e3c8ccb6b490fe02b22995f1e2341c0e3048ba
Reviewed-on: http://gerrit.openafs.org/5244
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
14 years agoredhat: update dkms config
Derrick Brashear [Fri, 12 Aug 2011 22:25:24 +0000 (18:25 -0400)]
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>
14 years agolibafs: Avoid duplicate afs_Analyze in bulk stat
Andrew Deason [Fri, 22 Jul 2011 21:09:52 +0000 (16:09 -0500)]
libafs: Avoid duplicate afs_Analyze in bulk stat

In afs_DoBulkStat, we can call afs_Analyze multiple times for the same
set of connection objects. Since afs_Analyze puts its reference to the
given afs_conn and rx_connection structures, calling it more than once
can cause the reference counts on those objects to be lower than they
should be.

Instead of making another afs_Analyze call, just alter the error code
inside the normal do/while afs_Analyze loop, so the 'loop' afs_Analyze
call gets the appropriate error code from the first bulk stat'd entry.

(cherry picked from commit ef28bc08c18e750f6100535665d5258a317a0a2b)
Reviewed-on: http://gerrit.openafs.org/5086
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I8bb484aade39830a56cb967a3e3167e63777e333
Reviewed-on: http://gerrit.openafs.org/5127
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
14 years agodir: Protect against circular hash chains
Simon Wilkinson [Sat, 16 Jul 2011 21:59:12 +0000 (22:59 +0100)]
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>
14 years agolibafs/dir: Verify directory pathnames
Simon Wilkinson [Sat, 16 Jul 2011 21:57:55 +0000 (22:57 +0100)]
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>
14 years agoWindows: ChangeLog for 1.6.0 (final)
Jeffrey Altman [Fri, 12 Aug 2011 20:30:26 +0000 (16:30 -0400)]
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>
14 years agodoc: add old release notes
Derrick Brashear [Fri, 12 Aug 2011 21:24:55 +0000 (17:24 -0400)]
doc: add old release notes

pull in old release notes

Change-Id: I2865c1e7a6490bf11e77d63d2acd7f2bdf99b150
Reviewed-on: http://gerrit.openafs.org/5243
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoFBSD: coalesce three assignments to the same variable
Garrett Wollman [Fri, 12 Aug 2011 04:39:54 +0000 (00:39 -0400)]
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>
14 years agoWindows: Interlocked operations for cm_buf
Jeffrey Altman [Wed, 10 Aug 2011 20:40:35 +0000 (16:40 -0400)]
Windows: Interlocked operations for cm_buf

cm_buf flags and qFlags

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

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>
(cherry picked from commit 7ab34058120ebcc218e4061ea3ac3c8eeca6d83e)

Change-Id: I8cbc806833af630fb56c8ef388fe3a21df1f5478
Reviewed-on: http://gerrit.openafs.org/5218
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: implement InterlockedAnd/Or for X86 Debug
Jeffrey Altman [Tue, 9 Aug 2011 21:25:50 +0000 (17:25 -0400)]
Windows: implement InterlockedAnd/Or for X86 Debug

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>
(cherry picked from commit ec1295d11b5e75fa942fe8c3a0f16309c5486ed4)

Change-Id: Icd6b76abec2c9a677b5e344ef36587bfbe696a43
Reviewed-on: http://gerrit.openafs.org/5212
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: Interlocked for cm_buf cmFlags
Jeffrey Altman [Wed, 10 Aug 2011 15:42:59 +0000 (11:42 -0400)]
Windows: Interlocked for cm_buf cmFlags

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>
(cherry picked from commit 4876a416d2e59e87f9da8834db1ea4770f2c618c)

Change-Id: I7416e0be7f0de82eddc366dbdb77e94ceabab797
Reviewed-on: http://gerrit.openafs.org/5217
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: fix tptserver director creation
Jeffrey Altman [Wed, 10 Aug 2011 16:02:20 +0000 (12:02 -0400)]
Windows: fix tptserver director creation

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>
(cherry picked from commit 8661c9b6710322195b00de6ae03b3172712104aa)

Change-Id: Ie762b896e68028053a8746181f2086af57e02d0d
Reviewed-on: http://gerrit.openafs.org/5216
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: Interlocked ops for cm_volume
Jeffrey Altman [Wed, 10 Aug 2011 15:41:21 +0000 (11:41 -0400)]
Windows: Interlocked ops for cm_volume

Use Interlocked operations for protection of cm_volume flags and
qFlags as well as cm_vol_state flags.

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>
(cherry picked from commit cbd075a36000d0b54b64eb7d9736587b27a08e9e)

Change-Id: Ib2b11cbadcbdbc244866d6bf90ab4d55ef589819
Reviewed-on: http://gerrit.openafs.org/5215
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: Interlocked ops for cm_scache
Jeffrey Altman [Wed, 10 Aug 2011 15:40:35 +0000 (11:40 -0400)]
Windows: Interlocked ops for cm_scache

Use Interlocked operations for cm_scache flags and mask field
changes.

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>
(cherry picked from commit 75297d4439bb30ddd9968805aecf2cc2812bfdf0)

Change-Id: Ic10b726eb5791c7c8d3eb7c3ad529522f627f73c
Reviewed-on: http://gerrit.openafs.org/5214
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: Interlocked ops for cm_cell
Jeffrey Altman [Wed, 10 Aug 2011 15:37:51 +0000 (11:37 -0400)]
Windows: Interlocked ops for cm_cell

Use Interlocked operations for cm_cell flag updates.

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>
(cherry picked from commit deb8c893c2bd78b2871ccf1ff733539534a2890e)

Change-Id: I3d0a31e9f809aa91009a8cb1256937ab9646818a
Reviewed-on: http://gerrit.openafs.org/5213
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: make osi_Log macro safe for if..else
Jeffrey Altman [Sun, 7 Aug 2011 18:11:17 +0000 (14:11 -0400)]
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.

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>
(cherry picked from commit 6691ff6daceb7960dc925983a2b9129877e67c9a)

Change-Id: I954ea5a567bbfd77b02d3e8634a64f877668280e
Reviewed-on: http://gerrit.openafs.org/5211
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: adjust scache LRU postion upon deletion
Jeffrey Altman [Thu, 4 Aug 2011 21:25:01 +0000 (17:25 -0400)]
Windows: adjust scache LRU postion upon deletion

If the object represented by a scache object is deleted,
update the LRU position of the scache object to make it
the first object in the LRU queue to be recycled.  This
preserves the cached objects for those that might prove
useful in the future.

Reviewed-on: http://gerrit.openafs.org/5161
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit c5126838590eaf15e0df569c31b2a1bc12b3e0af)

Change-Id: Icf60ad3127c295e4fca0e99e338ba4c62cd9e392
Reviewed-on: http://gerrit.openafs.org/5210
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: LockOrderValidation memory usage optimization
Jeffrey Altman [Thu, 4 Aug 2011 21:15:16 +0000 (17:15 -0400)]
Windows: LockOrderValidation memory usage optimization

Instead of using malloc() and free() to allocation lock reference
structures, cache allocated objects in a free list.  This reduces
memory fragmentation.

Reviewed-on: http://gerrit.openafs.org/5159
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 17e50a4b98de057a699681261ba126a5ac12a0cc)

Change-Id: Ifc8d7b6a92e32557575e24cec7513f890439ce67
Reviewed-on: http://gerrit.openafs.org/5209
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: after dir enum adjust dir scache LRU
Jeffrey Altman [Thu, 4 Aug 2011 21:08:45 +0000 (17:08 -0400)]
Windows: after dir enum adjust dir scache LRU

During a directory enumeration the directory scache object
is reference counted so it can't be recycled.  However, if
there are more directory entries than the maximum number
of cached scache objects the directory scache object will
end up being the next object to be recycled after the refcount
is dropped.  Since the directory is clearly a hot object, before
dropping the reference, adjust the scache LRU position so that
it is the last object to be recycled.

Fix the variable name for the directory scache to be 'dscp'
for consistency.

Reviewed-on: http://gerrit.openafs.org/5158
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 2bce3b50ef4fd9b9bdd03daf6e8332710f541922)

Change-Id: Ie4400d769a7ac2d0bfed3ccebe02760619bb76b2
Reviewed-on: http://gerrit.openafs.org/5208
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoWindows: use %p to print cm_scache_t pointers
Jeffrey Altman [Tue, 2 Aug 2011 22:24:56 +0000 (18:24 -0400)]
Windows: use %p to print cm_scache_t pointers

Reviewed-on: http://gerrit.openafs.org/5152
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 4111ee2374d030e1f3bb1fa3530f2877f2576d07)

Change-Id: If4ff7b219cce5c631666e0843123f6c7d8dbcec6
Reviewed-on: http://gerrit.openafs.org/5207
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
14 years agoRedHat: Return status values from client init
Will Maier [Sun, 31 Jul 2011 13:24:12 +0000 (14:24 +0100)]
RedHat: Return status values from client init

The init script provided with OpenAFS always returns 0 when the status
subcommand is called, even if the service is not running.

For example:

$ sudo service afs status; echo $?
afsd is stopped
0

This change makes sure the init script exits with the value returned
by the status function from /etc/init.d/functions. With this patch,
the afs init script behaves as expected when used, for example, in a
Chef service resource:

$ sudo service afs status; echo $?
afsd is stopped
3

Reviewed-on: http://gerrit.openafs.org/5123
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 6b83ba621b520174dc4679c220888619dc0b44a0)

Change-Id: I4103875caba88d61c3edf480f3a7e0b24227a319
Reviewed-on: http://gerrit.openafs.org/5231
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoSOLARIS: Do not release NULL root vp on unmount
Andrew Deason [Fri, 29 Jul 2011 21:44:11 +0000 (16:44 -0500)]
SOLARIS: Do not release NULL root vp on unmount

When we unmount, and afs_globalVp is NULL (e.g. because root.afs was
unavailable when the client was started), we will panic the machine if
we try to release it. So, if afs_globalVp is NULL when we hit our
unmount handler, don't touch it.

Reported by Andy Cobaugh.

Reviewed-on: http://gerrit.openafs.org/5117
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit b621a2986099488426a026818532a9600db9aeba)

Change-Id: Iaa5db97e9fc87d1eb083d20a9fc6a49cbb5a066b
Reviewed-on: http://gerrit.openafs.org/5230
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovos: spell "vldb" correctly
Derrick Brashear [Mon, 1 Aug 2011 14:58:28 +0000 (10:58 -0400)]
vos: spell "vldb" correctly

i'm not even going to ask.

Reviewed-on: http://gerrit.openafs.org/5125
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit d54c9b05d003bf861fd51e904b631e5425a079d6)

Change-Id: I0188a58363657a0ccf48afef79bf63ff4c4b4f9d
Reviewed-on: http://gerrit.openafs.org/5229
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovolser doesn't depend on tviced, but on vlserver
Simon Wilkinson [Wed, 3 Aug 2011 17:45:01 +0000 (18:45 +0100)]
volser doesn't depend on tviced, but on vlserver

Nothing within the volser/ directory depends on tviced, so remove the
unecessary dependency. Add an explicit dependency on vlserver, so that
libvldb is available to us.

This is required to get rid of some potential circular loops when we
start including volser objects in libafsauthent

Reviewed-on: http://gerrit.openafs.org/5156
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 400c72561e7622716a46a38affd2f5a7842519eb)

Change-Id: I0ff6463cc63093f1c82ed74523256cbdb7fc75c8
Reviewed-on: http://gerrit.openafs.org/5228
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agovos: don't free stack garbage on error
Garrett Wollman [Sun, 7 Aug 2011 03:15:14 +0000 (23:15 -0400)]
vos: don't free stack garbage on error

If wantExtendedInfo is true, then pntr is used uninitialized.
In the other case, UV_ListVolumes will have set it to NULL
before doing anything (even if it returns an error), so this
free() is dead anyway.

Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5164
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 619b420903c99e48618db0d2f12085111573f279)

Change-Id: Icd76d3ac160ccb04b05445552a9e6d04f053efbb
Reviewed-on: http://gerrit.openafs.org/5227
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agobutc: avoid testing stack garbage; remove dead initializer
Garrett Wollman [Sun, 7 Aug 2011 03:49:10 +0000 (23:49 -0400)]
butc: avoid testing stack garbage; remove dead initializer

"code" is unconditionally set early in saveDbToTape() so there's
no need to initialize it.  On the other hand, dumpEntry.id is used
before dumpEntry is initialized, so set it to what appears to be
the expected value before any non-local exits could cause it to be
inspected.

Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5166
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c92f04af6094ce04b1541a1b23b254d3c1421290)

Change-Id: If99aaf327749550623ef5abc3dd077f5291bc899
Reviewed-on: http://gerrit.openafs.org/5226
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agorx: avoid nat ping until connection is attached
Derrick Brashear [Mon, 1 Aug 2011 20:38:46 +0000 (16:38 -0400)]
rx: avoid nat ping until connection is attached

drop nat pings on connections we haven't talked on yet

Reviewed-on: http://gerrit.openafs.org/5130
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 496fb87372555f6acddd4fd88b03c94c85f48511)

Change-Id: Id64a771f9cb50191a665f5ccb98ec66d991f47bb
Reviewed-on: http://gerrit.openafs.org/5225
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agobutc: avoid freeing uninitialized pointer in writeDbDump()
Garrett Wollman [Sun, 7 Aug 2011 03:55:50 +0000 (23:55 -0400)]
butc: avoid freeing uninitialized pointer in writeDbDump()

In error conditions, charList could be freed before it is initialized.
Move the initialization up to before the error checks.

Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5167
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 43834bff1a2b1af348ff69d538a884bf1070b90c)

Change-Id: I05d1602b3f59b521d7daa3fd23f6609bf14c460e
Reviewed-on: http://gerrit.openafs.org/5224
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agoafsd: look in the right place for -splitcache argument
Garrett Wollman [Sun, 7 Aug 2011 04:35:36 +0000 (00:35 -0400)]
afsd: look in the right place for -splitcache argument

The argument to -splitcache is in as->parms[34], not [30].

Found-by: clang static analyzer
Reviewed-on: http://gerrit.openafs.org/5169
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 90ea68979c6740583747d0af500ed4a034eba651)

Change-Id: Iff8072cf8c7b5d9a5d7486fc9778f079fab1426c
Reviewed-on: http://gerrit.openafs.org/5223
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agobos: don't dereference a null pointer when printing an error message
Garrett Wollman [Tue, 9 Aug 2011 03:26:38 +0000 (23:26 -0400)]
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.

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>
(cherry picked from commit bf4b2fd3e26dcf2a0db704815e05d77a558d38c6)

Change-Id: I92db9e5ec10054cef4421ab1b2fd0f60baaf07ca
Reviewed-on: http://gerrit.openafs.org/5222
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
14 years agotbudb depends on tubik ...
Simon Wilkinson [Wed, 3 Aug 2011 18:07:14 +0000 (19:07 +0100)]
tbudb depends on tubik ...

... so say so in the Makefile

(cherry picked from commit 88725587e97d717086801b2522e4625e5fdeb3a8)
Reviewed-on: http://gerrit.openafs.org/5155
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: Ibe759403533cd4b2d538cf1cd905c6268a341f0f
Reviewed-on: http://gerrit.openafs.org/5235
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>