12155 Commits

Author SHA1 Message Date
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
Jeffrey Altman
1b5d5afca6 viced: kill HOST_TO_ZERO macro
Move all struct host fields that are zeroed into a new structure
host_to_zero which is then included in struct host as 'z'.

Remove the HOST_TO_ZERO macro entirely as its presence can lead
to the introduction of dangerous errors.

Change-Id: I44afd37413afae4e4357e68cdadf5c28784611c5
Reviewed-on: http://gerrit.openafs.org/11287
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: D Brashear <shadow@your-file-system.com>
2014-10-31 08:37:03 -04:00
Jeffrey Altman
fb67a8d4ef viced: move host tmay fields before index
The index field and those after it in struct host do not get zeroed
when a host is reused.  The placement of the tmay fields after index
in commit 9a0a8ca4d186cf953b87d9fae1a35f66090b060c results in the
use of uninitialized memory.

This change moves the tmay fields before index which permits
the HOST_TO_ZERO() macro to compute the correct size to be memset()
to zero.

Change-Id: I1f93bebb23c99eaa7826dafa8cd7497d1b49bb53
Reviewed-on: http://gerrit.openafs.org/11286
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-10-29 17:30:42 -04:00
Mark Vitale
235e88a36c viced: remove obsolete comment about alignment
Alignment may have been historically relevant, but is no longer.
Remove the comment.

Also remove the unneeded 'dummy' field which does not provide
padding for a useful alignment.

Change-Id: I447fb73c379e6f86facd955a29ffd80e8929ceff
Reviewed-on: http://gerrit.openafs.org/11289
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-10-29 17:30:27 -04:00
D Brashear
3b27be6692 libafs: avoid contaminating the return of lookup vnop
when we resort to checking the inlinebulk errors to see if a retry
is needed, do not overwrite the lookup return code; only decide if
a retry is needed.

problem case was where the first vnode returned EACCES and so
all vnodes were assumed to have failed, when just one did.

Change-Id: Ifd7361ce5af50a72817afa81d31d9cfbda906efd
Reviewed-on: http://gerrit.openafs.org/11537
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2014-10-29 15:20:00 -04:00
Christer Grafström
8f630226f6 Packaging support for MacOS X 10.10 "Yosemite"
This is just the packaging part of the patch submitted in the
RT ticket. The configuration part is in the preceding change.

FIXES 131946

Change-Id: Ic5b200b1f54d7f9f9552b0f9e2b881c3f0af9bc2
Reviewed-on: http://gerrit.openafs.org/11561
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-10-29 14:19:42 -04:00
Christer Grafström
4109785a89 Add support for configuration of MacOS 10.10 "Yosemite"
This is just the configuration part of the patch submitted
in the RT ticket. The packaging part will will follow in the
next change.

FIXES 131946

Change-Id: Ic8835b1ddf317600483505a2d94d9f3568720804
Reviewed-on: http://gerrit.openafs.org/11560
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-10-29 14:19:32 -04:00
Andrew Deason
8c78a44cf5 rx: Reset lastSendData when resetting call
Currently we use call->lastSendData to attempt to detect a stalled
call, if it's been too long since the last time the call sent any
data. However, we never initialize lastSendData to anything when
creating a new call.

This means that when rx_NewCall (or rxi_NewCall) returns, lastSendData
can be nonzero. This can happen if we reuse a DALLY call, or if we
pull a call off of rx_freeCallQueue. This can be a time very far in
the past, since the lastSendData time has not changed since the last
time the call was used; it will remain unchanged until a user of the
new call writes something to the call stream.

This can be a problem between the time when a caller creates a new
call with rx_NewCall and when the caller actually writes something to
the stream. Between those two times, if lastSendData happens to be set
to a time in the past, we may call rxi_CheckCall on that call, and
abort the call for being idle. The call will thus be aborted before it
even sent any data on the wire.

This is of particular concern for multi_Rx calls, since those can
create a large number of call structures, possibly introducing a delay
between calling rx_NewCall and writing anything to the stream (if one
of the later rx_NewCall invocations blocks waiting for an open call
channel, for instance, all of the previous allocated calls will stick
around unused for potentially a long time).

One such multi_Rx call is done by the cache manager, where it
periodically uses multi_Rx to call RXAFS_GetCapabilities to probe
fileservers for reachability. If this issue occurs during that
operation you can see a large number of servers get marked down for
code -9 (RX_CALL_IDLE), and then get marked as coming back up.

To fix this, set lastSendData to 0 when resetting a call, along with
most of the other fields in a call, to indicate that the call has
never sent any data. As long as lastSendData is 0, the call will never
get aborted with RX_CALL_IDLE, and this situation will be avoided.
This ensures that this issue cannot happen, since rxi_ResetCall is
guaranteed to be called at some point whenever we reuse a call
structure for any reason.

Change-Id: Ie96d1c640616fd5a234c635f60dfef4ad7c19d28
Reviewed-on: http://gerrit.openafs.org/11557
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2014-10-27 22:12:05 -04:00
Nathaniel Wesley Filardo
616d19a2eb Remove duplicate CREATE_SGUID_ADMIN_ONLY define
A trivial omission from 30433f36a953187f27b5db9fb432f3b7dce91e6b

Change-Id: If85ebd73a68c6226077b690243a94c2e40f88149
Reviewed-on: http://gerrit.openafs.org/11556
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2014-10-27 00:17:14 -04:00
Benjamin Kaduk
c04c57c6c5 Remove documentation of 'program'
This tool was removed in 2006 in commit
b405868ca02880207bda1ec6eb4e21c7b0ac250c. Also remove mention of
wsadmin, removed at the same time.

Change-Id: I8475b951f576f10ddd2f4b72565354b9fba41d94
Reviewed-on: http://gerrit.openafs.org/11554
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-10-23 16:10:07 -04:00
Benjamin Kaduk
6e167d4646 Remove unused -k argument to fileserver
It has been unused since the LWP fileserver was removed.
It was used to set the LWP stack size.

Change-Id: I2ffd3a2f02049a307b668a46b62b31dc9bc128a8
Reviewed-on: http://gerrit.openafs.org/11527
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-10-15 11:06:59 -04:00
Benjamin Kaduk
89febdba40 Warn at configure time about bitmap-later
It's superseded by DAFS and is slated for removal post-1.8.

Change-Id: Id2c870fb76eeb470bbf393e99654df434b1a1a86
Reviewed-on: http://gerrit.openafs.org/11525
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-10-15 11:05:35 -04:00
Benjamin Kaduk
f7ddab6606 Merge pam into the kauth configure option
Realistically, you shouldn't be using either kauth or pam.  The
pam functionality provided by the module in our tree is only
useful in a kaserver-style environment, so it makes sense to merge
the two knobs.

Retain a separate enable_pam variable so that it can be overridden
on a per-architecture basis where it is known to not work.  Consolidate
the two places where we did such checks, as well.

Change-Id: I6bf39ee5002f943548c51d089fe612f7e2f0501b
Reviewed-on: http://gerrit.openafs.org/11524
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-10-15 11:05:21 -04:00
Benjamin Kaduk
2c3a517e87 Retire Makefile.shared
It has served its purpose, and been replaced by libtool.

Change-Id: Ifb4e2f585fb4239e9138daef82dcc7f41d7f2a99
Reviewed-on: http://gerrit.openafs.org/11485
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-10-15 11:05:08 -04:00
Benjamin Kaduk
6d2395ed22 Build kopenafs with libtool
Prior to this commit, we were installing libkopenafs.so.1.1.  As
for the other libtoolizations, bump SONAME to 2.0 as a general
precaution.

Change-Id: I6edef89737cf057eb8aab8dfe2eacfb4f417dd6e
Reviewed-on: http://gerrit.openafs.org/11484
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-10-15 10:52:52 -04:00
Marc Dionne
5815ee92a4 Linux 3.17: Deal with d_splice_alias errors
In 3.17 the logic in d_splice_alias has changed.  Of interest to
us is the fact that it will now return an EIO error if it finds
an existing connected directory for the dentry, where it would
previously have added a new alias for it.  As a result the end
user can get EIO errors when accessing any file in a volume
if the volume was first accessed through a different path (ex:
RO path vs RW path).

This commit just restores the old behaviour, adding the directory
alias manually in the error case, which is what older versions
of d_splice_alias used to do.

Change-Id: I5558c64760e4cad2bd3dc648067d81020afc69b6
Reviewed-on: http://gerrit.openafs.org/11492
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-10-15 10:51:28 -04:00
Marc Dionne
6a23ca5b6e Linux 3.17: No more typedef for ctl_table
The typedef has been removed so we need to use the structure
directly.

Note that the API for register_sysctl_table has also changed
with 3.17, but it reverted back to a form that existed
before and the configure tests handle it correctly.

Change-Id: If1fd9d27f795dee4b5aa2152dd09e0540d643a69
Reviewed-on: http://gerrit.openafs.org/11455
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-10-15 10:50:52 -04:00
Anders Kaseorg
cadaea4f86 Linux: Refine openafs-client.service dependencies
Make sure that openafs-client is started after the network is online,
and before services that need remote-fs at startup.

Change-Id: Ib69e0c07f9079f47bbe5057626652c44039c433a
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/11441
Reviewed-by: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2014-10-12 22:04:16 -04:00
Benjamin Kaduk
57ca77786e Fix disk name initialization in scout
Scout needs to initialize names in scout_disk structures to prevent
the use of uninitialized data.  However, '\0' is a NUL character
constant, i.e., the integer value 0, which is interpreted as NULL
(the pointer constant) in a pointer context, such as when assigned to
a variable of type char*.  Since the name field in these structs is
passed to printing routines, the safe initialization value is the
empty string constant "", not a zero value.

Change-Id: Ie0530fc4fc090b226c0e54201b4a74158efddebd
Reviewed-on: http://gerrit.openafs.org/11469
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2014-10-08 17:30:52 -04:00
Benjamin Kaduk
66a431bf82 Build fixes for recent FreeBSD -current
Let's try a new paradigm of using flag checks in the main code,
which are based off of precise version checks in the FreeBSD-specific
param.h file.  It's not quite configure checks, but is much more
granular.

Change-Id: I8274a8ad3747d3847cdec3ce8d521837fd5b2a92
Reviewed-on: http://gerrit.openafs.org/11467
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2014-10-08 17:29:20 -04:00
Benjamin Kaduk
ec2382e060 Tweak AFSDIR_PATH_MAX definition
On recent Debian, we run into runtime errors in the test suite
because _POSIX_PATH_MAX is only 256, and that buffer is too small
for a call to realpath().  Use PATH_MAX if it's available and larger
than _POSIX_PATH_MAX, in a way that should be safe even when PATH_MAX
is not defined.

Change-Id: I39127e88d92b358245ece21131219380ca4be98a
Reviewed-on: http://gerrit.openafs.org/11453
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
2014-10-08 10:55:38 -04:00
Benjamin Kaduk
4514dbb1c4 Let mancheck_utils ignore version subcommands
We don't have a man page for the 'version' subcommand, which has
"always" been present but only recently was exposed to the usage.
It's okay to not have a man page for it, so tell the test infrastructure
to not complain about its absence.

Change-Id: Ife834d41797d1d1efe403b204736ac85d62724e9
Reviewed-on: http://gerrit.openafs.org/11452
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
2014-10-08 10:55:22 -04:00
Benjamin Kaduk
27cb0d3888 Adjust configure defaults for 1.8
Disable pam; enable pthreaded ubik.
(Pam is actually not installed by default anyway, since it is
functionally part of kauth.)

pthreaded ubik is believed to be stable, and we want to move away
from LWP moving forward.

Change-Id: I14d20e3157df625a9e04059534bbb59268384213
Reviewed-on: http://gerrit.openafs.org/11483
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-08 10:55:07 -04:00
Benjamin Kaduk
f2d4ba8b61 Build hcrypto with libtool
Or rather, with lwptool, since we need a LWP version as well as
the various pthreaded versions.

The previous version was the initial version, 1.1, but since we're
switching to libtool, bump the version to 2.0 just to be safe.

Libtool abstracts away the extra logic that had previously been needed
to build different copies of rand-fortuna for the pthreaded and LWP
libraries.

As for roken, we must install both shared and static libraries
to $(TOP_LIBDIR) for unity of consumption, but remove the libtool
archive after instllation.

Change-Id: Ibc530a1fa4baa7a38b44eb3e0719e1905a6fe269
Reviewed-on: http://gerrit.openafs.org/11482
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-08 10:54:54 -04:00
Benjamin Kaduk
a6d7014187 Allow external hcrypto
Put the configure checks into a separate file in src/cf, following
the same general structure as the roken checks.

Allow explicitly requesting the internal version, or checking
what's in the default paths, or providing a specific hcrypto root
or lib/include dirs for Debian compatibility.

We must still always compile libafshcrypto_lwp.a for use by LWP
binaries, from the bundled sources, but other binaries will use
the system version.

The hcrypto headers have an unfortunately large number of dependencies,
including depending on being able to find each other by including
<hcrypto/foo.h> paths.  As such we must pass both the user-supplied
directory and $dir/hcrypto to the preprocessor in order for things
to work, and we also may need to revisit the includes used in the
configure check for use on non-linux systems due to the dependencies
on system headers.

Change-Id: Idcba1418a19a7b562335524c911d69dc84268177
Reviewed-on: http://gerrit.openafs.org/11481
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-08 10:54:40 -04:00
Benjamin Kaduk
493765cc88 Link aklog against LIB_hcrypto
This was the last place where libafshcrypto.a was explicitly referenced,
preventing the use of an out-of-tree hcrypto library.

We will continue to need to build the in-tree code to produce a
libafshcrypto_lwp.a library for use in LWP applications, until we
do not have any more LWP applications, but some systems (such as
Debian) have a desire to avoid bundled libraries, so we should
facilitate the use of an external libhcrypto where possible.

Many consumers of libafshcrypto_lwp.a will be removed when the
LWP versions of various modules are removed after 1.8 is branched.

Change-Id: I23049866caae9c16ffb2ec32c5e7b058465a26ba
Reviewed-on: http://gerrit.openafs.org/11480
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-08 10:54:12 -04:00