]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
12 years agoConfigure: Tidy up AC_CHECK_FUNCS
Simon Wilkinson [Fri, 20 Aug 2010 12:17:53 +0000 (13:17 +0100)]
Configure: Tidy up AC_CHECK_FUNCS

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>
12 years agoautoconf: Tidy up header includes
Simon Wilkinson [Mon, 3 Jan 2011 10:40:56 +0000 (10:40 +0000)]
autoconf: Tidy up header includes

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>
12 years agofix garbage counters in supergroup prdb_check
Simon Wilkinson [Wed, 3 Apr 2013 11:09:03 +0000 (07:09 -0400)]
fix garbage counters in supergroup prdb_check

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>
12 years agoaklog: Only try to use krb5-weak.conf if it exists
Andrew Deason [Tue, 26 Mar 2013 18:27:33 +0000 (13:27 -0500)]
aklog: Only try to use krb5-weak.conf if it exists

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>
12 years agoaklog: Search for /etc/krb5/krb5.conf
Andrew Deason [Tue, 26 Mar 2013 18:14:30 +0000 (13:14 -0500)]
aklog: Search for /etc/krb5/krb5.conf

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>
12 years agoafsd: Parse cacheinfo during argument parsing
Andrew Deason [Thu, 22 Dec 2011 03:00:12 +0000 (22:00 -0500)]
afsd: Parse cacheinfo during argument parsing

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>
12 years agoLWP: don't copy pid to a null pointer
Derrick Brashear [Mon, 20 Dec 2010 21:36:42 +0000 (16:36 -0500)]
LWP: don't copy pid to a null pointer

In LWP_CreateProcess we take a pid. if it's null, don't crash.

Reviewed-on: http://gerrit.openafs.org/3556
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 5d218831f3186d0d1dc7d3b00dd4a3b6a4a8757c)

Change-Id: I96c0e2a8858fa929f0de22a774050aa63a200101
Reviewed-on: http://gerrit.openafs.org/9414
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>
12 years agoLinux: crset should use passed credentials
Marc Dionne [Fri, 25 Jan 2013 02:38:28 +0000 (21:38 -0500)]
Linux: crset should use passed credentials

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>
12 years agoubik: Avoid unlinking garbage
Simon Wilkinson [Wed, 27 Feb 2013 10:34:59 +0000 (10:34 +0000)]
ubik: Avoid unlinking garbage

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>
12 years agoubik: cleanup DB lock usage in SDISK_SendFile
Marc Dionne [Sat, 29 Jan 2011 17:48:02 +0000 (12:48 -0500)]
ubik: cleanup DB lock usage in SDISK_SendFile

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>
12 years agobutc: clean xbsa shutdown on control C
Rainer Toebbicke [Wed, 19 Sep 2012 16:13:15 +0000 (12:13 -0400)]
butc: clean xbsa shutdown on control C

when we catch a control-c, do a clean shutdown

Reviewed-on: http://gerrit.openafs.org/8141
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 aea3c71e59ec30e84ca4e7383fd3b566ce94bbb6)

Change-Id: I89665c29a522909e126214abaec008a18acb59d7
Reviewed-on: http://gerrit.openafs.org/9495
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@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>
12 years agoihandle: Indent ifdef maze
Andrew Deason [Fri, 21 Dec 2012 11:11:00 +0000 (11:11 +0000)]
ihandle: Indent ifdef maze

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>
12 years agoafs: Do not avoid DNLC if fakestat is set
Andrew Deason [Fri, 18 May 2012 21:55:09 +0000 (17:55 -0400)]
afs: Do not avoid DNLC if fakestat is set

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>
12 years agocacheout: Perform authenticated RXAFS_FlushCPS
Andrew Deason [Mon, 18 Jun 2012 22:01:24 +0000 (17:01 -0500)]
cacheout: Perform authenticated RXAFS_FlushCPS

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>
12 years agoviced: initInterfaceAddr_r regardless of ICBS code
Andrew Deason [Fri, 28 Dec 2012 18:16:49 +0000 (13:16 -0500)]
viced: initInterfaceAddr_r regardless of ICBS code

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>
12 years agoLINUX: Detect non-vectorized aio functions
Andrew Deason [Wed, 29 Aug 2012 19:14:39 +0000 (14:14 -0500)]
LINUX: Detect non-vectorized aio functions

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>
12 years agoLinux: cleanup aio support
Marc Dionne [Fri, 22 Apr 2011 19:23:27 +0000 (15:23 -0400)]
Linux: cleanup aio support

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>
12 years agovol-salvage: Indent some ifdefs
Andrew Deason [Thu, 31 May 2012 21:08:00 +0000 (16:08 -0500)]
vol-salvage: Indent some ifdefs

Reviewed-on: http://gerrit.openafs.org/7513
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 80359f562a459ef1dba2cdf53ee486578b50752d)

Change-Id: I36fdd58895928fc82f9542e3c0d2ec1db7551e42
Reviewed-on: http://gerrit.openafs.org/9479
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>
12 years agoBeautify ubik_print()
Thorsten Alteholz [Sun, 3 Feb 2013 10:58:25 +0000 (11:58 +0100)]
Beautify ubik_print()

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>
12 years agoxstat: print collection values in debug mode
Michael Meffie [Mon, 13 Dec 2010 19:53:50 +0000 (14:53 -0500)]
xstat: print collection values in debug mode

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>
12 years agolibafs: Fix statistics for PrefetchFromTape pioctl
Simon Wilkinson [Wed, 13 Jul 2011 12:53:08 +0000 (13:53 +0100)]
libafs: Fix statistics for PrefetchFromTape pioctl

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>
12 years agoLinux 3.9: hlist iterator change
Marc Dionne [Wed, 6 Mar 2013 01:54:50 +0000 (20:54 -0500)]
Linux 3.9: hlist iterator change

hlist iterators have been reworked to not require a temporary
node parameter.

Reviewed-on: http://gerrit.openafs.org/9403
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 9cfd7f768ca350d3b750e89e7ddb186bdad6f726)

Change-Id: I47df8894467f4bb1c60cf239ec0ce0a4d6ca29aa
Reviewed-on: http://gerrit.openafs.org/9639
Tested-by: BuildBot <buildbot@rampaginggeek.com>
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>
12 years agoPrint "waiting for job termination" at most once.
Karl Ramm [Sun, 4 Dec 2011 18:56:29 +0000 (13:56 -0500)]
Print "waiting for job termination" at most once.

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>
12 years agoxstat_cm_test: Print all call info stats
Andrew Deason [Tue, 3 Apr 2012 23:13:17 +0000 (18:13 -0500)]
xstat_cm_test: Print all call info stats

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>
12 years agoviced: Avoid dangling uuid hash table entry
Andrew Deason [Fri, 28 Dec 2012 17:58:33 +0000 (12:58 -0500)]
viced: Avoid dangling uuid hash table entry

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>
12 years agoCall rx_SetNoJumbo earlier
Andrew Deason [Fri, 4 May 2012 22:23:42 +0000 (17:23 -0500)]
Call rx_SetNoJumbo earlier

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>
12 years agoafscp: null-terminate root.cell dir if needed in dynroot mode
Derrick Brashear [Thu, 7 Mar 2013 11:53:16 +0000 (06:53 -0500)]
afscp: null-terminate root.cell dir if needed in dynroot mode

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>
12 years agoLinux: Add missing semi-colon
Marc Dionne [Mon, 11 Feb 2013 23:49:21 +0000 (18:49 -0500)]
Linux: Add missing semi-colon

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>
12 years agoLinux: Detect undefined symbols in kernel modules
Marc Dionne [Mon, 28 Jan 2013 01:52:39 +0000 (20:52 -0500)]
Linux: Detect undefined symbols in kernel modules

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>
12 years agorx: Assert call error for RXS_PreparePacket error
Andrew Deason [Mon, 18 Feb 2013 01:34:06 +0000 (19:34 -0600)]
rx: Assert call error for RXS_PreparePacket error

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>
12 years agorx: Honor RXS_PreparePacket errors
Andrew Deason [Mon, 14 Jan 2013 18:45:04 +0000 (12:45 -0600)]
rx: Honor RXS_PreparePacket errors

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>
12 years agorxperf: print achieved transfer rate
Dan van der Ster [Fri, 14 Dec 2012 10:08:44 +0000 (11:08 +0100)]
rxperf: print achieved transfer rate

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>
12 years agoviced: Yell when we GetSomeSpace_r
Andrew Deason [Wed, 14 Dec 2011 20:16:16 +0000 (14:16 -0600)]
viced: Yell when we GetSomeSpace_r

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>
12 years agoadd a simple backport policy to README.GIT
Ken Dreyer [Mon, 10 Sep 2012 17:20:26 +0000 (11:20 -0600)]
add a simple backport policy to README.GIT

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>
12 years agoUpdate NEWS for 1.6.2.1
Stephan Wiesand [Thu, 14 Mar 2013 09:35:30 +0000 (10:35 +0100)]
Update NEWS for 1.6.2.1

Reviewed-on: http://gerrit.openafs.org/9602
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 5123deebdcbf634151b236bf7ff7ac7ca099b11e)

Change-Id: I2d357e3fb385fcaa0e3da056e41ef8704007da6b
Reviewed-on: http://gerrit.openafs.org/9664
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agoMake NEWS match the 1.6.2 Release Notes
Stephan Wiesand [Thu, 14 Mar 2013 09:16:30 +0000 (10:16 +0100)]
Make NEWS match the 1.6.2 Release Notes

Reviewed-on: http://gerrit.openafs.org/9601
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit b74728590ce14f9b6c3235f0b51f8865caa9427d)

Change-Id: I61acc90efd22e9577aa0447b93b3f81c6339da27
Reviewed-on: http://gerrit.openafs.org/9663
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agoUnix CM: Update AFS_STATS_NUM_FS_RPC_OPS
Simon Wilkinson [Thu, 28 Feb 2013 17:05:29 +0000 (17:05 +0000)]
Unix CM: Update AFS_STATS_NUM_FS_RPC_OPS

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>
12 years agoUnix CM: Fix byte accounting for storebehind
Simon Wilkinson [Fri, 22 Feb 2013 16:54:17 +0000 (16:54 +0000)]
Unix CM: Fix byte accounting for storebehind

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>
12 years agoafs_open: Deal with afs_GetDCache returning NULL
Andrew Deason [Tue, 6 Nov 2012 05:47:06 +0000 (23:47 -0600)]
afs_open: Deal with afs_GetDCache returning NULL

afs_open was assuming afs_GetDCache always returned non-NULL. Make it
deal with a NULL return.

Reviewed-on: http://gerrit.openafs.org/8408
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 595a614d76d84be602c07d519738556b7f9ebf2a)

Change-Id: Iba54fd03a63be485490db33ff48e5642f55df52d
Reviewed-on: http://gerrit.openafs.org/9500
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>
12 years agofileserver: add volume number to error-messages
Christof Hanke [Wed, 22 Aug 2012 14:39:13 +0000 (16:39 +0200)]
fileserver: add volume number to error-messages

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>
12 years agolibafs: log error code when marking server down
Michael Meffie [Mon, 9 Apr 2012 19:49:50 +0000 (15:49 -0400)]
libafs: log error code when marking server down

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>
12 years agovol: Remove O_EXCL|O_TRUNC combinations
Andrew Deason [Thu, 10 Nov 2011 17:05:28 +0000 (11:05 -0600)]
vol: Remove O_EXCL|O_TRUNC combinations

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>
12 years agoafsd: afsd.fuse needs MT_LIBS
Anders Kaseorg [Tue, 5 Mar 2013 07:34:02 +0000 (02:34 -0500)]
afsd: afsd.fuse needs MT_LIBS

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>
12 years agoAdded -dryrun
Jeff Blaine [Thu, 19 May 2011 03:49:52 +0000 (23:49 -0400)]
Added -dryrun

Added missing information about -dryrun option

Reviewed-on: http://gerrit.openafs.org/4680
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 97070b425d4c6e4fa4944160c0e7a6965ebb8e75)

Change-Id: I185f0d76a6c95dcffa01713798a06672e6f9bfa3
Reviewed-on: http://gerrit.openafs.org/9623
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agoviced: Allow GetCapabilities to return an error
Simon Wilkinson [Fri, 22 Feb 2013 10:23:43 +0000 (10:23 +0000)]
viced: Allow GetCapabilities to return an error

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>
12 years agoCatch up to FreeBSD KPI for vfs_cmount
Ben Kaduk [Fri, 11 Jan 2013 18:03:02 +0000 (13:03 -0500)]
Catch up to FreeBSD KPI for vfs_cmount

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>
12 years agorxgen: Fix NULL pointer dereference
Simon Wilkinson [Fri, 15 Feb 2013 16:05:33 +0000 (16:05 +0000)]
rxgen: Fix NULL pointer dereference

Avoid a NULL pointer dereference if strchr doesn't find any occurence
of '*' in the string. Whilst we handle the not found case when inserting
a mid string terminator, we don't handle it when restoring the string to
its previous value.

Reviewed-on: http://gerrit.openafs.org/9158
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 0d28f8c0cec91d68023795e6ba9c769d60869f9e)

Change-Id: I6eb3ec5647153e588c5a80025da2bf2c921469b3
Reviewed-on: http://gerrit.openafs.org/9525
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.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>
12 years agoviced: Catch GetCellInfo failure
Simon Wilkinson [Fri, 22 Feb 2013 10:20:58 +0000 (10:20 +0000)]
viced: Catch GetCellInfo failure

If GetCellInfo returns a non-zero result, catch the error, rather
than just carrying on regardless.

Caught by clang-analyzer

Reviewed-on: http://gerrit.openafs.org/9240
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 1d1ba5f74102ae703ef657aa19150729edfe6ab2)

Change-Id: I205b32a3e38faeae8e06bad3dc615ba01f0626d8
Reviewed-on: http://gerrit.openafs.org/9533
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>
12 years agoUnix CM: Catch ICL initialisation failures
Simon Wilkinson [Thu, 21 Feb 2013 19:34:47 +0000 (19:34 +0000)]
Unix CM: Catch ICL initialisation failures

If afs_icl_CreateLog fails, don't still call afS_icl_CreateSet.
If afs_icl_CreateSetWithFlags fails, don't ignore its error code.

Caught by clang-analyzer

Reviewed-on: http://gerrit.openafs.org/9203
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 3bbff16c6d34c905fab8fcb792c8606ea356e2a8)

Change-Id: I4835a6cbdc802bc08f5ae83fa10f9c93357cf736
Reviewed-on: http://gerrit.openafs.org/9532
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>
12 years agokauth: Don't ignore GetExtendedCellInfo failures
Simon Wilkinson [Fri, 22 Feb 2013 09:51:24 +0000 (09:51 +0000)]
kauth: Don't ignore GetExtendedCellInfo failures

Don't ignore a failure from afsconf_GetExtendedCellInfo, as it will
leave buffers that we later read uninitialised.

Caught by clang-analyzer

Reviewed-on: http://gerrit.openafs.org/9180
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 5cefa0247fe4f22f769e366a207fb177ee8fb94f)

Change-Id: I613a371f1f0ab1a739966e81965661d6cbff8e5e
Reviewed-on: http://gerrit.openafs.org/9531
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>
12 years agoFreeBSD version compatibility for 1.6.x
Ben Kaduk [Tue, 19 Feb 2013 20:24:04 +0000 (15:24 -0500)]
FreeBSD version compatibility for 1.6.x

This is a direct commit, not a cherry-pick, as the libafs build is
different for master and the 1.6 branch.

Instead of needing to always play catch-up, reverse the sense of the
conditional and specifically exclude the FreeBSD 5.x and 6.x versions
so that new versions will automatically be in the right conditional.

Change-Id: Ifa1d4004faab8a7d6a94ca8d5aeff90e4c51b88e
Reviewed-on: http://gerrit.openafs.org/9143
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agodoc: Fix Solaris 11 kernel module path
Andrew Deason [Mon, 24 Sep 2012 19:20:07 +0000 (14:20 -0500)]
doc: Fix Solaris 11 kernel module path

For Solaris 11, the module goes in drv, not fs.

Reviewed-on: http://gerrit.openafs.org/8152
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
(cherry picked from commit a7278eb5620507cd70086582cf539b4024b46194)

Change-Id: Idb5f864132f436f9a6cc619d1c672c9ceec3ff67
Reviewed-on: http://gerrit.openafs.org/9566
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agodoc: solaris x86 kernel module path
Michael Meffie [Fri, 21 Sep 2012 19:58:29 +0000 (15:58 -0400)]
doc: solaris x86 kernel module path

Add instructions for solaris x86 kernel module installation.

Reviewed-on: http://gerrit.openafs.org/8143
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 5ef5cf48f3d2ba52cf5ed428728215b5b5f8d0b2)

Change-Id: I7bec3361b5f9e47c8b3cfbfbe27e012288ec9780
Reviewed-on: http://gerrit.openafs.org/9565
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agodoc: distributed files are under dest
Michael Meffie [Tue, 10 Apr 2012 20:07:37 +0000 (16:07 -0400)]
doc: distributed files are under dest

Add the dest path component in the quick start guide instructions for
copying files from a binary OpenAFS distribution file.

Reviewed-on: http://gerrit.openafs.org/7187
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit bc770a5007ae16aa5477bf1748f3e0666f665781)

Change-Id: I54c96f35ce4f9c60a25fee012306ecb210972287
Reviewed-on: http://gerrit.openafs.org/9564
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agodoc: document volinfo -filenames option
Michael Meffie [Fri, 20 May 2011 17:53:48 +0000 (13:53 -0400)]
doc: document volinfo -filenames option

Add the namei -filenames option to the volinfo man page.

Note this option as implemented implies the -vnode flag, but for
consistency with the other fields that modify the default mode
output, it is documented to be accompany the -vnode flag.

Reviewed-on: http://gerrit.openafs.org/4690
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e3fb2740ba20e78fdc93308b6a2843454a6d269c)

Change-Id: I1ef65090d5449f600ef03171436a27c142e69fbb
Reviewed-on: http://gerrit.openafs.org/9563
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agobudb: Store dumper information correctly
Simon Wilkinson [Sun, 24 Feb 2013 12:53:59 +0000 (12:53 +0000)]
budb: Store dumper information correctly

Change f498c18a6f7300eb89ca3b9d9b85c4d461fa8474 attempted to fix
a problem with using an inappropriate function to copy the
ktc_principal value 'principal' into the d.dumper structure element.

Originally the code read:
    principal_hton(&principal, &d.dumper)

which copies the 'host' principal principal into the 'net' structure
d.dumper. However, this was changed to
    principal = d.dumper

Which populates 'principal' with whatever garbage is in the d.dumper
structure.

Fix this so that the assignment is done the right way around.

Caught by clang-analyzer

Reviewed-on: http://gerrit.openafs.org/9252
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit dce2d8206ecd35c96e75cc0662432c2a4f9c3d7a)

Change-Id: Ib3851649293bddedf465739acc9bd7ad327c80e0
Reviewed-on: http://gerrit.openafs.org/9537
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>
12 years agobudb: Fail if afsconf_GetExtendedCellInfo does
Simon Wilkinson [Sun, 24 Feb 2013 10:43:52 +0000 (10:43 +0000)]
budb: Fail if afsconf_GetExtendedCellInfo does

Rather than silently ignoring the failure of
afsconf_GetExtendedCellInfo, and then using garbage cell
configuration, just fail to start if afsconf can't parse the
config directory.

Reviewed-on: http://gerrit.openafs.org/9247
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 3fbdc609dc025cfcaac6949485d6fb072bf34764)

Change-Id: I40f0aefda1bc44ce92a7733ec644002229c32079
Reviewed-on: http://gerrit.openafs.org/9536
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>
12 years agobutc: Catch failures to start keep alive thread
Simon Wilkinson [Sun, 24 Feb 2013 10:39:53 +0000 (10:39 +0000)]
butc: Catch failures to start keep alive thread

If we can't start the keep alive thread, in either the LWP or
pthread versions of a code, report an error and exit instead of
carrying on regardless.

Caught by clang-analyzer

Reviewed-on: http://gerrit.openafs.org/9245
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit e4862e284832420e9dbf5a6f437f6f7c8801f7dd)

Change-Id: I55453557b592bb1814877d291b1604907ab2e8d6
Reviewed-on: http://gerrit.openafs.org/9535
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>
12 years agoUnix CM: Fix bogus character in license string
Simon Wilkinson [Thu, 21 Feb 2013 22:10:38 +0000 (22:10 +0000)]
Unix CM: Fix bogus character in license string

A stray $ had crept into the license string in afs_dcache.c. Fix it.

Reviewed-on: http://gerrit.openafs.org/9233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 983d67616b670c5d57c8c67578fdb52f2bb3ddbd)

Change-Id: I21d31dc9e50e6be253cc7e7878e1079567f10220
Reviewed-on: http://gerrit.openafs.org/9529
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>
12 years agoptserver: Don't ignore ubik_Write failures
Simon Wilkinson [Tue, 19 Feb 2013 15:43:29 +0000 (15:43 +0000)]
ptserver: Don't ignore ubik_Write failures

If we can't write to the ubik database, then that's a bad thing.
Don't ignore it.

Caught by clang-analyzer

Reviewed-on: http://gerrit.openafs.org/9176
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 860c34ba938602387f78c10c2f548fb8a523a9cd)

Change-Id: Id379d94844e6cc520829b4ef6015d0a004fdbc42
Reviewed-on: http://gerrit.openafs.org/9526
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>
12 years agocorrect whitespace errors in readme files
Michael Meffie [Sat, 5 Jan 2013 18:37:51 +0000 (13:37 -0500)]
correct whitespace errors in readme files

Fix the trailing whitespace and leading spaces
before tabs in the readme files.

Reviewed-on: http://gerrit.openafs.org/8877
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 8a17568fb4fd3f77a3b9d043bbe49e992bca8266)

Change-Id: I60fb4d05cf79f4998e8652026dc3f1f636bcd6a4
Reviewed-on: http://gerrit.openafs.org/9518
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>
12 years agoubik/udebug.c: check array index before dereferencing
Nickolai Zeldovich [Sun, 6 Jan 2013 04:44:55 +0000 (23:44 -0500)]
ubik/udebug.c: check array index before dereferencing

Avoid out-of-bounds array accesses by first checking that the index
is in-bounds, and then dereferencing; not the other way around.

Reviewed-on: http://gerrit.openafs.org/8879
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 0e83cde60e6e91fbe20ffac0f0a77afe8497d950)

Change-Id: I7a5018011939d43b702c63a272d53a2018df7d33
Reviewed-on: http://gerrit.openafs.org/9513
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>
12 years agoviced: RXAFS_GetVolumeStatus remove access check
Jeffrey Altman [Tue, 3 Jul 2012 19:58:01 +0000 (15:58 -0400)]
viced: RXAFS_GetVolumeStatus remove access check

The AFS file server had always performed a PRSFS_READ permission
check on the volume's root directory (1.1) vnode before responding
succesfully to the client.  A successful response contains the
following volume state information:

  Message of the day (if any)
  Offline message (if any)
  Online flag
  InService flag
  Blessed flag
  NeedsSalvage flag
  Type
  MinQuota
  MaxQuota
  BlocksInUse
  PartBlocksAvail
  PartMaxBlocks

All of this information is publicly available to anonymous users
via other services so it is odd that it is hidden from anonymous
cache managers.

As sites begin to tighten the ACLs on volumes due to privacy
and security concerns this READ permission check is begin to
cause problems for Windows clients that rely upon the quota and
block counts to determine whether or not it is likely to be safe
to perform an extending write.  In many environments volumes are
being configured such that the root directory is 'l' for all and
only the subdirectories provide for 'ridw'.  Under these situations
the user is able to read/write the data but cannot determine how
much free space is available.  Since all of the data returned by
RXAFS_GetVolumeStatus is publicly available, the patchset removes
the access check entirely.

Reviewed-on: http://gerrit.openafs.org/7705
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit d2d591caf2c9b4cf2ebae708cc9b4c8b78ca5a5a)

Change-Id: I94886f2325ee46995dd886bbf2d359f6d3af76fe
Reviewed-on: http://gerrit.openafs.org/9489
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
12 years agolibadmin: Don't try to release garbage connection
Simon Wilkinson [Fri, 15 Feb 2013 22:34:36 +0000 (22:34 +0000)]
libadmin: Don't try to release garbage connection

In bos_ServerOpen, initalise the contents of bos_server structure
to 0 using calloc, so that if we jump to the error handling stuff
before they are assigned real values we don't end up trying to
release garbage.

Reviewed-on: http://gerrit.openafs.org/9163
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 17154a3c0afa88f7bb25e2b642fc13ee69c2b7db)

Change-Id: Iaa6e5166cb29799feb82ca29ef3e78ceea82d6e2
Reviewed-on: http://gerrit.openafs.org/9524
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>
12 years agoafsd: Report fakestat correctly
Andrew Deason [Mon, 21 May 2012 23:15:58 +0000 (18:15 -0500)]
afsd: Report fakestat correctly

A fakestat value of 1 is for -fakestat-all, and 2 is for -fakestat,
not the other way around.

Reviewed-on: http://gerrit.openafs.org/7445
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 47e12584804b287051552900c94c99a3c84daa92)

Change-Id: I8b0872430c771741962afcfd9854cbe5fcdc42e8
Reviewed-on: http://gerrit.openafs.org/9478
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
12 years agosalvager: incorrect comment
Mark Vitale [Thu, 14 Feb 2013 15:51:34 +0000 (10:51 -0500)]
salvager: incorrect comment

The comment for the code handling the -showsuid option was incorrect.

Reviewed-on: http://gerrit.openafs.org/9109
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 4051c5e96e921b69ac2a6e7bcb805cbc0a8f7993)

Change-Id: Id19e063c9540e362b4d9478a0fce606084d470e6
Reviewed-on: http://gerrit.openafs.org/9523
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>
12 years agofix some typos in bos_setrestricted
Thorsten Alteholz [Wed, 30 Jan 2013 19:11:04 +0000 (20:11 +0100)]
fix some typos in bos_setrestricted

the real name of the command is: 'bos setrestricted'
it is sufficient to name 'bos install' only once

Reviewed-on: http://gerrit.openafs.org/8990
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 69f634503482f899e4d422b16100636905c72ea8)

Change-Id: I7ab452cb2cf5e836341f7fc66dacd317cf65ed58
Reviewed-on: http://gerrit.openafs.org/9521
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>
12 years agoLINUX: fix array indexing issue in memory statistics
Chas Williams (CONTRACTOR) [Thu, 17 Jan 2013 02:16:31 +0000 (21:16 -0500)]
LINUX: fix array indexing issue in memory statistics

The comma is a sequence point and i gets incremented and then used.
This results in writing past the end of the array by one (and failing
to initialize the first element as well).

Potential fix for RT ticket 131566.

Reviewed-on: http://gerrit.openafs.org/8914
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 04ddecc1f2827463edf22857f9b19910ccc25e98)

Change-Id: I09a96fcb5ffc9a58f0930f76e4ee5f65628ba5c8
Reviewed-on: http://gerrit.openafs.org/9520
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>
12 years agolibadmin/vos/vosutils.c: mask out sign-extension
Nickolai Zeldovich [Sun, 6 Jan 2013 04:45:59 +0000 (23:45 -0500)]
libadmin/vos/vosutils.c: mask out sign-extension

Right-shifting a signed int by 24 bits can produce a value outside of
0..0xff due to sign-extension.  As a result, in AddressMatch(), the
first bPattern!=255 check can never succeed.  Fix by masking with 255
before comparison.

Reviewed-on: http://gerrit.openafs.org/8884
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 8e8e3c26b87d78b92d96ba91d58ee59d774ebcb5)

Change-Id: Ifee303905d004936e96f6be1e6a9188d7b70978c
Reviewed-on: http://gerrit.openafs.org/9517
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>
12 years agolwp/iomgr.c: avoid off-by-one out-of-bounds access
Nickolai Zeldovich [Sun, 6 Jan 2013 04:45:46 +0000 (23:45 -0500)]
lwp/iomgr.c: avoid off-by-one out-of-bounds access

Avoid accessing sigDelivered[NSIG] and sigEvents[NSIG], which are
out-of-bounds by one.

Reviewed-on: http://gerrit.openafs.org/8883
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 bd850e5b980d34236ee98d16b9717860b63af306)

Change-Id: I859c654b8d35484aeeb029432c69848846335fb8
Reviewed-on: http://gerrit.openafs.org/9516
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>
12 years agobutm/file_tm.c: check for null pointer before dereferencing
Nickolai Zeldovich [Sun, 6 Jan 2013 04:45:33 +0000 (23:45 -0500)]
butm/file_tm.c: check for null pointer before dereferencing

Move the null pointer check to before the pointer is dereferenced.

Reviewed-on: http://gerrit.openafs.org/8882
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 4d6967e0b0a0628deb1dd9d210de84779d41f856)

Change-Id: Ib6c9308170b1242ea207f5380275d51b1514028d
Reviewed-on: http://gerrit.openafs.org/9515
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>
12 years agosrc/tests/pathname.c: properly check strdup() return value
Nickolai Zeldovich [Sun, 6 Jan 2013 04:45:11 +0000 (23:45 -0500)]
src/tests/pathname.c: properly check strdup() return value

Fix the check for strdup() running out of memory.

Reviewed-on: http://gerrit.openafs.org/8880
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 d9cc9c9dee9ad0213ddd39174e81d01b9707937b)

Change-Id: I56dc0dd7ced4df5be636a03db819169b5413e56b
Reviewed-on: http://gerrit.openafs.org/9514
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>
12 years agovolser/vol_split.c: do not dereference known-NULL pointer
Nickolai Zeldovich [Sun, 6 Jan 2013 04:44:33 +0000 (23:44 -0500)]
volser/vol_split.c: do not dereference known-NULL pointer

Avoid dereferencing a pointer that we just checked is NULL when printing
an error message.

Reviewed-on: http://gerrit.openafs.org/8878
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 5c5515a5c3b34f9a115b29378e123c779c138f51)

Change-Id: I73de73f8cd9be9d106285f45e86e030909293521
Reviewed-on: http://gerrit.openafs.org/9512
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>
12 years agovol: Call memset with the correct size
Simon Wilkinson [Fri, 30 Mar 2012 18:31:10 +0000 (19:31 +0100)]
vol: Call memset with the correct size

Call memset with the size of the structure we're initialising to 0,
and not the size of the pointer to that structure.

Caught by clang's new warnings.

Reviewed-on: http://gerrit.openafs.org/7083
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 408afc5690fc8ac3b6942983765ab36e63d2534d)

Change-Id: I25fd235ffd7478295bf205b232ecc5816f962d3f
Reviewed-on: http://gerrit.openafs.org/9472
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>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
12 years agotools: example sysvmq audit reader
Michael Meffie [Tue, 20 Nov 2012 13:49:39 +0000 (08:49 -0500)]
tools: example sysvmq audit reader

A user contributed sysvmq audit log example reader. Shows
how to read the sysvmq audit log using core only perl modules.

Reviewed-on: http://gerrit.openafs.org/8485
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 7c8373c8c27abdfa316c6526aa14654caed3e7f8)

Change-Id: Ib2eb66763e6ada884f33f14fbe950759fc9c3c43
Reviewed-on: http://gerrit.openafs.org/9501
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>
12 years agobozo: fix typo in help text
Marc Dionne [Sat, 22 Sep 2012 00:08:58 +0000 (20:08 -0400)]
bozo: fix typo in help text

Fix a typo for "interface" in the help text for bosserver.

Reviewed-on: http://gerrit.openafs.org/8144
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
(cherry picked from commit 58c089e642198a210462b3bf508056b56667f879)

Change-Id: I90fff6c691ae59ff467a641cb025cedc17a3bb4c
Reviewed-on: http://gerrit.openafs.org/9498
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>
12 years agorx: Save errno in LWP rxi_Sendmsg
Andrew Deason [Tue, 11 Sep 2012 23:46:42 +0000 (18:46 -0500)]
rx: Save errno in LWP rxi_Sendmsg

Much of this code examines errno or WSAGetLastError to determine what
to do. However, some other operations between the actual sendmsg call
and code that examines errno may modify errno. So, save the value of
errno to ensure errno reflects the actual error we got from sendmsg;
this also slightly simplifies some of the logic.

Reviewed-on: http://gerrit.openafs.org/8110
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 347908cd0031c558c266ec412aa49200ae2b3204)

Change-Id: Ia0134acb2ae5f9e47fb82f36bd0889987803d897
Reviewed-on: http://gerrit.openafs.org/9496
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>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agovos: Avoid creating volume with the same RO/BK ids
Andrew Deason [Wed, 20 Jun 2012 21:28:51 +0000 (16:28 -0500)]
vos: Avoid creating volume with the same RO/BK ids

If we specified an RW id of 5, an RO id of 6, and no BK id, this code
would assign the BK id to RW+1, or 6. This gives the RO and BK volumes
the same volume id, which is a mistake. Choose a different id instead.

Reviewed-on: http://gerrit.openafs.org/7603
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 234bedae6ef506ec1ff53854a22548e892db3f11)

Change-Id: I332fed5b8cac23a847a8890188f899cff909f130
Reviewed-on: http://gerrit.openafs.org/9488
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agoviced: fix incorrect error message
Marc Dionne [Thu, 22 Sep 2011 23:09:52 +0000 (19:09 -0400)]
viced: fix incorrect error message

The error message was obviously copied from another location in the
code (after the pr_Initialize call) and is misleading.  Adapt it for
vl_Initialize failure.

Reviewed-on: http://gerrit.openafs.org/5490
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit a020c572d372f2e86807dc4c75ec50ff14ef2fba)

Change-Id: I067ceb0e5e2281508647065f11e48d4a07033c99
Reviewed-on: http://gerrit.openafs.org/9432
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>
12 years agovos: print correct command name in diagnostics for changeloc
Marc Dionne [Tue, 13 Sep 2011 23:32:37 +0000 (19:32 -0400)]
vos: print correct command name in diagnostics for changeloc

Fix the label in the diagnostics message, it prints "addsite"
instead of "changeloc" when an error occurs during vos changeloc

Reviewed-on: http://gerrit.openafs.org/5414
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 1de4561529bdb92b6647a634d9f2c2714e1758e5)

Change-Id: If87fd2a1ed0d4c2975479b5167f6e867db62437a
Reviewed-on: http://gerrit.openafs.org/9431
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>
12 years agoptuser: Clear return value from pr_ListMembers
Simon Wilkinson [Thu, 28 Feb 2013 10:22:43 +0000 (10:22 +0000)]
ptuser: Clear return value from pr_ListMembers

Make sure that lnames is zero'd on entry to pr_ListMembers, so that
an early error return doesn't also return garbage.

Reviewed-on: http://gerrit.openafs.org/9309
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 bc70828f0713891597cf0042bc3e204f3d923271)

Change-Id: If99abc35f49ac1d436fbb82c1f9dbf97590e95c5
Reviewed-on: http://gerrit.openafs.org/9379
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agoUnix CM: Don't overflow ICL logs array
Simon Wilkinson [Thu, 28 Feb 2013 13:45:00 +0000 (13:45 +0000)]
Unix CM: Don't overflow ICL logs array

When checking whether a user supplied index into the ICL logs array
is out of bounds, we need to check whether it is greater or equal
to the maxmimum number of elements. Otherwise we can access one
more than the number of elements in the array.

Caught by coverity (#985567)

Reviewed-on: http://gerrit.openafs.org/9311
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 ff8bae8938532d95f792258d2c520705e095e7af)

Change-Id: I5dba0d22d4589cb7d1f0a4fe57623646d300ab61
Reviewed-on: http://gerrit.openafs.org/9378
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agoUnix CM: Fix stray semicolon
Simon Wilkinson [Fri, 1 Mar 2013 10:54:07 +0000 (10:54 +0000)]
Unix CM: Fix stray semicolon

Commit d2437d02a6f59d972dd0690f7eb1c46cf7cc4b85 introduced a
stray semicolon in the osidnlc code. Fix it.

Caught by coverity (#989030)

Reviewed-on: http://gerrit.openafs.org/9321
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 59def405ba9404954debd35da539346b1ccd4096)

Change-Id: I35256e7b0aec95b3341db9cd1e99387b1050fab4
Reviewed-on: http://gerrit.openafs.org/9377
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agoUnix CM: Fix hash table overflow in dnlc code
Simon Wilkinson [Thu, 28 Feb 2013 15:26:15 +0000 (15:26 +0000)]
Unix CM: Fix hash table overflow in dnlc code

In GetMeAnEntry, we can end up overflowing the nameHash array by one
element if the stars are particularly badly aligned.

nameptr is a static across function calls, so nameptr and j are not
equal. If nameptr is increment to NHSIZE in the same loop iteration
as j reaches NHSIZE + 2, the loop will terminate. We'll then
lookup nameHash[NHSIZE], which is 1 element passed the end of the
array.

Add an if statement which loops nameptr outside the loop (in the
same way as the if statement in the loop)

Caught by coverity (#985568)

Reviewed-on: http://gerrit.openafs.org/9312
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 d2437d02a6f59d972dd0690f7eb1c46cf7cc4b85)

Change-Id: Ic19d72e6c012cb06e98c3c970162995e77da4b68
Reviewed-on: http://gerrit.openafs.org/9376
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agokauth: Don't overflow cellinfo hostAddrs array
Simon Wilkinson [Fri, 1 Mar 2013 11:22:26 +0000 (11:22 +0000)]
kauth: Don't overflow cellinfo hostAddrs array

The hostaddrs array has MAXHOSTSPERCELL (8) available elements.
The ubik connections list has MAXSERVERS (20) elements - when copying
from the ubik list into the cellinfo hostaddrs list, be careful not
to overflow it.

Caught by coverity (#985577)

Reviewed-on: http://gerrit.openafs.org/9323
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 30e25c74376dd8aa24018116015e57c47c1dfaf9)

Change-Id: I6bf03fada98cf6f5442a7d6a1e52e18cc91aad59
Reviewed-on: http://gerrit.openafs.org/9375
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agounlog: Don't overflow cells array
Simon Wilkinson [Fri, 1 Mar 2013 11:31:31 +0000 (11:31 +0000)]
unlog: Don't overflow cells array

cells has a maximum size of MAXCELLS. Doing cells[MAXCELLS] overflows
that array. Clamp our maximum number of cells at one below this to
avoid the overflow.

Caught by coverity (#98551)

Reviewed-on: http://gerrit.openafs.org/9324
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit ff7fd58b49a41bf85df492b9f470004d4433800e)

Change-Id: If6c0caed4b4fedf571c4c6c6b8466bfaaff67975
Reviewed-on: http://gerrit.openafs.org/9374
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agoubik: Don't overflow server's addr array
Simon Wilkinson [Fri, 1 Mar 2013 11:47:03 +0000 (11:47 +0000)]
ubik: Don't overflow server's addr array

We're checking to see if we've overflowed the array _after_ we've
looked up an element within it - so on the final iteration, we
always read past the end of the array.

Fix this by swapping the order of the tests in the for statemen

Caught by coverity (#985590)

Reviewed-on: http://gerrit.openafs.org/9326
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit a4ae9a4c3cc1fa5ca2b813174040dce36284a4b9)

Conflicts:
src/ubik/recovery.c

Change-Id: Ic09177a1e85492e181e51d554ddb25df2ca2dfbd
Reviewed-on: http://gerrit.openafs.org/9373
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agoutil: Fix overflows in address parsing
Simon Wilkinson [Fri, 1 Mar 2013 12:01:19 +0000 (12:01 +0000)]
util: Fix overflows in address parsing

The extractAddr function (which turns a dotted quad into an IP
address), has a number of overflows when one or more elements of
the quad are more than 31 characters in length.

The array allocated for each portion is 32 bytes long, but we only
stop writing into the array when the indexing pointer reaches 32,
which doesn't leave us with space for the trailing NULL.

Rework this so we always allow space for the NULL, and use a #define
for the array length to make it more clear whats going on.

Caught by coverity (#985591, #985592, #985593, #985594)

Reviewed-on: http://gerrit.openafs.org/9327
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 28a441ebd8323437bf762a790b4ec5e6301e4bec)

Change-Id: I9506fd8b468c957f0c9f8dc2d58baf5bc6bc2e19
Reviewed-on: http://gerrit.openafs.org/9372
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agoup: Fix improper use of readlink
Simon Wilkinson [Fri, 1 Mar 2013 12:12:07 +0000 (12:12 +0000)]
up: Fix improper use of readlink

readlink returns a non-NUL terminated string. If the string must be
terminated, we need to have space in the buffer for it. So, the
buffer passed to readlink must be 1 less than the real length of
the buffer.

Caught by coverity (#985597, #985610)

Reviewed-on: http://gerrit.openafs.org/9329
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 80875f8aa1540bf032073a4843566bbe6b1fe301)

Change-Id: I1dd039bfceaff7891c9145cf4799469b2de2f23a
Reviewed-on: http://gerrit.openafs.org/9371
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agovolser: Catch EOFs when reading dumps
Simon Wilkinson [Tue, 26 Feb 2013 12:38:59 +0000 (12:38 +0000)]
volser: Catch EOFs when reading dumps

When reading a standard tag, make sure and catch an EOF error
from iod_getc. Otherwise we'll end up trying to parse 0xFF as a
tag length.

Caught by coverity (#985603)

Reviewed-on: http://gerrit.openafs.org/9275
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit cc703d9562455c74767fcd6d2055339109fa9243)

Change-Id: I29957f7b656bb2cdd19601d90990d7bacd82e98c
Reviewed-on: http://gerrit.openafs.org/9361
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agovolser: Make it clear what's copied from partList
Simon Wilkinson [Wed, 20 Feb 2013 14:54:55 +0000 (14:54 +0000)]
volser: Make it clear what's copied from partList

XVolListPartitions uses partList to maintain a list of partition
IDs - it does not use the partFlags field. Make it clear when we
populate the partEntries field that we are only copying the
partition list.

Caught by coverity (#986030)

Reviewed-on: http://gerrit.openafs.org/9262
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 00601179625ffb71461bbcc46629791895cf4793)

Change-Id: I878011efe4baae897e5d4f875c8e02378da38587
Reviewed-on: http://gerrit.openafs.org/9360
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
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>
12 years agoviced: Don't write out garbage when extending file
Simon Wilkinson [Tue, 26 Feb 2013 12:17:29 +0000 (12:17 +0000)]
viced: Don't write out garbage when extending file

When we extend a file, we write a single byte of data to it - tlen
is used as a source for this single byte. However, in the current
code, tlen is used uninitialised. Set it to 0, so we don't write a
byte of stack garbage.

Caught by coverity (#986015)

Reviewed-on: http://gerrit.openafs.org/9271
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit e191cb889c941848fe09f04c24d969111e6dc494)

Change-Id: I517b5772241314a0854094655e25f3f75eba90d1
Reviewed-on: http://gerrit.openafs.org/9358
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agoubik: Zero header before writing to disk
Simon Wilkinson [Tue, 26 Feb 2013 12:21:59 +0000 (12:21 +0000)]
ubik: Zero header before writing to disk

The ubik disk header contains a padding field, which is never
zeroed before being written out to disk. This means that there is
a shorts worth of stack garbage in every ubik label!

Just zero the whole structure with memset before we populate it.

Caught by coverity (#986011)

Reviewed-on: http://gerrit.openafs.org/9272
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit d8fa251a14e9469fb6ec722d100b6a8557248694)

Change-Id: I1d3baf4ced6583f22458155edcc16344acc5757e
Reviewed-on: http://gerrit.openafs.org/9357
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agodoc: dynamic mount requires dynroot and fakestat
Michael Meffie [Mon, 10 Dec 2012 17:01:38 +0000 (12:01 -0500)]
doc: dynamic mount requires dynroot and fakestat

Document that dynamic mount (/afs/.:mount) requires
dynroot and fakestat on non-linux unix.

Reviewed-on: http://gerrit.openafs.org/8739
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
(cherry picked from commit 7dbb35a89f42743ff0a29bc9822b94141a2a8323)

Change-Id: Ia77835cd1830c7bc5dde573f2e890341aa06bc21
Reviewed-on: http://gerrit.openafs.org/9519
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>
12 years agoOpenBSD: Replace "vnodeop_desc" with "vops" in kernel module.
Antoine Verheijen [Mon, 21 Jan 2013 09:30:58 +0000 (02:30 -0700)]
OpenBSD: Replace "vnodeop_desc" with "vops" in kernel module.

In OpenBSD 4.9, the vnode operations vector in the "vnode" struct
was changed from using a "vnodeop_desc" struct to a new "vops"
struct. This patch makes the appropriate changes to the OpenBSD
kernel module support to accommodate the change.

Reviewed-on: http://gerrit.openafs.org/8928
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit bb42c02ce56aec29e3860bec47e47157d0406f20)

Change-Id: I768358758763a362c92351211bda6d8a7eab6a26
Reviewed-on: http://gerrit.openafs.org/9595
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agospelling corrections in readme files
Michael Meffie [Sat, 5 Jan 2013 15:40:42 +0000 (10:40 -0500)]
spelling corrections in readme files

Fix spelling errors in readme files.

Reviewed-on: http://gerrit.openafs.org/8876
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
(cherry picked from commit 4042667388406e540c8a6546031d514793ffc8c4)

Change-Id: Idd64293533af373c2b467049442231bb85b6d7db
Reviewed-on: http://gerrit.openafs.org/9511
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>
12 years agoRemove AFSLore from wiki URLs
Michael Laß [Sat, 22 Dec 2012 21:54:20 +0000 (22:54 +0100)]
Remove AFSLore from wiki URLs

The URL of the openafs wiki doesn't contain "AFSLore" anymore. Although
these old URLs still work, replace them to point users to the correct
address in the first place. Also be consistent and always use a
trailing /.

Reviewed-on: http://gerrit.openafs.org/8819
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit df4d971ec1a014826929dfeac017fb24d37ac38a)

Change-Id: I99027c23c3a2e5604f927f51961298b5ec27d1c1
Reviewed-on: http://gerrit.openafs.org/9504
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
12 years agoRemove completed tasks from todo list, add info about git/gerrit preference
Jeff Blaine [Sun, 5 Jun 2011 20:38:53 +0000 (16:38 -0400)]
Remove completed tasks from todo list, add info about git/gerrit preference

Removed completed tasks (fstrace subcommand help in-binary and issue with
-noexecute vs. -dryrun in vos delentry) from todo list.  Added info about
git/gerrit preference for documentation help, but patches still allowed
to the openafs-doc list.

Reviewed-on: http://gerrit.openafs.org/4803
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8f186c0f7a48059ca561422d58073e22934ea2dc)

Change-Id: Iec6e3db185e816f6c1b587cc74cc5ca5a2c93282
Reviewed-on: http://gerrit.openafs.org/9503
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>
12 years agoafscp: Always show fetch/store errors
Andrew Deason [Wed, 10 Nov 2010 21:21:07 +0000 (15:21 -0600)]
afscp: Always show fetch/store errors

When we get an error from a fetch or store operation, show what the
error was, instead of just saying "some network error occured".

Reviewed-on: http://gerrit.openafs.org/3290
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8078c4dcf2dd5a922225f0e37babf1b357b5e72d)

Change-Id: Icfdce08149e16749097bd6be326312dec6292d34
Reviewed-on: http://gerrit.openafs.org/9415
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>
12 years agoafsd: Remove unused definitions
Andrew Deason [Mon, 22 Nov 2010 02:40:28 +0000 (21:40 -0500)]
afsd: Remove unused definitions

Remove some #defines for s_host and similar things. They are not used
anywhere, and they can cause warnings for e.g. s_host being redefined.

Reviewed-on: http://gerrit.openafs.org/3364
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit be6fb658fe717469470bcd28c46bee1901c4d96c)

Change-Id: I9ca3c81dde7321928c96a80ae46ff9b736c1040e
Reviewed-on: http://gerrit.openafs.org/9413
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>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>