9413 Commits

Author SHA1 Message Date
Simon Wilkinson
f4efc8b467 tests: volser doesn't need rxgk yet
An rxgk dependency has crept in to the volser tests. Remove it for
now.

Change-Id: Ic475977b3e5191f267e932943ec6546632f2977d
Reviewed-on: http://gerrit.openafs.org/5665
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 2aaa540276f5b5a0c368e44d8fd04b32c4632c3f)
Reviewed-on: http://gerrit.openafs.org/5907
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:53:31 -08:00
Simon Wilkinson
d38f316e4e tests: Add opr library for ktime test
The ktime tests need libopr for the lcstring routines. Add the
dependency.

Change-Id: Ib366a17cf770e93b109eab890dc61398831080ad
Reviewed-on: http://gerrit.openafs.org/5664
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from fd5174d918a5d75f64b122c8433a3c431cb8e454)
Reviewed-on: http://gerrit.openafs.org/5906
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:53:20 -08:00
Simon Wilkinson
e4ccc7af0c roken: Add *progname() to shared library exports
Add rk_getprogname and rk_setprogname to the set of shared
library exports in libroken

Change-Id: I178d2a4d428f889c869da75f9dc4e5da46a650e1
Reviewed-on: http://gerrit.openafs.org/5661
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from d88682e803912451880c3a9c2b07a01abaebe984)
Reviewed-on: http://gerrit.openafs.org/5905
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:53:10 -08:00
Simon Wilkinson
f4974db918 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: Idd90fd0c2b0aa94fde1308b49641f83a820dee8b
Reviewed-on: http://gerrit.openafs.org/5660
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 5743c96bdea2e9aafeeeec3a1b4377d8860ef437)
Reviewed-on: http://gerrit.openafs.org/5904
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:52:58 -08:00
Simon Wilkinson
dc4e3ac1c1 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: I6a8f3583dd1c9c11f1dbc59dcd36fdd0460bda61
Reviewed-on: http://gerrit.openafs.org/5659
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry-picked from 3f938315adc08936024eb86678745dd85d2a092d)
Reviewed-on: http://gerrit.openafs.org/5903
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:52:47 -08:00
Andrew Deason
66730cdf8f LINUX: Fix afs_linux_pag_to_groups signature
"new" is a struct group_info**, not a struct group_info*

Change-Id: I4007c614002cbe3683787f9a77e43798328c5d07
Reviewed-on: http://gerrit.openafs.org/5648
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 6cb6bcc208a0ebb57325522ed764c7bf4bf6104e)
Reviewed-on: http://gerrit.openafs.org/5902
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:52:35 -08:00
Andrew Deason
a329764341 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: I068158607d19e27db6dbeda84f912c52d4b1919f
Reviewed-on: http://gerrit.openafs.org/5238
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from ee2fbffb04bb8b5098354646e262afa90c1b6f59)
Reviewed-on: http://gerrit.openafs.org/5901
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:52:25 -08:00
Andrew Deason
6f730bcdad 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: I1fcd0f52821ac813d57ecac2f743edd4474727b1
Reviewed-on: http://gerrit.openafs.org/5645
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from dd831c09602f1ef16cc7dece84aeff638cce7272)
Reviewed-on: http://gerrit.openafs.org/5900
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:52:14 -08:00
Simon Wilkinson
d26d743c9d 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: I56cebc8f2d9f53454e70147e07587580c4e3c4b5
Reviewed-on: http://gerrit.openafs.org/5656
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
(cherry-picked from 55efff93fe2762b58dc70cdd20aaf97e39825929)
Reviewed-on: http://gerrit.openafs.org/5899
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:52:00 -08:00
Simon Wilkinson
f4743c4b30 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: Ifc2adecb0b05c17abba8f7aed711c4fe6aa1b86c
Reviewed-on: http://gerrit.openafs.org/5655
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from ab866c821a705d7911e0ff8ac987249efdc63435)
Reviewed-on: http://gerrit.openafs.org/5898
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:51:49 -08:00
Derrick Brashear
fbbbe68380 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: Idcca18e8db6defda5654015f97cc1fdce27d45cc
Reviewed-on: http://gerrit.openafs.org/5612
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 488c7c97854a4bd0ec67bcfe17df93b3fd025f88)
Reviewed-on: http://gerrit.openafs.org/5897
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:51:38 -08:00
Simon Wilkinson
d0ca0866a1 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: I590482eeeb4ad72398cbeadb159b2c6822715794
Reviewed-on: http://gerrit.openafs.org/5613
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 796de9fb43857acccbd51e2af7c8d67eea90fdc5)
Reviewed-on: http://gerrit.openafs.org/5896
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:51:26 -08:00
Derrick Brashear
d323e80b68 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: I3624dbefb0029ad735fcbfb8a1368b5bef7a5590
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>
(cherry-picked from 7ae1921b76750ef28258777cf1b233c4917663d7)
Reviewed-on: http://gerrit.openafs.org/5895
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:51:14 -08:00
Simon Wilkinson
ba344bc2b6 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: I72ff1229530bb36470891aae2e5ec65e59463084
Reviewed-on: http://gerrit.openafs.org/5605
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from eead07418f13cd87a90770f03ea5118c546d8f1a)
Reviewed-on: http://gerrit.openafs.org/5894
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:51:02 -08:00
Derrick Brashear
c6a43197f9 afs: on uuid init fail, don't leave garbage behind
make sure we zero the uuid if we failed

Change-Id: I9563bfc2b9b4dcb208578eff0a98489b803e395d
Reviewed-on: http://gerrit.openafs.org/5599
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 9f68e0dd31ddb7bf69ea8ac13b3afe371dd6b7cb)
Reviewed-on: http://gerrit.openafs.org/5893
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:50:51 -08:00
Derrick Brashear
75b3b6c9f1 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: I240283fa0b67eacd0e5c38a21af1664a6f68e9f1
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>
(cherry-picked from 87dcfc872c11fdb13ebf0448abe91150aaa86859)
Reviewed-on: http://gerrit.openafs.org/5892
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:50:41 -08:00
Andrew Deason
9e1205f80c 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: I8707bdc4d3cd5c6c183b2659a14d5b23a7d48a89
Reviewed-on: http://gerrit.openafs.org/4482
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 735873d51512bc31134856c06345bb7caf9d8144)
Reviewed-on: http://gerrit.openafs.org/5891
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:50:28 -08:00
Andrew Deason
339eccb2c1 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: Ic7f592dee71d05004f639027cd588ccebd5b54f0
Reviewed-on: http://gerrit.openafs.org/4481
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 59b47fba3fa7cf13ef82463c5112851f7bdaf2ec)
Reviewed-on: http://gerrit.openafs.org/5890
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:50:16 -08:00
Simon Wilkinson
34c886877e 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: Ic0d8c6f1b5c612b1e528f2d02e66012f575c3c3f
Reviewed-on: http://gerrit.openafs.org/5654
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from c37a14697df291f641b4fa5a32826054d92210b0)
Reviewed-on: http://gerrit.openafs.org/5889
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:50:04 -08:00
Simon Wilkinson
64b9c8a6f0 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: I7282a30756fe13da2c69f064f36a863cae70d827
Reviewed-on: http://gerrit.openafs.org/5653
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 7a4498850814ea524f55de0b84d6b0ae0b4834bb)
Reviewed-on: http://gerrit.openafs.org/5888
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:49:50 -08:00
Rod Widdowson
55f3f860ff 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: If20f756d6e655bca6c560c8672a97003f122ba5e
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>
(cherry-picked from 1b32b4800b1dd8985c1554453354e683a66c9ab5)
Reviewed-on: http://gerrit.openafs.org/5887
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:49:37 -08:00
Derrick Brashear
685cca704b 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: I6ed5d52dd04953ae5d7d2d40aa617753986426d1
Reviewed-on: http://gerrit.openafs.org/5597
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from da9044cff966736bc064166a7136c94c0bfc1e5f)
Reviewed-on: http://gerrit.openafs.org/5886
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:49:25 -08:00
Derrick Brashear
0d786f8a3a ukernel: install our sysincludes to root.perf
otherwise, we can't actually include sysincludes from something
linking libuafs

Change-Id: I77ae1b8a3decee0a32086d6d7b3967514a6d0777
Reviewed-on: http://gerrit.openafs.org/5593
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 75179d50eae3258e8baa0a4c9f069fcd11d08260)
Reviewed-on: http://gerrit.openafs.org/5885
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:49:07 -08:00
Derrick Brashear
4f357e064d ukernel: add uafs_access
we don't have an access vop. add one.

Change-Id: Ieb46c411a8300933e8dfb0000290fb821f286ad9
Reviewed-on: http://gerrit.openafs.org/5589
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 3eb60908a1f9b3f2783ec3f7755b242bff3d573d)
Reviewed-on: http://gerrit.openafs.org/5884
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:48:52 -08:00
Derrick Brashear
2c03ddd2ef volinfo: fix bad format string
we need a format string; currently here we have none, which is no good

Change-Id: Idf6a04475f29ec1413d3d27f91b3c20a42e110cc
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>
(cherry-picked from 0676dc9e0c59e8aee3db5e0a7b4acf7229da7b88)
Reviewed-on: http://gerrit.openafs.org/5883
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:48:41 -08:00
Hartmut Reuter
404ba73245 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: I0b12c7e012d86695f7c48549beb2f454c902dff7
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>
(cherry-picked from 3df03f0abe3e706eaba57e4d9d8c46f2f4d7414c)
Reviewed-on: http://gerrit.openafs.org/5882
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:48:26 -08:00
Michael Meffie
7f9a04656d bozo: bosserver man page updates
Add the new -pidfiles option to the man page. Add a few other missing
options as well.

Change-Id: I1068fa1d5d7767020ed35ff11bc4115042f07978
Reviewed-on: http://gerrit.openafs.org/5587
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 26253df896a7709847cda041db1dc187f1dbf83e)
Reviewed-on: http://gerrit.openafs.org/5881
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:48:11 -08:00
Derrick Brashear
a827ed78aa bypasscache: free in order
we need to free this, but while the pointer is still good

Change-Id: I5108ba4495998ac64796c7cb4528ae74bf56aa7e
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>
(cherry-picked from df3e4145e758de3530a21bb1e75cd48a4a7f61ec)
Reviewed-on: http://gerrit.openafs.org/5880
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:48:00 -08:00
Michael Meffie
df27041865 doc: fileserver synopsis typo
Fix a fileserver synopsis typo noticed during Derrick's EACK2011
debugging session.

Change-Id: I310b7d178fdbe7920121863658ea0be9b4243f1d
Reviewed-on: http://gerrit.openafs.org/5558
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from f2cba414c1390d5ed46b6c57f5682bfbcf53774e)
Reviewed-on: http://gerrit.openafs.org/5879
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:47:47 -08:00
Derrick Brashear
e329617326 bypasscache for ukernel
simple (read) bypasscache for ukernel.
does not bother trying any buffercache stuff.

Change-Id: Ifa750b2f3e52ee5321e8af23e60f6213b1c80a2a
Reviewed-on: http://gerrit.openafs.org/5484
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from d1cf14d54e380014851fb850b65263a66a8a4443)
Reviewed-on: http://gerrit.openafs.org/5878
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:47:36 -08:00
Andrew Deason
c4626c83be aklog_dynamic_auth: Support new SetToken pioctl
Make aklog_dynamic_auth use the new SetTokenEx method of storing
tokens.

Change-Id: Ic2c91cc25c028d1ab802c218c250996f4f4fae4e
Reviewed-on: http://gerrit.openafs.org/4483
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 40eebd37a295c77615950858e08282447a8c28ca)
Reviewed-on: http://gerrit.openafs.org/5877
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:47:23 -08:00
Andrew Deason
673f46aeb2 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: I32533fec0df4e4fb9501bd3cb40c420a56d0af79
Reviewed-on: http://gerrit.openafs.org/5523
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 0ca1d92952cc81483e7b949f2982033cf0b9f3db)
Reviewed-on: http://gerrit.openafs.org/5876
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:47:09 -08:00
Andrew Deason
cb64172867 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>
(cherry-picked from 82481c6f4464ad978ea56c687205bdfcd3eebffd)
Reviewed-on: http://gerrit.openafs.org/5875
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:46:57 -08:00
Rod Widdowson
8cbd52a3d8 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: I2f2b0c67d9df23207c47f4cd816be5b20909a1c5
Reviewed-on: http://gerrit.openafs.org/5521
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry-picked from b4f96eb78d9403799b97a39b9659070cf1114cd1)
Reviewed-on: http://gerrit.openafs.org/5874
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:46:38 -08:00
Andrew Deason
a13b52888e 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>
(cherry-picked from 5c6bd04211d587efde4b0915a62273aafb2d306b)
Reviewed-on: http://gerrit.openafs.org/5873
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:46:23 -08:00
Andrew Deason
b3dd6ccb74 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: I5d78718d5625e4ce8475695dcb699b1cd6b305c3
Reviewed-on: http://gerrit.openafs.org/5527
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 6e7b31ef0a69b8ea39e8acc474a7aab48f828d3d)
Reviewed-on: http://gerrit.openafs.org/5872
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:46:13 -08:00
Andrew Deason
e6ae122e76 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: I30447aa426c041f9261fdfa37505d71fd604426c
Reviewed-on: http://gerrit.openafs.org/5526
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from d54a9994d362ce3f287fe786839ec72f6d94806c)
Reviewed-on: http://gerrit.openafs.org/5871
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:46:01 -08:00
Andrew Deason
442af50e29 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: I3041d4a3c72a8fd8cdd21d158d594dacba162b99
Reviewed-on: http://gerrit.openafs.org/5525
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from d43438bb914f267f1c65d81e23efbab6874ae426)
Reviewed-on: http://gerrit.openafs.org/5870
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:45:39 -08:00
Andrew Deason
93ce998199 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: I907ffe6c67eb8402810287894d8d643e85b06df3
Reviewed-on: http://gerrit.openafs.org/5524
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 22d94407ea06a3213b7f0f6d57edd48d1977b2e1)
Reviewed-on: http://gerrit.openafs.org/5869
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:45:26 -08:00
Marc Dionne
c7eb9398e1 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: I3b3bb6e562321ccfb7c04dcf015f1b016a4868c2
Reviewed-on: http://gerrit.openafs.org/5529
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry-picked from 5587bbfc0bc70de234e5655faf7676cf2b9b9715)
Reviewed-on: http://gerrit.openafs.org/5868
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:45:14 -08:00
Marc Dionne
c24613019b viced: remove duplicate declaration
viced_uclient_key is declared twice, remove one of the
declarations.

Change-Id: Ibaeddbf4dcbe9c48bd838c8df46a4c82a863c2d8
Reviewed-on: http://gerrit.openafs.org/5515
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry-picked from 11a6fc948983c0a9f1fb41c58b9559750763440b)
Reviewed-on: http://gerrit.openafs.org/5867
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:45:03 -08:00
Rod Widdowson
4935b51eab 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: Ia8a276ecc28dc26eadc68f4e5c43ae699eae4e9b
Reviewed-on: http://gerrit.openafs.org/5511
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry-picked from 60a6454d80c760aa8768ba64f7c5bab24f897c7b)
Reviewed-on: http://gerrit.openafs.org/5866
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:44:50 -08:00
Andrew Deason
b6d390e7c0 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: I6cb8b26b0167c7243b20e3f535ea7c6e94e38985
Reviewed-on: http://gerrit.openafs.org/5513
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry-picked from c7dc0180c7c424c6cb58d1493759caf82ef280f2)
Reviewed-on: http://gerrit.openafs.org/5865
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:44:38 -08:00
Derrick Brashear
1ad1e1d4ae ukernel: output dataversion in stat struct if possible
we already have this data; if we can output it, do so.

Change-Id: I8b491dade6acf18fc42565563df82149866a0f49
Reviewed-on: http://gerrit.openafs.org/5510
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 955bab670d0aed714fc940b5be7e2b75896a63d0)
Reviewed-on: http://gerrit.openafs.org/5864
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:44:26 -08:00
Derrick Brashear
d9c0fe6f6c 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: I3cdaea1cccd1425b1146bf4a816894437787ef70
Reviewed-on: http://gerrit.openafs.org/5509
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 80943970b8cfcdf3fc630b25804aebaea228bd73)
Reviewed-on: http://gerrit.openafs.org/5863
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:44:15 -08:00
Rod Widdowson
3816c0f3b9 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: I167a0fd83a60dc3604ce6b1302d4e6b4549043f5
Reviewed-on: http://gerrit.openafs.org/5512
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry-picked from 5b579b83abc57d6bb9212b599aae96af9ac71832)
Reviewed-on: http://gerrit.openafs.org/5862
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:44:05 -08:00
Michael Meffie
8e0d084344 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: I6ddda254d69b10a68a16e4736d024bd89310b316
Reviewed-on: http://gerrit.openafs.org/5488
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 9133aa6ed3a7fe2ae55b2d3242366ae277c7f726)
Reviewed-on: http://gerrit.openafs.org/5861
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:43:49 -08:00
Jeffrey Altman
ff1341adab 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: I9f9bff18e09be8fa10dc1e573f6c0bb1660d8af3
Reviewed-on: http://gerrit.openafs.org/5505
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry-picked from 4a0d8cc24e687f271fcf44bab765691bd782d78d)
Reviewed-on: http://gerrit.openafs.org/5860
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:43:38 -08:00
Michael Meffie
bddac7ca58 bozo: fix overrun from -rxbind on restart
Fix buffer overrun in bosctlsrv introduced
by commit 544ff1b295a57b50afefa6146094434db7608355

Change-Id: Id6e2fe312ce0605685d3f5ce60f23271c59834b3
Reviewed-on: http://gerrit.openafs.org/5504
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry-picked from 48e326372d89b0d778420f268dbe59236758eba8)
Reviewed-on: http://gerrit.openafs.org/5859
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:43:09 -08:00
Michael Meffie
7d65c4544a volinfo: refactor vnode handling
At program startup, register procedures to be called
when scanning vnodes.

Change-Id: I7fee43035320ef8315177c19bd2b459f5bb50021
Reviewed-on: http://gerrit.openafs.org/5100
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry-picked from 11f54962f638c8ae48d5193f6b695c252fbb9937)
Reviewed-on: http://gerrit.openafs.org/5858
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
2011-11-12 15:42:56 -08:00