10294 Commits

Author SHA1 Message Date
Andrew Deason
3ff8ef499c doc: Consolidate CAUTIONS notes about volume size
Change-Id: I264906fb3f61db62c483982f613654a9a897f417
Reviewed-on: http://gerrit.openafs.org/7597
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-03 07:30:17 -07:00
Jeffrey Altman
5e91c3b5d1 Windows: export roken allocators
Use rk_alloc, rk_calloc, rk_free, rk_realloc instead of Windows
C RTL allocators.  The OpenAFS source tree has a bad habit of
allocating memory in one module and freeing it in another.  This
is not a problem for POSIX but is disaster on Windows.  This change
ensures that all OpenAFS modules share the same allocator.

Change-Id: Ia57f1ba351e8dc24e7fbba87bbc9595bcf001ed6
Reviewed-on: http://gerrit.openafs.org/7625
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-02 19:30:58 -07:00
Heimdal Developers
9c0b7be87d Import of code from heimdal
This commit updates the code imported from heimdal to
3fe55728404c602884f16126e9cc60fc5a3d8f20 (switch-from-svn-to-git-2993-g3fe5572)

Upstream changes are:

Andrew Bartlett (1):
      Revert "make paranoia check less paranoid" - check that key types strictly match

Jeffrey Altman (3):
      do not include stdint.h unprotected
      Windows EAFNOSUPPORT defined by VS2010
      roken: Use a common allocator for all windows

Love Hornquist Astrand (2):
      add rk_getpwnam_r
      move windows compat errno constants to after <errno.h> is included

Nicolas Williams (7):
      Fixes to make Heimdal -Wall -Werror clean
      Make krb5_kuserok() pluggable and add features (including MIT config compat)
      Generalize token expansion to allow for context-specific tokens
      Address code review comments (use krb5_enomem())
      Make master build on Windows
      Fix a compiler warning in lib/roken/snprintf.c on 32-bit Ubuntu
      Move base into lib

Roland C. Dowdeswell (3):
      Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues.
      Provide support for enctype aliases for ease of use.
      Additional changes to make -Wshadow build on Ubuntu 10.04.

Simon Wilkinson (1):
      hcrypto: Use correct size for memset in md2

New files are:
	roken/realloc.c
	roken/win32_alloc.c

Change-Id: I8129ad5677fd7e3a3d3daa78eadf436bbc63adc2
Reviewed-on: http://gerrit.openafs.org/7612
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-02 19:30:30 -07:00
Simon Wilkinson
e05a630452 roken: Import Windows allocator changes
Roken now supports using a single allocator across all of the objects
which include that roken library. Two additional objects are required
to support this, so add them to the list of symbols that we import.

Change-Id: If43537f06a6cdc6ea4dea278cdc1db1e6970f955
Reviewed-on: http://gerrit.openafs.org/7618
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-02 19:28:08 -07:00
Jeffrey Altman
0e327b4982 cmd: add krb5_enomem() definition
Heimdal's expand_path.c now makes use of a new function krb5_enomem()
which is a wrapper around krb5_set_error_message().  Add a dummy
implementation to src/cmd/krb5_locl.h so that expand_path.c can
build within the OpenAFS tree.

Change-Id: I9616604dfd7e0844b7e09576c76d844b1cb678dc
Reviewed-on: http://gerrit.openafs.org/7624
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-02 19:27:36 -07:00
Jeffrey Altman
a41ab06496 Windows: HAVE_UINTPTR_T
The Windows build has a definition of uintptr_t.  Add
HAVE_UINTPTR_T to the Windows config.h file.  The sources imported
from Heimdal make use of it.

Change-Id: I6d01dd9eb67c1e7f7ef257f0ac06d89d656f8bd8
Reviewed-on: http://gerrit.openafs.org/7623
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-02 19:24:53 -07:00
Jeffrey Altman
7c23991151 Add HAVE_INT64TOINT32 test in stds.h
Windows SDK v6.0 and above include a platform specific
definition of Int64ToInt32.  Use the platform definition when
available.

Change-Id: I8081ed1c33d2ac11287ebaa1eaef1f77682575cf
Reviewed-on: http://gerrit.openafs.org/7622
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-02 19:24:26 -07:00
Jeffrey Altman
6f779c1867 Windows: remove unused defines from param.h
Remove #if 0 disabled definitions and those for strtoll and
strtoull as they are not used anywhere in the tree.  strtoll
and strtoull will conflict with the next roken.h update.

Change-Id: Ieea394abf6046be9b5974464890b7af945c00153
Reviewed-on: http://gerrit.openafs.org/7621
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-02 19:23:36 -07:00
Jeffrey Altman
754180b61e Windows: link to afsroken.dll
All binaries must be linked against afsroken.dll.

Change-Id: I74f392a8aaadfe67f24d01a8d65df6a6228fd952
Reviewed-on: http://gerrit.openafs.org/7620
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-02 19:23:00 -07:00
Jeffrey Altman
3078c4a592 Windows: roken.h ordering
The order of include files must be

  afsconfig.h
  afs/param.h
  afs/stds.h
  roken.h

Change-Id: Ie9f6476b9be143416105d1eec3a512a87cf66383
Reviewed-on: http://gerrit.openafs.org/7619
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-02 19:21:08 -07:00
Jeffrey Altman
d8397c7c32 Windows: afslogon is only an authentication provider
afslogon.dll is just a Authentication Provider DLL.  It does not
provide network file system browse and mapping functions.  Therefore,
do not include the "ProviderPath" registry value when the
AuthentProviderPath variable is sufficient.

Change-Id: I92848e614906c3e35b882dd70570bddfaa44d36f
Reviewed-on: http://gerrit.openafs.org/7550
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-07-02 18:44:37 -07:00
Derrick Brashear
0c6a2a7b35 viced: null-terminate server list for ubik
when we set up the vlserver connection, we could potentially use
uninitialized memory as ubik connections. don't.

Change-Id: Idefa71874c7402c927fbf148f994f9422183208a
Reviewed-on: http://gerrit.openafs.org/7610
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-06-29 07:37:40 -07:00
Ben Kaduk
44ca4aa90e Patch up FreeBSD-10 support
The auto-guessing code for sysnames produces *_fbsd_100, so we can't
just claim that we'll be *_fbsd_1000 for kicks.
Revert back to the old behavior so as to be less disruptive.

Change-Id: Iddbff8f6e03a1bd0cf140b6eaad1de72ad3b76b4
Reviewed-on: http://gerrit.openafs.org/7595
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-06-28 04:43:04 -07:00
Simon Wilkinson
6ea7a84bdc viced: Remove localcellname
Commit 8a040cfd848410b75b4e5ac5498f00f073932598 removed all of the
code which relies on the localcellname variable being set, but didn't
remove the variable itself. So do so.

Change-Id: I34bb0d321712b6712633cf42a1d89140a0146501
Reviewed-on: http://gerrit.openafs.org/7588
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 09:21:20 -07:00
Simon Wilkinson
eed293b295 viced: Make private host stuff static
The function initInterfaceAddr_r is internal to the host.c file,
so make it static to make this clear.

Change-Id: I4dd2de5a7071e68f103bb56347551a3e535d2fd9
Reviewed-on: http://gerrit.openafs.org/7587
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 09:21:02 -07:00
Simon Wilkinson
3b45a13a74 viced: Make the config directory path global
Store the location of the configuration directory in a global
variable, rather than hardcoding it in multiple locations in the file.
This makes it easier to write unit tests for portions of the fileserver,
and is a step towards producing a fileserver that can be run from
within the test suite.

Change-Id: I0ee1d9bed084472b1e29b9c559a8726f867f91e4
Reviewed-on: http://gerrit.openafs.org/7585
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 09:20:48 -07:00
Simon Wilkinson
7034b980f7 vol: Make some functions static
Make all of the functions in partition.c that are only used in that
file static.

Change-Id: I12e0980578b79459f50b6f4a46d2c423847e18a9
Reviewed-on: http://gerrit.openafs.org/7586
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 07:28:44 -07:00
Simon Wilkinson
c7ff0d28bf tests: Abstract out code for a test RPC service
Lots of our tests want to start a test RPC server, and then run
commands against it. Start to abstract out the code to do this
by pulling the code to start a test RPC server into its own
function in the common test directory.

Change-Id: Ie7fa1fa1984113f3722def17a9fd4b98993bd6ff
Reviewed-on: http://gerrit.openafs.org/7584
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 07:27:42 -07:00
Simon Wilkinson
6f9443e702 Unix builds: Reference krb5 libs in standard way
Use $(LIB_krb5) and $(LDFLAGS_krb5) to reference the Kerberos
library and linker flags, rather than directly using an autoconf
substitution. This brings us in line with the way other libraries
are handled.

Change-Id: Icda16833abea32440a5c307c39eb06b32613b06a
Reviewed-on: http://gerrit.openafs.org/7583
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 07:26:44 -07:00
Andrew Deason
387fe294f6 viced: Clear all client CPS on FlushCPS
Currently the fileserver only finds the first applicable 'client'
structure (via h_ID2Client) for a FlushCPS operation, and invalidates
the CPS for it. However, there may be many 'client' structures in
memory for the given viceid, since we may have many connections for
the same user (possibly from different hosts).

So, modify FlushCPS to find all relevant client structures, and
invalidate the CPS calculation on them.

Change-Id: I46532984cc470f41c83fb8c686766e4a4d49edd0
Reviewed-on: http://gerrit.openafs.org/7574
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 05:38:35 -07:00
Andrew Deason
cb64dea75a cacheout: Perform authenticated RXAFS_FlushCPS
Fileservers may now require RXAFS_FlushCPS calls to be made with
administrator tokens. So, try to make the call with admin tokens, and
provide the usual -noauth and -localauth options.

Change-Id: I8b3fc28b9151eb07eda858a0d7e6bd123a107d14
Reviewed-on: http://gerrit.openafs.org/7573
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 05:37:15 -07:00
Andrew Deason
568adf7d18 viced: Restrict RXAFS_FlushCPS to administrators
RXAFS_FlushCPS currently can be run by anyone, including
unauthenticated users. Forcing CPS calculation can be a relatively
resource-intensive operation, though, if done frequently enough, and
only should need to be done by administrators. Thus, only let
administrators use it.

Change-Id: Iaedd1e72e542b637070930bf1a0a9eba83a9ab64
Reviewed-on: http://gerrit.openafs.org/7572
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 05:37:00 -07:00
Andrew Deason
7a875f639f viced: Rename fs_rxstat_userok
The fs_rxstat_userok function can be used for other purposes; give it
a more general name.

Change-Id: Ic94e8121ac8b856b288712d486e34556be8250d6
Reviewed-on: http://gerrit.openafs.org/7571
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-06-27 05:36:31 -07:00
Andrew Deason
d4bab02f02 doc: Consolidate NetRestrict format docmentation
We were specifying exactly the same format in two different places;
consolidate them into one place. In addition, explicitly say there are
is no way to specify a range of addresses, in case some people are
confused by the previous versions of this man page that erroneously
said you could use 255 as a wildcard.

Change-Id: I18d96ee9e6c43dfb62719323fa7eb8d9f254e273
Reviewed-on: http://gerrit.openafs.org/7565
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 05:35:21 -07:00
Andrew Deason
4ae005062e doc: Remove reference to NetRestrict wildcards
Commit 80fc888a9223050481de932233fe7121a48df194 got some of this, but
forgot the other reference. We don't support these anywhere, so remove
it here, too.

FIXES 125340

Change-Id: I536336634beb835c9e1c93e23f8d7329fa821c96
Reviewed-on: http://gerrit.openafs.org/7564
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 05:35:06 -07:00
Ben Kaduk
58e7d52d00 Catch up on fbsd releases
Pull in the changes needed to even have a chance at supporting
FreeBSD 8.3, 8.4, 9-stable, and 10-current.
Conditionals for changed interfaces in a follow-up commit.

Change-Id: I4765679f6cef0555ce6d02ad281e127869d8924c
Reviewed-on: http://gerrit.openafs.org/7581
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 05:34:22 -07:00
Andrew Deason
e1ff7148cc cmd: Avoid premature OptionAsString free
Only free the previously-set string value if we're actually going to
change it. This avoids the scenario where a caller does something
like:

  char *str = strdup("defaultval");
  /* ... */
  cmd_OptionAsString(as, OPT_foo, &str);

resulting in 'str' pointing to freed memory when the relevant option
is not specified, or there is some other error.

Change-Id: If1f94d5eb39cc4dba9a4195ff20850ff81737eb9
Reviewed-on: http://gerrit.openafs.org/7475
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-06-27 05:33:58 -07:00
Derrick Brashear
1fbe83f9aa rx: abort on missing service
currently rx does not send an abort if a service does not
exist; it quietly ignores the packet. provide a hint we have
done so.

Change-Id: Id3533afd46ed21765d4d2aab630a896b21c945de
Reviewed-on: http://gerrit.openafs.org/7563
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 05:32:36 -07:00
Andrew Deason
a3ef19e199 FBSD: Add osi_fbsd_checkinuse
Add the osi_fbsd_checkinuse function, which contains code common to
the FreeBSD osi_TryEvictVCache and osi_VM_FlushVCache. Implement the
latter two in terms of osi_fbsd_checkinuse.

This commit should incur no behavior changes. This is just a
reorganization so future commits can change the implementations of
osi_TryEvictVCache and osi_VM_FlushVCache.

Change-Id: I42df9d6efb7b573bd933d0bf04924f668a3608da
Reviewed-on: http://gerrit.openafs.org/7432
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-27 05:32:23 -07:00
Michael Meffie
dda5cc0c5f vol: avoid attach retry loops on SYNC_FAILED
Avoid unnecessary volume attach retry loops if a volume
salvage is unable to be scheduled due to a hard error.

Change-Id: If1962b83e03f634044a55b03787661b8a7695008
Reviewed-on: http://gerrit.openafs.org/7566
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-21 10:57:22 -07:00
Derrick Brashear
e2d094595f libafs: put connection in analyze when conn srvr missing
we need to putconn in all cases we can in afs_Analyze, but at least
one case we didn't. fixed.

Change-Id: I4e3b8d9f8e7445e3641fad32ff54dde2d21bb06b
Reviewed-on: http://gerrit.openafs.org/7567
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-20 14:03:18 -07:00
Simon Wilkinson
c8e52c1f45 tests: Fix cmd config file path
Fix the configuration file path for the cmd test so that it works
when invoked from runtests

Change-Id: Id7d717e163abf5cfab2d551aaf08fb9967a87153
Reviewed-on: http://gerrit.openafs.org/7576
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-06-20 14:01:54 -07:00
Niklas Jonsson
3c16a2b296 Auth: increase size of DNS resolver answer buffer
This patchset increases the size of the res_search() answer
buffer from 1024 octets to 4096 octets.   This is not a proper
long term solution but will permit sites with longer response
lists to make use of SRV and AFSDB records.

This patchset only impacts UNIX systems.  Windows uses the
Win32 DNS resolver which dynamically allocates memory based
upon the size of the response.

FIXES 130936

Change-Id: I8434e128fb5918839c216209851b37a17cf94065
Reviewed-on: http://gerrit.openafs.org/7575
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-06-20 14:01:25 -07:00
Simon Wilkinson
5019ecd5fa rx: provide mechanism to send a bare abort packet
simply put an abort on the wire

Change-Id: I0486e1826da9466a2982ac07c3749876848a7f66
Reviewed-on: http://gerrit.openafs.org/7562
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-14 19:36:03 -07:00
Simon Wilkinson
4660b53e69 opr: Add simple time type
Add a simple time type to the opr library, which provides helper
routines to implement the 100ns time format selected for on-the-wire
use for AFS-3 (this also provides a handy single integer internal
time format)

Change-Id: I1f2d81e61a3e4124e0dd49830a115b72d7a7b37f
Reviewed-on: http://gerrit.openafs.org/7559
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-06-14 15:23:02 -07:00
Simon Wilkinson
ba300e35a5 viced: Abstract out peer mapping code
Pull the code which gets the peer information for an incoming connection
into its own function.

Reformat this function a little to avoid if-ladders.

Change-Id: I4a48e0079f00cca4fe651161fb19453f63527336
Reviewed-on: http://gerrit.openafs.org/7561
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-14 12:53:54 -07:00
Simon Wilkinson
fa1f2687af viced: Tidy up VL initialization
Tidy up the routines which initialize the VL server so that they
don't reopen an already open configuration directory, and so that
some global variables are less globally scoped.

Change-Id: I7e83073b2d984203e03133e94da4ec875d1b8472
Reviewed-on: http://gerrit.openafs.org/7560
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-14 12:49:21 -07:00
Simon Wilkinson
ed02c6ff8a rxgen: Make input strings const
Modify the code generation routines so that string inputs to RPCs
are declared as (const char *) on the client side. This doesn't affect
callers as we can freely cast from (char *) to (const char *), but means
it is easier to write API wrappers that accept const arguments.

Change-Id: I4719d04f03bd76cbe7ee21ad7511f6f3b3d36163
Reviewed-on: http://gerrit.openafs.org/7556
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-14 12:45:27 -07:00
Simon Wilkinson
9b97b80dd8 aklog: Fix error message fallback for Heimdal
Since we reverted to using Russ's upstream version of rra-c-util's
krb5.m4, we no longer check for the existence of the pure com_err
error_message().

So, for error message fallback on Heimdal, use krb5_get_error_message()
instead. As we don't have access to the context in which the error
occurred, build one to get the raw com_err error translation - this
won't give us any additional context specific detail.

Change-Id: I4bab080704ec5d08e8b85e6b7ad69cf1f89bf3b3
Reviewed-on: http://gerrit.openafs.org/7554
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-14 06:46:13 -07:00
Simon Wilkinson
5db615100a viced: Abstract out hpr thread context code
Every hpr lookup function had a copy of the same code to pull a thread
specific ubik context out of the pthread library, and to create one if
one wasn't already there.

Instead of endlessly repeating this code, create a small inline function
to do the job.

Change-Id: I7eac0eaebbd42978e40c90f0ce59b26f2e67d96d
Reviewed-on: http://gerrit.openafs.org/7558
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-14 05:36:08 -07:00
Simon Wilkinson
c855dd726a rx: Constify rx_opaque_populate
rx_opaque_populate doesn't modify the data passed into it, so
make that argument const

Change-Id: Icc7c121bda43a8abc19f72affc70967baba91e6d
Reviewed-on: http://gerrit.openafs.org/7557
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-14 05:35:52 -07:00
Simon Wilkinson
fac69a5c88 viced: Remove unused profiling code
src/viced/profile.c is never built, and contains unused code which
is now useless to us. Just remove it from the tree - it is in git if
we ever need it again.

Change-Id: I04da5395f5c4a618968958f1696f638e0db69122
Reviewed-on: http://gerrit.openafs.org/7555
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-14 04:45:44 -07:00
Derrick Brashear
a08604b78f uss: allow disabling by configure switch
provide an option to disable building uss. current heimdal
when built static can leak symbol names for its flex/bison parser
causing symbol conflicts. this is but a workaround, but
sites not needing uss can at least use it.

Change-Id: Ibab1dd189e7fbc41ca01e7ef7479421c056999f5
Reviewed-on: http://gerrit.openafs.org/7553
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-13 15:19:44 -07:00
Derrick Brashear
5d53c12b95 gtx: add configure switch to force not building
allow gtx and associated software to be turned off.

Change-Id: If02427311c79e0784fcc5fb1816a449f7dcdd879
Reviewed-on: http://gerrit.openafs.org/7552
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-13 15:19:28 -07:00
Derrick Brashear
6d3390bc16 aklog: can't assume krb5_524_conv_principal based on convert_creds
add probing for krb5_524_conv_principal directly instead of
assuming finding a 524 library will find it. current heimdal
does not include it.

Change-Id: Iea523e3e7ba4cb51ec5a0d4b38fec9c7df30529d
Reviewed-on: http://gerrit.openafs.org/7551
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-13 15:18:25 -07:00
Derrick Brashear
3e0eaec61e viced: fix GetVolumePackage to not bomb always when GetClient called
master only. already correct in 1.6. the gotos for error exit should
be called only when we have an error, due to missing braces that was
not true

Change-Id: I396be7d34ad741e01634a702784a0892f47a2d5a
Reviewed-on: http://gerrit.openafs.org/7549
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-11 15:27:46 -07:00
Derrick Brashear
3770ffe416 viced: fix merge error
when 37fc2dfbb9e3a8a8ecb022febae7ccd04d7340a4 was merged, the close
bracket went in the wrong place, meaning for non-remote calls
we don't re-enable keepalives. fix it.

Change-Id: I163db9b3b2f42f629d8a5ff22a75902a61a3138b
Reviewed-on: http://gerrit.openafs.org/7548
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-11 15:27:23 -07:00
Andrew Deason
4f9c3f2be9 vol: Avoid getting stuck in ATTACHING in attach2
Since commit 5fc2365f, a VNOVOL error early in attach2 meant that we
skipped changing the volume state to anything, and just returned
instead. When we do this, the volume is in VOL_STATE_ATTACHING for
DAFS, and so if we return, the volume will forever be in
VOL_STATE_ATTACHING. The next thing that tries to access the volume
will wait forever for the volume to come out of that state.

So, revert half of 5fc2365f, and transition to ERROR state instead.
This code path should not be hit during normal usage, since a
nonexistant volume access for the fileserver will be detected earlier.
If the volume does not appear to exist at this stage of attachment,
something is wrong with the volume, so this warrants the ERROR state.

For the volserver and other volume utilities, we may hit this when a
request just plain references a nonexistant volume for whatever
reason, but in that case the vp should go away soon. For non-DAFS,
this commit does not change much, since the difference between
error_notbroken and unlocked_error is very small.

The other half of 5fc2365f is not changed, since it is correct. For
VOFFLINE errors at this point, the volume has already been
transitioned to VOL_STATE_UNATTACHED, so it is okay to return. Add a
comment to help make this more explicit.

Change-Id: I63853f6e1721020cd204639c6e3ce4b59de08f75
Reviewed-on: http://gerrit.openafs.org/7516
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-11 15:26:53 -07:00
Andrew Deason
a43f0e4717 DAFS: Preattach, not attach, in FSYNC_Drop
FSYNC_Drop currently attaches volumes that were checked out by the
dropped fssync handler, but not checked back in, in order to make the
volume available again. For DAFS, however, a full attachment is
unnecessary; just preattach instead.

Change-Id: I2c9d0b8cf0ddc7f4182347706b2c26d86f69725e
Reviewed-on: http://gerrit.openafs.org/7515
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2012-06-11 15:26:00 -07:00
Andrew Deason
fff80cb198 vol-salvage: Unlock volumes before exiting
Normally, volume locks acquired by an exiting salvaging process would
be automatically given up when the process exits, since our FDs are
closed. However, if we exit by calling Exit() or Abort(), we
gracefully shutdown our SYNC channels before exiting. For FSSYNC, this
can result in the fileserver trying to online the volumes we had
checked out but had not yet checked back in, so the fileserver may try
to online a volume we have locked, before the locks have been
released.

To avoid this, unlock all volume locks for all partitions before we
shutdown SYNC channels on exit.

Change-Id: Idcda5fcf4639da7d4b951bea36606ea8daf68f3c
Reviewed-on: http://gerrit.openafs.org/7514
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2012-06-11 15:25:15 -07:00