This patch is intended to bring libafscp into accordance with the
current OpenAFS coding standards while also fixing a few small
issues. Apologies in advance for the numerous whitespace changes.
Change-Id: I606ed5024395319e12e8759f31494ebd27ff6112
Reviewed-on: http://gerrit.openafs.org/4380
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Fix a few issues with the recent commit to deal withg the removal
of path_lookup, spotted on RHEL 5:
- the configure tests needs fs.h to be included before namei.h, to
get the definition of struct inode
- we need to avoid the use of struct path unless its needed; on
older kernels the structure doesn't exist
Change-Id: I6251a96a371a50548dcafc70d94e91b52fc2922a
Reviewed-on: http://gerrit.openafs.org/4382
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove headers which are provided by libroken, and reorder header
includes so that they're a bit a more legible.
Change-Id: I41258d5b906350bcdf4854b244799fc8907b2bfc
Reviewed-on: http://gerrit.openafs.org/4385
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove headers which are provided by libroken, and reorded header
includes so that they're a bit a more legible.
Add math.h to the list of headers that configure will check for
Change-Id: I530afa77866a0aa3a33f8684ce9cf630aa347812
Reviewed-on: http://gerrit.openafs.org/4384
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Change-Id: I67bb92abc985d1510d8b8a108f9b9e3a62525fd5
Reviewed-on: http://gerrit.openafs.org/4332
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Change-Id: Ie4f0f87074b9f9c5a028098ea39e548d9932e54a
Reviewed-on: http://gerrit.openafs.org/4331
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
It turns out that we do need an afs.rc.fbsd that is set up for
transarc paths in this directory. To get it to work properly
will require the user to symlink to it from a dir that gets
checked by rcorder, but them's the breaks.
Change-Id: I1786e4862768127f29a6d309097536829da3e029
Reviewed-on: http://gerrit.openafs.org/4378
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
The OpenBSD version of afs_osi_TimedSleep() is missing the required
afs_event structure and afs_getevent routine. This update adds them
(by borrowing a copy of the code from the FreeBSD implementation).
Change-Id: Ie470e83a56caecb9494bb86dc3ff0a18420bb56e
Reviewed-on: http://gerrit.openafs.org/4373
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Normally *SYNC server processes wait indefinitely for activity to
occur on one of the SYNC sockets. On some Linux kernels, there exists
a race condition where data can come in on a socket, but the select()
call continues to wait. To ensure that we do not hang forever in such
a scenario, add a timeout to the select() call, which will ensure we
notice the new data within 10 seconds. Raise the timeout on non-Linux
to reduce impact elsewhere.
The Linux kernel bug is tracked in
<https://bugzilla.redhat.com/show_bug.cgi?id=494404>, though that bug
report may not represent all affected kernels.
Change-Id: I3250eb53d59610ccbcffe9e8e283984d5ae0e2b4
Reviewed-on: http://gerrit.openafs.org/4377
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
If we found an external libroken when configuring, we were not setting
LIB_roken if --with-roken=DIR was not specified. Set LIB_roken when we
find a libroken without --with-roken=DIR.
Change-Id: I927647a14f4c5cd8925f0e719b0a9b4164584571
Reviewed-on: http://gerrit.openafs.org/4376
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This clears up some warnings about duplicate symbols with Solaris 11
since the Solaris kernel already has these routines. Since we never
use stock kernel version of the xdr routines perhaps we should always
use/protect our version of the symbols.
Change-Id: I4b5b4a691fb838093aff728469d17c28dccbaaea
Reviewed-on: http://gerrit.openafs.org/4252
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
This adds arpa/inet.h to the list of headers that configure checks for
Change-Id: I1792ede4be761238bb05567c1d763ed63f50051e
Reviewed-on: http://gerrit.openafs.org/4330
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Change-Id: I444a8a325cca8da76f410185949103ccd873c743
Reviewed-on: http://gerrit.openafs.org/4329
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Change-Id: I0eee5dd0656e32617855ccf4a30d4c4be47b7da2
Reviewed-on: http://gerrit.openafs.org/4328
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Also, tidy up translate_et_nt.c by removing the AIX specific code which
will never be built, as this file is only compiled on Windows!
Change-Id: Iec7a811f02eaf1a2ad573bbadc30d782426231d0
Reviewed-on: http://gerrit.openafs.org/4327
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Change-Id: I355cf33fdf72fed640c17ff5c2dfca1dd6f93d6f
Reviewed-on: http://gerrit.openafs.org/4326
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Change-Id: I167b0fa7f48d7dd71efb43a4f137655b38137314
Reviewed-on: http://gerrit.openafs.org/4325
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
flock emulation is provided by rk_flock from roken. No need
to provide a local emulation function in namei_ops.c.
This change removes a macro redefinition warning.
Change-Id: Id8b7cf030d8653ceb979db60c20ed28c03bd9737
Reviewed-on: http://gerrit.openafs.org/4365
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Add the rk_flock() emulation function to roken, primarily for use
on the AIX build, but it will also be used for WIN32
Change-Id: Ia8f11e19bbe9fdf721a7b72660d860624139d9b1
Reviewed-on: http://gerrit.openafs.org/4368
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Change-Id: I424a0df98ff9334d9e46a9af2ba9d7f1861f501e
Reviewed-on: http://gerrit.openafs.org/4324
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Change-Id: If20a2ef67d4cbc70156c1707264a5b7360cfa11a
Reviewed-on: http://gerrit.openafs.org/4323
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Change-Id: Ie4f1b955c111f30b98aa8793b3e3d15dd0bb9275
Reviewed-on: http://gerrit.openafs.org/4322
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add flock.c to our list of roken imports, so that we can use it on
AIX
Change-Id: I1f7b953c8853f4b021a486bb93ddc392c2c08e07
Reviewed-on: http://gerrit.openafs.org/4366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
several callers drop locks so ih_release can be called unlocked,
then relock. simply allow a locked call (via _ih_release_r).
side effect: we had races before on refcnt check versus cleanup style.
this addresses it, but only removes lock contention.
Change-Id: Id2d132baa170894ba3ab0e1e8d0bcf9cf6c0c712
Reviewed-on: http://gerrit.openafs.org/4271
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Change-Id: I2afd32d86b40b84c14f8a6021a583b6a4888780c
Reviewed-on: http://gerrit.openafs.org/4321
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Add tests for arpa/nameserv.h and resolv.h, so that roken will look
after including these files for us.
Change-Id: Ifa6b7d877d67c967811017a25c98fab6bd571d4c
Reviewed-on: http://gerrit.openafs.org/4364
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
The structure 'state' in fssync-debug conflicts with a structure
of the same name in AIX's resolv.h header. Renaming the structure here
to fssync_state to avoid the conflict.
Change-Id: I15df31a48369f76ef927a5153d3415e821bc0c51
Reviewed-on: http://gerrit.openafs.org/4363
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Change-Id: I5543c5c9c22828ee19460c2ab24065f508a6353f
Reviewed-on: http://gerrit.openafs.org/4320
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Change-Id: Ifd88310dc26ebfd995b4a25b2984ddb01606264f
Reviewed-on: http://gerrit.openafs.org/4319
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Also, add sys/uio.h to the list of libraries that we check for.
Change-Id: I03d9c143db42a1ec415ab5624e2cbede0d34e310
Reviewed-on: http://gerrit.openafs.org/4318
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Commit 2d6bc153689f14f8690878b15d9fb711a56b0546 renamed the putshort
and putint32 macros in dumpstuff.c to avoid conflicts with macros
that are defined in resolv.h. However, an almost identical copy of
that code also exists in vol-dump.c
Rename putshort and putint32 there too.
Change-Id: I9b98f99fb5c2b24b57e2bc480c891aa86b6df344
Reviewed-on: http://gerrit.openafs.org/4317
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
We were shipping our own implementation of snprintf and friends, as
afs_snprintf. Now that we're using roken everywhere, we can make use
of roken's rk_snprintf, and no longer need to ship our own.
As Window's snprintf isn't C99 compliant, roken always uses its own
on this platform. The effect of this is that we can no longer use
AFS_UINT64_FMT and AFS_INT64_FMT for snprintf calls (and the Log
functions that call them). Instead, we need to always use the
Unix format specifiers when calling these functions.
Make thse changes across the whole tree.
Change-Id: I3fffef97566f239ad639f15c4decd136d5bbd765
Reviewed-on: http://gerrit.openafs.org/4316
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
%I isn't supported by the roken printf functions. In preparation
for switching over to them, replace our use of asprintf to convert
IP addresses to strings with the afs_inet_ntoa_r function.
Change-Id: Id38dc56405071d62fb2b12e4f69905aa7a2026b0
Reviewed-on: http://gerrit.openafs.org/4362
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
For 2.6 kernels the OpenAFS code is already BKL free, but the
corresponding header file smp_lock.h is still included in various
places. This header no longer exists, so remove all occurrences
outside of LINUX24.
Change-Id: Ib659fa787eab4b39efce5b0a62f5723950e79703
Reviewed-on: http://gerrit.openafs.org/4361
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Rather than having 2 copies of the usage message, just have one
with #ifdef switches to disable options that are not available in
that build.
Change-Id: I5b2135fba3d42fdbb879d5e8cb61933f4929d598
Reviewed-on: http://gerrit.openafs.org/4305
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Rather than having 4 copies of the usage message, just have one
with #ifdef switches to disable options that are not available in
that build.
Change-Id: If888a64307b78189fcf617bbe0dc4ca9e55e8d2b
Reviewed-on: http://gerrit.openafs.org/4304
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Make more use of roken on HP/UX by letting it provide definitions
for random and srandom, and using its implementation of
getdtablesize
Change-Id: I1212c77ea9cc6ef436cfc5c16e893aefbc33d31b
Reviewed-on: http://gerrit.openafs.org/4341
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The last Heimdal import changed the name of a number of structures
so that they are private to the krb5 code. Mirror this by changing our
prototypes to match the new names.
This solves the key_type problem that we previously fixed by #defining
key_type to hc_key_type, so remove that define.
Change-Id: I9b3f1712b0bf6641a780cc4002e73f8a511ff080
Reviewed-on: http://gerrit.openafs.org/4340
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit updates the code imported from heimdal to
987658325eb7bd6b10882cc4cdd224499e7f7a03 (switch-from-svn-to-git-2052-g9876583)
New files are:
roken/getdtablesize.c
Upstream changes are:
Love Hornquist Astrand (2):
prefix symbols that are _krb5_ structures
prefix internal structures with _krb5_
Change-Id: I36aae13d877b6b40b8d2db47217884dc24f3f9c8
Reviewed-on: http://gerrit.openafs.org/4339
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Also add pwd.h to the list of headers that we check for in configure,
and that roken will include if they are available
Change-Id: I61ab95eeca11127a33bb668dddfc24ec6ce7f8f1
Reviewed-on: http://gerrit.openafs.org/4303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Now that we're using hcrypto for DES, rather than rolling our own,
we don't need to specific NO_DES_H_INCLUDE, so get rid of it.
Change-Id: Id370ddacb0a57264cc8f5cdda3c59fbb627708af
Reviewed-on: http://gerrit.openafs.org/4302
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Also reorder our headers so that they go
#include <afsconfig.h>
#include <afs/param.h>
#include <afs/stds.h> (if required)
#include <roken.h>
[ ... out of directory headers ... ]
[ ... local headers ... ]
Change-Id: I9214f6bf65085947cfc588b47484e1b022ffc5b1
Reviewed-on: http://gerrit.openafs.org/4299
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Packaging for use with FreeBSD's Ports Collection.
The directory layout is flattened, and a couple of files that do not
make sense here are not included.
The afsd rc script lives in packaging/ as it is not runnable in
its committed form, it requires variable substitution that occurs
at install-time from the Ports Collection.
Change-Id: I72d6c2ee7106611b0ec9bfe3e47a471ed66b7255
Reviewed-on: http://gerrit.openafs.org/4351
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The semantics of rc scripts have changed drastically since this
was written. It will need to be rewritten from scratch; the
new version will live in src/packaging/FreeBSD as afsd.in, as it
is included with the port packaging in that form.
Change-Id: I397f8d5a9dc0430f1a9e8f2f0f378585cee4bd3b
Reviewed-on: http://gerrit.openafs.org/4350
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
We no longer use the Transaarc paths, and the rc environment
and packaging methods are quite different now.
Change-Id: I6915f41455dcf0518472b0a81fe7e5c559d4a994
Reviewed-on: http://gerrit.openafs.org/4349
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>