openafs.git
9 years agotests: volser doesn't need rxgk yet
Simon Wilkinson [Sun, 23 Oct 2011 16:41:27 +0000]
tests: volser doesn't need rxgk yet

An rxgk dependency has crept in to the volser tests. Remove it for
now.

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

9 years agotests: Add opr library for ktime test
Simon Wilkinson [Sun, 23 Oct 2011 16:40:20 +0000]
tests: Add opr library for ktime test

The ktime tests need libopr for the lcstring routines. Add the
dependency.

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

9 years agorpm: Add new libraries
Simon Wilkinson [Sun, 23 Oct 2011 23:09:32 +0000]
rpm: Add new libraries

Add the new libopr.a and libubik_pthread.a libraries

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

9 years agorpm: Turn on debugging
Simon Wilkinson [Sun, 23 Oct 2011 23:07:33 +0000]
rpm: Turn on debugging

Now that we build with a blank CFLAGS line, we need to make sure and
actually turn on debugging in the build system, so that our debuginfo
files are vaguely useful

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

9 years agoroken: Add *progname() to shared library exports
Simon Wilkinson [Sun, 23 Oct 2011 21:49:08 +0000]
roken: Add *progname() to shared library exports

Add rk_getprogname and rk_setprogname to the set of shared
library exports in libroken

Change-Id: I1fd26c59b26a256b2070bfdc14dfaa5f82fb8002
Reviewed-on: http://gerrit.openafs.org/5661
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agorx: Define afs_kmutex_t for LWP too
Simon Wilkinson [Sun, 23 Oct 2011 20:23:34 +0000]
rx: Define afs_kmutex_t for LWP too

afs_kmutex_t is used for lock definitions in the kernel, and in
pthreaded builds. LWP doesn't have any equivalent, and all structure
members using this type have to be protected with RX_ENABLE_LOCKS, which
starts to become untidy.

Just make afs_kmutex_t an int for LWP, so that we can simplify our
headers, at the expense of some additional storage on LWP builds (which
are going away at some point, anyway)

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

9 years agodir: Don't leak a buffer on a failed Enumerate
Simon Wilkinson [Sun, 23 Oct 2011 15:38:13 +0000]
dir: Don't leak a buffer on a failed Enumerate

If, for some reasons, Enumerate encounters a hash object with a NULL
buffer pointer, that's no reason to leak the hash object. Make sure
that we DRelease it before failing

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

9 years agorx: ackall handling
Simon Wilkinson [Wed, 12 Oct 2011 13:50:18 +0000]
rx: ackall handling

If we ACKALL a stream, then we're sending a hard ACK for all of the
packets in the stream. We shouldn't send that hard ACK, and then a
load of soft ACKs for packets that don't actually exist.

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

9 years agoLINUX: Fix afs_linux_pag_to_groups signature
Andrew Deason [Fri, 21 Oct 2011 20:05:06 +0000]
LINUX: Fix afs_linux_pag_to_groups signature

"new" is a struct group_info**, not a struct group_info*

Change-Id: I606afce74be6820b99b151b6077cf23d06e8e2d6
Reviewed-on: http://gerrit.openafs.org/5648
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agoLINUX: Revert group changes on keyring failure
Andrew Deason [Fri, 12 Aug 2011 19:50:26 +0000]
LINUX: Revert group changes on keyring failure

On Linux kernels that support keyrings, when we setpag we try to add
the PAG to the session keyring and to the supplemental group list.
Currently, if we fail to add the PAG to the keyring (which may happen
due to key quotas, or possibly other reasons), we return failure but
the group list is still modified with the new PAG in it.

Therefore, if the keyring-based approach fails, the new PAG may still
be in use, but there are no keyring keys associated with that PAG, so
the PAG may never get destroyed. This can cause a large number of PAGs
to accumulate over time, causing performance problems.

So, change this so that, in the event that keyring installation fails,
we revert the group list back to what it was before we touched it.
Also mark all unixusers with the new PAG as expired, in case one got
created during processing. Thus, the new PAG never gets used.

Change-Id: I61993edf705209e1a5d8dee638a9003690017c35
Reviewed-on: http://gerrit.openafs.org/5238
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

9 years agoviced: Do not swallow errors on StoreData recovery
Andrew Deason [Thu, 20 Oct 2011 21:57:14 +0000]
viced: Do not swallow errors on StoreData recovery

When we encounter any error in the StoreData fetch/store loop, we
reset the disk usage to ensure it remains correct, even in the face of
unexpected errors. However, when we do so, we use the errorCode from
VAdjustDiskUsage as our return value; if it is 0, we return success,
ignoring the error that got us in this code path in the first place.

Instead, keep track of a temporary errorCode for the disk usage
adjustment, and do not override our return value if there was no error
in the disk usage numbers.

Change-Id: Ifbe2377f2750b508d48e535215be3583d1d78e65
Reviewed-on: http://gerrit.openafs.org/5645
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agoopr: Move queue header out of util
Simon Wilkinson [Sat, 22 Oct 2011 08:43:41 +0000]
opr: Move queue header out of util

Move the header which is installed as opr/queues.h out of util/ and
into the new, top level, opr/ directory. Similarly move the tests out
of the util/ test suite, and into the opr/ tests

Change-Id: I81af487f09e1f0f4b25654a1f64c5ac75fd5a95b
Reviewed-on: http://gerrit.openafs.org/5656
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>

9 years agodir: Remove double release in FindBlobs
Simon Wilkinson [Tue, 11 Oct 2011 00:01:26 +0000]
dir: Remove double release in FindBlobs

When DRead() fails, we DRelease the entrybuf, then break. However,
this break takes us to the end of the function, where we promptly
DRelease again, causing a double free

Change-Id: I5a0293990e01376525d8adae25477c64e2cc93ad
Reviewed-on: http://gerrit.openafs.org/5655
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agolinux: makesrpm should cope with releases with letters
Simon Wilkinson [Wed, 12 Oct 2011 13:44:37 +0000]
linux: makesrpm should cope with releases with letters

don't just deal with numbered releases.

Change-Id: Iab97e4a7bebebf97d367243501aaf2a0b4b0476c
Reviewed-on: http://gerrit.openafs.org/5602
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agoafs: don't try GetDownD if nothing to get
Derrick Brashear [Wed, 12 Oct 2011 18:34:55 +0000]
afs: don't try GetDownD if nothing to get

if we "need" negative slots or caches, don't run. also,
don't stay "too full"

Change-Id: I29ef8d5fd9844a878d0c804d06aed5862a2d0df4
Reviewed-on: http://gerrit.openafs.org/5612
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agoukernel: don't define rdwr env on linux
Simon Wilkinson [Wed, 12 Oct 2011 19:26:23 +0000]
ukernel: don't define rdwr env on linux

We're not vm rdwr env in ukernel. Don't claim we are, otherwise we
will never push chunks out to the fileserver when our cache is full

Change-Id: I1c52ef502d42a4a2b63e786471fa487b88712e9d
Reviewed-on: http://gerrit.openafs.org/5613
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agoukernel: set pthread stacksize to an integer multiple of 8k
Derrick Brashear [Wed, 12 Oct 2011 17:09:42 +0000]
ukernel: set pthread stacksize to an integer multiple of 8k

because some pthread stacks require this to be in units of page size,
guess that page sizes will be 4k or 8k, and use the larger as a divisor

Change-Id: I9f89f7e32e2a70e12f1ed7a7fb86cab171b61e07
Reviewed-on: http://gerrit.openafs.org/5606
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agoukernel: add morepackets check in listener
Simon Wilkinson [Wed, 12 Oct 2011 17:04:28 +0000]
ukernel: add morepackets check in listener

Make the listener loop actually check for more packets needed,
like kernel, pthreads and lwp. Only checking for new packets every
20 seconds isn't sufficient on today's networks!

Change-Id: I80319cfd9d540c9a56b0dd8d948a380665426409
Reviewed-on: http://gerrit.openafs.org/5605
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agoafs: on uuid init fail, don't leave garbage behind
Derrick Brashear [Tue, 11 Oct 2011 19:21:12 +0000]
afs: on uuid init fail, don't leave garbage behind

make sure we zero the uuid if we failed

Change-Id: I9d21e003b68eff0ce9bea4634c601c4663a0c078
Reviewed-on: http://gerrit.openafs.org/5599
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agoukernel: set close-on-exec on our socket
Derrick Brashear [Tue, 11 Oct 2011 18:32:04 +0000]
ukernel: set close-on-exec on our socket

if the process we are in execs a child, it doesn't get our socket

Change-Id: Iaf1831866e0dcda0449e75d89c576557c61090dd
Reviewed-on: http://gerrit.openafs.org/5598
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agorx: Don't clear the receive queue when out of packets
Simon Wilkinson [Wed, 12 Oct 2011 13:47:14 +0000]
rx: Don't clear the receive queue when out of packets

We can end up discarding a receive queue that's been soft acked,
effectively taking back soft acks we sent. Whilst the RX
documentation says that a client can drop soft acked packets at
will, our RX implementation assumes that if the final packet in
a call has been soft acked, we won't clear the queue. If a client
clears the queue in this situation, the call will hang.

What *should* happen is that we should take necessary locks,
confirm that we have not soft-acked all of the packets in a flow,
and then discard, or, if we're just going to discard, error the
call.

Change-Id: Ic8e358b8648c1a6f0154009093468531a9e3cf74
Reviewed-on: http://gerrit.openafs.org/5603
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agoauth: Get correct viceid in legacy GetToken
Andrew Deason [Thu, 14 Apr 2011 20:36:50 +0000]
auth: Get correct viceid in legacy GetToken

When ktc_GetTokenEx needs to get tokens via the legacy ktc_GetToken
interface, it was not extracting the viceid. Make it set the viceid so
the caller gets the correct id.

Normally this would require parsing the given client name. To reduce
the amount of times we store and extract the viced from the "AFS ID
%d" string, create a helper GetToken function that can store the
viceid directly, without storing it in a string.

Change-Id: Ib03a419aee6eaed3b253c4d5d575d4dd8d3b8ddc
Reviewed-on: http://gerrit.openafs.org/4482
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

9 years agoauth: Force correct evenness on rxkad tokens
Andrew Deason [Thu, 14 Apr 2011 20:05:37 +0000]
auth: Force correct evenness on rxkad tokens

Rxkad tokens historically have forced odd lifetimes when the given
viceid is actually an AFS ID, and even lifetimes when it is not. Force
this when the new token-handling functions are used (so the viceid is
correctly interpreted by users of the old token format), by creating
rxkad tokens with token_importRxkadViceId.

Slightly reworked by Simon Wilkinson to provide a generic token
destructor function.

Change-Id: I9f6aa518b8ae51a3772b69a0722a28bff6b47128
Reviewed-on: http://gerrit.openafs.org/4481
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

9 years agodocs: Refer to dafs binaries by their real names
Simon Wilkinson [Mon, 10 Oct 2011 22:19:13 +0000]
docs: Refer to dafs binaries by their real names

(Most of) the dafs binaries are called da(something). Update the
example in the dafileserver documentation so that we call the binaries
by the names that they are actually installed with on the system.

Change-Id: I05906758aa2b00ea7bc7f9be10414c8ad1a5a11a
Reviewed-on: http://gerrit.openafs.org/5654
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

9 years agoptserver: Don't check for noauth before rebuilding
Simon Wilkinson [Mon, 10 Oct 2011 21:09:40 +0000]
ptserver: Don't check for noauth before rebuilding

The ptserver database building scripts would check to see if the server
was running from a bosserver with the noauth flag set before performing
a database rebuild.

This means that you can't start ptserver normally, and then configure
the database using pts -localauth, which is the preferred method for
configuring new cells.

Remove the check for noauth. This is slightly risky, as it means that a
corrupt database could be completely erased upon restart. However, we
already check that the dbheader (65k) is entirely blank - which will
protect us against any single page corruption errors.

Change-Id: I45dbb53d7f80b0b307f88941cb1e061967fcac81
Reviewed-on: http://gerrit.openafs.org/5653
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

9 years agoFBSD: typo fix
Ben Kaduk [Sun, 23 Oct 2011 15:22:07 +0000]
FBSD: typo fix

Gerrit/5572 added conditionals on __FreeBSD_version >= 900044, which
is (approximately) when a bunch of kernel API renames happened.
(There has since been a dedicated version bump to 900045 a month
or two post-facto, but 900044 should be fine for now.)
However, 900044 is not 90004.

Change-Id: I566186a7b53fd3b605a0f531e241eaf54a96bba3
Reviewed-on: http://gerrit.openafs.org/5657
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>

9 years agoWindows AFSRDR: Log before decrementing refcount
Rod Widdowson [Wed, 12 Oct 2011 10:04:33 +0000]
Windows AFSRDR: Log before decrementing refcount

The library support package keeps count of the number of times
the library code is active.  When this goes to zero this means
that unload of the library can continue.

Although I cannot see it in the code it seems reasonable to assume
that at that stage the device object might go away so (and if it
doesn't do now it may in the future).  This potentially renders it
unsafe to do anything after InflightLibraryEvent has been signalled.

This patch moves the logging up to above the decrement of the refcount.

Change-Id: I9493d970cec4a025ca9e4c5542e2d838c87f7817
Reviewed-on: http://gerrit.openafs.org/5601
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

9 years agoukernel: don't enforce thread lockers in remove vop
Derrick Brashear [Tue, 11 Oct 2011 18:03:29 +0000]
ukernel: don't enforce thread lockers in remove vop

we enforce locking by pid. when we are ukernel, MyPidXX is stupid.

don't bother.

Change-Id: Iddefd5d63edd6cc35a3c8112cb2cfbf3d47031aa
Reviewed-on: http://gerrit.openafs.org/5597
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agoukernel: install our sysincludes to root.perf
Derrick Brashear [Mon, 10 Oct 2011 21:56:20 +0000]
ukernel: install our sysincludes to root.perf

otherwise, we can't actually include sysincludes from something
linking libuafs

Change-Id: Ia6565dda8390ef6510aa2170e36ff12ddb19fc9b
Reviewed-on: http://gerrit.openafs.org/5593
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agoukernel: add uafs_access
Derrick Brashear [Mon, 10 Oct 2011 20:35:45 +0000]
ukernel: add uafs_access

we don't have an access vop. add one.

Change-Id: I813fb941608b5e49a0f23730414854602630fdee
Reviewed-on: http://gerrit.openafs.org/5589
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agovolinfo: fix bad format string
Derrick Brashear [Mon, 10 Oct 2011 20:57:35 +0000]
volinfo: fix bad format string

we need a format string; currently here we have none, which is no good

Change-Id: Ib097100383dba9d56056b96c5322734abb765f9d
Reviewed-on: http://gerrit.openafs.org/5591
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agovol_split: avoid using stale open directory vnodes
Hartmut Reuter [Wed, 5 Oct 2011 14:06:05 +0000]
vol_split: avoid using stale open directory vnodes

we could in case of multiple splits end up using a stale open
vnode for a directory; attempt to close and thus force-reopen
any fdhandles backing ihandles.

Change-Id: I50ff39873b523b05287c7a183d84e6f16eb7cd90
Reviewed-on: http://gerrit.openafs.org/5553
Reviewed-by: Hartmut Reuter <reuter@rzg.mpg.de>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

9 years agoFBSD: deal with kernel API rename
Ben Kaduk [Sat, 8 Oct 2011 21:16:26 +0000]
FBSD: deal with kernel API rename

Upstream decided to rename the kernel functions that implement
syscalls to have a sys_prefix (including afs3_syscall!).
We use a couple of them, so we need to conditionalize accordingly.
Unfortunately, __FreeBSD_version was not bumped with the change,
so we use something close to it and hope it's close enough.

Change-Id: I228805a813af70b30f94f659e4da602210a6d6df
Reviewed-on: http://gerrit.openafs.org/5572
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agobozo: bosserver man page updates
Michael Meffie [Thu, 6 Oct 2011 10:03:07 +0000]
bozo: bosserver man page updates

Add the new -pidfiles option to the man page. Add a few other missing
options as well.

Change-Id: I2d72ec9948edb4dce4c6b6d974915d4ac7560b0b
Reviewed-on: http://gerrit.openafs.org/5587
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agoWindows: correct use of krb5_init_context in aklog
Jeffrey Altman [Fri, 7 Oct 2011 15:23:57 +0000]
Windows: correct use of krb5_init_context in aklog

A zero return code is success.  Apply ! to obtain proper
conditional test.

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

9 years agoCorrect Heimdal conversion of libadmin/adminutil
Jeffrey Altman [Sat, 8 Oct 2011 08:01:07 +0000]
Correct Heimdal conversion of libadmin/adminutil

Patchset 4251e386aa25bb3fc02fa255e92327fffc8b954d converts to
using Heimdal.  The conversion undid the introduction of the
abstraction function fetch_krb5_error_message() which is
implemented in src/util.  Restore the use of fetch_krb5_error_message()
and modify src/util/krb5_nt.c to use the Kerberos Compat SDK
interface.

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

9 years agobypasscache: free in order
Derrick Brashear [Fri, 7 Oct 2011 12:11:34 +0000]
bypasscache: free in order

we need to free this, but while the pointer is still good

Change-Id: I5afa3505b764c5bf72811f60f63e29c80a29c5af
Reviewed-on: http://gerrit.openafs.org/5562
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agodoc: fileserver synopsis typo
Michael Meffie [Fri, 7 Oct 2011 09:50:37 +0000]
doc: fileserver synopsis typo

Fix a fileserver synopsis typo noticed during Derrick's EACK2011
debugging session.

Change-Id: I73ed6bd93f644689acbdeeb4293a22b3b6752ba6
Reviewed-on: http://gerrit.openafs.org/5558
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agoRedHat: Add xstat_*_test commands to RPMs
Andrew Deason [Fri, 7 Oct 2011 08:04:03 +0000]
RedHat: Add xstat_*_test commands to RPMs

Install the xstat_*_test commands in the 'openafs' RPM.

Change-Id: Idec42e133dd3f27c72f06c5411dd12acc163ef93
Reviewed-on: http://gerrit.openafs.org/5557
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agobypasscache for ukernel
Derrick Brashear [Wed, 21 Sep 2011 19:02:40 +0000]
bypasscache for ukernel

simple (read) bypasscache for ukernel.
does not bother trying any buffercache stuff.

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

9 years agoWindows: Explorer shell GetUnixModeBits()
Jeffrey Altman [Tue, 4 Oct 2011 23:01:50 +0000]
Windows: Explorer shell GetUnixModeBits()

actually append the unix mode string elements to the
respective strings.

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

9 years agoWindows: char* is not a Unicode string
Jeffrey Altman [Tue, 4 Oct 2011 21:29:26 +0000]
Windows: char* is not a Unicode string

Do not treat the output of NetbiosName() as a wide_t when
it is a char*.

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

9 years agotsm41: Add options for uidpag and localuid
Andrew Deason [Tue, 12 Apr 2011 22:47:51 +0000]
tsm41: Add options for uidpag and localuid

Add runtime options to aklog_dynamic_auth. Commit
3a541eb11d1bc7bd05b85635315214218d3b5d6f changed the behavior of
aklog_dynamic_auth to be more friendly to the CDE screenlocker, but
forced the use of UID-based PAGs.

Since some users like to use real PAGs and don't care about the CDE
screenlocker, made this behavior a runtime decision instead.

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

9 years agoaklog_dynamic_auth: Support new SetToken pioctl
Andrew Deason [Thu, 14 Apr 2011 16:29:26 +0000]
aklog_dynamic_auth: Support new SetToken pioctl

Make aklog_dynamic_auth use the new SetTokenEx method of storing
tokens.

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

9 years agoWindows: Explorer Shell Extension enhancements
Jeffrey Altman [Sat, 1 Oct 2011 18:05:31 +0000]
Windows: Explorer Shell Extension enhancements

Redesign the AFS Volume Tab to report:

 . Volume name
 . Volume ID
 . Cell
 . Server
 . Availability
 . Quota
 . Partition Info
 . Replica Server List

Properly handle multiple selections to report the volume info
of the parent object and not the actively selected object.

When a mount point is selected, display the volume information
for the target volume.

Remove file server from AFS tab.

Modify the AFS tab to better handle multiple selections including
mount points.

Extend many gui2fs functions to implement a poor man's "follow"
option.  This really should be done with the pioctl 'literal'
capability but this is an improvement.  The pioctl modifications
will require a major redesign of gui2fs.c and all of the dialogs.

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

9 years agoRemove a few extra trailing backslashes
Andrew Deason [Thu, 29 Sep 2011 17:14:15 +0000]
Remove a few extra trailing backslashes

In a few different places, moving libutil before libafshcrypto_lwp
caused a variable definition to have a trailing \ on the last line of
the definition. This can confuse make (at least, the HP-UX make) to
think the next following definition is also part of the current
definition. Remove the trailing "\"s.

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

9 years agovol: Only check "logging" on vice partitions
Andrew Deason [Wed, 28 Sep 2011 20:02:48 +0000]
vol: Only check "logging" on vice partitions

We don't care about non-vicepX partitions, so move part of the UFS
"logging" check into VCheckPartition. This API should probably redone
so the "am I a vicepX partition" check is done completely separately,
but for now, this will do.

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

9 years agoFSSYNC-Client: Consistent use of partition name
Rod Widdowson [Thu, 29 Sep 2011 14:34:48 +0000]
FSSYNC-Client:  Consistent use of partition name

Over time the FSSYNC code has collected examples where the partition
path is passed rather than the partition name.  In Unix this is the
same (/vicepX), but on windows the path is the DOS device (C:).

This checkin changes FSSYNC client code to always use the partition
name.

This checkin does not address FSSYNC server or SALVSYNC.

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

9 years agoWindows: register Shell Ext handlers
Jeffrey Altman [Fri, 30 Sep 2011 07:43:24 +0000]
Windows: register Shell Ext handlers

Add registry keys and values to enable use of the overlay
handlers for symlinks and mount points.

Add registry keys and values to enable use of the property
sheet handlers.

Correct registry keys for the Folder background context menu
handler.

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

9 years agoDo not call krb5_get_error_message with NULL context
Jeffrey Altman [Tue, 27 Sep 2011 17:49:52 +0000]
Do not call krb5_get_error_message with NULL context

MIT's krb5_get_error_message() ignores the context and can
be called with a NULL context.  Heimdal's version does not.

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

9 years agokauth: permit kauth/test to build on Windows (again)
Jeffrey Altman [Wed, 21 Sep 2011 03:54:08 +0000]
kauth: permit kauth/test to build on Windows (again)

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

9 years agoWindows: add krb5_enctype_enable(DES) calls
Jeffrey Altman [Sat, 24 Sep 2011 15:12:09 +0000]
Windows: add krb5_enctype_enable(DES) calls

Heimdal disables DES by default.  Enable DES-CBC-CRC by
calling krb5_enctype_enable() so that the active profile
does not require

[libdefaults]
allow_weak_enctypes = 1

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

9 years agoWindows: Build against KerbCompatSDK instead of KFW
Asanka C. Herath [Fri, 8 Oct 2010 21:46:02 +0000]
Windows: Build against KerbCompatSDK instead of KFW

Build OpenAFS for Windows against the Secure Endpoints
Kerberos Compatibility SDK instead of the in tree
Kerberos for Windows SDK.

The compatibility layer is available from:

   http://github.com/secure-endpoints/heimdal-krbcompat

The SDK location must be specified with the
KERBEROSCOMPATSDKROOT environment variable.

The benefits of building against the Kerberos Compatibility
SDK are:

 * Heimdal 1.5.1 or later assemblies will be used
   if available

 * MIT KFW 3.2.x will be searched for if Heimdal 1.5.1
   is not installed

Version 1.0 of the SDK is supported.

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

9 years agoDAFS: Do not serialize state for invalid hosts
Andrew Deason [Thu, 29 Sep 2011 19:49:53 +0000]
DAFS: Do not serialize state for invalid hosts

When we serialize host information for DAFS during shutdown, we have
no guarantee that the host is in a valid state when we look at it.
This can result in a host being saved to disk when we are waiting for
the host to respond to an RPC, and so the information about the host
is invalid. For example, we can save a host that has the
HWHO_INPROGRESS flag set, and when it is restored later, this can
cause odd behavior since the flag is set but no thread is actually
waiting for the host to respond.

So instead, during state serialization, try to determine if a host may
be in an invalid state, and simply skip the host if it may.

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

9 years agoDAFS: Skip hosts with invalid flags on restore
Andrew Deason [Thu, 29 Sep 2011 21:04:54 +0000]
DAFS: Skip hosts with invalid flags on restore

Host entries with HWHO_INPROGRESS set or ALTADDR unset do not have
valid state, since those flags indicate that the fileserver was in the
middle of identifying the host when the host struct was serialized.
Skip entries from the on-disk host data that have such invalid flags
set when restoring state, so we do not load invalid data.

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

9 years agoDAFS: Add explicit 'valid' field for index maps
Andrew Deason [Thu, 29 Sep 2011 20:22:35 +0000]
DAFS: Add explicit 'valid' field for index maps

The CB, FE, and host serialization structures were just using the
relevant indices to determine whether or not an entry mapping and old
index to a new index was populated with actual data. For host
structures, this really isn't sufficient, since our index can be 0,
and the structure is calloc'd, so the index in the structure could
also be 0.

Add a flag explicitly stating whether or not the structure has been
filled in, to make this unambiguous.

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

9 years agoviced: Assert valid statistics indices
Andrew Deason [Thu, 29 Sep 2011 23:36:07 +0000]
viced: Assert valid statistics indices

Make sure we are passed valid statistic index numbers, so passing in a
bad index doesn't result in writing over random memory.

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

9 years agoviced: Use xfer indices for xfer data
Andrew Deason [Thu, 29 Sep 2011 23:31:37 +0000]
viced: Use xfer indices for xfer data

Use the xfer indices for the xfer-related data, not the op indices, so
we don't try to fill in data beyond the actual storage for the stats.

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

9 years agorx: add post RPC procedure capability
Marc Dionne [Thu, 29 Sep 2011 01:15:32 +0000]
rx: add post RPC procedure capability

Add the ability to specify a procedure that will be called after
the end of each RPC for a service.  This is similar to the
existing afterProc, except that it gets called after the RPC
has ended (after EndCall).

rx_SetPostProc and rx_GetPostProc are provided to set and retrieve
a postProc for a specified service.

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

9 years agoFix typo in windows release notes
Jeffrey Altman [Thu, 29 Sep 2011 13:35:51 +0000]
Fix typo in windows release notes

Reported by Jeff Blaine.

FIXES 132233

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

9 years agoWindows: Fixup errors in AFS ACL Property Sheet
Jeffrey Altman [Thu, 29 Sep 2011 01:46:48 +0000]
Windows: Fixup errors in AFS ACL Property Sheet

Unlike the afs_set_acl_dlg the PropACL sheet only uses a single
ComboList to maintain both the positive and negative ACEs but
uses two CStringArrays to separately store the positive and
negative ACEs.  Two entries in each array are used to store
an ACE.  The %2==0 entry is the pts name and the %2==1 entry is
the permission list.  This needs to be taken into account when
manipulating the negative entries since the array count for the
normal entries is twice the number of ACEs.

Negative entries were prefixed with '=' instead of '-'.

The Remove button was not hooked up and was not enabled or disabled
under all appropriate conditions.

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

9 years agoWindows: add resource info to afshcrypto.dll
Jeffrey Altman [Wed, 28 Sep 2011 23:59:03 +0000]
Windows: add resource info to afshcrypto.dll

The afshcrypto.rc file was provided but it was never compiled
nor linked to the dll.

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

9 years agoWindows: Add resource info to afsroken.dll
Jeffrey Altman [Wed, 28 Sep 2011 23:58:07 +0000]
Windows: Add resource info to afsroken.dll

The afsroken.rc file was provided but it was never compiled
or linked to the dll.

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

9 years agoviced: remove duplicate declaration
Marc Dionne [Wed, 28 Sep 2011 22:39:55 +0000]
viced: remove duplicate declaration

viced_uclient_key is declared twice, remove one of the
declarations.

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

9 years agoWindows: Remove spurious use of CRTL
Rod Widdowson [Wed, 28 Sep 2011 15:46:00 +0000]
Windows: Remove spurious use of CRTL

Checkins b71a2daa and 5247fa38a moved us from using a FILE*
to using an FDi_t.  However, lurking inside the dump code we
see a use of _filelength() which is a MS-Crtl API.

This checkin replaces this call with one to the WIN32 API
GetFileSizeEx.

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

9 years agoRemove references to afs_assert.h
Andrew Deason [Wed, 28 Sep 2011 20:41:38 +0000]
Remove references to afs_assert.h

The header afs_assert.h no longer exists after commit
cac74242728ad97e3ce9cef0a949d58c237250f6. Remove all remaining
references to afs_assert.h in the tree.

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

9 years agoukernel: output dataversion in stat struct if possible
Derrick Brashear [Wed, 28 Sep 2011 14:23:19 +0000]
ukernel: output dataversion in stat struct if possible

we already have this data; if we can output it, do so.

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

9 years agoukernel: make web enhancements the default
Derrick Brashear [Wed, 28 Sep 2011 14:11:16 +0000]
ukernel: make web enhancements the default

none of the web enhancements break base functionality,
and they are strictly more functionality; just turn them on everywhere

Change-Id: I462d3571d055f1d8ec19bdd0132b935bacd435c0
Reviewed-on: http://gerrit.openafs.org/5509
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

9 years agoWindows: Fix comment about DiskPartition64
Rod Widdowson [Wed, 28 Sep 2011 16:34:54 +0000]
Windows: Fix comment about DiskPartition64

There is significant confusion between the partition name (/vicepX)
and the containing volume (C:) in the windows code.  A review of
the uses in FSYNCH found a downright wrong comment (as checked in
the debugger).

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

9 years agoFBSD: allow exclusion of kernel symbols
Ben Kaduk [Tue, 27 Sep 2011 00:21:49 +0000]
FBSD: allow exclusion of kernel symbols

Gerrit/5503 added support for kernel module symbols in the
bsd.kmod.mk world; however, the inclusion of symbols is conditoinal
on the DEBUG_FLAGS make variable being *set*, as opposed to nonempty.
So we must use an intermediate variable to store the AC_SUBST
result and conditionalize assignment to DEBUG_FLAGS on whether
or not it is empty.

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

9 years agobozo: report bosserver -rxbind address
Michael Meffie [Thu, 22 Sep 2011 13:13:18 +0000]
bozo: report bosserver -rxbind address

Create a file on bosserver startup called bosserver.rxbind in the
server local directory which contains an address local scripts may
use to contact the bosserver.

When bosserver is started with the -rxbind option, write the address
selected from the intersection of the interfaces, NetInfo, and
NetRestrict configuration to the bosserver.rxbind file, otherwise
write the loopback address 127.0.0.1.

Update the RedHat init script to use the new bosserver.rxbind file.

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

9 years agoWindows: do not install afs_assert.h
Jeffrey Altman [Mon, 26 Sep 2011 16:28:49 +0000]
Windows: do not install afs_assert.h

commit cac74242728ad97e3ce9cef0a949d58c237250f6 removed afs_assert.h
from the build tree.  It can no longer be installed.

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

9 years agobozo: fix overrun from -rxbind on restart
Michael Meffie [Mon, 26 Sep 2011 15:59:55 +0000]
bozo: fix overrun from -rxbind on restart

Fix buffer overrun in bosctlsrv introduced
by commit 544ff1b295a57b50afefa6146094434db7608355

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

9 years agovolinfo: refactor vnode handling
Michael Meffie [Mon, 25 Jul 2011 13:21:34 +0000]
volinfo: refactor vnode handling

At program startup, register procedures to be called
when scanning vnodes.

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

9 years agovolinfo: release volume header ihandles when done
Michael Meffie [Sat, 23 Jul 2011 18:55:57 +0000]
volinfo: release volume header ihandles when done

After scanning the volume, release the header ihandles
for the volume.

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

9 years agocorrect omission of AFS_NBSD60_ENV from nbsd60 param file
Jonathan A. Kollasch [Fri, 23 Sep 2011 19:14:47 +0000]
correct omission of AFS_NBSD60_ENV from nbsd60 param file

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

9 years agoClean up assertion
Simon Wilkinson [Sun, 10 Jul 2011 12:46:11 +0000]
Clean up assertion

The AFS code has multiple different assertion implementations in
userspace. This patchset is the start of bringing some sanity to them.

In rx, we have osi_Assert, a user/kernel assertion macro. This is only
available to libraries which have RX dependencies

In util, we redefine the standard 'assert()' macro to provide a
cross-platform assertion solution.

Because util has an RX dependency, neither of these provide an
assertion solution for libraries which should be independent of rx.
So, pull the assertion code out of util, and put it into opr, as a new
opr_Assert() macro. Implement the userspace osi_Assert in terms of this
macro, leaving the kernel variant untouched.

Update callers to the new macro and header file names.

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

9 years agoMove abort() into opr
Simon Wilkinson [Sun, 11 Sep 2011 20:44:23 +0000]
Move abort() into opr

We need our own abort function, because the behaviour of the Windows
abort() implementation isn't sufficiently flexible for us.
Because we're replacing an operating system function, reather than
implementing a missing function, this doesn't belong in roken.

So, provide an alternative opr_abort() implementation in our portable
runtime layer, which is a synonym for abort() on Unix, and implements
the required DebugBreak() functionality on Windows.

Remove lwp_abort() which was just creating another, unnecessary, layer
of abstraction.

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

9 years agobozo: bosserver -pidfiles option
Michael Meffie [Wed, 24 Nov 2010 01:21:50 +0000]
bozo: bosserver -pidfiles option

Add an option to bosserver to create pidfiles for long running
processes for simple, fs, and dafs bnode types, as well as the
bosserver process. The pidfiles are located in the server local
directory by default, or in the path specifed by the -pidfiles
command-line option.

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

9 years agoFBSD: bsd.kmod.mk fallout for debug symbols
Ben Kaduk [Sat, 24 Sep 2011 22:05:09 +0000]
FBSD: bsd.kmod.mk fallout for debug symbols

Now that we no longer control the installation of libafs.ko,
debug symbols are always getting stripped.
If the user requested kernel debug symbols, define DEBUG_FLAGS
for the libafs build and install, so that bsd.kmod.mk will
install the .symbols file alongside the kernel module.

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

9 years agoWindows: update ntbuild.bat
Jeffrey Altman [Sat, 24 Sep 2011 15:42:50 +0000]
Windows: update ntbuild.bat

Add references to:

 . new APPVER and _WIN32_IE values

 . new AFSVER_CL values

 . additional code signing variables

 . variables for symbol store support

 . WiX Installer Toolkit location

 . Cygwin Install Directory

 . ActivePerl Install Directory

 . SignTool path

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

9 years agobozo: remove duplicate prototype
Michael Meffie [Fri, 23 Sep 2011 15:28:05 +0000]
bozo: remove duplicate prototype

Remove duplicate function prototype.

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

9 years agoFix buffer leak in dir/buffers.c
Rod Widdowson [Fri, 23 Sep 2011 15:37:43 +0000]
Fix buffer leak in dir/buffers.c

Checkin 0284e65f97861e888d95576f22a93cd681813c39 accidently
threw in a trailing semicolon after an if statement.
Since the next line was a break this had several unfortunate
side effects, the most obvious being that we leaked a buffer
in certain cases.

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

9 years agoviced: fix incorrect error message
Marc Dionne [Thu, 22 Sep 2011 23:09:52 +0000]
viced: fix incorrect error message

The error message was obviously copied from another location in the
code (after the pr_Initialize call) and is misleading.  Adapt it for
vl_Initialize failure.

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

9 years agobozo: pass -rxbind on restart
Michael Meffie [Thu, 22 Sep 2011 15:28:17 +0000]
bozo: pass -rxbind on restart

Pass the -rxbind on restarts when bosserver is initially started
with the -rxbind option.

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

9 years agodarwin: ukernel is 64-bit able
Derrick Brashear [Thu, 22 Sep 2011 17:00:08 +0000]
darwin: ukernel is 64-bit able

update ukernel settings for darwin

Change-Id: Ifd72d0d5affa1bfbea04da2c95e8011fb055e59f
Reviewed-on: http://gerrit.openafs.org/5489
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

9 years agofs: fix setserverprefs where long is larger than afs_int32
Marc Dionne [Thu, 22 Sep 2011 00:31:33 +0000]
fs: fix setserverprefs where long is larger than afs_int32

Make the fscanf and scanf format specifiers match the type of the
target variable.  This prevents trying to store a long int into an
afs_int32 variable which may be smaller, and overwriting neighbouring
data on the stack.

The effect on a 64-bit Linux system was that the high bits of "rank"
would overwrite the first 4 bytes of the scanned host name, causing
setserverprefs to fail with:
: couldn't resolve name.

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

9 years agoWindows: Disable OACR by default for AFSRDR build
Jeffrey Altman [Wed, 21 Sep 2011 05:46:52 +0000]
Windows: Disable OACR by default for AFSRDR build

When building the AFS redirector with WDK7600 the Microsoft Auto
Code Review process is started by default.  This is a problem for
buildbot.  Disable OACR by default if the _RunOacr environment
variable is not set to TRUE.

Change-Id: I7e8f9f978e5f6b8a33fe0ff6174b9ddbe2a86ec7
Reviewed-on: http://gerrit.openafs.org/5479
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

9 years agoafscp: enable debugging support in the volume portion
Derrick Brashear [Wed, 21 Sep 2011 16:55:39 +0000]
afscp: enable debugging support in the volume portion

readd the missing code when we are compiled for debug

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

9 years agoafscp: allow listing of bare root.cell dirs in dynroot mode
Derrick Brashear [Wed, 21 Sep 2011 06:03:30 +0000]
afscp: allow listing of bare root.cell dirs in dynroot mode

don't assume that /afs/cell.name (as opposed to /afs/cell.name/)
is bogus. if there's text, at least try

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

9 years agoafscp: add confdir override
Derrick Brashear [Wed, 21 Sep 2011 03:26:25 +0000]
afscp: add confdir override

allow an alternate config dir

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

9 years agoFix AFSPreference compile error on Mac OS 10.7
Terry Long [Wed, 21 Sep 2011 01:21:12 +0000]
Fix AFSPreference compile error on Mac OS 10.7

Lion llvm/clang complains about main returning void instead of int.
Fixed main to return int in DARWIN/AFSPreference/afshlp.m.
Resubmitted patch to origin/master.

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

9 years agoWindows: install control panel only if afs_config
Jeffrey Altman [Sun, 18 Sep 2011 17:13:18 +0000]
Windows: install control panel only if afs_config

Add the AFS control panel to the AFS Configuration Tool
component so that it is installed only if afs_config.exe
is going to be installed.

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

9 years agoWindows: Disable Control Panel button in NIM
Jeffrey Altman [Sun, 18 Sep 2011 17:14:39 +0000]
Windows: Disable Control Panel button in NIM

Since afs_config.exe is no longer installed, remove the
OpenAFS control panel button from the Network Identity Manager
provider.

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

9 years agosalvager: fix filesystem path truncation
Michael Meffie [Tue, 20 Sep 2011 20:21:50 +0000]
salvager: fix filesystem path truncation

Fix filesystem path truncation for vice partitions beyond /vicepz.

Commit 3d7388b7 moved the filesystem path to a fixed size buffer,
however the path of the filesystem to be salvaged is truncated for
partitions with two character ids (e.g. /vicepaa), in which case
the salvager will salvager the wrong partition, or abort if the
truncated path is not present.

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

9 years agosolaris: libafs depends on fs/ufs
Michael Meffie [Fri, 16 Sep 2011 15:23:18 +0000]
solaris: libafs depends on fs/ufs

The solaris afs module depends on symbols exported by fs/ufs.
Set this dependency in the afs module so the kernel loader
will automatically load the fs/ufs driver if is not already
loaded, such on zfs only systems.

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

9 years agosolaris: build 64-bit binaries for sunx86_51x by default
Michael Meffie [Wed, 14 Sep 2011 21:22:25 +0000]
solaris: build 64-bit binaries for sunx86_51x by default

Build 64-bit binaries on solaris x86 version 10 or better
build systems running in 64-bit mode.

Builders may set the the ARCHFLAGS environment variable
to "-m32" before running configure to build 32-bit binaries
on a 64-bit build host.

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

9 years agontohs ubik header size
Andrew Deason [Mon, 19 Sep 2011 15:05:59 +0000]
ntohs ubik header size

The 'size' field in the ubik header is only 16-bits wide, so we should
be using ntohs to read it, not ntohl. The database checking utilities
for the prdb and kadb were still using ntohl (vldb was fixed by
591f9b6de9ab3dc5c17ad41af0241527f7f04b31).

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

9 years agodir: remove unnecessary cast from malloc
Jeffrey Altman [Sun, 18 Sep 2011 18:18:24 +0000]
dir: remove unnecessary cast from malloc

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

9 years agoFix input size computation in SetSPrefs pioctl
Jeffrey Altman [Mon, 19 Sep 2011 14:35:11 +0000]
Fix input size computation in SetSPrefs pioctl

Patchset 718f85a8b69a78ac77beb5c8471af20657be2a53 contained
a small typo that prevents the SetSPrefs pioctl processing from
functioning in all cases.  fs setserverprefs continues to work
for non-DB preference lists because fs.c pokeServers() attempts
to try the old SetSPrefs33 pioctl in the non-DB server case.

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