Do not log a code of zero if the name plus instance length exceeds
the max pr name buffer.
Reviewed-on: http://gerrit.openafs.org/6861
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit ef6ae1e7eda56e1d6ff7b9ade25b290c855e5780)
Change-Id: If644670ed522eaba575e7246084f106231649991
Reviewed-on: http://gerrit.openafs.org/9474
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
When we receive interface information from a client to determine its
alternate IP addresses, ignore any addresses that look like loopback.
Reviewed-on: http://gerrit.openafs.org/2368
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit 2a6ddae62e4fac5eecdf4634746e7294405393d6)
Change-Id: Idcdaabd3aad62f0e84efbaf1d8523338bc683924
Reviewed-on: http://gerrit.openafs.org/9466
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Move all of our AC_CHECK_FUNCS calls into a single, ordered, list
so that it's easier to see what's being checked for and what's not.
Reviewed-on: http://gerrit.openafs.org/2598
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 3fc5863f062c14c346bcc50c82b8d15971750e55)
Change-Id: I167b42d84c9ddbb8b35aee6b4ced3c7a809e72dc
Reviewed-on: http://gerrit.openafs.org/9423
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tidy up our list of header includes so it's easier to see what
we're testing for. The list is now one-per-line, in alphabetically
sorted order.
Note that this won't affect our use of the default include set, as
autoconf will already have tested for all of those before it starts
this CHECK_HEADERS run.
Reviewed-on: http://gerrit.openafs.org/3612
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c8fc94fb86255a2c5cbd1613b33e32ec3a4d3b21)
Change-Id: I0b507dcd9578d1c041731f7f7923f27e33fc89df
Reviewed-on: http://gerrit.openafs.org/9411
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This is a backport of one hunk of commit
9efc255ab8de7ad90c7d599fea7bd1956bfd48c2, where a calloc fixes an
incorrectly sized memset. The original memset clears the size of the
pointer, not the sizeof the structure.
Change-Id: I40250e0346345fe9b4b43d14e76ea5fb23c8c04b
Reviewed-on: http://gerrit.openafs.org/9701
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
The logic we use for using krb5-weak.conf to allow 'weak crypto'
requires us to know where the default krb5.conf is. The default
krb5.conf local can vary significantly depending on the platform, and
we don't have a good way of figuring out what it is, so we guess. We
may guess wrong.
To limit the cases where we guess wrong, only try to do this
workaround if the krb5-weak.conf file actually exists.
Reviewed-on: http://gerrit.openafs.org/9667
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 95240a5a5030a1053ce9966b54037eda2d37140b)
Change-Id: I02313b2cc37da05adc0529e685abf6a8546bb3de
Reviewed-on: http://gerrit.openafs.org/9687
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
aklog tweaks the KRB5_CONFIG environment var when performing one of
our 'weak crypto' workarounds. We assume that the default krb5.conf is
/etc/krb5.conf, but for Solaris 11 libkrb5, krb5.conf is in
/etc/krb5/krb5.conf. Although this file could be anywhere, try
/etc/krb5/krb5.conf too, so we at least work on stock Solaris.
Reviewed-on: http://gerrit.openafs.org/9666
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit cd1ffc1073d6f9a191e07cb72e8d0b4ec8cd6347)
Change-Id: I8eeb406107592bac6da415d25b688d936a385a87
Reviewed-on: http://gerrit.openafs.org/9686
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Currently we parse cacheinfo in afsd_run, when the client is
initialized and started. Parsing cacheinfo can change
afsd_cacheMountDir, however, which may be of interest to afsd.o users;
in particular, libuafs exposes this via uafs_MountDir(). This means
that if a mount dir is not explicitly specified in the libcmd
arguments to afsd, a libuafs-using program will see the mountpoint as
the empty string if it is queried after afsd_parse but before
afsd_run. For afsd.fuse, this causes the cryptic error message:
fuse: bad mount point `': No such file or directory
since the mountpoint is the empty string if it is not specified
explicitly on the command line.
To fix this, move cacheinfo parsing to effectively near the end of
afsd_parse, so the mountpoint is calculated in afsd_parse().
Reviewed-on: http://gerrit.openafs.org/6400
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit af218dee6c517f4636a18c681bff6f1212a7d9c0)
Change-Id: Ibd087f52c9a6f1d98614f4fdbbc5b92ea0806506
Reviewed-on: http://gerrit.openafs.org/9453
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
When copying credentials in crset, take the passed credentials as
the source instead of the current process credentials.
This doesn't cause any problems currently since crset always gets
called with the current credentials.
Reviewed-on: http://gerrit.openafs.org/8980
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 3b733db8bf2bc3a1366554ae97814cc722437149)
Change-Id: I4d0000a139d16fafe480f7ebccc6759da7dea6bb
Reviewed-on: http://gerrit.openafs.org/9333
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
If SDISK_SendFail fails before the pathname to the temporary file
has been constructed, then the failure handler will unlink stack
garbage, with variable results.
Initialise the string, and check to see if it has contents before
calling unlink
Reviewed-on: http://gerrit.openafs.org/9299
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 44e806431bec3149a78127f5d1003e84e3a0b072)
Change-Id: I366de3ce15a5e1ea855eb45110ff7acf1748c377
Reviewed-on: http://gerrit.openafs.org/9538
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Some failure paths can return from SDISK_SendFile with the
database lock still held. Other failure paths will cause
setlabel to be called without holding the lock.
Rework the failure paths so we always release the DB lock before
returning, and always hold it when calling setlabel.
Reviewed-on: http://gerrit.openafs.org/4151
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ad63745f357e377c613881fa3470b85d4d36fe36)
Change-Id: I99cb359f108f604be75f19250fb697eb95b81947
Reviewed-on: http://gerrit.openafs.org/9418
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
According to the mesoamerican long count calendar, ifdef ladders will
destroy the world in 2012.
Reviewed-on: http://gerrit.openafs.org/8837
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit a04071e7940b26dc2a29ac3f0952b10321e7b786)
Change-Id: I1db449283c709cba48cc887757c9109cfc4bd253
Reviewed-on: http://gerrit.openafs.org/9506
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Currently in afs_lookup we avoid putting an entry in the DNLC if
'force_eval' is unset, in order to avoid populating the DNLC with
mountpoint symlinks (we want the target of the mountpoint to be in
there instead, the root dir). However, if -fakestat or -fakestat-all
are enabled, 'force_eval' is always false, since we only set it to
true under certain circumstances when evaluating mountpoints.
To fix this, populate the dnlc for non-mountpoints, even if force_eval
is unset.
Reviewed-on: http://gerrit.openafs.org/7431
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 35d5be2adf2456e26aa6b10935352dc19eb6b3f2)
Change-Id: I32f859c4478432de65025f35ae0c484ff7fa1bf0
Reviewed-on: http://gerrit.openafs.org/9494
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Fileservers may now require RXAFS_FlushCPS calls to be made with
administrator tokens. So, try to make the call with admin tokens, and
provide the usual -noauth and -localauth options.
Reviewed-on: http://gerrit.openafs.org/7573
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit cb64dea75a114f6ebcba174be4e71c7fb5f85658)
Change-Id: I0d8e38d3cc1b0e55f63cfa0e50fd9cd4cebc8c30
Reviewed-on: http://gerrit.openafs.org/9486
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Currently we only call initInterfaceAddr_r for a host if a call to
RXAFS_InitCallBackState3 succeeds. However, this leaves the host
without a host->interface structure, which indicates that the host
does not support UUIDs, and is represented by just a single host,port
pair.
But this is not correct; the host probably does have the relevant UUID
associated with it, but it is just not responding. So, with the
current code, we create a uuid-less host structure for a host that
probably has a uuid; that host structure will probably never be used,
and will just get deleted later.
So instead, always call initInterfaceAdd_r. Do it before the ICBS
call, so the host will be findable via UUID as early as possible. If
the ICBS call fails, the host will be marked as 'down' later on.
Reviewed-on: http://gerrit.openafs.org/8847
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit f2f7ba50ed61a6187814d633327a8cacda0f656f)
Change-Id: I4847ec0350346d44883b5c5912867555292cf3db
Reviewed-on: http://gerrit.openafs.org/9380
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
In kernels before 027445c3, the functions generic_file_aio_read and
generic_file_aio_write, as well as the fs operations aio_read and
aio_write, do not deal with iovecs but rather just use a single
buffer. Detect this, so our aio_read and aio_write implementations
have the correct signatures.
This removes several warnings on such kernels.
Reviewed-on: http://gerrit.openafs.org/8020
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit e5ba359f64b5d8d874a31a50694398c17f27cfa1)
Change-Id: I8d8ee81c2bcff2dc85c2ff3e70452a0af5639921
Reviewed-on: http://gerrit.openafs.org/9493
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Code that called directly into the aio operations (ex: readv/writev)
would bypass the AFS specific operations found in afs_linux_read
and afs_linux_write.
Rework the handlers:
- For newer kernels with aio, let the kernel use its default read
and write operations, and define the aio_read and aio_write operations,
with the AFS specific bits, calling into generic_file_aio_read/write.
The kernels default read/write operations are just wrappers around the
aio versions.
- For older kernels, leave things as is, pointing read and write to
afs_linux_read/write
Reviewed-on: http://gerrit.openafs.org/4563
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit a8c46e5010c0b4e41ad66458b8723e32f99b427d)
Change-Id: I3c20064cc911aabfce576178c22fcdc1a99b8125
Reviewed-on: http://gerrit.openafs.org/9492
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
After lots of intermediate steps a call to ubik_print(), ubik_vprint()
and ubik_dprint*() ends in vFSLog() which adds a timestamp to the output.
So any call to ubik_print(), that does not contain a \n at the end,
makes a mess of the logfile.
The least invasive change will simply add this newline at the end
of any ubik_print() call.
This also prevents long lines in the log, which might appear on
multi-homed hosts with lots of interfaces.
FIXES 1446
Reviewed-on: http://gerrit.openafs.org/9059
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit dc32caae7768c486e610c4e56c6a78e9c918d975)
Change-Id: I05892d6d9c47517208e21a3ab00bad2f30d58ba9
Reviewed-on: http://gerrit.openafs.org/9522
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Print the values of the integers returned in the collection data
when the -debug option is given to xstat_fs_test and xstat_cm_test
test programs. This allows us to at least see what the unformatted
values are when there is a mismatch in timeval sizes between the
host and client (aka the 32/64 bit xstat bug). This change could
break scripts which call the xstat test programs with the debug
option. New debug output are prepended with 'debug:' to be
easily ignored.
Reviewed-on: http://gerrit.openafs.org/2878
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 13aeb1dcaee5ad4e95477464860963788c5d1469)
Change-Id: Ief2f9346fad92e86aa2a214f1a462a10560c6e64
Reviewed-on: http://gerrit.openafs.org/9567
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
The PrefetchFromTape pioctl was overloading SetAcl's statistics. Give
it a slot of its own.
1.6-only: Also give a slot for the master-only PSetTokens2, so xstat
data will be more consistent across versions.
Reviewed-on: http://gerrit.openafs.org/4989
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 4e9a49c58aa1a6c910b01fe995739d0852c75dd4)
Change-Id: I718585a6ff6fcb39469bd6a007e6ebd2b59ef4fa
Reviewed-on: http://gerrit.openafs.org/9468
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This message is useless, annoying, and is the UI equivalent of littering... but
it does explain why your backup command is just sitting there.
Reviewed-on: http://gerrit.openafs.org/6223
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit 6d6d52e18f3bd537331de6021a0fcc2e96fc48db)
Change-Id: Ide51c7ef7c40426f34a5f1cb6c23395b0d93886a
Reviewed-on: http://gerrit.openafs.org/9438
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
For CM xstat collecton 0 (function call statistics), there are many
more stats given to us on the wire than we currently print. Change
this so we print out everything in the afs_CMCallStats struct.
Reviewed-on: http://gerrit.openafs.org/7047
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit 1a458e8e72455e480ccf4c0e3fd926dd9af9beea)
Change-Id: Ib263a26829bc538009f605ebb502895628e66fc2
Reviewed-on: http://gerrit.openafs.org/9469
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Currently we add a given host to the uuid hash table, then call
RXAFS_InitCallBackState3, and then only initialize the host->interface
structure if the ICBS3 call succeeded.
If the ICBS3 call fails, we have added a host to the uuid hash table,
but the host structure does not contain that uuid. If the host is then
deleted, we will not remove the host from the uuid hash table (since
host->interface is NULL), and so the uuid hash table entry will still
point to the freed host. If that host is then later looked up via that
uuid, we can reference a freed host, which can cause all kinds of
undefined behavior.
So instead, add the host to the uuid hash table at the same time that
we initialize the host->interface structure, inside
initInterfaceAddr_r.
FIXES 131277
Reviewed-on: http://gerrit.openafs.org/8846
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 7b642173c7cd7b6b7130214c1a940501736abbf0)
Change-Id: I838b55244a9745dd07b7d633cb3091414162b0d5
Reviewed-on: http://gerrit.openafs.org/8868
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
For ubik server processes, rx_SetNoJumbo needs to be called before
ubik initialization for it to effect the communication between
dbservers; otherwise, full database transfers may result in Rx
jumbograms on the wire regardless of the jumbo/nojumbo setting. Move
the call to rx_SetNoJumbo to before ubik initialization to avoid this.
Also move the call to rx_SetNoJumbo to immediately after rx_Init* for
all server processes, for consistency. Move similar calls to
rx_SetMaxMTU for the same reason.
Reviewed-on: http://gerrit.openafs.org/7350
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 0debf2d2274db1ea862bfdc2ef767372f1fa77e3)
Change-Id: Iacb1afa853281e856bbb70f39c6ac9a81f210d0d
Reviewed-on: http://gerrit.openafs.org/9121
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
instead of doing a check for something which will never be true,
and then terminating, just terminate if it's not already
null-terminated.
Reviewed-on: http://gerrit.openafs.org/9439
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit ceac74a6baad79155adaa692639b1d9f403525b6)
Change-Id: I14d3de25bca5b1ba1878048aac1973518f8c2359
Reviewed-on: http://gerrit.openafs.org/9583
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Add a missing semi-colon in the error case when missing symbols
are detected. The effect is strictly cosmetic - a few additional
error messages would follow the "undefined symbols" error.
Reviewed-on: http://gerrit.openafs.org/9095
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 50879d5727c183982a40bd242d6039ed470d835d)
Change-Id: If2c1be51969131794cb2ea30f96490fce95b0103
Reviewed-on: http://gerrit.openafs.org/9365
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Undefined symbols in the kernel modules are not currently detected
at build time. As a result, buildbot may indicate success while
the resulting kernel modules are unusable.
In the kernel build process, modpost warns about missing symbols
but does not return an error in the case of external modules.
Detect these warnings and cause the libafs build to fail.
Reviewed-on: http://gerrit.openafs.org/8981
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit dbdee60a83d72d38a04a0eeb2a5324cf497e57e3)
Change-Id: I1986dfd3c195be13b4014014b42eb745f9daf1f8
Reviewed-on: http://gerrit.openafs.org/9364
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
If we've received an error from the underlying security class, we must
not try to send the given packet, or we risk security issues. We
currently achieve this by setting an error on the connection. It is
slightly indirect in how this yields an error on this specific call,
and so it may not be immediately clear, but doing so is critical. If
somehow the call does not have an error by the end of this, we cannot
proceed as this is an error condition we do not handle. So, assert.
Reviewed-on: http://gerrit.openafs.org/9122
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 85f2a66ceafd7a13f51d0352c62b5d69f4620edb)
Change-Id: Iae523e6f18dd73749a6be5c3d10e132e5c14a70c
Reviewed-on: http://gerrit.openafs.org/9280
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
rxi_PrepareSendPacket calls RXS_PreparePacket to allow the security
class to modify the given packet appropriately (to be undone by
CheckPacket on the other endpoint). However, currently
rxi_PrepareSendPacket ignores all errors generated by
RXS_PreparePacket, and processing continues as if there was no error.
For rxkad, an error often results in the given packet being untouched.
This means that the security checksum is not calculated, and thus not
populated in the packet, and for encrypted connections means that the
packet contents are not encrypted.
This occurs for any error generated by the security class
PreparePacket routine. For rxkad, the most common error is probably
RXKADEXPIRED, though some other internal errors are possible as well.
This behavior has a few effects for rxkad:
1. When any error is generated by PreparePacket, the other endpoint
generally bails out with the error RXKADSEALEDINCON, since the
security checksum of the packet is 0, which does not match what the
checksum should be. This results in error messages like 'rxk: sealed
data inconsistent'. This can be very confusing if the actual error
is, say, just that the given credentials have expired.
2. For connections requiring encryption (rxkad_crypt), an error from
PreparePacket means that the packet payload is sent in the clear.
This can happen for about a window size's worth of packets.
3. If a client ignores errors/inconsistencies with the checksum and
encryption, etc, they can keep reading data for the call forever,
even after their credentials have expired.
To fix this, make an error from RXS_PreparePacket cause a connection
error for the given connection, and immediately send a connection
abort. No further error checking should be necessary for the callers
of rxi_PrepareSendPacket, since they already check for call/conn
errors before sending any actual packets.
Reviewed-on: http://gerrit.openafs.org/8909
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 03d3dacae16847352af754ac13c854ca0df0c08c)
Change-Id: I5d0f421d22ca2e4d723df2d698088b6bbdc85f7b
Reviewed-on: http://gerrit.openafs.org/9279
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Prints the client transfer rate in appropriate units (kbit/s, Mbit/s, or Gbit/s).
Reviewed-on: http://gerrit.openafs.org/8758
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 07d83cd473146a0db9c2ed521b6fa6ba607b0d40)
Change-Id: Ia17b315e79313407e5479cd3710ac454d56ee7dd
Reviewed-on: http://gerrit.openafs.org/9682
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Dan van der Ster <daniel.vanderster@cern.ch>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
A GetSomeSpace_r call indicates we don't have enough callbacks
configured. For many people, this can happen without the administrator
realizing anything is wrong, since we never give any indication that
something is amiss, unless the administrator checks the xstat
statistics.
Since this can indicate a serious performance problem, yell in the log
when this happens. Only do it once, so we don't spam the log.
Reviewed-on: http://gerrit.openafs.org/6334
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit da3f8d86dd216a90bc400367b7b95e9a427f99e8)
Change-Id: I63ec14c6f635c57249023e0fc34b15838cee2eb3
Reviewed-on: http://gerrit.openafs.org/9386
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
This will clarify where patches should go, and who can do backports.
Reviewed-on: http://gerrit.openafs.org/8075
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 8662592caedbcf8e065312fe142731faabe1eb77)
Change-Id: I1d2c452dd17c8ae63eebfd8d800659c9de0fc327
Reviewed-on: http://gerrit.openafs.org/9684
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
There are actually 30 elements in the AFS_STATS_FS array. When the
ResidencyRpcs counter was added, the total number of operations
wasn't updated.
Fix this so that it is correct, although this still remains rather
fragile.
Reviewed-on: http://gerrit.openafs.org/9313
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 2c8e4f839fc253abb8051bbf89d36e94a2200590)
Change-Id: Id6094e6e5007984cb080281f6a085eba958d6367
Reviewed-on: http://gerrit.openafs.org/9540
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
In the current version of CacheStoreDCaches, the stored variable is
maintained within the for loop that iterates over the chunk list. This
means that it is reset to 0 each time we handle a new chunk.
However, this means that our progress is no longer accurately tracked,
as (bytes - stored) no longer gives the number of bytes which remain to
be transfered. In fact, as stored is zeroed with each loop iteration,
(bytes - stored) == bytes. This means that store behind is no longer
activated according to the users settings.
Prior to commit 334114ac58b0039ae90d7e29fa2f019fe068bd79, the
stored variable was maintained within the outer, function, scope.
Just move it back there to restore the previous behaviour.
Caught by clang-analyzer
Reviewed-on: http://gerrit.openafs.org/9237
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 5acb1a0f323a6692cca66ee3aa4c7e5f1a0f24f2)
Change-Id: I22c60b07ba9518d5714c65b1952a35214f690433
Reviewed-on: http://gerrit.openafs.org/9530
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
in physio. If things go wrong in ReallyRead() or
ReallyWrite(), the admin would like to know which
volume to salvage.
Reviewed-on: http://gerrit.openafs.org/8010
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 185699e631ec3548bb6d1e68302d4a652632d3e6)
Change-Id: I0bc7fa31db17fc438e4c9852d685984747fb9b74
Reviewed-on: http://gerrit.openafs.org/9491
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Log the error code when marking the server down due
to server/networks issues.
Reviewed-on: http://gerrit.openafs.org/7138
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit f0b039fc4761bb0151c7ee69110926ef16e264c7)
Change-Id: Ib66457a75006858b9523fa44c164859e8c8fae6f
Reviewed-on: http://gerrit.openafs.org/9473
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
A few places were specifying both O_EXCL and O_TRUNC to open().
O_TRUNC does not make any sense with O_EXCL, and doesn't do anything,
so remove O_TRUNC from these instances to make the code more clear.
Reviewed-on: http://gerrit.openafs.org/5832
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 4c679e380f697760de777d35fe057229bf2bf762)
Change-Id: Iae79f552d17d626bbf2a7c9428bc9c7bbf91fae9
Reviewed-on: http://gerrit.openafs.org/9433
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
This fixes a build failure on Ubuntu raring as of binutils
2.23.1-0ubuntu8, which pulled in a bugfix that makes
--no-copy-dt-needed-entries stricter:
http://sourceware.org/git/?p=binutils.git;a=commit;h=63f3bee644cc30f1e6d049ca54d307a7c63b8186
make[3]: Entering directory `/…/src/afsd'
gcc -O -I/…/src/config -I/…/include -I. -I. -D_LARGEFILE64_SOURCE -I/…/src/afs -I/…/src/afs/UKERNEL -I/…/src/rx/UKERNEL -DUKERNEL -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -o afsd.fuse afsd_fuse.o /…/lib/libuafs.a /…/lib/libdes.a /…/lib/libafsutil.a /…/lib/libcmd.a /…/lib/libafsutil.a -lresolv -lfuse
/usr/bin/ld.bfd.real: /…/lib/libuafs.a(afs_usrops.o): undefined reference to symbol 'pthread_setspecific@GLIBC_2.2.5'
/usr/bin/ld.bfd.real: note: 'pthread_setspecific@GLIBC_2.2.5' is defined in DSO /lib/x86_64-linux-gnu/libpthread.so.0 so try adding it to the linker command line
/lib/x86_64-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[3]: *** [afsd.fuse] Error 1
make[3]: Leaving directory `/…/src/afsd'
This is roughly a partial cherry-pick of commit
f6d7a4b426f55db366113bbdda4da71570310410 (which doesn’t apply on
1.6.x), although this particular build failure had already been fixed
on master as a side effect of commit
98f86cfc53fc987fdaed2f5bb733b5b5d21bfda9.
Change-Id: I89467f00bbf511ec63c464b656d342c5fd2ce557
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/9387
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
At the moment, the GetCapabilities RPC handler ignors errors from
CallPreamble or CallPostamble. Instead of silently swallowing these,
and potentially reutnring a bogus capabilities structure, make
it possible for the RPC to return failure to the caller.
Caught by clang-analyzer
Reviewed-on: http://gerrit.openafs.org/9241
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit ea0441520138d2129b5c6b2bd16c7640a8680146)
Change-Id: Ic3828198e43403506f991455f09924387b483879
Reviewed-on: http://gerrit.openafs.org/9534
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Almost a year ago, mckusick changed the VFS KPI/KBI for the cmount
VFS operation, making the flags argument a 64-bit quantity.
Introduce appropriate conditionals for our prototype of afs_cmount
for the change on the 10.x and 9.x branches.
Reviewed-on: http://gerrit.openafs.org/8907
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 13111d25408cf6765d1b67bc3767614c8963cfde)
Change-Id: I6e74760422f57336203d562dc4ee39ed2af0df84
Reviewed-on: http://gerrit.openafs.org/9406
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>