12130 Commits

Author SHA1 Message Date
Jeffrey Altman
ba0b0986ec Windows: Fix cm_AppendServerList
Should use || and not | as the operator when testing for
NULL pointers.

Change-Id: I00afe64aec4f965d6a831028b546ed01d8e9672a
Reviewed-on: http://gerrit.openafs.org/11523
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2014-11-25 11:55:01 -05:00
Michael Meffie
3b8c4abf81 cmd: avoid piggy-backing flags in the help string
Remove the hack to piggy-back the hidden command option
in the help string argument.

Change-Id: Iedcb6b96e98b766e3ef2c87cd6e5d41874f2c0b7
Reviewed-on: http://gerrit.openafs.org/10982
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2014-11-25 09:43:07 -05:00
Michael Meffie
0adad43d8e cmd: add flags argument to create syntax function
Add the flags argument to cmd_CreateSyntax() and update all callers.
The flags argument will be used to set command options, such as
CMD_HIDDEN.

Change-Id: Ia51be9635f262516cb084d236a9e0756f608bf16
Reviewed-on: http://gerrit.openafs.org/11430
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2014-11-24 21:09:52 -05:00
Garrett Wollman
744a0e6df1 FBSD: osi_vcache: remove support for unsupported FreeBSD releases
Support for FreeBSD 7.x terminated in early 2013, and it's highly
unlikely that anyone was successfully using OpenAFS in that
environment.  OpenAFS has not been tested on 7.x since at least that
time, probably longer.  This removes the #ifdefs that support pre-8.0
releases.

Change-Id: I01cbce2d98f02755b170df34d948a94525df3853
Reviewed-on: http://gerrit.openafs.org/11382
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2014-11-24 19:15:39 -05:00
Nathaniel Wesley Filardo
94d5807d82 Export xdr_nbulkentries from liboafs_vldb
Change-Id: I117b875189f4f9de971a99ff68eca470515a11ad
Reviewed-on: http://gerrit.openafs.org/11449
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2014-11-24 19:11:46 -05:00
Nathaniel Wesley Filardo
e053b6bf43 Move vos COMMONPARMS to a larger offset
Currently, vos.c leaves a gap of 12 in the argument handling array
before its common operations (-verbose, -noauth, etc.); 'vos each'
will take more, so move that to 25.

While here, switch to named constants for these arguments, which
should make it easier to do this again, if ever necessary.

Change-Id: Idc4424e5fe4efd78389ea8421db000a361b461ec
Reviewed-on: http://gerrit.openafs.org/11332
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2014-11-24 19:11:21 -05:00
Ben Kaduk
562b8f39d1 rx: Named values for securityObjectStats types
Stop using hardcoded constants and use defined symbols for these
values.

Change-Id: I3edcf809572cb8c8360af19dcab7a12c4d1be4a9
Reviewed-on: http://gerrit.openafs.org/10528
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2014-11-22 22:48:44 -05:00
Benjamin Kaduk
da12da791e Disallow creating users with ANONYMOUSID
It can result only in sadness.

Document this restriction alongside UID 0 as a reserved number.

Change-Id: Ibea2d98bc15a730bc85e84477791ca45a40f2d92
Reviewed-on: http://gerrit.openafs.org/10950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2014-11-22 21:37:27 -05:00
Andrew Deason
cb8195d2d6 systemd: RemainAfterExit in openafs-client.service
Currently, if the client is started without any options that require
an extra thread (like -afsdb), all processes spawned by afsd will
exit. There may be some kernel threads still active, but those are
spawned by the kernel module, and are not child processes of the
parent afsd process, or anything like that.

Since we are a Type=forking service in systemd, systemd interprets
this situation to mean that the service has stopped successfully, and
then runs the ExecStop commands. So, for example, if our AFSD_ARGS in
our sysconfig is "-fakestat -afsdb", the service starts as normal. But
if it is changed to "-fakestat", then when openafs-client.service is
started, it immediately stops again.

To avoid this, turn on the systemd option RemainAfterExit, which tells
systemd that the service has not stopped if all of our processes have
exited. The client service will thus remain running until it is
stopped.

Issue reported by Rich Sudlow.

Change-Id: If760d3617d4afbcfac923df726eb58b03ce25771
Reviewed-on: http://gerrit.openafs.org/11440
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2014-11-22 17:17:38 -05:00
Jonathan A. Kollasch
cbf67da1e5 NetBSD osi_crypto: use cprng(9) for random source on NetBSD 6.99/7.x
Change-Id: Id8ee7f149cdc921989a5de7dda35739147de0014
Reviewed-on: http://gerrit.openafs.org/11086
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2014-11-19 19:59:26 -05:00
Benjamin Kaduk
ce0cad182c Update CellServDB to 20141117 snapshot
This should be all the locations we keep it in-tree.

Change-Id: I6819bf0658766aaad21ad38417295616418d41c5
Reviewed-on: http://gerrit.openafs.org/11607
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2014-11-19 15:25:40 -05:00
Jonathan A. Kollasch
f8ec0c9d55 NetBSD: catch up to <sys/simplelock.h> removal in NetBSD 6.99.x
Change-Id: I2c663fc426914e978e98c6003419503b57a020d3
Reviewed-on: http://gerrit.openafs.org/11087
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2014-11-18 18:19:32 -05:00
Michael Meffie
7ae5b73a90 fix whitespace errors in acinclude.m4
Use tabs instead of spaces in the sysname lookup case
statement for the macos cases.

Change-Id: Iee03d1b593aee4f6c4bc2488b069b21e116c9f1d
Reviewed-on: http://gerrit.openafs.org/11566
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2014-11-06 13:26:20 -05:00
Andrew Deason
a9a3cb2eff LINUX: Avoid check for key_type.match existence
Commit b5de4a9f removed our key_type 'match' function for kernels that
do not have such a 'match' function pointer. However, this added a
configure test where we are supposed to fail for the "new" behavior,
which is discouraged.

This causes an actual problem, because this test will fail on at least
RHEL5, due to arguably unrelated reasons (the header file for the
relevant struct is in key.h instead of key-type.h). And so, in that
situation we avoid defining a 'match' function callback, meaning our
'match' function callback is NULL, which causes a panic when we try to
actually look up keys for a PAG.

To fix this, transform the 'match' config test into one where we
succeed for the "new" behavior. We do this by testing for the
existence of the new functionality that replaced the old 'match'
function, which is the match_preparse function (specifically, the
'cmp' field in the structure accepted by match_preparse). This should
cause unrelated compilation errors to cause us to revert to the "old"
behavior instead of the "new" behavior. At worst, this should cause
build issues if we get the config test wrong (since we will try to use
the 'match' function definition that does not exist), instead of
panicing at runtime.

Note that while we test for key_type.match_preparse, we don't actually
use that function, since our 'match' functionality is the same as the
default behavior (according to b5de4a9f). So, we can avoid defining
any such function for newer kernels.

Thanks to Stephan Wiesand for bisecting this issue.

Change-Id: If6f93d6b5340fa738a55adeb7778d26ff5dbacc1
Reviewed-on: http://gerrit.openafs.org/11589
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2014-11-06 13:25:49 -05:00
Arne Wiebalck
255c0a564f rx: initialize memory before use
initialize sockaddr_in.sin_zero before using. cosmetic, might fix some
compiler warnings.

Change-Id: Ib9c4707373ca98742f6a5e28e60006499527fa38
Reviewed-on: http://gerrit.openafs.org/10816
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2014-11-06 13:22:35 -05:00
Benjamin Kaduk
7583f97d5f Allow compiling with KERNEL and AFS_PTHREAD_ENV
Add the necessary preprocessor conditionals to allow building
libuafs with AFS_PTHREAD_ENV defined.

A follow-up commit will switch to building libuafs using libtool,
which will set the pthread compiler/linker flags.  UKERNEL is already
using the pthread primitives for its internal kernel synchronization,
so there should not be any harm from additionally specifying the
pthread build arguments.

This change was produced mostly in a mechanical fashion, attempting
to perform such a build, and eliminating compiler and linker errors
in an iterative process.  No concerted effort has been made to audit
the whole kernel codebase for correctness of conditionals, but the
linktest executable does link (that is, the overall build succeeds).

Change-Id: I14a3ab5fce72812d92ba5657c734783dbd086ee3
Reviewed-on: http://gerrit.openafs.org/11546
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2014-11-05 13:56:18 -05:00
Jeffrey Altman
a55d61b1f5 klog: make krb5_524 non-fatal for native K5 tokens
The krb5_524_conv_principal() function should fail whenever the Kerberos
v5 principal cannot safely be mapped onto a Kerberos v4 principal, and
does fail on some Kerberos v5 principals used in real-world AFS
deployments.

Prior to this patchset a failure was treated as a fatal error that
in turn prevents an AFS token from being generated or set into the
cache manager.

Prior to b1f9b4cb5dd295162ae51704310e9d6058008f0a the
krb5_524_conv_principal() function wasn't used and a local client
mapping was created.  b1f9b4cb5dd295162ae51704310e9d6058008f0a
replaced the local mapping with the krb5 function because the local
mapping could be wrong and confusing.

The krb5_524_conv_principal() function as applied to AFS tokens is
just a local guess.  How the username in the token is interpreted by
the AFS server is up to the server.

krb5_524_conv_principal() is only used for Krb5 native tokens. For Krb4
tokens the krb5_524_convert_creds() function is used to obtain both the
Kerberos v4 ticket and the converted names from the KDC. Many
organizations used the krb524d service to perform name translation. When
the krb524d service is used, the name translation is performed by the KDC,
so there is no local call to krb5_524_conf_principal() which might fail.
As a result, disallowing the use of a native Krb5 token due to a failed
local name translation is a needless loss of functionality; the local name
translation is not an essential part of obtaining a token.

This patchset modifies the behavior such that krb5_524_conv_principal()
errors are non-fatal.

 1. If -noprdb is not specified the error message is generated
    and a NULL username is used.

 2. If the username is NULL the prdb lookup is disabled.

 3. If the username is NULL the informational messages do not
    include a username.

 4. If the username is NULL the username info provided to the
    cache manager in the token description is the nul string.

Credit to Ben Kaduk for assistance with the wording of this
commit message.

Change-Id: Ib07131fc0ff4bf5319815213198c3f0adac17b10
Reviewed-on: http://gerrit.openafs.org/11542
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 10:41:09 -05:00
Nathaniel Wesley Filardo
d9a39f3580 Stylistic tweak lwp/process.o machinery
Rename process.s to process.default.s so that the name "process.s" is free
for use, and switch to using that as the ephemeral file name.  This enables
the use of gcc for ${AS}, despite gcc's ignoring files with extensions that
it does not recognize.

Change-Id: Idc0716547770fe4fc94bc3fa2c223966f3f76c3b
Reviewed-on: http://gerrit.openafs.org/11535
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:40:05 -05:00
Andrew Deason
96e001088c tests: Fix fmt-t.c warning
'main' in fmt-t.c was declared as a prototype-less function, which
triggers a warning, which is an error with --enable-checking. Fix it
by declaring 'main' properly.

Change-Id: I45cfec591acd0ef8d7836c79e997e8ffe29b9e38
Reviewed-on: http://gerrit.openafs.org/11539
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Nathaniel Filardo <nwfilardo@gmail.com>
2014-11-05 08:39:25 -05:00
Michael Meffie
6b93ad695e vldb_check: fix false mh block error message
Fix a false error message about invalid mh blocks when the vldb has more
than one mh block.  To add insult to injury, vldb_check complains about
the wrong address and block number.

The flags field in the mh block header is in network byte order, in all
of the blocks, not just the first one.  Be sure to convert all of them
to host byte order so the VLCONTBLOCK flag check works.  Fix the error
message on the secondary blocks to show the correct address and block
number.

Example bogus error messages:

vldb_check ./vldb.DB0
address 132120 (offset 0x20458): Multihomed Block 0: Not a multihomed block
address 132120 (offset 0x20458): Multihomed Block 0: Not a multihomed block
address 132120 (offset 0x20458): Multihomed Block 0: Not a multihomed block

Change-Id: I31d96ad43f01fbf2774815184942be45e2d7820b
Reviewed-on: http://gerrit.openafs.org/11555
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:38:15 -05:00
Benjamin Kaduk
46bc619c38 Finish deorbiting libjuafs.a
Change I2074d5bc26e326db36b16e055431818ef1c69210 removed the separate
compilation/link of a libjuafs.a (since it was functionally identical
to the libuafs.a already being built), but retained a libjuafs.a in
TOP_LIBDIR for use by src/JAVA/libjafs/.

This commit adjusts src/JAVA/libjafs to refer to libuafs.a directly,
and removes references to libjuafs.a which are no longer relevant.

Change-Id: I0d02ea9e4be773ac50a04925c45e5f243650e21a
Reviewed-on: http://gerrit.openafs.org/11526
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:37:51 -05:00
Benjamin Kaduk
003519485d Make afs_usrops.h more closely resemble reality
Remove prototypes for many routines which are not implemented.
(I thought some toolchains would complain about this sort of thing?
Maybe we disable it.)

Change-Id: Id09f494f1c64c2feb05ae82ead9898c08888a5de
Reviewed-on: http://gerrit.openafs.org/11547
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:37:23 -05:00
Benjamin Kaduk
33f20e841d Build libuafs with libtool
Use the standard program for building PIC and non-PIC object files,
instead of rolling our own.  This allows us to pull the build rules
into the Makefile.common, leaving just compiler flags and similar
in the MakefileProtos.

This does change the build flags being used to compile these files
somewhat -- the old CRULE1 and CRULEPIC used CC instead of CCOBJ
or MT_CC, and did not pass MT_CFLAGS, but it should be safe to
move to the standard compiler invocations.  We can also eliminate
the libuafs-specific 'OPTF' variable which expands to OPTMZ almost
everywhere.

Rename our COMMON_INCLUDE to MODULE_INCLUDE so it's picked up properly
by the standard build rules; this will let us remove
${TOP_OBJDIR}/src/config and ${TOP_INCDIR} once the rest of the
build rules in this Makefile are converted to use libtool, as those
include directories are already added by COMMON_INCL in Makefile.config.

As a side effect, we get rid of the LIBUAFS make variable -- all sites
were defining it to libuafs.a anyway, so we can just hardcode it.

We can also build a shared libuafs.la "for free".  Don't install
it anywhere just yet, though.

Change-Id: I2bda2f40bbd0aa808c24e074d2d7bcd329f6b77e
Reviewed-on: http://gerrit.openafs.org/11472
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:37:03 -05:00
Benjamin Kaduk
ba229cbf45 Attempt to make hcrypto parallel-safe
make -j4 on a Fedora buildbot machine failed to compile engine.lo
because hcrypto/rand.h was missing.

Change-Id: I2750db9ed932144fbc66ede41d24c4930172a446
Reviewed-on: http://gerrit.openafs.org/11548
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:36:07 -05:00
Benjamin Kaduk
c7f1db24d5 (Partially) unify XDR for libuafs and libafs
The libuafs build was getting xdr_vector() from both afsaux.c and
xdr_update.c, but because of the rules for creating static libraries,
this did not cause build errors.

The libafs build is sensitive to duplicate symbols, and was only
getting xdr_vector() from afsaux.c; libafs was not building xdr_update.c
or xdr_refernce.c (that is not a typo).

Remove duplicate xdr_vector() from afsaux.c, and build xdr_update.c
and xdr_refernce.c into libafs.

Remove the unused #define of AUTH_DES.

Change-Id: I58ea595d424801697acb07406664ede33aeaf026
Reviewed-on: http://gerrit.openafs.org/11545
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:35:47 -05:00
Benjamin Kaduk
67d168511e Avoid AFS_version conflicts in uafs
libuafs links in both afsd.o and AFS_component_version_number.o;
afsd.c #includes AFS_component_Version_number.c, which causes
symbol conflicts when linking shared.

Don't include the version file when compiling for UKERNEL, to
avoid the conflict.

Change-Id: I9474faf10e029d0022b12431aad51e27412b19fc
Reviewed-on: http://gerrit.openafs.org/11544
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:33:20 -05:00
Benjamin Kaduk
7223d7b00c Do not install kauth manpages when kauth is disabled
Commit 5afe7a882b0bb90a515e505d9ffce4f644633f06 added a configure
option to disable the installation of the kauth suite, but did not
add any logic to disable the installation of the corresponding man
pages, so those man pages were always installed regardless of the
options to configure.

Add logic to doc/man-pages/Makefile.in to create .noinstall files
for man pages which should not be installed in the current configuration.
Depend on the Makefile (which will be regenerated by configure) in
this target so as to attempt to behave properly if configure is re-run
with different arguments in the same working tree.

Change-Id: I19b77a9f20fe27c49db14f3e800d8c77cda1bb3a
Reviewed-on: http://gerrit.openafs.org/10993
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:32:59 -05:00
Andrew Deason
c36a1525f1 auth: Fix GetNthIdentityOrUser EOF return code
Before commit 0af17e7e, afsconf_GetNthUser always returned 1 on
failure, to indicate to the caller that they should stop traversing
over the list. After commit 0af17e7e, when reaching the end of the
list, we return EIO or -1. This causes 'bos listusers' invocations to
always fail, since 'bos' clients expect to get the code 1 when
reaching the end of the SUsers list.

To fix this, make GetNthIdentityOrUser always return -1 when searching
beyond the end of the list. For the newer interface
afsconf_GetNthIdentity, we return this as-is, to have a separate
return code specifically for EOF, but still allowing us to return any
positive error code in case of an error.

For the older interface afsconf_GetNthUser, return 1 in this
situation, to retain compatibility with the old interface (both at the
libauth level and on the wire).

Change-Id: I2db4760440d7846dc290a05fa24e24ec97a02f12
Reviewed-on: http://gerrit.openafs.org/7377
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:32:40 -05:00
Benjamin Kaduk
01bbe37727 Remove dead code
RX_ENABLE_TSFPQ is never defined for KERNEL builds.

In any case, there's a syntax error in the removed code, with a
missing '&' before rx_stats.receivePktAllocFailures.

Change-Id: I3aaf3d80f7dfee6836016b65b057e1312d716368
Reviewed-on: http://gerrit.openafs.org/11543
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:31:52 -05:00
Benjamin Kaduk
f39dd54e11 Build fix for recent FreeBSD -current
r273707 added a flags argument to syscall_register(), so
add the appropriate version check in param.generic_fbsd.h
and ues that in the main code.

Change-Id: I7ddf6e1295d7ed94625f19fdeee4e38ef5fd511e
Reviewed-on: http://gerrit.openafs.org/11565
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:31:30 -05:00
Michael Meffie
ae8df21d26 remove cmd-suite-option-for-hiding-admin-commands
Remove the incomplete and non-functional cmd option for hiding admin
commands, introduced in commit 36d02757fd6863a845163daf0d730bdcc0a28343.

This patch removes the CMD_ADMIN flag, the non-functional help -admin
parameter, and the non-functional cmd_IsAdministratorCommand() function.

Thanks to Jeffrey Altman for pointing out this old commit and for
suggestions on cleanup.

Change-Id: I72c7d2ed7109b1238713fe0d6d177c5af6fc6b7d
Reviewed-on: http://gerrit.openafs.org/11429
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:30:35 -05:00
Nathaniel Wesley Filardo
c22e1797e8 Add sparc_linux26 sysname and params
A copy of sparc_linux24 without #undef USE_UCONTEXT.  Userland
tested on a Debian unstable-release machine.

Change-Id: I69a4226622748b18f5835d6517297b2d3750586a
Reviewed-on: http://gerrit.openafs.org/11567
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2014-11-05 08:30:17 -05:00
Benjamin Kaduk
27b66f24aa Attempt to make the server install bits current
Avoid using -noauth, and mention both the rxkad.keytab (1.6)
and the KeyFileExt (as 1.8, though it's only master at present).
To support these, move forward the use of kadmin to extract
the afs/cell principal's keytab.

Move the buserver's creation to the end of the list and mark it
as optional (many sites do not run the AFS backup suite).

Deindent some programlisting blocks so they don't flow off the
page as much in the PDF version.

Drop vos syncserv and vos syncvldb from the tasks for setting
up a new server; they should not be needed, as the new db server
should pick up the existing database when it joins the quorum.

General edits for clarity, whitespace and such.

Change-Id: I951ec3ee237e4c83a17c82802328f0a454b61097
Reviewed-on: http://gerrit.openafs.org/11581
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:29:48 -05:00
Benjamin Kaduk
f0ba037073 Switch other-linux to built-from-source
Don't talk about tarball distributions; we shouldn't be
doing those anymore.  Also switch away from 'make dest'.

Change-Id: If0badacab4b3c2492e90867328153f83da82bfc1
Reviewed-on: http://gerrit.openafs.org/11580
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:29:21 -05:00
Benjamin Kaduk
112064b98f Add a Debian/Ubuntu subsection
As an alternative to rpm-based systems or "systems packaged as
tar files".  Luckily, the instructions are pretty simple.

Change-Id: I8045763b518465c3ffd7fe3f177fff98146033fb
Reviewed-on: http://gerrit.openafs.org/11579
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:29:05 -05:00
Benjamin Kaduk
face986d94 Deorbit upserver from the quickstart guide
It's not the recommended way to push updates anymore,
and clutters up the guide.

Change-Id: I248380f12609a2ca03f47602773dc08f230b6fbe
Reviewed-on: http://gerrit.openafs.org/11578
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:27:16 -05:00
Benjamin Kaduk
b83ba7e3fd Drop the non-DA fileserver
The instructions are clearer when we just tell people what
to do, and we think that dafs should be right for almost
everyone.  Mention that the traditional fileserver is an
option and where to read about it, but nothing more.

Change-Id: I1fccceb8ee2bf2ec1e5afb0f5b034f029ee96c61
Reviewed-on: http://gerrit.openafs.org/11577
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:25:52 -05:00
Benjamin Kaduk
2c6886bf8c Reorder "Getting Started" sections
Put the ones most likely to be relevant at the top, instead
of sorting alphabetically.

Change-Id: I6ad80ee2a30b7192d8c8e4668234fa1789e1a213
Reviewed-on: http://gerrit.openafs.org/11576
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:25:27 -05:00
Benjamin Kaduk
f71063b032 Deorbit "Getting started on IRIX systems"
IRIX is mostly gone as an upstream.  The case for removing this
is less clear than the case for removing the HP-UX docs, but
it still feels like clutter in this document.

Change-Id: Ib7e9bfc8f7ae8e08e9f12b70d5df615496f57bb6
Reviewed-on: http://gerrit.openafs.org/11575
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:24:54 -05:00
Benjamin Kaduk
ce57b96ecb Deorbit "Getting started on HP-UX systems"
We don't really support HP-UX anymore; no need to clutter up
the documentation with it.

Change-Id: Ib75f4f137c3cfcb5ab2aece3746964f1cfbab051
Reviewed-on: http://gerrit.openafs.org/11574
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:24:39 -05:00
Benjamin Kaduk
2e9c06056b Update QuickStartGuide front matter
Bump copyright and, uh, major version for the "in progress" note...

Change-Id: I5edd235864138b82c84dc1c1218f849217efad1e
Reviewed-on: http://gerrit.openafs.org/11573
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:24:22 -05:00
Michael Meffie
86cdf6daa7 roken: configure checks for inet_ntop and inet_pton
Change-Id: Idf2eee040235bbf1f34ed993c74dd5936ae063c6
Reviewed-on: http://gerrit.openafs.org/11584
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:23:54 -05:00
Heimdal Developers
dedc1734e5 Import of code from heimdal
This commit updates the code imported from heimdal to
5dfaa0d10b8320293e85387778adcdd043dfc1fe (git2svn-syncpoint-master-311-g5dfaa0d)

New files are:
	roken/inet_ntop.c
	roken/inet_pton.c

Change-Id: Ice2f687c67550409b366fbea3e52ae42284f4cbd
Reviewed-on: http://gerrit.openafs.org/11583
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:23:38 -05:00
Michael Meffie
f4c2befbdf roken: add inet_ntop and inet_pton to the imported file list
Change-Id: If785d18e3fd5f333c62bff9ddee2c5835ee871db
Reviewed-on: http://gerrit.openafs.org/11582
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:23:31 -05:00
Michael Meffie
e4a8a7a38d avoid writing loopback addresses into CellServDB
Do not use loopback addresses for the server side CellServDB file.  Use
getaddrinfo() instead of gethostbyname() to look up a list of IPv4
addresses for a given hostname, and take the first non-loopback address.

This avoids writing a loopback address into the CellServDB on systems
such as Debian, which map the address 127.0.1.1 to the hostname in the
/etc/hosts file.

Change-Id: I11521df50262ca80c7db21b7b44671d94bef3587
Reviewed-on: http://gerrit.openafs.org/11585
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:23:03 -05:00
Michael Meffie
9be7e23cc5 Document the vldb (ubik) file format
Briefly document the vldb version 4 file format.  Describe the vl
header, the vl entry, and mh extensions.

Thanks to Marcio Barbosa for an initial draft, comments, and review.

Thanks to Ben Kaduk the prdb.txt, and for an initial review and comments.

Change-Id: If3ca85419027a218b7bb1585f5d5cd4763ad5b26
Reviewed-on: http://gerrit.openafs.org/11564
Reviewed-by: Nathaniel Filardo <nwfilardo@gmail.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
2014-11-05 08:22:35 -05:00
Andrew Deason
ba1cc838ab LINUX: Avoid d_revalidate failure on mtpt mismatch
Currently, if afs_linux_dentry_revalidate is given an inode that
corresponds to a mtpt vcache ('vcp'), it resolves the mtpt to its root
dir if it's easy to do so (mvid and CMValid are set). Later on, we run
afs_lookup to see if looking up our dentry's name returns the same
vcache that we got; afs_lookup presumably will also resolve the mtpt
if it's easy to do so.

However, it is possible that afs_linux_dentry_revalidate and
afs_lookup will make different decisions as to whether or not they
resolve a mtpt to a dir. Specifically, if CMValid is cleared after
afs_linux_dentry_revalidate checks for it, but before afs_lookup does,
then afs_lookup will return a different vcache than
afs_linux_dentry_revalidate is expecting, even though the relevant
directory entry has not changed. That is, tvc is not equal to vcp, but
tvc could be a mtpt that resolves to vcp, or vice versa. CMValid can
be cleared by another thread at virtually any time, since this is
cleared in some situations when we're not sure if the mtpt resolution
is still valid (callbacks are broken, vldb cache entries expire, etc).

afs_linux_dentry_revalidate interprets this situation to mean that the
directory entry has changed, and so it eventually d_drop's the
associated dentry. The way that this manifests to users is that a
"fakestatted" mtpt can appear to be deleted effectively randomly, even
when nothing has changed. This can be a problem because this causes
the getcwd() syscall to return ENOENT when the working directory
involves such an affected directory.

To fix this situation, we just detect if afs_lookup returned either
'vcp' (our possibly-resolved vcache), or the original inode associated
with the dentry we are revalidating. If the returned vcache matches
either of these, then the entry is okay and we don't need to
invalidate or drop anything.

FIXES 131780

Change-Id: Ide1dd224d1ea1e29a82eb7130a010877cf4e9fc7
Reviewed-on: http://gerrit.openafs.org/11559
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-10-31 08:38:29 -04:00
Marc Dionne
b5de4a9f42 Linux 3.18: key_type no longer has a match op
Structure key_type no longer has a match op, and
overriding the default matching has to be done
differently.

Our current match op doesn't do anything special so there's
no need to try to override the defaults; just remove the
assignment of .match and the associated function.

Change-Id: I0ee195e47f40688d9a71ea62a0b87a4265363f05
Reviewed-on: http://gerrit.openafs.org/11563
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-10-31 08:38:02 -04:00
Marc Dionne
a42f01d5eb Linux 3.18: d_invalidate can no longer return an error
d_invalidate is now defined as void and does not have
a return value to check.

Change-Id: Ief1b562db63877dde9f4a8ac4918b727a05b23bb
Reviewed-on: http://gerrit.openafs.org/11562
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-10-31 08:37:48 -04:00
Jeffrey Altman
882146b0e6 viced: kill CLIENT_TO_ZERO macro
Move all struct client fields that are to be zeroed upon structure
reuse to a new struct client_to_zero.  Include the new structure
within struct client and call memset() on that structure.

Change-Id: I0f83f5f18b41bc0d4f8e1f7f8e04cd5508cbe4e1
Reviewed-on: http://gerrit.openafs.org/11288
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
2014-10-31 08:37:22 -04:00