Commit Graph

11726 Commits

Author SHA1 Message Date
Ken Hornstein
ce96143d79 Remove extra whitespace from macro invocations
On MacOS X 10.9, the compiler has switched to LLVM and as a consequence
generates an error if there is a space between a macro invocation and
the starting left parenthesis.

Based on code originally done by Matt Haught <dmhaught@ncsu.edu>.

Change-Id: I28848f5294d0575d8abb1759c202cc3c2db85ac2
Reviewed-on: http://gerrit.openafs.org/10540
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-12-05 20:50:15 -08:00
Ken Hornstein
cb53d255a6 Packaging support for MacOS X 10.9 "Mavericks".
Based on work originally done by Matt Haught <dmhaught@ncsu.edu>.

Change-Id: Ibc7d79953667dfdfcc2e6c5c1c4c77249f11f4ad
Reviewed-on: http://gerrit.openafs.org/10539
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-12-05 13:13:05 -08:00
Ken Hornstein
aac384b2ed Add support for configuration of MacOS 10.9 "Mavericks".
Based on work originally done by Matt Haught <dmhaught@ncsu.edu>

Change-Id: I331cfc0040fab526c32e24f6af970f352f0a0a8e
Reviewed-on: http://gerrit.openafs.org/10538
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-12-05 13:12:25 -08:00
Jeffrey Altman
2c8d55bee1 Windows: RXAFS_GetVolumeStatus no PRSFS_READ check
Since d2d591caf2 the file server no
longer performs a PRSFS_READ access check for the GetVolumeStatus RPC.
The cache manager should no longer test for PRSFS_READ as a means of
avoiding RPCs that are known to fail.

Change-Id: I67bd849d337d87657db8e1f0ed2839367b7972a8
Reviewed-on: http://gerrit.openafs.org/10532
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-12-05 09:21:58 -08:00
Chas Williams (CONTRACTOR)
082597be62 lwp: rw now depends on libopr
rw (a test program for lwp) needs libopr to build

Change-Id: I489e675f5a1b845c7a8083466b44a73af305f8b8
Reviewed-on: http://gerrit.openafs.org/10517
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-12-05 02:43:30 -08:00
Christof Hanke
faf14be382 Linux: fix whitespace issue
introduced in Change I1e84969b. It does not
follow the overall style.

Change-Id: I5f68fdf425b365d69ee94680cef014de679cf6ff
Reviewed-on: http://gerrit.openafs.org/10529
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-12-05 02:42:27 -08:00
Jeffrey Altman
9b6f791087 Windows: RDR capture Cc/Mm exceptions do not break
All of the Cc and Mm functions are wrapped in try/except blocks.
The purpose is to ensure that Cc and Mm do not return an error as
an exception which could result in the afs redirector failing to
release a resource.   Instead of calling the AFS exception handler
just handle the exception with EXCEPTION_EXECUTE_HANDLER.  This permits
the __except block to capture the exception code.

The AFS exception handler will throw its own exception if the
AFSDebugFlags AFS_DBG_BUGCHECK_EXCEPTION bit is set.  This is helpful when
debugging exceptions thrown by errors in the afs redirector code.  It is
not helpful when a Cc function throws an exception.  For example,
CcReadCopy() will throw STATUS_DELETE_FILE as an exception if an attempt
to read from a deleted file is initiated.   This should simply fail the
read operation not BSOD the system.

Change-Id: I2fd1d4db530600441272e59353fbf28b831e2691
Reviewed-on: http://gerrit.openafs.org/10524
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-12-03 13:28:22 -08:00
Jeffrey Altman
1e24762a2c Windows: AFSRDFSProvider NPOpenEnum vs no redirector
If there is no redirector device present, return WN_NO_NETWORK
to indicate that this network provider is not ready for browsing.

Change-Id: I3e33769bb2d52a59b0ff993aa07e89d959d60800
Reviewed-on: http://gerrit.openafs.org/10523
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-12-03 13:28:09 -08:00
Ben Kaduk
45f7528af7 Remove klogin
It has not been connected to the build since at least the 1.2 days
and should be considered dead code.

FIXES 131777

Change-Id: Id1551e7f9f543934dc8755a29f46aa7b905bfadd
Reviewed-on: http://gerrit.openafs.org/10522
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-11-27 10:18:08 -08:00
Jeffrey Altman
06fe295734 Windows: Rationalize Freelance vs "fs flush*"
Background:

cm_scache_t objects representing Freelance volume (cell=-1, volume=-1)
are special because they are populated from the Freelance mountpoint
and symlink tables.  These tables are in turn generated from the
registry.  The tables are regenerated on-demand after the execution of
cm_noteLocalMountPointChange() which increments cm_data.fakeDirVersion
which becomes the new data version value for the (-1.-1.1.1) directory
object.

The next time that cm_GetSCache() is called for a Freelance object
the fake root directory is rebuilt by cm_InitFakeRootDir().  Since the
vnode values are not persistent with regards to directory entry names the
FileId unique is used to distinguish the various versions.
cm_data.fakeUnique is incremented with each call to cm_InitFakeRootDir().

Each time cm_noteLocalMountPointChange() is executed the afs redirector is
notified of the data version change which will force the redirector to
rebuild its view of the directory the next time a path evaluation requires
evaluation of the root (\afs).  In other words, on the next request.

If cm_noteLocalMountPointChange() is executed multiple times there is the
possibility of a race between the redirector and the service.  When the
race is lost the redirector receives an invalidation event for -1.-1.1.1
as it is in the process of rebuilding the directory contents.  The
redirector ends up believing it has the most recent data version when it
doesn't but the service no longer has Freelance mountpoint and symlink
tables representing the requested data version.  Hence, the mountpoints
and symlinks end up as CM_SCACHETYPE_INVALID.

fs flushfile and fs flushvolume both had explicit checks to prevent
flushing Freelance objects because each call to cm_FlushFile() on a
Freelance object would execute cm_noteLocalMountPointChange() triggering
the race.

The Problem:

fs flushall is not executed on a specific object (volume or file).
Therefore there was no explicit check to prevent execution against
Freelance objects.  For each cm_scache_t in the cache cm_FlushFile() is
processed.  If there are N Freelance mountpoints and symlinks, there will
be N+1 calls to cm_noteLocalMountPointChange() in quick succession.  Not
only does this risk losing the race described above but it is extremely
wasteful as the Freelance tables may be repeatedly regenerated.

This Patchset:

This patchset re-organizes the Freelance processing in the flush code
paths.  cm_FlushFile() and cm_FlushVolume() can simply no longer be
successfully executed against a Freelance object.  Both will return
CM_ERROR_NOACCESS.

"fs flush <file>" is not permitted against Freelance objects.

"fs flushvolume <path>" will execute cm_noteLocalMountPointChange() once if
the path is a Freelance object.

"fs flushall" continues to execute cm_FlushFile() on all cm_scache_t
objects.  The calls on Freelance object will fail.  After all cm_scache_t
objects are flushed then cm_noteLocalMountPointChange() will be executed
once to force the Freelance directory to be rebuilt.

This patchset does not address the race but significantly reduces the
likelihood the race will be lost.

Change-Id: I298dad453432001b7b2e6f4533ddee17e041b02e
Reviewed-on: http://gerrit.openafs.org/10521
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-11-27 09:42:29 -08:00
Jeffrey Altman
0e851b7fcb Windows: Reset mp/symlink target during fs flush*
When processing a "fs flush*" command, reset the the cm_scache_t
mountPointStringp which contains the known mountpoint or symlink
target information.

Change-Id: I72bba6101699e82649eed226cdfc73077b13de92
Reviewed-on: http://gerrit.openafs.org/10520
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-11-27 09:42:19 -08:00
Stephan Wiesand
5b67620c7b Linux: Fix build for older kernels w/o bool
Commit b7f4f2023b broke builds against
older kernels which don't have bool defined in linux/types.h . Fix
this by using unsigned char instead of bool for the static inline
functions.

Change-Id: Icbb82446ef66edd2650f33135ed6ccd2b8a920b2
Reviewed-on: http://gerrit.openafs.org/10483
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-25 07:52:14 -08:00
Ken Hornstein
3f4c1099b7 Support for changes to OS X Mavericks VNOP_SYMLINK() function.
Add support for an extra argument to afs_symlink() to return the
newly-created symlink vnode if requested (this is needed on OS X
Mavericks).  On OS X Mavericks return the newly-created symlink vnode in
the symlink vnops functions, on all other platforms ignore it.

It turns out that technically OS X has required the symlink to be
created for a while, but code inside of symlink() would call namei() on
the symlink name if the returned vnode point was NULL.  The difference
is that on Mavericks the Manditory Access Control Framework has been
enabled, and that turns on some extra code which unconditionally calls
vnode_mount() on the returned vnode pointer, which ends up causing a
panic

Change-Id: I33b2f51cd10f76689eb9868eb05800ab493087c4
Reviewed-on: http://gerrit.openafs.org/10474
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-11-21 14:15:27 -08:00
Jeffrey Altman
a1b5a1d422 Windows: cm_Analyze retries vs CM_REQ_NORETRY
CM_REQ_NORETRY is set by threads that want all errors returned
immediately.  However, there are some errors that should never
be returned:

  RX_MSGSIZE
  RX_CALL_BUSY
  VNOSERVICE
  RX_CALL_IDLE
  RXKADEXPIRED
  VICECONNBAD
  VICETOKENDEAD

For these errors even if the thread has requested no retries a RPC
retry must be performed.

Change-Id: I692f65a9fdbbf27fc880ac8912fc72c1d1357c6d
Reviewed-on: http://gerrit.openafs.org/10470
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-11-20 15:31:46 -08:00
Chas Williams (CONTRACTOR)
a95b1f2f15 cmd: Correctly initialize cmd_OptionAsString arguments
These are coming from the stack and as such they might not be NULL.

Change-Id: Ia5c6efd08574b4de05a11dceae47021b0160395b
Reviewed-on: http://gerrit.openafs.org/10475
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-20 13:30:48 -08:00
Christof Hanke
779ab18baf Linux: always include <linux/uidgid.h> headerfile
when it is required. In some linux-kernels (like in SLES11 SP3)
it is not done automatically and the compilation fails.

Change-Id: I1e84969b26e87e36893b071103325a7a532ebbf9
Reviewed-on: http://gerrit.openafs.org/10471
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-19 05:03:51 -08:00
Michael Meffie
250a4341bc util: remove dup include
Change-Id: I415dbcae5ae549b6347286ecdee5717fb66cc012
Reviewed-on: http://gerrit.openafs.org/10319
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Christof Hanke <christof.hanke@rzg.mpg.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-19 03:27:35 -08:00
Michael Meffie
38fc16ddbf cleanup potpourri.h references
Clean up references to a header file which was removed some time ago.

Change-Id: I2ddc26afc01edf84bb1bdb21a3488c88dd6c9775
Reviewed-on: http://gerrit.openafs.org/10318
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-19 03:27:18 -08:00
Chas Williams (CONTRACTOR)
a178a9bd00 autoconf: Combine the x86/solaris configuration stanzas
This reduces some clutter and makes it easier to see what is
different.

Change-Id: I2bad8b085daf04444d2740287c106008e2650bc9
Reviewed-on: http://gerrit.openafs.org/10463
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-19 03:26:30 -08:00
Chas Williams (CONTRACTOR)
d067089e44 autoconf: Combine the sparc/solaris configurations
According to cc's man page:

  v9        Is equivalent to -m64 -xarch=sparc
	    Legacy makefiles and scripts that use
	    -xarch=v9 to obtain the 64-bit memory model
	    need only use -m64.

Change-Id: Idd1021f3fef9c427072079f3c7d7aa9ca6fa0060
Reviewed-on: http://gerrit.openafs.org/10462
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-18 04:24:48 -08:00
Jeffrey Altman
0570d13a62 Windows: cm_FindVolumeByFID
cm_GetVolumeByFID() does not query the vldb if the volume group
is not known to the cache manager.   cm_FindVolumeByFID() is to
be used in cases where the volume group data must be known for the
operation to successfully complete.

Change-Id: I9bb3bd13f14dea534952495b00a3348aafd2d591
Reviewed-on: http://gerrit.openafs.org/10465
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-11-15 16:59:06 -08:00
Jeffrey Altman
dbedd62b7c Windows: Fix out of range pointer validation
The ACL, Stat, and Volume pointer validation checks did not take
into account that NULL is a valid pointer value.  As a result the
cache validation failed.

Change-Id: I538310d534fd4ada383d5bf0dc58d49206fe3dfb
Reviewed-on: http://gerrit.openafs.org/10453
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-11-15 16:58:53 -08:00
Jeffrey Altman
727e951d8c Windows; GetSystemTimeAsFileTime
As per Raymond Chen's "The Old New Thing" blog

  http://blogs.msdn.com/b/oldnewthing/archive/2013/11/01/10462403.aspx

Calling GetSystemTime() followed by SystemTimeToFileTime() performs
two format translations which can be avoided by using
GetSystemTimeAsFileTime() directly.

Change-Id: I3d3de0e045777c9dfdb1c1f4503bfdfe19fb7b73
Reviewed-on: http://gerrit.openafs.org/10430
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-11-15 16:58:38 -08:00
Jeffrey Altman
3f5f3013e9 Windows: GiveUpAllCallBacks only if non-loopback
If the only ip addresses are known to be loopback addresses, then
do not waste time by attempting to GiveUpAllCallBacks during suspend
or shutdown.

Change-Id: I28b08e61435a7132ba08c9649010185097df0da0
Reviewed-on: http://gerrit.openafs.org/10429
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-11-15 16:58:25 -08:00
Anders Kaseorg
d0a13fe678 Linux: Get rid of !STRUCT_KEY_UID_IS_KUID_T case
On the few kernel versions before struct key.uid was converted to
kuid_t (v3.7-rc1~147^2~76), it was not possible to enable both
CONFIG_KEYS and CONFIG_UIDGID_STRICT_TYPE_CHECKS, so this case was
impossible.  That’s good, because it also had a typo in its
implementation (and was confusing to deal with correctly).

Change-Id: I4ecd164ed3604558ed4419bf6f9d531bd5d1a9ff
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/10443
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-11-13 07:55:11 -08:00
Anders Kaseorg
f5f53cb0a1 Linux: afs_fill_super: Call bdi_destroy on the failure path
Without this, if AFS startup failed, then trying to start AFS again
triggers these warnings:

WARNING: CPU: 3 PID: 657 at /build/buildd/linux-3.12.0/fs/sysfs/dir.c:526 sysfs_add_one+0xa5/0xd0()
sysfs: cannot create duplicate filename '/devices/virtual/bdi/afs'

WARNING: CPU: 3 PID: 657 at /build/buildd/linux-3.12.0/lib/kobject.c:196 kobject_add_internal+0x1f4/0x300()
kobject_add_internal failed for afs with -EEXIST, don't try to register things with the same name in the same directory.

and leads to general system instability.  This can be reproduced by
starting AFS twice with an empty cache, dynroot disabled, and no
network.

Change-Id: I8ec1ed365c5b3cf60bd34af0aca94e0c496bcaa3
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/10448
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-12 04:29:38 -08:00
Michael Meffie
9f6f419b9a build: more configure summary
Improved configure summary, including a check for namei fileserver mode.

Change-Id: Id5117ae8c27126c56e28eb3ab7f6e8ef7fd0558d
Reviewed-on: http://gerrit.openafs.org/10372
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-10 06:13:11 -08:00
Andrew Deason
53a50414c2 doc: backup manpage fixes
- Consistently specify -dryrun and -n across various subcommands.
   Many did not list -n, some listed -n but no -dryrun, and some
   listed -noexecute instead.

 - backup_volrestore: Add missing option -usedump

 - backup_deletedump: Add missing options -groupid, -dbonly, -force,
   and -portoffset

Change-Id: Iec1c36cba0ad0e61d7e6215c9cba81228b95a81f
Reviewed-on: http://gerrit.openafs.org/10441
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-07 04:21:42 -08:00
Andrew Deason
ad357e4ce4 backup deletedump: Change -port to -portoffset
Use -portoffset instead of -port, for consistency with all of the
other backup suite commands. Leave -port in as an alias, for backwards
compatibility. Currently -port will mean -portoffset anyway, since
it's an unambiguous abbreviation, but put in the alias explicitly,
just in case some other option comes along starting with -port.

Change-Id: I2f8aaa34fdf9e7c80a8fec1dc1caf63d9b7192b1
Reviewed-on: http://gerrit.openafs.org/10440
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-07 04:21:13 -08:00
Andrew Deason
dc4384653f backup: Display general help on -help
Currently, 'backup' tries to guess if we are running 'backup
interactive' before libcmd actually parses our arguments. This is
tricky, since we run 'backup interactive' if no explicit subcommand is
actually given. One consequence of this is that currently, running
'backup -help' just displays the help for the 'backup interactive'
command, not the help output for 'backup' itself.

The current heuristics for guessing at whether we are running 'backup
interactive' or not are a bit fishy, but at least for now, just make
sure -help works. This should still ensure any other behavior is
unchanged, but just 'backup -help' now works like other command
suites.

Change-Id: I31ecbcad7efffd301d23f109c66eee0417882a90
Reviewed-on: http://gerrit.openafs.org/10439
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-07 04:20:50 -08:00
Andrew Deason
c870513c5e doc: Add 'checkman' tool
Add the 'checkman' script, which compares a command's "-help" output
to the options actually documented in its manpage. This command is
certainly not perfect, and may contain false negatives and false
positives. It is not (currently) intended to be run as an automated
check, but is meant to assist a human manually checking the
correctness of man pages. An error reported by 'checkman' does not
necessarily indicate something that should actually be changed.

Change-Id: Iae1965c441279dd3f93c1a7283ea0a0140d5ebe3
Reviewed-on: http://gerrit.openafs.org/10442
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-07 04:20:11 -08:00
Andrew Deason
a9301cd2dc bos: Remove MR-AFS commands and options
The blockscanner and unblockscanner commands, as well as many options
to "bos salvage", were only of use to MR-AFS. MR-AFS is not used
anywhere anymore, and these commands and options were largely
undocumented, so get rid of them. See
<https://lists.openafs.org/pipermail/openafs-info/2013-January/039215.html>.
Thanks to Hartmut Reuter for providing information about this.

Change-Id: I496eb4a23a0310aafd6c224a08c76a8b7464c758
Reviewed-on: http://gerrit.openafs.org/10425
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-07 04:20:01 -08:00
Andrew Deason
27768ade85 volserver: Remove -sleep functionality
This option is completely useless since the LWP volserver was removed.
Remove the code for it.

Change-Id: I2257ba2ecd2ffeb9c47d21cbb516d6a0abb19b94
Reviewed-on: http://gerrit.openafs.org/10424
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-11-07 04:19:39 -08:00
Andrew Deason
90753f9dc7 volserver: Restore -allow-dotted-principals
Commit cd3492d0 converted volserver command-line parsing to use
libcmd. However, it accidentally also changed the
-allow-dotted-principals option to -dotted. Change it back to
-allow-dotted-principals for consistency with previous versions, as
well as other server processes.

Note that currently there are no public releases of OpenAFS containing
cd3492d0, so no public release has contained the -dotted option.

Change-Id: Ied07f0eb867a13591656daae00bc9e85a2c7f6c8
Reviewed-on: http://gerrit.openafs.org/10423
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-11-07 04:19:33 -08:00
Andrew Deason
90d4cbc285 volserver: Exit on arg parsing failure
If ParseArgs returns an error, argument parsing failed. Currently we
keep going anyway, ignoring the error. Exit instead.

Change-Id: I2f9e4e06d6c3fab8e29921bdb0ea30d714c794b1
Reviewed-on: http://gerrit.openafs.org/10422
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-11-07 04:19:26 -08:00
Anders Kaseorg
b7f4f2023b Linux: Fix build with CONFIG_UIDGID_STRICT_TYPE_CHECKS (user namespaces)
With CONFIG_UIDGID_STRICT_TYPE_CHECKS (a dependency of user namespace
support, CONFIG_USER_NS) turned on, uid_t and kuid_t are different
types, as are gid_t and kgid_t, and we need to use namespace-dependent
functions to convert between them.

We can’t use init_user_ns as the namespace because it’s GPL-only, so
instead we grab the current user_ns at module load time.

This is required to support kernels with user namespace support.  We
don’t yet have full support for independent AFS use by different users
in a multiuser container; that will need to wait for future work.

Change-Id: Icc03f9098dd25b483d406db5167264ba960cdcb7
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/10386
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-05 11:44:55 -08:00
Anders Kaseorg
231e50ff97 afs_linux_pag_from_groups: Stop checking for NOGROUP sentinel
Linux hasn’t used NOGROUP as a sentinel like this since before kernel
2.1.12, and OpenAFS hasn’t used it on Linux since commit
109927bf6f (Remove pre-Linux 2.6
support).

Change-Id: I0b18de8e5d9b6cd9b20da43ed050163c2d8651ff
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/10426
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-05 11:44:04 -08:00
Andrew Deason
076b9b7465 Exit successfully on -help
Running a command with -help is not an error. cmd_Dispatch handles
this correctly, but several server processes call cmd_Parse directly,
and exit with failure on -help. Make them exit successfully instead.

Change-Id: Ieab32ba4a62a182308538469e69320d241dc3aad
Reviewed-on: http://gerrit.openafs.org/10421
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-04 18:36:18 -08:00
Andrew Deason
d28a21f0d8 klog.krb5: Don't hide the -x option
We accept the -x option, even if it doesn't do anything. Don't hide
it, to be honest about what options we accept.

Change-Id: I779558c429b18c97c495c5e9ae81f8630383f572
Reviewed-on: http://gerrit.openafs.org/10420
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-04 18:36:11 -08:00
Andrew Deason
e7b75a2e40 Do not hide -enable_{peer,process}_stats
Both afsd and kaserver accepted the -enable_peer_stats and
-enable_process_stats options, but they did not include the options in
their usage message. We already document these flags in the manpages,
so also include them in the usage message; they are not a secret.

Change-Id: Ic1ff0e8c0dcd07e2721676b09a53c30a3db3ee9d
Reviewed-on: http://gerrit.openafs.org/10419
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-04 18:36:05 -08:00
Andrew Deason
701fe99a58 ptserver: Fix argument aliases
It's "-db", not "db". Similarly, it's "-depth", not "depth".

Change-Id: I24a3f08d02f9b14d06ad3f04c52957c46001b2d9
Reviewed-on: http://gerrit.openafs.org/10418
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-04 18:35:59 -08:00
Andrew Deason
20faeaaa32 bozo: Fix help message formatting
Need a space here to separate [-allow-dotted-principals] from the
following option.

Change-Id: Iabe353fd1c5366064a448c15a7c986d0fcf35415
Reviewed-on: http://gerrit.openafs.org/10417
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-04 18:35:53 -08:00
Andrew Deason
f2ac99c5b4 viced: Misc argument parsing fixes
- It's -pctspare, not pctspare.

 - The -config and -logfile options are already specified in the
   "testing" options section. Don't specify them again here.

Change-Id: Ieace97d92d35dc2e310a8122bdec7987246aa723
Reviewed-on: http://gerrit.openafs.org/10416
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-04 18:35:46 -08:00
Andrew Deason
5e461e52dc doc: Add 'fs discon' manpage
Change-Id: I67c3bf50bfb7f4f7c0eb46cd011cc8ae68ec5302
Reviewed-on: http://gerrit.openafs.org/10415
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-04 12:21:27 -08:00
Andrew Deason
e96803d22a doc: Add 'fs nukenfscreds' manpage
Change-Id: I51c6cd56f463e10ab51adf20a0cf8505e3361326
Reviewed-on: http://gerrit.openafs.org/10414
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-04 12:20:58 -08:00
Andrew Deason
fb311d271d doc: Add 'fs precache' manpage
Change-Id: Ib4101fdb37cf91a547974216425e4a005392d988
Reviewed-on: http://gerrit.openafs.org/10413
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-04 12:20:29 -08:00
Andrew Deason
ff3fca515e doc: Symlink all dafssync-debug pages
For every fssync-debug subcommand, provide a symlink for the
associated dafssync-debug subcommand. This way, running e.g.
"man dafssync-debug_attach" will actually give you a manpage, instead
of needing to specifically run "man fssync-debug_attach".

Change-Id: I83d71dc14f9f838d9a9900fcc62817677898dd27
Reviewed-on: http://gerrit.openafs.org/10412
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-04 12:20:06 -08:00
Andrew Deason
477f270656 doc: Fix livesys output formatting
If we indent text here, the formatting codes are not interpreted, and
the text is output "raw". So currently, we actually see
"I<system_type>" in this section, which is a bit confusing.

Saying the actual output with string substitutions and stuff here
doesn't seem very helpful when the output doesn't have any constant
text in it. Just describe what the output is instead; an example
immediately follows if this is unclear.

Change-Id: Ib3e0f0c5143afa2dd41a655ff3908c791026a426
Reviewed-on: http://gerrit.openafs.org/10411
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-04 12:18:48 -08:00
Andrew Deason
e3cd2bcc61 doc: butc manpage fixes
Add missing -rxbind option.

Change-Id: I25fb205dc058ed345bda4d86bd1d344457432939
Reviewed-on: http://gerrit.openafs.org/10410
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-04 12:17:17 -08:00
Andrew Deason
bd8282d7bc doc: pt_util manpage fixes
Add missing -help option.

Change-Id: I2edd7bcaf5b5799ba1216777200580df2cd9ca7f
Reviewed-on: http://gerrit.openafs.org/10409
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-11-04 12:16:31 -08:00