openafs.git
11 years agoLinux: Detect undefined symbols in kernel modules
Marc Dionne [Mon, 28 Jan 2013 01:52:39 +0000]
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>

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

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

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

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

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

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

11 years agoMake NEWS match the 1.6.2 Release Notes
Stephan Wiesand [Thu, 14 Mar 2013 09:16:30 +0000]
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>

11 years agoUnix CM: Update AFS_STATS_NUM_FS_RPC_OPS
Simon Wilkinson [Thu, 28 Feb 2013 17:05:29 +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>

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

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

11 years agofileserver: add volume number to error-messages
Christof Hanke [Wed, 22 Aug 2012 14:39:13 +0000]
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>

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

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

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

11 years agoAdded -dryrun
Jeff Blaine [Thu, 19 May 2011 03:49:52 +0000]
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>

11 years agoviced: Allow GetCapabilities to return an error
Simon Wilkinson [Fri, 22 Feb 2013 10:23:43 +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>

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

11 years agorxgen: Fix NULL pointer dereference
Simon Wilkinson [Fri, 15 Feb 2013 16:05:33 +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>

11 years agoviced: Catch GetCellInfo failure
Simon Wilkinson [Fri, 22 Feb 2013 10:20:58 +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>

11 years agoUnix CM: Catch ICL initialisation failures
Simon Wilkinson [Thu, 21 Feb 2013 19:34:47 +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>

11 years agokauth: Don't ignore GetExtendedCellInfo failures
Simon Wilkinson [Fri, 22 Feb 2013 09:51:24 +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>

11 years agoFreeBSD version compatibility for 1.6.x
Ben Kaduk [Tue, 19 Feb 2013 20:24:04 +0000]
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>

11 years agodoc: Fix Solaris 11 kernel module path
Andrew Deason [Mon, 24 Sep 2012 19:20:07 +0000]
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>

11 years agodoc: solaris x86 kernel module path
Michael Meffie [Fri, 21 Sep 2012 19:58:29 +0000]
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>

11 years agodoc: distributed files are under dest
Michael Meffie [Tue, 10 Apr 2012 20:07:37 +0000]
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>

11 years agodoc: document volinfo -filenames option
Michael Meffie [Fri, 20 May 2011 17:53:48 +0000]
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>

11 years agobudb: Store dumper information correctly
Simon Wilkinson [Sun, 24 Feb 2013 12:53:59 +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>

11 years agobudb: Fail if afsconf_GetExtendedCellInfo does
Simon Wilkinson [Sun, 24 Feb 2013 10:43:52 +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>

11 years agobutc: Catch failures to start keep alive thread
Simon Wilkinson [Sun, 24 Feb 2013 10:39:53 +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>

11 years agoUnix CM: Fix bogus character in license string
Simon Wilkinson [Thu, 21 Feb 2013 22:10:38 +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>

11 years agoptserver: Don't ignore ubik_Write failures
Simon Wilkinson [Tue, 19 Feb 2013 15:43:29 +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>

11 years agocorrect whitespace errors in readme files
Michael Meffie [Sat, 5 Jan 2013 18:37:51 +0000]
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>

11 years agoubik/udebug.c: check array index before dereferencing
Nickolai Zeldovich [Sun, 6 Jan 2013 04:44:55 +0000]
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>

11 years agoviced: RXAFS_GetVolumeStatus remove access check
Jeffrey Altman [Tue, 3 Jul 2012 19:58:01 +0000]
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>

11 years agolibadmin: Don't try to release garbage connection
Simon Wilkinson [Fri, 15 Feb 2013 22:34:36 +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>

11 years agoafsd: Report fakestat correctly
Andrew Deason [Mon, 21 May 2012 23:15:58 +0000]
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>

11 years agosalvager: incorrect comment
Mark Vitale [Thu, 14 Feb 2013 15:51:34 +0000]
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>

11 years agofix some typos in bos_setrestricted
Thorsten Alteholz [Wed, 30 Jan 2013 19:11:04 +0000]
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>

11 years agoLINUX: fix array indexing issue in memory statistics
Chas Williams (CONTRACTOR) [Thu, 17 Jan 2013 02:16:31 +0000]
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>

11 years agolibadmin/vos/vosutils.c: mask out sign-extension
Nickolai Zeldovich [Sun, 6 Jan 2013 04:45:59 +0000]
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>

11 years agolwp/iomgr.c: avoid off-by-one out-of-bounds access
Nickolai Zeldovich [Sun, 6 Jan 2013 04:45:46 +0000]
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>

11 years agobutm/file_tm.c: check for null pointer before dereferencing
Nickolai Zeldovich [Sun, 6 Jan 2013 04:45:33 +0000]
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>

11 years agosrc/tests/pathname.c: properly check strdup() return value
Nickolai Zeldovich [Sun, 6 Jan 2013 04:45:11 +0000]
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>

11 years agovolser/vol_split.c: do not dereference known-NULL pointer
Nickolai Zeldovich [Sun, 6 Jan 2013 04:44:33 +0000]
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>

11 years agovol: Call memset with the correct size
Simon Wilkinson [Fri, 30 Mar 2012 18:31:10 +0000]
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>

11 years agotools: example sysvmq audit reader
Michael Meffie [Tue, 20 Nov 2012 13:49:39 +0000]
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>

11 years agobozo: fix typo in help text
Marc Dionne [Sat, 22 Sep 2012 00:08:58 +0000]
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>

11 years agorx: Save errno in LWP rxi_Sendmsg
Andrew Deason [Tue, 11 Sep 2012 23:46:42 +0000]
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>

11 years agovos: Avoid creating volume with the same RO/BK ids
Andrew Deason [Wed, 20 Jun 2012 21:28:51 +0000]
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>

11 years agoviced: fix incorrect error message
Marc Dionne [Thu, 22 Sep 2011 23:09:52 +0000]
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>

11 years agovos: print correct command name in diagnostics for changeloc
Marc Dionne [Tue, 13 Sep 2011 23:32:37 +0000]
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>

11 years agoptuser: Clear return value from pr_ListMembers
Simon Wilkinson [Thu, 28 Feb 2013 10:22:43 +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>

11 years agoUnix CM: Don't overflow ICL logs array
Simon Wilkinson [Thu, 28 Feb 2013 13:45:00 +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>

11 years agoUnix CM: Fix stray semicolon
Simon Wilkinson [Fri, 1 Mar 2013 10:54:07 +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>

11 years agoUnix CM: Fix hash table overflow in dnlc code
Simon Wilkinson [Thu, 28 Feb 2013 15:26:15 +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>

11 years agokauth: Don't overflow cellinfo hostAddrs array
Simon Wilkinson [Fri, 1 Mar 2013 11:22:26 +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>

11 years agounlog: Don't overflow cells array
Simon Wilkinson [Fri, 1 Mar 2013 11:31: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>

11 years agoubik: Don't overflow server's addr array
Simon Wilkinson [Fri, 1 Mar 2013 11:47:03 +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>

11 years agoutil: Fix overflows in address parsing
Simon Wilkinson [Fri, 1 Mar 2013 12:01:19 +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>

11 years agoup: Fix improper use of readlink
Simon Wilkinson [Fri, 1 Mar 2013 12:12:07 +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>

11 years agovolser: Catch EOFs when reading dumps
Simon Wilkinson [Tue, 26 Feb 2013 12:38:59 +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>

11 years agovolser: Make it clear what's copied from partList
Simon Wilkinson [Wed, 20 Feb 2013 14:54:55 +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>

11 years agoviced: Don't write out garbage when extending file
Simon Wilkinson [Tue, 26 Feb 2013 12:17:29 +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>

11 years agoubik: Zero header before writing to disk
Simon Wilkinson [Tue, 26 Feb 2013 12:21:59 +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>

11 years agodoc: dynamic mount requires dynroot and fakestat
Michael Meffie [Mon, 10 Dec 2012 17:01:38 +0000]
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>

11 years agoOpenBSD: Replace "vnodeop_desc" with "vops" in kernel module.
Antoine Verheijen [Mon, 21 Jan 2013 09:30:58 +0000]
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>

11 years agospelling corrections in readme files
Michael Meffie [Sat, 5 Jan 2013 15:40:42 +0000]
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>

11 years agoRemove AFSLore from wiki URLs
Michael Laß [Sat, 22 Dec 2012 21:54:20 +0000]
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>

11 years agoRemove completed tasks from todo list, add info about git/gerrit preference
Jeff Blaine [Sun, 5 Jun 2011 20:38:53 +0000]
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>

11 years agoafscp: Always show fetch/store errors
Andrew Deason [Wed, 10 Nov 2010 21:21:07 +0000]
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>

11 years agoafsd: Remove unused definitions
Andrew Deason [Mon, 22 Nov 2010 02:40:28 +0000]
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>

11 years agobutc: do not use stack garbage for secobj
Ben Kaduk [Tue, 19 Feb 2013 18:06:36 +0000]
butc: do not use stack garbage for secobj

The butc only ever handles connections over rxnull anyway, so just
specify an array of security objects of length one.

Reviewed-on: http://gerrit.openafs.org/9140
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 252a5b65c30636bf5f62a49a79e5777004ecd17d)

Change-Id: I0b5c112f56553b7ee0ea4e40a9c65f2fe45f8297
Reviewed-on: http://gerrit.openafs.org/9404
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-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>

11 years agoafsutil: fix prototype
Derrick Brashear [Mon, 25 Feb 2013 19:56:37 +0000]
afsutil: fix prototype

the prototype for afs_config_get_string was broken. fix it.
1.6 fix only; on master, hcrypto provides this

Change-Id: Id7f877c197e44437fe41cb89630ce6e1bf2d6e3d
Reviewed-on: http://gerrit.openafs.org/9362
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

11 years agotbudb depends on libafsauthent
Andrew Deason [Thu, 7 Mar 2013 19:52:25 +0000]
tbudb depends on libafsauthent

budb_server in src/tbudb requires libafsauthent to build. So, make
tbudb depend on libafsauthent.

This is a 1.6-only change. On master, tbudb no longer uses
libafsauthent.

Change-Id: I0737f455323589c28a78d680c6c09fcbcb99d302
Reviewed-on: http://gerrit.openafs.org/9456
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

11 years agoOnly have one build rule for budb_errs.c
Ben Kaduk [Wed, 6 Mar 2013 18:51:15 +0000]
Only have one build rule for budb_errs.c

This commit squashes two cherry-picks from master together, as the
first one broke the build with pthreaded ubik enabled.

The first commit:
    Author: Simon Wilkinson <sxw@your-file-system.com>
    Date:   Mon Feb 21 00:29:33 2011 +0000
    budb: Only have one build rule for budb_errs.c

    budb had two build rules that could produce budb_errs.c, but only
    one of them also produced budb_client.h. This led to problems with
    parallel makes, as depending on which rule fired first, budb_client.h
    might, or might not, exist.

    Rework all of this so that it's cleaner. Instead of producing two
    copies of the error table, just make budb_client.h a static file,
    and include the dynamically generated budb_errs.h from it. This
    reduces code duplication, and means that we have to run compile_et
    one less time.

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

The second commit:
    Author: Andrew Deason <adeason@sinenomine.net>
    Date:   Mon Feb 21 13:49:59 2011 -0600
    Fix budb build rules for tbudb and WINNT

    Commit 0d0b5048a5b68d4079b13609775f9234183d1947 only fixed the budb
    Makefile.in. Make the analagous changes to tbudb/Makefile.in and
    NTMakefile.

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

Change-Id: I7d35c7557bcd82ba50742f2594bd4bb78cf0e5a5
Reviewed-on: http://gerrit.openafs.org/9405
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-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>

11 years agovlserver: Use correct memsets in vlentry convertor
Simon Wilkinson [Thu, 19 May 2011 17:56:27 +0000]
vlserver: Use correct memsets in vlentry convertor

The various vlentry_to_<blah> conversion functions have obviously
been copy and pasted from each other. However, the size of the
structure which is being zeroed has not been updated when we are
zeroing different structures. Fix this, so that we always clear all
of the structure that we are filling.

Change-Id: Ic822e1d2b17494574074c332c7680e94d4701c66
Reviewed-on: http://gerrit.openafs.org/4773
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 90507fcb104313154679f89ac22c1947c713a65d)
Reviewed-on: http://gerrit.openafs.org/9019
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agomake 1.6.2.1 openafs-stable-1_6_2_1
Stephan Wiesand [Thu, 14 Mar 2013 09:00:14 +0000]
make 1.6.2.1

Update configure version strings for 1.6.2.1. Note that macos kext
can be of form XXXX.YY[.ZZ[(d|a|b|fc)NNN]] where d dev, a alpha,
b beta, f final candidate so we have no way to represent 1.6.2.1.
Switch to 1.6.3 dev 1 for macos.

Change-Id: I98f4371b8c020ba9ba6a98046690968bbae05744
Reviewed-on: http://gerrit.openafs.org/9600
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

11 years agoLINUX: ifconfig's output has changed
Chas Williams (CONTRACTOR) [Wed, 30 Jan 2013 03:54:00 +0000]
LINUX: ifconfig's output has changed

net-tools in Fedora 18 has changed 'inet addr' to just 'inet' (possibly
to more closely match the ip command).

Reviewed-on: http://gerrit.openafs.org/8987
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 7d8b636d9493f3c470c1bbffb4a566060b21d98b)

Change-Id: Iac819b281a26bbd508805541c80e6f1f281a19f9
Reviewed-on: http://gerrit.openafs.org/9363
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>

11 years agoLinux: setpag() may replace credentials
Marc Dionne [Sat, 19 Jan 2013 03:40:03 +0000]
Linux: setpag() may replace credentials

For recent Linux. setpag() may replace the current process' cred
structure with a new one.  This is not a problem for most callers,
but in the case of processing a SetTokens2 pioctl with the setpag
option, the new credentials should be used to determine the target
for the token.

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

Change-Id: I66b5f171318964ff40fe78be24e75519183c3a82
Reviewed-on: http://gerrit.openafs.org/8948
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

11 years agoLinux 3.8: vmtruncate removal
Marc Dionne [Thu, 10 Jan 2013 02:22:27 +0000]
Linux 3.8: vmtruncate removal

vmtruncate had been deprecated for a while and has now been
removed.  Do things the new way based on truncate_setsize.

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

Change-Id: Iafc64e19544dec9fcaefad5ad274eac4133f4083
Reviewed-on: http://gerrit.openafs.org/8942
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Derrick Brashear <shadow@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>

11 years agoLinux 3.8: session_keyring changes
Marc Dionne [Thu, 10 Jan 2013 00:26:54 +0000]
Linux 3.8: session_keyring changes

The session_keyring is now attached directly to the cred structure
and the thread_group_cred structure (cred->tgcred) no longer exists.

Adapt code that makes use of tgcred, and use the standard rcu based
mechanism to update session_keyring.

Reviewed-on: http://gerrit.openafs.org/8905
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit c6d27e322a8d3b352554650473a048235a9c763a)

Change-Id: If0998ee777ab0d196e19162499eb3ee60c5ff85d
Reviewed-on: http://gerrit.openafs.org/8941
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Derrick Brashear <shadow@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>

11 years agoLINUX: Indent osi_machdep.h maze
Andrew Deason [Wed, 29 Aug 2012 16:34:06 +0000]
LINUX: Indent osi_machdep.h maze

This one isn't so bad, actually, but it still benefits from some
indentation.

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

Change-Id: I91bddcafe4141c5e6789b01cc4be1a879b6464d1
Reviewed-on: http://gerrit.openafs.org/9330
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agomake openafs 1.6.2 openafs-stable-1_6_2
Derrick Brashear [Tue, 12 Feb 2013 20:28:24 +0000]
make openafs 1.6.2

update version strings for 1.6.2

Change-Id: I60a765f899f09366b6b380b49dc14c191203af15

11 years agoFix scanf buffer overflows
Nickolai Zeldovich [Tue, 12 Feb 2013 20:08:38 +0000]
Fix scanf buffer overflows

Fix potential buffer overflows caused by misuse of the scanf function
in the fileserver and ptserver.

Also fix similar issues in the client side fs command and libadmin
library.

Change-Id: Ia6a46981c50537da1673507c2bc777f96e43f95a

11 years agoRemove empty Makefile continuation lines
Andrew Deason [Fri, 29 Jun 2012 17:36:36 +0000]
Remove empty Makefile continuation lines

HP-UX make gets confused by constructs like:

   FOO = bar \

   BAZ = quux

Where a line continuation is followed by an empty line. So, get rid of
all of these in the tree. Not all of them matter, but removing all of
them makes it easier to find these, and catch them in the future.

Reviewed-on: http://gerrit.openafs.org/7611
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 79f68de80e56179cfc5158fdcb51c34cfa864802)

Change-Id: Icf379b9d7557746c2c47134b1314a38ec13134cc
Reviewed-on: http://gerrit.openafs.org/8991
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>

11 years agoNEWS updates for 1.6.2
Ken Dreyer [Wed, 12 Dec 2012 17:37:47 +0000]
NEWS updates for 1.6.2

Add an entry for 1.6.2 with "in progress" instead of a date to hold the
release notes for 1.6.2pre4 rather than creating separate entries for
each release candidate. Users who track the release candidates can refer
to the public announcements, and this will be cleaner when reading
history later on.

Reviewed-on: http://gerrit.openafs.org/8750
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: Ken Dreyer <ktdreyer@ktdreyer.com>
(cherry picked from commit 265a4b542b717c14e810202078c3ce83e4d851f5)

Change-Id: I68d4e6983097a97caac660f740ea8a01f1a95caa
Reviewed-on: http://gerrit.openafs.org/8988
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>

11 years agomake openafs 1.6.2pre4
Stephan Wiesand [Wed, 30 Jan 2013 17:46:45 +0000]
make openafs 1.6.2pre4

prerelease for 1.6.2

Change-Id: I012e498c5a2a46c0f712f453de03c98b0a5a5187
Reviewed-on: http://gerrit.openafs.org/8989
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>

11 years agoCellServDB update 28 Jan 2013
Stephan Wiesand [Mon, 28 Jan 2013 14:53:36 +0000]
CellServDB update 28 Jan 2013

Reviewed-on: http://gerrit.openafs.org/8982
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 35ee4abecd2ed77eaa49e9748e4034ad9ad37edc)

Change-Id: Idb8b868ddf927b5daf39f25925fff928e599bd14
Reviewed-on: http://gerrit.openafs.org/8985
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>

11 years agoSOLARIS: Use vn_renamepath as early as possible
Andrew Deason [Fri, 18 Jan 2013 20:27:16 +0000]
SOLARIS: Use vn_renamepath as early as possible

Commit 6c509601 uses the vn_renamepath when we are building on Solaris
11. However, some recent patch level of Solaris 10 (more recent than
stock 10u10) has the same problem fixed by that commit, where
vn_setpath takes an additional argument. So instead, just test for the
existence of vn_renamepath itself, so we also use it on Solaris 10
when we can.

Thanks to Rich Sudlow for reporting this.

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

Change-Id: I035c76dba51571fa82fd8932302e7f26b4954333
Reviewed-on: http://gerrit.openafs.org/8984
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>

11 years agolibafsauthent, tvolser: fix objdir build
Jonathan A. Kollasch [Tue, 7 Feb 2012 21:23:23 +0000]
libafsauthent, tvolser: fix objdir build

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

Change-Id: I30b1e5876e9a91b3caaf9d097fd3a886fabe7e7e
Reviewed-on: http://gerrit.openafs.org/8945
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>

11 years agoaklog: Fix allow_weak_crypto warning
Andrew Deason [Tue, 22 Jan 2013 21:41:38 +0000]
aklog: Fix allow_weak_crypto warning

It's _crypto, not _enctypes. The user will just be more confused than
before if we tell them to do the wrong thing.

Reviewed-on: http://gerrit.openafs.org/8938
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit f6f145c90fbc236c350ddaa4d18b359be581496f)

Change-Id: I17978b15f140729760ce84f1a7af913eac97d836
Reviewed-on: http://gerrit.openafs.org/8940
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>

11 years agodarwin: don't process incoming packets during rx shutdown
Derrick Brashear [Tue, 22 Jan 2013 20:00:29 +0000]
darwin: don't process incoming packets during rx shutdown

we have a chicken and egg problem because the kpi doesn't
let us kill the upcall before we close a socket. a more correct
fix (on master) uses atomics, but for 1.6 this is a minimally-invasive
fix, macos only and strictly better than before.

FIXES 131577

Change-Id: I6003679f709284ae28f51bf5de8deff873346819
Reviewed-on: http://gerrit.openafs.org/8937
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>

11 years agomacos: future-proof MakefileProto.DARWIN.in
Derrick Brashear [Mon, 16 Jul 2012 19:16:53 +0000]
macos: future-proof MakefileProto.DARWIN.in

if new cases show up which match the current ones, they just work.
darwin60 and older were already killed from the tree, kill here also

Reviewed-on: http://gerrit.openafs.org/7782
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit e6aa586a996e32b3def4b8108815730fcfbf1463)

Change-Id: I66bb6eb54856a37d3ff14cf455d90c482443a00e
Reviewed-on: http://gerrit.openafs.org/8912
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>

11 years agomake openafs 1.6.2pre3 openafs-stable-1_6_2pre3
Stephan Wiesand [Thu, 10 Jan 2013 16:10:32 +0000]
make openafs 1.6.2pre3

prerelease for 1.6.2

Change-Id: I1df309f98b003f6ef88289e4219e24ef00dfbf13
Reviewed-on: http://gerrit.openafs.org/8899
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agoSOLARIS: Avoid open count cleanup for Solaris 11
Andrew Deason [Tue, 8 Jan 2013 23:50:57 +0000]
SOLARIS: Avoid open count cleanup for Solaris 11

The comments in here no longer apply to Solaris, as of OpenSolaris
commit 11736:63a134e1f09c by Donghai Qiao (4492533 Filesystems may
need VOP_CLOSE() for executables following a VOP_OPEN()). This means
that this workaround should no longer be necessary for any Solaris 11
release, any illumos release, and anything else based off of
OpenSolaris. So, stop doing it.

Thanks to Frank Batschulat for pointing this out, and providing all of
the details.

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

Change-Id: Ic689ac75fd618945ae7a6e101f29c3610d414603
Reviewed-on: http://gerrit.openafs.org/8897
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

11 years agoSOLARIS: Use vn_renamepath when available
Andrew Deason [Tue, 8 Jan 2013 23:41:21 +0000]
SOLARIS: Use vn_renamepath when available

In Solaris 11.1, the signature of vn_setpath changes; it gains an
extra boolean_t argument called 'force'. Instead of trying to adapt to
it, call vn_renamepath() instead, which will do the correct thing and
call vn_setpath &co for us. vn_renamepath has existed since Solaris 10
Update 8, and is in all releases of Solaris 11. Only call it in
Solaris 11, since it makes the ifdefs easier, and there are no
problems with calling vn_setpath on Solaris 10.

Thanks to Frank Batschulat for all of the relevant information.

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

Change-Id: Ifdc5bb7785b791d36dc1523421badd29d8df2faa
Reviewed-on: http://gerrit.openafs.org/8896
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

11 years agoSOLARIS: Look for ncurses in ncurses/ncurses.h
Andrew Deason [Fri, 4 Jan 2013 19:18:40 +0000]
SOLARIS: Look for ncurses in ncurses/ncurses.h

Solaris 11+ has ncurses.h in ncurses/ncurses.h. Look for it there.

Without this, on Solaris 11.1 we will detect libncurses automatically
(because it lives in /usr/lib), but not ncurses.h (since it is in
ncurses/ncurses.h, not ncurses.h). So, we will fall back to curses.h,
but will try to link to libncurses, which, as you might guess, fails
with various undefined symbols.

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

Change-Id: I139296ae267ec057fc5ee11634d19ba36c8f8d6c
Reviewed-on: http://gerrit.openafs.org/8890
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>

11 years agoSOLARIS: Avoid areq and auid conflict
Andrew Deason [Fri, 4 Jan 2013 18:47:35 +0000]
SOLARIS: Avoid areq and auid conflict

On new Solaris (11.1), nfs/auth.h #defines areq and auid to access
some elements inside the nfsauth_arg structure more easily. We have a
lot of functions that use those names as parameters, so the compiler
throws an error (since we have a decl like "struct vrequest
*areq_u.areq").

We cannot avoid including that header, since we need some NFS-related
headers for the NFS xlator, and they pull in nfs/auth.h
unconditionally. So, work around this by undefining areq and auid
afterwards.

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

Change-Id: I54da96a48d163b6aa57bb8525ff4c80f10d70fa1
Reviewed-on: http://gerrit.openafs.org/8889
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>

11 years agoEnsure MIN/MAX are defined in userspace builds of rx
Russ Allbery [Thu, 3 Jan 2013 21:57:02 +0000]
Ensure MIN/MAX are defined in userspace builds of rx

The include of <sys/param.h> was removed from rx_packet.h on
Linux 2.6 and later to fix kernel builds with 3.7, which doesn't
have that header in kernel space.  However, while kernel space
always provides MIN/MAX defines, userspace relied on the header.
On at least powerpc, no other include chain includes sys/param.h,
so MIN/MAX were left undefined.

Fix this by only skipping the include of <sys/param.h> on Linux
if building in kernel mode.

Reviewed-on: http://gerrit.openafs.org/8870
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
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 fe2bae1c83a6d050e0afb88bad8fe02beae343e7)

Change-Id: I4b2b123c493ab35cbeff309db7ff58354afc170b
Reviewed-on: http://gerrit.openafs.org/8872
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>