Commit Graph

10458 Commits

Author SHA1 Message Date
Jeffrey Altman
070e90a921 doc: Windows Release Notes Integrated Logon
Expand on support for integrated logon details.   Explain the
new capabilities for per-user configuration and name mapping.

Change-Id: I6aef3f99cb54aa964f9a6dbc3992031d6199e97d
Reviewed-on: http://gerrit.openafs.org/7905
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-30 12:47:56 -07:00
Jeffrey Altman
da9f42d044 doc: Remove USA vs International from AdminGuide
OpenAFS does not have separate distributions for the United States
and the rest of the world.  Nor are there any restrictions on the
capabilities of the Update Server.

Change-Id: I834d86764bb3d8df4cce62b9cbaa33bff455bc30
Reviewed-on: http://gerrit.openafs.org/7902
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-30 08:35:15 -07:00
Michael Meffie
227cff3dd6 vlserver: remove an unused global
Remove the unused global variable extentaddr.

Change-Id: I3a7aec78dddcdf4e56a9ed432d650a1693e7c16e
Reviewed-on: http://gerrit.openafs.org/7900
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-29 19:45:55 -07:00
Derrick Brashear
71dc077831 opr: tweak nonnull macro to use nested parens
throws an error on windows in some cases otherwise

Change-Id: I977b63908fb64a9711f9ba9ca22aeb04882fadf4
Reviewed-on: http://gerrit.openafs.org/7899
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-29 17:03:25 -07:00
Simon Wilkinson
8c01141cca Windows: Rename cm_btree struct data
Rename the "struct data" in cm_btree.h to something less generic in
order to avoid conflicts with other code.

Change-Id: I0580be084d508c195d767152af4f9a461cf0407e
Reviewed-on: http://gerrit.openafs.org/7898
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-07-29 15:56:08 -07:00
Garrett Wollman
b725a28eac volser: restructure GetNextVol and clients to remove duplicate code
There are several odd-looking but stylized loops involving GetNextVol()
which can be radically simplified if only GetNextVol() would return
a meaningful value.  Move all of the code that skips non-volume-header
files in the directory into GetNextVol and have it return a truth value
(instead of always returning zero) that indicates whether it saw
something that looks like a volume header.  Then all the odd while
loops and strcmps just collapse into while(GetNextVol(...)).

GetNextVol() had external scope, but there are no callers in the
tree that use it outside of volprocs.c, and it's not part of a
public library interface, so make it static.

While here, don't strcmp() past the end of a filename that begins with
'V' but is too short to be a valid volume name.

Change-Id: I214b33c46714959d700608b3d3718c79d3792878
Reviewed-on: http://gerrit.openafs.org/7893
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-28 10:36:28 -07:00
Garrett Wollman
cac7bcda08 afscp: avoid null dereference in _GetSecurityObject error case
Handle the possible error return from krb5_get_host_realm in the
same way as the other error cases (using an anonymous security
object); otherwise "realm" would be left null.

Change-Id: I5ce7a614a3e272b3a9903a8e95545a8116d1af3c
Reviewed-on: http://gerrit.openafs.org/7891
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-27 22:25:00 -07:00
Garrett Wollman
2460396391 pam: Use the right password variable in pam_sm_chauthtok()
"password" is known to be null at this point.  Use "prompt_password"
which is obviously the one intended.

Change-Id: I4ab566f93c4978438df2c2875d619177ad8f5bdd
Reviewed-on: http://gerrit.openafs.org/7892
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-27 22:24:08 -07:00
Garrett Wollman
fdb4ec2e27 butc: don't pass NULL to strcpy in RcreateDump
volumesetNamePtr can return a null pointer in certain error
conditions.  Check for this and return BUDB_BADARGUMENT rather
than dumping core.

Change-Id: If0ce509c964211ffa591d8e095b7c32c51ae7bc3
Reviewed-on: http://gerrit.openafs.org/7890
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-27 20:19:52 -07:00
Andrew Deason
5237d3d232 LINUX: Hold GLOCK for proc traversal
The functions that traverse unixuser structures for display via /proc
(uu_start et al) call various libafs functions hold and release locks,
etc. To do any of that, we need GLOCK. Amongst other issues, we can
panic if we try to acquire a contested lock without GLOCK, since we
assert glock is held when we sleep for the lock or try to wake other
waiters. The same goes for the legacy CellServDB proc file.

So, hold and release GLOCK as appropriate.

Change-Id: I9ec2051bc5d914521d12a9d20d28da1076c090fc
Reviewed-on: http://gerrit.openafs.org/7885
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-27 20:19:27 -07:00
Andrew Deason
23f2f1232b LINUX: Fix osi_proc.c formatting
osi_proc.c had a few formatting issues:

 - Several function definitions did not have the function name at the
   beginning of the line

 - A few preprocessor directives were not indented

 - A few areas used a tab character for each indentation level, as
   opposed to 4 spaces, then 1 tab, as the rest of the tree has

 - Struct definitions were aligned using tabs, not spaces, causing
   misalignments when the indentation was fixed

Fix these.

Change-Id: I8d6b511473b89c42abd759553ec77332407daff0
Reviewed-on: http://gerrit.openafs.org/7884
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-27 20:19:01 -07:00
Jeffrey Altman
e02fd4d358 rx: protect against ACKs with serial as prevPacket
patchset 4e71409fe1 introduced a
check in rxi_ReceiveAckPacket for out of order ack packets which
relied upon the value of the previousPacket field.  Unfortunately,
some versions of RX store the previous packet's serial number in
the field instead of previous packet's sequence number.  Modify
the check to only discard out of order ACKs if the previousPacket
sequence number is within the valid window.

Change-Id: I72885a8c1aaa69eb263335be1827545f2b4c3e09
Reviewed-on: http://gerrit.openafs.org/7785
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-27 12:59:04 -07:00
Jeffrey Altman
300dd717fa rx: better rxi_FindRpcStat check for end of queue
patchset 1f0cf8b2b4 tested for
an empty queue but what is really required is a test for end of
queue after the queue_Scan().  If the queue_Scan() completes
at the end of the queue, in other words, pointing at the list
head, then return NULL because no match was found.

Change-Id: I444531d3cfa85b4691eaa8960da0266de82a03a3
Reviewed-on: http://gerrit.openafs.org/7886
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-27 06:35:43 -07:00
Jeffrey Altman
ee2b9c2d3e rx: protect against invalid params in rx_Copy*RPCStats
Protect against:

  . rxi_Alloc() failure

Change-Id: I3334855e261bb40d5720fd376e62028760f0cee5
Reviewed-on: http://gerrit.openafs.org/7873
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-27 06:34:44 -07:00
Andrew Deason
3fc800be9c vos: Minimize release impact for new RO sites
Currently, if a new RO site is added with 'vos addsite', the only way
to populate the new site with data is a 'vos release' (excepting hacks
using 'vos restore' and 'vos addsite -live', etc). Due to safeguards
in 'vos' ensuring that RO sites always all contain the same data when
marked as up-to-date in the VLDB, such a release always incurs some
amount of data to be transmitted to all sites, as well as remote sites
being brought offline briefly, even when the RW data has not changed
in very long time.

To alleviate this situation, make 'vos release' detect if new,
unpopulated RO sites have been added, and if the RW volume has not
changed since the release of any existing RO sites. If both of these
conditions are true, do not update any of the existing sites, but only
transmit volume data to the sites that did not already contain RO
volumes.

Change-Id: If343d241a18e788c3619876f5d494d2ebf425cb8
Reviewed-on: http://gerrit.openafs.org/7393
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-07-26 11:50:34 -07:00
Garrett Wollman
93aa733909 tabular_output: don't leak table struct on error exit
The caller is almost certainly going to exit when we return, but
all the same, don't leak the table description structure in the
error exit.  Makes the static analyzer happier.

Change-Id: I55e986a3601968751921ee38badf5bb86cd3174f
Reviewed-on: http://gerrit.openafs.org/7870
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-26 11:49:56 -07:00
Garrett Wollman
ff217dec93 afsdump_extract: clarify logic to avoid freeing local buffer
Sometimes vnodepath is set to a local buffer.  Sometimes it is set
to malloc'ed storage.  Simplify the logic for freeing vnodepath
by checking explicitly for this condition rather than the state
of other variables.  As a bonus, avoids a false (?) positive from
the static analyzer.

Change-Id: I3772cb97698acc5a6ac1f438977c673e6fea7722
Reviewed-on: http://gerrit.openafs.org/7869
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-26 11:43:30 -07:00
Michael Meffie
24d2d3ea83 vlserver: always use the hostaddress table in GetAddrsU
Use the hostaddress (IpMappedAddr) table when looking up hosts by IP
address and when listing addresses by index, instead of accessing
the multi-homed extensions directly.

The existing vos client calls the old GetAddrs rpc to first retrieve
a count of the number of addresses expected. This count is the
number of addresses in the hostaddress table.  If there are
unreferenced entries in the mh extension blocks, then vos can return
an incorrect or incomplete list of addresses.

To be consistent with the rest of the host address processing, use
the hostaddress table in GetAddrsU to lookup hosts by index or by IP
address.

The hostaddress table is already used when looking up addresses by
UUID.

Change-Id: I01aa29ae7d24d48bcd245f0320e329435f61548e
Reviewed-on: http://gerrit.openafs.org/7878
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-26 11:42:42 -07:00
Garrett Wollman
7649a66a61 afs_conn: make release_conns_vector() actually work
release_conns_vector must never have been called before with
a non-null parameter, because it could not possibly work.
The first line of the loop is a null pointer dereference, and
if that were fixed, there's also a modify-after-free bug as well.
It's not clear how what the old version was trying to do; this
version makes a stab at doing something sensible but might be
less than required.  (Note that this would be much simpler if
converted to queue(3) macros or a similar standard linked-list
data structure.)

Change-Id: I4c0fb7ed1ee977dcc0b4dfb32557882679069731
Reviewed-on: http://gerrit.openafs.org/7838
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-26 10:53:48 -07:00
Garrett Wollman
d0db811939 pruser: AFS_NONNULL annotations for functions that deserve it
Change-Id: I68e74affcb3235d93e684a04a56ef44798a42406
Reviewed-on: http://gerrit.openafs.org/7861
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-26 10:53:03 -07:00
Garrett Wollman
3f691e663c kauth: ka_CellToRealm's "realm" parameter cannot be null
Annotate ka_CellToRealm with AFS_NONNULL to indicate that its
"realm" parameter cannot be null; it does not make sense to call
this routine without this parameter.  (The static analyzer inlines
the call to ka_ExpandCell and concludes that "realm" might be null;
the annotation will prevent that and avoid a false positive.)

Change-Id: Id7fac19cf4eb4bdb1decde81d951b8bcd96fce71
Reviewed-on: http://gerrit.openafs.org/7865
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-07-26 10:52:11 -07:00
Andrew Deason
f6d7a4b426 afsd: More pthreads damage
We need MT_LIBS for -lpthread and such. HP-UX needs this, and probably
other platforms; otherwise we complain about missing pthreads symbols.

Change-Id: If7486cabfc20ef4238087f0285c25d9f8602703a
Reviewed-on: http://gerrit.openafs.org/7880
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-26 10:50:05 -07:00
Andrew Deason
cf03e0a474 crypto: Use our strcasecmp in kernel
A few pieces of heimdal we use in the kernel call strcasecmp
(hcrypto/evp.c, krb5/crypto.c). The strcasecmp function does not exist
in all kernels (specifically, it does not exist in at least Linux 2.4,
2.6.9, and probably not on Solaris pre-10). Since we have our own copy
of strcasecmp (called afs_strcasecmp), just use that for now.

Ideally we would have some kind of configure test for detecting the
presence of the function in the kernel, and use the roken
implementation when we don't. We currently have the framework for
neither of those in place at the moment, though, so just get by with
this for now.

Change-Id: Ia96b17596da6cb168c80c92486fa049c05205da4
Reviewed-on: http://gerrit.openafs.org/7881
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-26 10:49:27 -07:00
Andrew Deason
97e241fdc6 afs: afs_strcasecmp args are const
We do not modify our args, so declare them const so we are usable with
const strings.

Change-Id: I2d60044014e51e2a52638b76ca50a5c2fc6980c0
Reviewed-on: http://gerrit.openafs.org/7882
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-26 08:16:48 -07:00
Garrett Wollman
97146a8ed8 ptuser: avoid implementation-defined behavior in CreateIdList()
CreateIdList() is an internal subroutine of pr_IDListExpandedMembers(),
used to flatten a hash table of protection IDs into an array that can
be passed to pr_IdToName().  If for some reason the hash table had no
entries, it would call malloc(0) and, depending on how the
the implementation defines this, either return a PRNOMEM error (wrong!)
or else allocate a minimum-sized buffer which pr_IdListExpandedMembers
would then promptly leak.  Compromise between the two behaviors by
not allocating any memory in this case but returning success, and in
the caller check for an empty list and avoid the pointless RPC to
translate no IDs into no names.  pr_IDListExpandedMembers() will return
success, as it previously did in the non-PRNOMEM case.

Change-Id: I8a042bde3e98f5cf248358f37f2e875d6b5b298d
Reviewed-on: http://gerrit.openafs.org/7863
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-25 13:29:41 -07:00
Garrett Wollman
2e7939ea46 kauth: don't call lcstring with a null source argument
This code was probably never executed, but now that lcstring() has
an AFS_NONNULL annotation, the static analyzer indicates the
potential null-pointer-dereference.

Change-Id: Idb41c2af1cb38bc5c084d4912614e0a553d4aa5a
Reviewed-on: http://gerrit.openafs.org/7864
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-25 13:27:45 -07:00
Garrett Wollman
a573697da3 rxgen: avoid an unimportant memory leak in docppline()
If cpp emitted
  # 1234 ""
docppline() would leak a small buffer.  Just free it.
The static analyzer will thank you.

Change-Id: I34ae6e228469a900139375f2a4758855922cf0ef
Reviewed-on: http://gerrit.openafs.org/7871
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-25 13:27:24 -07:00
Andrew Deason
3c9a9b4960 rx: Initialize kernel rx_atomic_mutex
Change-Id: I9a63fbee0e5a0f9df31b8e2440e91a03af54151f
Reviewed-on: http://gerrit.openafs.org/7876
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-25 13:25:38 -07:00
Andrew Deason
410a55addf rx: Raise minimum Linux atomics version to 2.6
Linux 2.4 does not have atomic_dec_return. If we switch to a
dec_and_test-like API, then we could use the Linux 2.4 atomics. But
for now, just raise the minimum to 2.6, and for 2.4 and below just use
the generic atomics implementation so we can build.

Change-Id: Ie584bd420839dbcbe3158fe7b50df633cb7eba6d
Reviewed-on: http://gerrit.openafs.org/7875
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-25 13:25:12 -07:00
Andrew Deason
6dd0bc6bed LINUX24: explicit dir buffers fallout
Fix fallout from 0284e65f97

Change-Id: I40a16fee3bb3835690f7ff7328f70d3454fd1198
Reviewed-on: http://gerrit.openafs.org/7874
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-25 13:25:00 -07:00
Derrick Brashear
3638ef30d0 macos: next version header
add header for next macos

Change-Id: I9078b77587197b38ff705663c73a7f930efeec7a
Reviewed-on: http://gerrit.openafs.org/7868
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-07-24 21:19:53 -07:00
Jeffrey Altman
5f60992bfe Windows: NPAddConnection3 debugging
Define Add3FlagsToString() and use it when generating debug
output from NPAddConnection3().

Change-Id: I73251890659ea5a833b5f67d26129053c625b58a
Reviewed-on: http://gerrit.openafs.org/7860
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-24 21:10:05 -07:00
Jeffrey Altman
16b671cf3b Windows: Correct exceptions in AFSRDFSProvider
Correct two errors in the generation of debug strings that
were triggering invalid memory access exceptions.

Change-Id: Ie5ee3289e2fa74809067f05931c3aa568c2be9d0
Reviewed-on: http://gerrit.openafs.org/7859
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-24 21:09:42 -07:00
Garrett Wollman
78f1e230ce afs_bypasscache: parameters of afs_ReadNoCache can't be null
The first two parameters of afs_ReadNoCache() are unconditionally
indirected through, and all existing callers appear to guarantee
that these parameters are in fact non-null, so annotate the function
declaration to so indicate, and remove the one test that checks
whether avc (the first parameter) is null.  I suspect that acred
cannot be null either, but this code does not appear to depend on
that, so it's not included in the non-null annotation.

Change-Id: I496c868ffcbc9b894f91578019bc30bf7b14fefd
Reviewed-on: http://gerrit.openafs.org/7837
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-24 05:22:57 -07:00
Garrett Wollman
21878c61dd ptuser: use the "prname" typedef rather than "char[PR_MAXNAMELEN]"
There's a typedef for this type, so use it in function prototypes
rather than the more complicated declarator.

Change-Id: I75a9b4e72201e6b2072dba14185579f9c4aa61be
Reviewed-on: http://gerrit.openafs.org/7858
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-24 05:22:29 -07:00
Derrick Brashear
5e0c59284a afsd: fix pthreads damage
ah linker fun. clean up from 98f86cfc53

Change-Id: Id78debe0c9ddec0ce5f3fd2b95e16802a132845f
Reviewed-on: http://gerrit.openafs.org/7855
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-23 21:52:57 -07:00
Jeffrey Altman
8ff703fcbb Windows: No VLDB server blocking probes
Now that we have background probes, use them for VLDB server probes.

Change-Id: Ib160ec5ae702065f410e85ae949ae13a02c425e8
Reviewed-on: http://gerrit.openafs.org/7854
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-23 21:25:00 -07:00
Jeffrey Altman
ceeb047457 Windows: NOPROBE means probe in background thread
It is important that down servers be detected as soon as possible.
When it is not possible to perform a blocking probe, perform a
probe in a backgrond thread.

Change-Id: If73856359ba894c5c302c11fd50aaa76cd2fcf28
Reviewed-on: http://gerrit.openafs.org/7853
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-23 21:24:47 -07:00
Garrett Wollman
a738c8dcff ptuser: pr_SNameToId/SIdToName: if RPC response empty, force error
If the prserver returns an empty response to ubik_PR_NameToID
or ubik_PR_IDToName, but doesn't otherwise give an error,
force a PRINTERNAL error return so that the client knows that the
the return parameter was not updated.  Existing callers seem to
expect this, as pr_SNameToId is often called without initializing
the variable which receives the result and checking only for the
error code.

PRINTERNAL is a new error code.

Change-Id: I3e598a22deb39792a0f208ac09b3c1991d6f1e58
Reviewed-on: http://gerrit.openafs.org/7836
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-23 20:26:43 -07:00
Derrick Brashear
98f86cfc53 afsd: switch to pthreads
kill one more lwp dependency.

Change-Id: I9a878d7b0e1ab50770c6162f6bd380119b7a4292
Reviewed-on: http://gerrit.openafs.org/7828
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-07-23 19:51:31 -07:00
Derrick Brashear
a3b6a940f8 afsd: cleanup syscall cleanup
sadly ead743db5d missed a few bugs. fix
them here.

Change-Id: I03d52543fb096f75ccf6dbde4f7526a7c0c576bb
Reviewed-on: http://gerrit.openafs.org/7852
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-07-23 19:29:39 -07:00
Jeffrey Altman
736e0dbeec Windows: get rid of _strdup and use rk_strdup
Do not use the _strdup() C RTL function.  Use strdup() so that
rk_strdup() roken replacement can be used.

Change-Id: Ifd2808a078b514468aee52ef76a9b51e606a2c88
Reviewed-on: http://gerrit.openafs.org/7848
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-23 14:48:25 -07:00
Jeffrey Altman
907dbac89c roken: rk_strdup rk_wcsdup exports
Change-Id: Iee3670ddf86599dd81f1247a9f8cfafcbc6e1e8f
Reviewed-on: http://gerrit.openafs.org/7847
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-23 14:48:13 -07:00
Heimdal Developers
cabfe32c33 Import of code from heimdal
This commit updates the code imported from heimdal to
b8a53329fc8bf2fe8c4f4058512f828d7654e3f8 (switch-from-svn-to-git-3003-gb8a5332)

Upstream changes are:

Jeffrey Altman (2):
      Windows: rk_strdup allocator
      Windows: rk_wcsdup allocator

Nicolas Williams (1):
      Fix bug in _krb5_expand_path_tokensv()

Change-Id: I08abb25b4f4136bccb3eaf8d8c44851ce748f395
Reviewed-on: http://gerrit.openafs.org/7842
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-23 14:48:01 -07:00
Simon Wilkinson
5dce817d40 ptserver: Make ptclient build again
Make the ptclient utility build again, and add it to the ptserver
Makefile so that it is built by default and, hopefully, won't
bitrot again.

Change-Id: I888a9d4392b62ecb2d7556694400a2853658052a
Reviewed-on: http://gerrit.openafs.org/7841
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-07-23 09:31:03 -07:00
Simon Wilkinson
0eca3c1822 auth: Fix GetTokenEx with NULL cellName
If GetTokenEx is called with a NULL cellName, it means use the
local cell. To do this with the legacy interface, a 0 length string
must be used for the cell instance of the ktc_principal passed to
GetToken. Fix this so that we do so, rather than attempting to
strcpy(..., NULL) which never ends well.

Caught by clang-analyzer

Change-Id: I53d9bdf0fc280ee073a2fb7693659269df29c2eb
Reviewed-on: http://gerrit.openafs.org/7840
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-07-23 09:26:17 -07:00
Jeffrey Altman
1f0cf8b2b4 rx: rxi_FindRpcStat must test for empty queue
When queue_Scan is executed on an empty queue the queue element
variable, in this case 'rpc_stat' is the queue head, _RXQ(q),
and not NULL.  Callers of rxi_FindRpcStat() expect NULL on failure
to find or create an rx_interface_stat object.  Correct the behavior
by testing for an empty queue and return NULL immediately if the
queue is empty and the caller is not requesting creation.

Change-Id: I9952d7aaf357e039e87f6b8b17cb1a00208d6465
Reviewed-on: http://gerrit.openafs.org/7835
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-23 07:54:11 -07:00
Simon Wilkinson
ead743db5d afsd: Tidy up system calls
Tidy up the way that we do system calls from afsd, by making
afsd_syscall a va_arg function, using a structure to pass system call
information around, and simplifying the #ifdef ladder that converts our
platform independent system calls into something platform specific.

This fixes all of the warnings in afsd which required the -Wno-error
option, the only warnings remaining are related to daemon being
deprecated on Darwin.

Change-Id: I357c7d175b5327007d50d213c6181881c842050e
Reviewed-on: http://gerrit.openafs.org/7188
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-23 07:11:23 -07:00
Jeffrey Altman
748a3e29b6 Windows: cm_UpdateVolumeLocation volp locked
When calling cm_UpdateVolumeLocation the volp->mx must be held.
cm_Analyze() did not obtain the mutex as required.

Change-Id: Ida69105879a78692a367cd4439bee8e4bea751ff
Reviewed-on: http://gerrit.openafs.org/7839
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-23 05:51:54 -07:00
Michael Meffie
82865811e4 libafs: avoid flushing already freed dcaches in flush volumes
When flushing volume data, skip flushing dcache entries which
are already freed.

Change-Id: I74d7e055e833dc91214dd9d544af3781f74db59b
Reviewed-on: http://gerrit.openafs.org/7539
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-07-22 05:25:30 -07:00