9185 Commits

Author SHA1 Message Date
Simon Wilkinson
1e515eb4c5 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>
2013-03-25 06:33:35 -07:00
Simon Wilkinson
e33bdad36b 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>
2013-03-22 16:51:21 -07:00
Simon Wilkinson
86c3a3b7ea 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>
2013-03-22 16:49:58 -07:00
Simon Wilkinson
8bd21b891f 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>
2013-03-22 16:47:56 -07:00
Ben Kaduk
fff7c2fe29 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>
2013-03-22 11:43:12 -07:00
Andrew Deason
977a7b060d 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>
2013-03-22 11:10:09 -07:00
Michael Meffie
3a51648fb5 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>
2013-03-22 11:09:51 -07:00
Michael Meffie
392b1c6b4c 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>
2013-03-22 11:09:34 -07:00
Michael Meffie
73fa4ef44d 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>
2013-03-22 11:09:16 -07:00
Simon Wilkinson
7f58563429 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>
2013-03-22 11:08:24 -07:00
Simon Wilkinson
2b14a3b290 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>
2013-03-22 11:06:52 -07:00
Simon Wilkinson
489bb387a3 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>
2013-03-22 11:06:20 -07:00
Simon Wilkinson
2327f5fd3a 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>
2013-03-22 10:51:08 -07:00
Simon Wilkinson
9b3f4d8be8 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>
2013-03-22 10:50:48 -07:00
Michael Meffie
85fade41f2 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>
2013-03-22 09:03:36 -07:00
Nickolai Zeldovich
6751327f6f 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>
2013-03-22 09:03:12 -07:00
Jeffrey Altman
dc8952ff29 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>
2013-03-22 08:03:22 -07:00
Simon Wilkinson
35108215d9 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>
2013-03-22 07:46:12 -07:00
Andrew Deason
0671633b59 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>
2013-03-22 07:45:30 -07:00
Mark Vitale
c1bc649cef 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>
2013-03-22 07:44:57 -07:00
Thorsten Alteholz
f8d0557912 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>
2013-03-22 07:44:37 -07:00
Chas Williams (CONTRACTOR)
69ef35ac14 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>
2013-03-22 07:44:12 -07:00
Nickolai Zeldovich
d0418efd8e 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>
2013-03-22 07:40:02 -07:00
Nickolai Zeldovich
bfe9b6a8d3 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>
2013-03-22 07:39:40 -07:00
Nickolai Zeldovich
bba18139f2 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>
2013-03-22 07:39:22 -07:00
Nickolai Zeldovich
8a6b943b3f 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>
2013-03-22 07:39:01 -07:00
Nickolai Zeldovich
0e367d2eb7 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>
2013-03-22 07:33:53 -07:00
Simon Wilkinson
ff77c3a190 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>
2013-03-22 07:24:26 -07:00
Michael Meffie
1eb75c9bc7 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>
2013-03-22 07:09:51 -07:00
Marc Dionne
0c6b8c13ce 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>
2013-03-22 07:08:34 -07:00
Andrew Deason
a3f495b664 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>
2013-03-22 07:07:42 -07:00
Andrew Deason
72ce52692f 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>
2013-03-22 07:01:41 -07:00
Marc Dionne
d87fdb50db 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>
2013-03-22 06:44:41 -07:00
Marc Dionne
2fa8aebb40 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>
2013-03-22 06:43:53 -07:00
Simon Wilkinson
ab07b2f8b2 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>
2013-03-22 06:05:01 -07:00
Simon Wilkinson
81aee15405 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>
2013-03-22 06:03:44 -07:00
Simon Wilkinson
d8c76c472a 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>
2013-03-22 06:02:56 -07:00
Simon Wilkinson
0c1815b37a 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>
2013-03-22 06:02:04 -07:00
Simon Wilkinson
393043f6db 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>
2013-03-22 06:01:12 -07:00
Simon Wilkinson
d3dca0b7dd 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>
2013-03-22 06:00:21 -07:00
Simon Wilkinson
9fc38b1bcd 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>
2013-03-22 05:59:23 -07:00
Simon Wilkinson
486ba70844 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>
2013-03-22 05:57:43 -07:00
Simon Wilkinson
c73b6b61f6 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>
2013-03-22 05:56:53 -07:00
Simon Wilkinson
77249c3a54 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>
2013-03-22 05:56:01 -07:00
Simon Wilkinson
4e9e404dea 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>
2013-03-22 05:55:12 -07:00
Simon Wilkinson
3073ca05ec 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>
2013-03-22 05:54:15 -07:00
Simon Wilkinson
19e427070f 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>
2013-03-22 05:53:20 -07:00
Michael Meffie
36e1707ffb 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>
2013-03-22 03:26:15 -07:00
Antoine Verheijen
af1888ff14 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>
2013-03-22 03:06:16 -07:00
Michael Meffie
0ba3e7521c 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>
2013-03-22 02:55:59 -07:00