openafs.git
12 years agoviced: Assert valid statistics indices
Andrew Deason [Thu, 29 Sep 2011 23:36:07 +0000]
viced: Assert valid statistics indices

Make sure we are passed valid statistic index numbers, so passing in a
bad index doesn't result in writing over random memory.

Change-Id: I29ed03b59df937e6f95fba44209a03db23613a8d
Reviewed-on: http://gerrit.openafs.org/5525
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoviced: Use xfer indices for xfer data
Andrew Deason [Thu, 29 Sep 2011 23:31:37 +0000]
viced: Use xfer indices for xfer data

Use the xfer indices for the xfer-related data, not the op indices, so
we don't try to fill in data beyond the actual storage for the stats.

Change-Id: I075d4eb9439d9bd603489f0aa90b3c18c3959de3
Reviewed-on: http://gerrit.openafs.org/5524
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agorx: add post RPC procedure capability
Marc Dionne [Thu, 29 Sep 2011 01:15:32 +0000]
rx: add post RPC procedure capability

Add the ability to specify a procedure that will be called after
the end of each RPC for a service.  This is similar to the
existing afterProc, except that it gets called after the RPC
has ended (after EndCall).

rx_SetPostProc and rx_GetPostProc are provided to set and retrieve
a postProc for a specified service.

Change-Id: I52e70323c5d35c9c0d70d9b9bbb05ff56a6edcad
Reviewed-on: http://gerrit.openafs.org/5529
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoFix typo in windows release notes
Jeffrey Altman [Thu, 29 Sep 2011 13:35:51 +0000]
Fix typo in windows release notes

Reported by Jeff Blaine.

FIXES 132233

Change-Id: I0a311e75d1da4c753cd902fd964587a62ef7abf1
Reviewed-on: http://gerrit.openafs.org/5519
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: Fixup errors in AFS ACL Property Sheet
Jeffrey Altman [Thu, 29 Sep 2011 01:46:48 +0000]
Windows: Fixup errors in AFS ACL Property Sheet

Unlike the afs_set_acl_dlg the PropACL sheet only uses a single
ComboList to maintain both the positive and negative ACEs but
uses two CStringArrays to separately store the positive and
negative ACEs.  Two entries in each array are used to store
an ACE.  The %2==0 entry is the pts name and the %2==1 entry is
the permission list.  This needs to be taken into account when
manipulating the negative entries since the array count for the
normal entries is twice the number of ACEs.

Negative entries were prefixed with '=' instead of '-'.

The Remove button was not hooked up and was not enabled or disabled
under all appropriate conditions.

Change-Id: I3bbfd9e82c8796554482b876d31ec53d8f9ac91f
Reviewed-on: http://gerrit.openafs.org/5518
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: add resource info to afshcrypto.dll
Jeffrey Altman [Wed, 28 Sep 2011 23:59:03 +0000]
Windows: add resource info to afshcrypto.dll

The afshcrypto.rc file was provided but it was never compiled
nor linked to the dll.

Change-Id: I41138c53a5b53417d880ae748c7f8e8248daedce
Reviewed-on: http://gerrit.openafs.org/5517
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: Add resource info to afsroken.dll
Jeffrey Altman [Wed, 28 Sep 2011 23:58:07 +0000]
Windows: Add resource info to afsroken.dll

The afsroken.rc file was provided but it was never compiled
or linked to the dll.

Change-Id: Id64ccd06b85c444f2009ef21f1fc65fb14f1bf01
Reviewed-on: http://gerrit.openafs.org/5516
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoviced: remove duplicate declaration
Marc Dionne [Wed, 28 Sep 2011 22:39:55 +0000]
viced: remove duplicate declaration

viced_uclient_key is declared twice, remove one of the
declarations.

Change-Id: I6f5cfef56512c660be75958e99d35ee86e6718ef
Reviewed-on: http://gerrit.openafs.org/5515
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: Remove spurious use of CRTL
Rod Widdowson [Wed, 28 Sep 2011 15:46:00 +0000]
Windows: Remove spurious use of CRTL

Checkins b71a2daa and 5247fa38a moved us from using a FILE*
to using an FDi_t.  However, lurking inside the dump code we
see a use of _filelength() which is a MS-Crtl API.

This checkin replaces this call with one to the WIN32 API
GetFileSizeEx.

Change-Id: I6ecc25a52d083f918bd8d92670b05f12e58e4015
Reviewed-on: http://gerrit.openafs.org/5511
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoRemove references to afs_assert.h
Andrew Deason [Wed, 28 Sep 2011 20:41:38 +0000]
Remove references to afs_assert.h

The header afs_assert.h no longer exists after commit
cac74242728ad97e3ce9cef0a949d58c237250f6. Remove all remaining
references to afs_assert.h in the tree.

Change-Id: I708a399d4389d2f96d93ce3caf9c8b96e38bdf64
Reviewed-on: http://gerrit.openafs.org/5513
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoukernel: output dataversion in stat struct if possible
Derrick Brashear [Wed, 28 Sep 2011 14:23:19 +0000]
ukernel: output dataversion in stat struct if possible

we already have this data; if we can output it, do so.

Change-Id: Ibc445a152e4e1e61be50003dd8683d2a4b32d190
Reviewed-on: http://gerrit.openafs.org/5510
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoukernel: make web enhancements the default
Derrick Brashear [Wed, 28 Sep 2011 14:11:16 +0000]
ukernel: make web enhancements the default

none of the web enhancements break base functionality,
and they are strictly more functionality; just turn them on everywhere

Change-Id: I462d3571d055f1d8ec19bdd0132b935bacd435c0
Reviewed-on: http://gerrit.openafs.org/5509
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoWindows: Fix comment about DiskPartition64
Rod Widdowson [Wed, 28 Sep 2011 16:34:54 +0000]
Windows: Fix comment about DiskPartition64

There is significant confusion between the partition name (/vicepX)
and the containing volume (C:) in the windows code.  A review of
the uses in FSYNCH found a downright wrong comment (as checked in
the debugger).

Change-Id: I9cf6e965c9efee18b608a622b83639f25e410ce5
Reviewed-on: http://gerrit.openafs.org/5512
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoFBSD: allow exclusion of kernel symbols
Ben Kaduk [Tue, 27 Sep 2011 00:21:49 +0000]
FBSD: allow exclusion of kernel symbols

Gerrit/5503 added support for kernel module symbols in the
bsd.kmod.mk world; however, the inclusion of symbols is conditoinal
on the DEBUG_FLAGS make variable being *set*, as opposed to nonempty.
So we must use an intermediate variable to store the AC_SUBST
result and conditionalize assignment to DEBUG_FLAGS on whether
or not it is empty.

Change-Id: I7f86fd08d6dcf1ac7116680db98db13f5f31be7b
Reviewed-on: http://gerrit.openafs.org/5507
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agobozo: report bosserver -rxbind address
Michael Meffie [Thu, 22 Sep 2011 13:13:18 +0000]
bozo: report bosserver -rxbind address

Create a file on bosserver startup called bosserver.rxbind in the
server local directory which contains an address local scripts may
use to contact the bosserver.

When bosserver is started with the -rxbind option, write the address
selected from the intersection of the interfaces, NetInfo, and
NetRestrict configuration to the bosserver.rxbind file, otherwise
write the loopback address 127.0.0.1.

Update the RedHat init script to use the new bosserver.rxbind file.

Change-Id: I00a4249ae7445f872625ec46f960e778483d1f9f
Reviewed-on: http://gerrit.openafs.org/5488
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoWindows: do not install afs_assert.h
Jeffrey Altman [Mon, 26 Sep 2011 16:28:49 +0000]
Windows: do not install afs_assert.h

commit cac74242728ad97e3ce9cef0a949d58c237250f6 removed afs_assert.h
from the build tree.  It can no longer be installed.

Change-Id: I9a5c9f679a3cd8755b0a290ac91be6c651242e22
Reviewed-on: http://gerrit.openafs.org/5505
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agobozo: fix overrun from -rxbind on restart
Michael Meffie [Mon, 26 Sep 2011 15:59:55 +0000]
bozo: fix overrun from -rxbind on restart

Fix buffer overrun in bosctlsrv introduced
by commit 544ff1b295a57b50afefa6146094434db7608355

Change-Id: Icb39b5107113e2819a643537b042b20504c783f3
Reviewed-on: http://gerrit.openafs.org/5504
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agovolinfo: refactor vnode handling
Michael Meffie [Mon, 25 Jul 2011 13:21:34 +0000]
volinfo: refactor vnode handling

At program startup, register procedures to be called
when scanning vnodes.

Change-Id: I8dda202f1ea61b538278eacc8f86c323728cf191
Reviewed-on: http://gerrit.openafs.org/5100
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agovolinfo: release volume header ihandles when done
Michael Meffie [Sat, 23 Jul 2011 18:55:57 +0000]
volinfo: release volume header ihandles when done

After scanning the volume, release the header ihandles
for the volume.

Change-Id: I689a33b321fc68d0dc480369e6cbdfd41c1dbfc9
Reviewed-on: http://gerrit.openafs.org/5099
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agocorrect omission of AFS_NBSD60_ENV from nbsd60 param file
Jonathan A. Kollasch [Fri, 23 Sep 2011 19:14:47 +0000]
correct omission of AFS_NBSD60_ENV from nbsd60 param file

Change-Id: I6b72ab5d9e3e5000c9138e6470e80491d85328b1
Reviewed-on: http://gerrit.openafs.org/5499
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoClean up assertion
Simon Wilkinson [Sun, 10 Jul 2011 12:46:11 +0000]
Clean up assertion

The AFS code has multiple different assertion implementations in
userspace. This patchset is the start of bringing some sanity to them.

In rx, we have osi_Assert, a user/kernel assertion macro. This is only
available to libraries which have RX dependencies

In util, we redefine the standard 'assert()' macro to provide a
cross-platform assertion solution.

Because util has an RX dependency, neither of these provide an
assertion solution for libraries which should be independent of rx.
So, pull the assertion code out of util, and put it into opr, as a new
opr_Assert() macro. Implement the userspace osi_Assert in terms of this
macro, leaving the kernel variant untouched.

Update callers to the new macro and header file names.

Change-Id: I780b30ec1ea1207daa17127df4d5fbf9a94481b6
Reviewed-on: http://gerrit.openafs.org/5394
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agoMove abort() into opr
Simon Wilkinson [Sun, 11 Sep 2011 20:44:23 +0000]
Move abort() into opr

We need our own abort function, because the behaviour of the Windows
abort() implementation isn't sufficiently flexible for us.
Because we're replacing an operating system function, reather than
implementing a missing function, this doesn't belong in roken.

So, provide an alternative opr_abort() implementation in our portable
runtime layer, which is a synonym for abort() on Unix, and implements
the required DebugBreak() functionality on Windows.

Remove lwp_abort() which was just creating another, unnecessary, layer
of abstraction.

Change-Id: Ice226d70d2791beaba011f42e39fde60242f6cc3
Reviewed-on: http://gerrit.openafs.org/4428
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agobozo: bosserver -pidfiles option
Michael Meffie [Wed, 24 Nov 2010 01:21:50 +0000]
bozo: bosserver -pidfiles option

Add an option to bosserver to create pidfiles for long running
processes for simple, fs, and dafs bnode types, as well as the
bosserver process. The pidfiles are located in the server local
directory by default, or in the path specifed by the -pidfiles
command-line option.

Change-Id: I3e85b027dc6f630965f84b18b7f849ac481dabe2
Reviewed-on: http://gerrit.openafs.org/5497
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoFBSD: bsd.kmod.mk fallout for debug symbols
Ben Kaduk [Sat, 24 Sep 2011 22:05:09 +0000]
FBSD: bsd.kmod.mk fallout for debug symbols

Now that we no longer control the installation of libafs.ko,
debug symbols are always getting stripped.
If the user requested kernel debug symbols, define DEBUG_FLAGS
for the libafs build and install, so that bsd.kmod.mk will
install the .symbols file alongside the kernel module.

Change-Id: I0e7f3736666c96c6aaed18c0add98dea37349b83
Reviewed-on: http://gerrit.openafs.org/5503
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoWindows: update ntbuild.bat
Jeffrey Altman [Sat, 24 Sep 2011 15:42:50 +0000]
Windows: update ntbuild.bat

Add references to:

 . new APPVER and _WIN32_IE values

 . new AFSVER_CL values

 . additional code signing variables

 . variables for symbol store support

 . WiX Installer Toolkit location

 . Cygwin Install Directory

 . ActivePerl Install Directory

 . SignTool path

Change-Id: Ie9465102977aee628d8f129de9c5c9c14fa5d97c
Reviewed-on: http://gerrit.openafs.org/5500
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agobozo: remove duplicate prototype
Michael Meffie [Fri, 23 Sep 2011 15:28:05 +0000]
bozo: remove duplicate prototype

Remove duplicate function prototype.

Change-Id: I84a30c27edabd82272f99711285eb043122f66a0
Reviewed-on: http://gerrit.openafs.org/5496
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoFix buffer leak in dir/buffers.c
Rod Widdowson [Fri, 23 Sep 2011 15:37:43 +0000]
Fix buffer leak in dir/buffers.c

Checkin 0284e65f97861e888d95576f22a93cd681813c39 accidently
threw in a trailing semicolon after an if statement.
Since the next line was a break this had several unfortunate
side effects, the most obvious being that we leaked a buffer
in certain cases.

Change-Id: I4f1043426cac22c70b64731c98ac858d82e2f11e
Reviewed-on: http://gerrit.openafs.org/5498
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 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.

Change-Id: I4fc65fd82b92df3298227abf3f6bcc24184ebfe8
Reviewed-on: http://gerrit.openafs.org/5490
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agobozo: pass -rxbind on restart
Michael Meffie [Thu, 22 Sep 2011 15:28:17 +0000]
bozo: pass -rxbind on restart

Pass the -rxbind on restarts when bosserver is initially started
with the -rxbind option.

Change-Id: Ic6e884c87fcd0e8b3808a2f362d8c32177e9e2a0
Reviewed-on: http://gerrit.openafs.org/5487
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agodarwin: ukernel is 64-bit able
Derrick Brashear [Thu, 22 Sep 2011 17:00:08 +0000]
darwin: ukernel is 64-bit able

update ukernel settings for darwin

Change-Id: Ifd72d0d5affa1bfbea04da2c95e8011fb055e59f
Reviewed-on: http://gerrit.openafs.org/5489
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

12 years agofs: fix setserverprefs where long is larger than afs_int32
Marc Dionne [Thu, 22 Sep 2011 00:31:33 +0000]
fs: fix setserverprefs where long is larger than afs_int32

Make the fscanf and scanf format specifiers match the type of the
target variable.  This prevents trying to store a long int into an
afs_int32 variable which may be smaller, and overwriting neighbouring
data on the stack.

The effect on a 64-bit Linux system was that the high bits of "rank"
would overwrite the first 4 bytes of the scanned host name, causing
setserverprefs to fail with:
: couldn't resolve name.

Change-Id: I2100e7fe77a137257eb308ad127c151de84756bc
Reviewed-on: http://gerrit.openafs.org/5486
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

12 years agoWindows: Disable OACR by default for AFSRDR build
Jeffrey Altman [Wed, 21 Sep 2011 05:46:52 +0000]
Windows: Disable OACR by default for AFSRDR build

When building the AFS redirector with WDK7600 the Microsoft Auto
Code Review process is started by default.  This is a problem for
buildbot.  Disable OACR by default if the _RunOacr environment
variable is not set to TRUE.

Change-Id: I7e8f9f978e5f6b8a33fe0ff6174b9ddbe2a86ec7
Reviewed-on: http://gerrit.openafs.org/5479
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoafscp: enable debugging support in the volume portion
Derrick Brashear [Wed, 21 Sep 2011 16:55:39 +0000]
afscp: enable debugging support in the volume portion

readd the missing code when we are compiled for debug

Change-Id: Ia4f0bcf2868e2f87bf8f7b6c01f3842e1a2eed50
Reviewed-on: http://gerrit.openafs.org/5483
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoafscp: allow listing of bare root.cell dirs in dynroot mode
Derrick Brashear [Wed, 21 Sep 2011 06:03:30 +0000]
afscp: allow listing of bare root.cell dirs in dynroot mode

don't assume that /afs/cell.name (as opposed to /afs/cell.name/)
is bogus. if there's text, at least try

Change-Id: I9566efe60c942533cd0415a03528953cb90310c9
Reviewed-on: http://gerrit.openafs.org/5480
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoafscp: add confdir override
Derrick Brashear [Wed, 21 Sep 2011 03:26:25 +0000]
afscp: add confdir override

allow an alternate config dir

Change-Id: I454d63199dcfadc46ba957ddae0685efee6acf26
Reviewed-on: http://gerrit.openafs.org/5476
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agoFix AFSPreference compile error on Mac OS 10.7
Terry Long [Wed, 21 Sep 2011 01:21:12 +0000]
Fix AFSPreference compile error on Mac OS 10.7

Lion llvm/clang complains about main returning void instead of int.
Fixed main to return int in DARWIN/AFSPreference/afshlp.m.
Resubmitted patch to origin/master.

Change-Id: I2f4e88ded2d98688901cc18d60abac8172942bbd
Reviewed-on: http://gerrit.openafs.org/5475
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoWindows: install control panel only if afs_config
Jeffrey Altman [Sun, 18 Sep 2011 17:13:18 +0000]
Windows: install control panel only if afs_config

Add the AFS control panel to the AFS Configuration Tool
component so that it is installed only if afs_config.exe
is going to be installed.

Change-Id: I9016ad70f3b201bbe440ec39e9987c6209cae0cc
Reviewed-on: http://gerrit.openafs.org/5462
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: Disable Control Panel button in NIM
Jeffrey Altman [Sun, 18 Sep 2011 17:14:39 +0000]
Windows: Disable Control Panel button in NIM

Since afs_config.exe is no longer installed, remove the
OpenAFS control panel button from the Network Identity Manager
provider.

Change-Id: I4b3d7a091a6c833d8bf4a24110ee6deb00c6baa0
Reviewed-on: http://gerrit.openafs.org/5463
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agosalvager: fix filesystem path truncation
Michael Meffie [Tue, 20 Sep 2011 20:21:50 +0000]
salvager: fix filesystem path truncation

Fix filesystem path truncation for vice partitions beyond /vicepz.

Commit 3d7388b7 moved the filesystem path to a fixed size buffer,
however the path of the filesystem to be salvaged is truncated for
partitions with two character ids (e.g. /vicepaa), in which case
the salvager will salvager the wrong partition, or abort if the
truncated path is not present.

Change-Id: Iadf45268514ef5045a4481950f213abecbb20b33
Reviewed-on: http://gerrit.openafs.org/5469
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agosolaris: libafs depends on fs/ufs
Michael Meffie [Fri, 16 Sep 2011 15:23:18 +0000]
solaris: libafs depends on fs/ufs

The solaris afs module depends on symbols exported by fs/ufs.
Set this dependency in the afs module so the kernel loader
will automatically load the fs/ufs driver if is not already
loaded, such on zfs only systems.

Change-Id: I87ae2c326ac0c895cca37cf30e4c11d0decbe6d1
Reviewed-on: http://gerrit.openafs.org/5456
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agosolaris: build 64-bit binaries for sunx86_51x by default
Michael Meffie [Wed, 14 Sep 2011 21:22:25 +0000]
solaris: build 64-bit binaries for sunx86_51x by default

Build 64-bit binaries on solaris x86 version 10 or better
build systems running in 64-bit mode.

Builders may set the the ARCHFLAGS environment variable
to "-m32" before running configure to build 32-bit binaries
on a 64-bit build host.

Change-Id: I27558a2c7fe9872cf30889ca57e778985a3ff461
Reviewed-on: http://gerrit.openafs.org/5450
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agontohs ubik header size
Andrew Deason [Mon, 19 Sep 2011 15:05:59 +0000]
ntohs ubik header size

The 'size' field in the ubik header is only 16-bits wide, so we should
be using ntohs to read it, not ntohl. The database checking utilities
for the prdb and kadb were still using ntohl (vldb was fixed by
591f9b6de9ab3dc5c17ad41af0241527f7f04b31).

Change-Id: Ic3894f5ae78ff05279e87b364841c5f6dfdf803c
Reviewed-on: http://gerrit.openafs.org/5466
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agodir: remove unnecessary cast from malloc
Jeffrey Altman [Sun, 18 Sep 2011 18:18:24 +0000]
dir: remove unnecessary cast from malloc

Change-Id: I2b91c9ad2983ba08e5e1bc49c3790e018951be31
Reviewed-on: http://gerrit.openafs.org/5464
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoFix input size computation in SetSPrefs pioctl
Jeffrey Altman [Mon, 19 Sep 2011 14:35:11 +0000]
Fix input size computation in SetSPrefs pioctl

Patchset 718f85a8b69a78ac77beb5c8471af20657be2a53 contained
a small typo that prevents the SetSPrefs pioctl processing from
functioning in all cases.  fs setserverprefs continues to work
for non-DB preference lists because fs.c pokeServers() attempts
to try the old SetSPrefs33 pioctl in the non-DB server case.

Change-Id: I2e06dccb51c53ba312418fb5f51be3d621a2004c
Reviewed-on: http://gerrit.openafs.org/5465
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agosolaris: fix afs_event build error
Michael Meffie [Wed, 14 Sep 2011 14:48:08 +0000]
solaris: fix afs_event build error

Fix build error on solaris introduced with commit
dc077b83c9b1f107efbc3483743f44117748f23c.

Change-Id: Id41a0d7cf6400769dde5d2626854e2190cd6bd2e
Reviewed-on: http://gerrit.openafs.org/5419
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agorx: arrange for Finalize to really stop running calls
Derrick Brashear [Thu, 15 Sep 2011 17:48:31 +0000]
rx: arrange for Finalize to really stop running calls

previously rxi_ServerProc would happily error a call once
rx_tranquil was set, but keep calling ExecuteRequest.
Reorder code so kernel shutdown attempts are processed first;
then arrange if we are tranquil to not process the call further.

Issue discovered by Chaskiel Grundman.

Change-Id: I545960fb0eb0d5151baa7e06e2758cdeaf0885da
Reviewed-on: http://gerrit.openafs.org/5447
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoWindows: changelog prior to branching openafs-devel-1_7_x
Jeffrey Altman [Thu, 15 Sep 2011 19:16:55 +0000]
Windows: changelog prior to branching openafs-devel-1_7_x

Change-Id: I27ece967a136a44513fade8e9b8cc1c8d57951b4
Reviewed-on: http://gerrit.openafs.org/5449
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agowindows: Set ReparsePoint Attribute in FileAttributes
Jeffrey Altman [Thu, 15 Sep 2011 18:00:39 +0000]
windows: Set ReparsePoint Attribute in FileAttributes

The ReparsePoint Attribute is a primary attribute that is used
internally within the redirector to determine when the object
is a reparse point.  It must be set in all code paths that
obtain the FileAttributes from the service.  Do not fold it in
during the QueryBasicInformation response processing.

Change-Id: Iba819dd94ec03133f78a4d18559dbd1b5352788e
Reviewed-on: http://gerrit.openafs.org/5448
Reviewed-by: Peter Scott <pscott.kd@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: README-WINDOWS updates for build environment
Jeffrey Altman [Thu, 15 Sep 2011 14:32:19 +0000]
Windows: README-WINDOWS updates for build environment

Not complete but closer than it was.

Change-Id: I5945101206535753ace6d3a53a4d91ee4290351c
Reviewed-on: http://gerrit.openafs.org/5446
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: NetWksta RPC test application
Jeffrey Altman [Thu, 15 Sep 2011 06:07:53 +0000]
Windows: NetWksta RPC test application

A simple application to query the NetWksta RPC interface.

Change-Id: I9d53dd956ace89ce01e3cf48583e160176fa05ce
Reviewed-on: http://gerrit.openafs.org/5445
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: Build the AFS Redirector world
Jeffrey Altman [Thu, 15 Sep 2011 06:06:14 +0000]
Windows: Build the AFS Redirector world

All of the new build rules necessary to build the
new AFS Redirector world.

Change-Id: Ic5b8839eb6f10e44c3b6e185c85c3948f77b4d60
Reviewed-on: http://gerrit.openafs.org/5444
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: Release Notes updates for AFS Redirector
Jeffrey Altman [Thu, 15 Sep 2011 06:04:45 +0000]
Windows: Release Notes updates for AFS Redirector

No more support for Windows 2000.

A first pass at indication which features that are SMB only
are no longer applicable.

much more.

Change-Id: I6e6337804d75c8dccdbc66307215e18238f33dac
Reviewed-on: http://gerrit.openafs.org/5443
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: WiX Installers for AFS Redirector
Jeffrey Altman [Thu, 15 Sep 2011 06:02:36 +0000]
Windows: WiX Installers for AFS Redirector

Add the AFS Redirector and AFSRDFSProvider and new
Shell Extensions to the MSI installer package.

Change-Id: I82d8256d016a19865bc8a681331f650d52e3b261
Reviewed-on: http://gerrit.openafs.org/5442
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: NSIS installers for AFS Redirector
Jeffrey Altman [Thu, 15 Sep 2011 06:00:00 +0000]
Windows: NSIS installers for AFS Redirector

These changes provide basic support for installing
the AFS Redirector and the AFSRDFSProvider.dll.
However, since NSIS is not useful for 64-bit installations
the NSIS installers will be removed from the source tree
in the near future.

1.7.x series will not be distributed with NSIS installers.

Change-Id: Ifd9d06af4f047e27c23c87af79ba84085bc3614a
Reviewed-on: http://gerrit.openafs.org/5441
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: AFS Redirector Support Tools
Peter Scott [Thu, 15 Sep 2011 05:58:48 +0000]
Windows: AFS Redirector Support Tools

settrace, gettrace, objstatus, authgroup, and crash.

These tools are useful for debugging the system.

Change-Id: I2d62186a98f5561d579f7934ef568a54a3b099f1
Reviewed-on: http://gerrit.openafs.org/5440
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: AFS Redirector Network Provider
Peter Scott [Thu, 15 Sep 2011 05:52:08 +0000]
Windows: AFS Redirector Network Provider

In Windows a network file system must have a matching network
provider dll that interfaces with the Multiple Provider Router
(MPR) to support the WNet APIs called by the Windows Explorer
Shell and other applications.  The WNet APIs are primarily
used to support driver letter mapping but they also have a
number of other functions including universal name mapping,
path formatting, and path parsing.

Jeffrey Altman <jaltman@your-file-system.com> contributed to
the development of the AFSRDFSProvider.dll interface.

Change-Id: I9476003e05f12684676e8c7331a0a8dd13d98686
Reviewed-on: http://gerrit.openafs.org/5439
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: AFSRedirLib.sys file system library driver
Peter Scott [Thu, 15 Sep 2011 05:48:59 +0000]
Windows: AFSRedirLib.sys file system library driver

This patchset implements the AFS Redirector Library driver.
This driver contains all of the AFS specific implementation
details for service communication, network provider support,
directory management, extent management, metadata management,
callback invaldation, volume management, file locking, etc.

Rod Widdowson <rdw@steadingsoftware.com> and Jeffrey Altman
<jaltman@your-file-system.com> contributed to the development
of this driver.

Change-Id: Icc18c26b81b96a92096c20e01360007815ca1acb
Reviewed-on: http://gerrit.openafs.org/5438
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: RDR File System Framework driver
Peter Scott [Thu, 15 Sep 2011 05:33:20 +0000]
Windows: RDR File System Framework driver

This is the first of two kernel drivers used to implement
the AFS Redirector: AFSRedir.sys.

This driver is registered at boot time and provides the binding
to the Windows kernel infrastructure.  However, it only provides
a framework of a file system driver.  All of the AFS specific
interfaces are actually implemented in a secondary library
driver, AFSRedirLib.sys.  The rationale for this model is that
file system drivers cannot be unloaded on a running system.
By using this approach the library driver can be unloaded which
permits systems to be live updated.

To permit this model to work, all memory allocation is performed
by AFSRedir.sys.  This confuses the driver verifier tool.  When
the library is unloaded all objects are still valid.  Operation
is simply paused until a new library is brought up.  Under the
current configuration the library is loaded as part of afsd_service
initialization of AFSRedir.sys and is automatically unloaded when
afsd_service.exe shuts down.

The framework driver also implements all of the process and
thread tracking logic necessary to support Authentication Groups.

Communication between AFSRedir.sys and afsd_service.exe is
performed via a reverse ioctl model whereby the service contributes
threads to the driver to convey requests for processing.

The original file system was derived from the Kernel Drivers
File System under license from Kernel Drivers, LLC.

Rod Widdowson <rdw@steadingsoftware.com> and Jeffrey Altman
<jaltman@your-file-system.com> contributed to the development
of this driver.

Change-Id: Ic123cacd868ddde31d66bf17d3ad2a13c22cd1f4
Reviewed-on: http://gerrit.openafs.org/5437
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: Make pioctl interface RDR aware
Jeffrey Altman [Thu, 15 Sep 2011 05:31:08 +0000]
Windows: Make pioctl interface RDR aware

Permit the pioctl interface to recognize how to interact with
the RDR for processing pioctl operations.

Change-Id: I7ddf15f29661e61fab6439d2a3c1aa2935011559
Reviewed-on: http://gerrit.openafs.org/5436
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: build loopback installer for current DDKs
Jeffrey Altman [Thu, 15 Sep 2011 05:29:57 +0000]
Windows: build loopback installer for current DDKs

Modify the build rule for the loopback installer to permit
it to build with the latest DDKs.

Change-Id: I94c09e4f8e459ffebdcb2a63dbbe2197d7fbf070
Reviewed-on: http://gerrit.openafs.org/5435
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: "AFS_SMBNAME" envvar for aklog
Jeffrey Altman [Thu, 15 Sep 2011 05:27:58 +0000]
Windows: "AFS_SMBNAME" envvar for aklog

Permit the Windows smb user parameter used when setting
tokens as the LOCAL_SYSTEM account to be set via an environment
variable.  This is useful for debugging.

Change-Id: Id4521c863df1288a7a0937b83bf85cff1af3696f
Reviewed-on: http://gerrit.openafs.org/5434
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: no SOCKLEN_T before WDK 6.0
Jeffrey Altman [Thu, 15 Sep 2011 05:26:00 +0000]
Windows: no SOCKLEN_T before WDK 6.0

Change-Id: Idc63e28385b85e808b4391bc897863c792584c70
Reviewed-on: http://gerrit.openafs.org/5433
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: Redirector interface for afsd_service.exe
Jeffrey Altman [Thu, 15 Sep 2011 05:11:15 +0000]
Windows: Redirector interface for afsd_service.exe

Over the last three years the afsd_service sources have been
gradually separated into distinct layers for the SMB server
and the AFS cache.  The eventual goal of this work was to
permit the addition of alternative interfaces to the cache
manager in parallel.

This patchset implements the first alternative interface,
a reverse ioctl model that communicates with a native IFS
redirector driver.  The driver will be submitted in a
subsequent patchset.

Although it is possible to run afsd_service with both the
SMB and RDR interfaces active at the same time.  In practice
it is somewhat impractical because it destroys the uniformity
of the \\AFS name space.  The RDR loads at boot time and claims
all of \\AFS.  The SMB interface if active at the same time
must use the old \\%HOSTNAME%-AFS.  As implemented, if the RDR
interface is functional the SMB interface is not started.  Only
if the RDR interface fails will the SMB interface be activated.

The afsd_service.exe maintains all of its primary responsibilities
for communicating with the AFS servers, processing callbacks,
enforcing permissions, handling afs path ioctls, Windows RPC
service simulation, and object management.  The biggest change
is in the cm_buf_t management.  Data is exchanged with the
RDR by passing control over cm_buf_t->data buffers in the form
of Windows File Extents.  This avoids data copies across a
communication channel which significantly improves performance
at a substantial complexity cost.

Credential management is switched from a Windows username binding
to a GUID binding where the GUIDs represent authentication groups
that are managed by the RDR.

This patchset includes additional changes to support integrated
logon in conjunction with the RDR.  In particular, adding support
for authentication groups.

Change-Id: I7135489421c67a429ec3b2acd4c8ae08b8329f6d
Reviewed-on: http://gerrit.openafs.org/5432
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: AFS Redirector Support Headers
Peter Scott [Thu, 15 Sep 2011 05:07:03 +0000]
Windows: AFS Redirector Support Headers

This patchset includes all of the common headers upon which
all of the subsequent submissions depend.

Co-authored by Jeffrey Altman <jaltman@your-file-system.com>

Change-Id: I3b2ba6fe0a9a5231801db2cd1a340b9c518b9be4
Reviewed-on: http://gerrit.openafs.org/5431
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: Explorer Shell extensions
Stefan Kueng [Thu, 15 Sep 2011 04:57:23 +0000]
Windows: Explorer Shell extensions

This patchset implements a broad range of improvements to
the explorer shell.  There is still a significant amount of
work to be done.

 * Remove the 'cut' and 'delete' options from the
   context menu if the selected object is a symlink
   or mount point.  This is performed in a language
   neutral manner.

 * Add AFS Property page to the property sheet

 * Add AFS Volume Property page

 * Add AFS ACL Property page

 * force the linker to add the common-controls V6 manifest and
   define ISOLATION_AWARE_ENABLED to make property sheets
   work for the shell extension dll

 * Fix the InfoTip handler.  Display symlink and mount point
   target strings

Stefan Kueng was assisted by Jeffrey Altman.

Change-Id: I6b7c4506026270a5408d90cdc5358864e3fb44c3
Reviewed-on: http://gerrit.openafs.org/5430
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoLinux: Remove use of undefined AFS_LINUX_ENV
Marc Dionne [Wed, 14 Sep 2011 21:16:52 +0000]
Linux: Remove use of undefined AFS_LINUX_ENV

AFS_LINUX_ENV is used in a few places, mostly from commit dc077b83,
but it is not defined anywhere.  As a result the logic was not as
intended.

In the definition of osi_ThreadUnique, this means that on all
Linux we use getpid(), which is OK as it gets defined appropriately
under LINUX and LINUX24 as current->pid or current->tgid.

Change-Id: Ic8daf10480a91ff8406cd6ca3929a2ecfafa78ad
Reviewed-on: http://gerrit.openafs.org/5424
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoWindows: mountpoints always have a trailing dot
Jeffrey Altman [Thu, 15 Sep 2011 02:41:20 +0000]
Windows: mountpoints always have a trailing dot

when expanding a cell alias to a full cell name the trailing
dot was forgotten when putting the mountpoint string back
together.

Change-Id: I82a84380175d9ef5c41ef29d9043671d264df589
Reviewed-on: http://gerrit.openafs.org/5427
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: minor cm_ioctl corrections
Jeffrey Altman [Thu, 15 Sep 2011 02:39:52 +0000]
Windows: minor cm_ioctl corrections

remove unused variable

fix a comment to reference correct function name

remove debugging windows event log entry that doesn't
belong in production code

Change-Id: Id81cfccd2c2c15d7fcbdbb5edc7dcb095abbd665
Reviewed-on: http://gerrit.openafs.org/5426
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: validate buffer hash tables in cm_MergeStatus
Jeffrey Altman [Wed, 14 Sep 2011 21:46:32 +0000]
Windows: validate buffer hash tables in cm_MergeStatus

Change-Id: I1ff76513e9f2ba08bdeb988a19fec992b08310db
Reviewed-on: http://gerrit.openafs.org/5425
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoTidy up event hash table definitions a bit more
Ben Kaduk [Tue, 13 Sep 2011 01:54:09 +0000]
Tidy up event hash table definitions a bit more

The change in http://gerrit.openafs.org/5314 consolidated the
definitions of struct afs_event and some related objects, but
the definitions were not quite in the right place.  In
http://gerrit.openafs.org/5392 this content was moved to more
standard headers, but a comment and #define were missed.
This change moves the comment to be in the same place as the content.

Change-Id: I86831879e9a2afd9e653182dcba4621624c55471
Reviewed-on: http://gerrit.openafs.org/5403
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoUse rra-c-util m4 from src/external
Simon Wilkinson [Tue, 13 Sep 2011 08:54:12 +0000]
Use rra-c-util m4 from src/external

This commit switches us over from using manually maintained copies
of Russ's rra-c-util m4 macros, to using ones that are automatically
imported from his upstream git tree.

The macro versioning in the OpenAFS tree was slightly confused. This
(approximately) updates us from using version 3.3 of the macros to
version 3.8. The signifcant changes are:

  *) Use PATH_KRB5_CONFIG rather than KRB5_CONFIG to set the location
     of the krb5-config file
  *) Use --with-gssapi-{include, lib} if given, rather than krb5-config
  *) Use --with-krb5-{include, lib} if given, rather than krb5-config
  *) Define HAVE_KERBEROS if we find a Kerberos library

The first, in particular, is likely to cause some confusion.

Change-Id: Ie7a1c0db31b32fc7ac9ad7bded2c4ffce3ac013f
Reviewed-on: http://gerrit.openafs.org/5418
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agoImport of code from rra-c-util
Russ Allbery [Tue, 13 Sep 2011 08:40:59 +0000]
Import of code from rra-c-util

This commit updates the code imported from rra-c-util to
aadb400e7536b29fb2b34299ef3cac07d86c108d (release/3.8)

New files are:
LICENSE
m4/gssapi.m4
m4/krb5.m4
m4/lib-depends.m4
m4/lib-pathname.m4
m4/pam-const.m4

Change-Id: I34d42a5491e87dc61b81ac2bf034c53dc2020f20
Reviewed-on: http://gerrit.openafs.org/5417
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

12 years agoAdd rra-c-util to the src/external regime
Simon Wilkinson [Tue, 13 Sep 2011 08:37:04 +0000]
Add rra-c-util to the src/external regime

We're already using a number of m4 configure tests which are taken
from rra-c-util. Instead of importing these piecemeal, add rra-c-util
to the src/external git import system, so that we can simply keep our
selves in sync

Change-Id: I58d610a3ee5f0f924b02745a89696ef46a8b0c04
Reviewed-on: http://gerrit.openafs.org/5416
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

12 years agoWindows: osi_Debug macros
Jeffrey Altman [Tue, 2 Aug 2011 22:33:06 +0000]
Windows: osi_Debug macros

The osi_Debug macros are like osi_Log macros except when used
the logged values are always printed using OutputDebugString().
This interface is meant only for temporary debugging.  No code
that uses osi_Debug should ever be committed to the upstream
repository.

Change-Id: I139c81aa0c745f4f03c6900a19f65c55c495ad33
Reviewed-on: http://gerrit.openafs.org/5415
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: daemonCheckLockInterval to 60 seconds
Jeffrey Altman [Fri, 19 Aug 2011 02:07:26 +0000]
Windows: daemonCheckLockInterval to 60 seconds

Since we are no longer using deleted cm_fileLocks to
cache file server locks, there is no need to purge the
list so frequently.

Change-Id: I47d1e40be8b4008a11b1114389538a110644bed0
Reviewed-on: http://gerrit.openafs.org/5412
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: record history of read lock threads
Jeffrey Altman [Sun, 21 Aug 2011 04:38:24 +0000]
Windows: record history of read lock threads

Maintance an array of up to 32 reader threads that have
acquired a rwlock.  Use it for debugging when things go bad.

Change-Id: I2e2e781ff355f1452e991898dfb5b91c47db9e34
Reviewed-on: http://gerrit.openafs.org/5411
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 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

Change-Id: I8c541bc1709d2c02fb58d6d15b4a66d95647d1e7
Reviewed-on: http://gerrit.openafs.org/5414
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: ignore SYNCHRONIZE privilege in cm_CheckNTOpen
Jeffrey Altman [Fri, 9 Sep 2011 16:47:52 +0000]
Windows: ignore SYNCHRONIZE privilege in cm_CheckNTOpen

SYNCHRONIZE has not meaning for AFS so just ignore it.  Do not
deny an open request because it is set.

Change-Id: I33fe4a02d0d1ce2cb4d192dd1b2e5f23fda4091c
Reviewed-on: http://gerrit.openafs.org/5410
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agovolser: dont double-stat vnodes when dumping
Derrick Brashear [Tue, 13 Sep 2011 19:27:37 +0000]
volser: dont double-stat vnodes when dumping

we get the size, then we get it again. no clue why. let's just not.

Change-Id: I430d5c9941043341908cbf50ae70b982bb0ab8b3
Reviewed-on: http://gerrit.openafs.org/5398
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agodarwin: minimal afsbackgrounder ticket fix
Derrick Brashear [Tue, 13 Sep 2011 20:17:18 +0000]
darwin: minimal afsbackgrounder ticket fix

avoid the "default" API since it's broken. this will at least prompt for
tickets.

Change-Id: Iee566d5f5502b7dce900d833f5711038c984cf37
Reviewed-on: http://gerrit.openafs.org/5408
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agorx: avoid nat ping during shutdown
Derrick Brashear [Thu, 8 Sep 2011 14:44:38 +0000]
rx: avoid nat ping during shutdown

shutdown_rx, unlike rx_Finalize, kills the socket before the conns.
since we call osi_NetSend directly, we lose. just do a simple
check for rxinit_status, and exit immediately before sending if rx
is not up.

Change-Id: Ie34a45a4c1c88fc5732801dcefec89cbc9764f81
Reviewed-on: http://gerrit.openafs.org/5377
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

12 years agoAdd warning suppression to tcudbprocs.c
Simon Wilkinson [Mon, 12 Sep 2011 08:42:47 +0000]
Add warning suppression to tcudbprocs.c

When tcudbprocs.o is built as part of tbutc, it needs to have the
same warning suppression as when it is built as part of butc.

Change-Id: Ied3a9512676ea929f5acdb80b29875555f69113a
Reviewed-on: http://gerrit.openafs.org/5402
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoBuild tbutc and tvlserver on Darwin
Simon Wilkinson [Mon, 12 Sep 2011 08:42:11 +0000]
Build tbutc and tvlserver on Darwin

At some point, the build lines for tbutc and tvlserver ended up
omitting Darwin platforms. This is incorrect, so re-add Darwin to the
platform list.

Change-Id: I7704eb19a457620b37cbe3d9cbd33d6c9bd3ae5e
Reviewed-on: http://gerrit.openafs.org/5401
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agocrypto: Fixes for recent Heimdal changes
Chas Williams (CONTRACTOR) [Mon, 12 Sep 2011 19:24:39 +0000]
crypto: Fixes for recent Heimdal changes

ignore KRB5_DEPRECATED_FUNCTIONS for now since it doesnt give any
advice.  Some keytypes (but not all) have been renamed.  So for
now we need to keep both apparently.

Change-Id: I55de284448d255d5107afe03b4df56ccebc90beb
Reviewed-on: http://gerrit.openafs.org/5400
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoImport of code from heimdal
Heimdal Developers [Mon, 12 Sep 2011 18:08:57 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
b118610a9c56835c4ac5dc49ce8124cae8078346 (switch-from-svn-to-git-2478-gb118610)

Upstream changes are:

Harald Barth (1):
      Move common code to krb5_unsupported_enctype() and make error message contain string instead of error number

Jeffrey Altman (1):
      roken: declare IN_LOOPBACKNET if necessary

Love Hornquist Astrand (5):
      Warning fixes from Christos Zoulas
      Fixes from NetBSD via Thomas Klausner and Roland C. Dowdeswell
      Rename subsystem_DEPRECATED to subsystem_DEPRECATED_FUNCTION(X)
      remove trailing whitespace
      remove warning, remove forward declaration by moving the function up, ident

Love Hörnquist Åstrand (4):
      don't set i = 0, its never read
      sprinkle doxygen and kode more like the rest of the code base
      partly unify enctype/keytype since there is only enctypes
      switch to KRB5_ENCTYPE

Roland C. Dowdeswell (1):
      Fix a couple of bugs in krb5_c_valid_enctype():

chas williams - CONTRACTOR (1):
      hcrypto: var name current conflicts with linux kernel

Change-Id: Id9a7a9ee8258b979b54f4ed2b4175815ab35ea21
Reviewed-on: http://gerrit.openafs.org/5399
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: permit offline volume check to be disabled
Jeffrey Altman [Sun, 4 Sep 2011 18:58:23 +0000]
Windows: permit offline volume check to be disabled

Setting the registry value to 0 can now be used as a
method of disabling the offline volume check.

Change-Id: I9fdc4e960efb0a6793316102ce2794c775693da1
Reviewed-on: http://gerrit.openafs.org/5370
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoviced: Use libcmd for command line options
Simon Wilkinson [Mon, 25 Apr 2011 14:46:33 +0000]
viced: Use libcmd for command line options

Change-Id: Id402dc44bce03fcf998ad5b3f6de80fae7de9539
Reviewed-on: http://gerrit.openafs.org/5075
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoRPM: Fix dkms support on Fedora 15
Todd Lewis [Sun, 11 Sep 2011 11:42:47 +0000]
RPM: Fix dkms support on Fedora 15

Newer dkms no longer uses or supplies a $kernelver_array variable;
instead it uses $kernelver. The attached patch uses both, one of
which will be empty, so the test will do the Right Thing regardless
of your dkms version.

Further, the "mv" command at the end of the MAKE[0]= line needs
lots of back-slashes on each of its parms. We need three to make it
all the way to the final dkms.conf file -- so that's six -- plus one
more to escape the '$'; that's seven in all.

In case there's any question (and with all the back-slashes involved,
there should be) about the intent here, the whole point of this
patch is to make the final dkms.conf MAKE[0]= line look like this
(module line breaks:

MAKE[0]="KMODNAME=openafs.ko; DSTKMOD=\".\"; [ \"\`echo
\"${kernelver_array[0]}${kernelver[0]}\" | sed -e
's/^\([0-9]*\.[0-9]*\)\..*/\1/'\`\" = \"2.4\" ] && KMODNAME=\"libafs-*\"
&& DSTKMOD=openafs.o; ./configure
--with-linux-kernel-headers=${kernel_source_dir}
--with-linux-kernel-packaging; make; mv src/libafs/MODLOAD-*/\\\$KMODNAME
\\\$DSTKMOD"

This is what was required to get "dkms build ..." to work on Fedora 15,
and as near as I can tell it shouldn't break 2.4 or other builds.

FIXES 130211

Change-Id: I1f7b3ccb438bb957bb0b97456b23c11cb0b4a41b
Reviewed-on: http://gerrit.openafs.org/5393
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoUnix CM: Fix afs_event fallout on Mac OS X
Simon Wilkinson [Sun, 11 Sep 2011 11:31:55 +0000]
Unix CM: Fix afs_event fallout on Mac OS X

Commit dc077b83c9b1f107efbc3483743f44117748f23c moved the afs_event
structure definition into afs_osi.h. However, afs_osi.h is included from
lots of places which don't include a complete set of platform headers.
This means that the use of lck_mtx_t in this file breaks the build on
Darwin.

Instead, define the structure in afs.h, along with all of the rest of
the cache manager structures. Also take the opportunity to move the
definition of shutdown_osisleep it afs_prototypes.h, with the rest of
the prototypes.

Change-Id: Idd19fc30adcb5ab37e65ad87fa9224668e8cd321
Reviewed-on: http://gerrit.openafs.org/5392
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoDarwin: Actually stop the kernel build
Simon Wilkinson [Sun, 11 Sep 2011 11:35:18 +0000]
Darwin: Actually stop the kernel build

At the moment, all of the kernel build lines end with "; true", which
means that the build will always continue, regardless of whether
creating an individual object file succeeds or not. The 'true' is there
to gobble up the name of the source file which the common build
infrastructure adds to the end of the command line.

Instead of using '; true', use '&& true', so that if one of the C
compiler commands, or the lipo, fails, we get told about it, before
we try to link the missing objects.

Change-Id: I11c14e6aa12188e3de044f900b3df8c8ffe5df13
Reviewed-on: http://gerrit.openafs.org/5391
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

12 years agoMove string manipulation functions out of util
Simon Wilkinson [Sun, 10 Jul 2011 09:24:26 +0000]
Move string manipulation functions out of util

Some functions in libafsutil depend upon the RX libraries, which means
that pulling in other functions in this library can create a dependency
upon RX. This is less than ideal for low-level libraries such as cmd and
comerr.

So, create a new low-level library (currently named 'opr') which can
contain low-level functions from util, and elsewhere. This library
should have no dependencies other than on system libraries and libroken.

Change-Id: I703db3da4d8faf79ee82bf572af09d07152d9b25
Reviewed-on: http://gerrit.openafs.org/5363
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

12 years agoautoconf: use $XCFLAGS from OPENAFS_OSCONF when making tests
chas williams - CONTRACTOR [Wed, 7 Sep 2011 13:55:47 +0000]
autoconf: use $XCFLAGS from OPENAFS_OSCONF when making tests

Certain platforms (like ppc64_linux26) compiler options might
affect some autoconf tests.  In particular, the ones related to
the size of certain primitive types.

Change-Id: I20c3f737ee4623451bc6cab3f97e86d152cb397f
Reviewed-on: http://gerrit.openafs.org/5366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoIRIX: Pull NFS translator hooks
Simon Wilkinson [Wed, 7 Sep 2011 17:20:24 +0000]
IRIX: Pull NFS translator hooks

We've never had working NFS translator for IRIX, and the system call
codes which are required to install the symbols used by the IBM
translator have long been used for other things by OpenAFS.

Simplify this mess by just removing the translator stubs from the kernel
module, and all of the code in afsd which used to handle pulling
addresses out of the kernel module so that we can hook ourselves in.

Change-Id: I2da2b0040afc0191e236706126d75bc7d39c0936
Reviewed-on: http://gerrit.openafs.org/5375
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agovolser: Don't initialise all error tables
Simon Wilkinson [Sun, 10 Jul 2011 12:57:36 +0000]
volser: Don't initialise all error tables

Initialising the KA and cmd error tables in vsprocs.c makes the
libvolser library dependent upon rxkad and cmd. As we may want to
use that library in programs which use neither rxkad, nor our command
processor, this is less than ideal. So, just drop the initialisations.

Change-Id: Ifd47b1b16fc014f969e2b487451e21877b6a5407
Reviewed-on: http://gerrit.openafs.org/5374
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoafsd: Fix res_init warning
Simon Wilkinson [Tue, 6 Sep 2011 13:18:12 +0000]
afsd: Fix res_init warning

afsd requires res_init to be declared - get a definition for this by
including roken.h (which has the necessary magic to figure out which
set of headers are required to get resolver functions)

Change-Id: I217405df223f0bc42be90aea991cb228db4da4f0
Reviewed-on: http://gerrit.openafs.org/5373
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agopam: Fix test_pam on Darwin
Simon Wilkinson [Tue, 6 Sep 2011 13:14:56 +0000]
pam: Fix test_pam on Darwin

Darwin doesn't have a getpassphrase function. Fix the PAM test to
use getpass, in the same way as we do for lots of other platforms.

Change-Id: Ib252174ac1356a8975a9187b252d4fe0246d5d39
Reviewed-on: http://gerrit.openafs.org/5372
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agopam: Don't duplicate .c.o rule
Simon Wilkinson [Tue, 6 Sep 2011 13:03:41 +0000]
pam: Don't duplicate .c.o rule

Our included configuration has a perfectly fine .c.o rule, so don't
override it in this Makefile, as all that does is produce a warning at
build time

Change-Id: If8d37f50932124ef0adef64ec23d81e646da337a
Reviewed-on: http://gerrit.openafs.org/5371
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoImport new pam-const.m4 from rra-c-util 3.8
Russ Allbery [Thu, 8 Sep 2011 02:25:23 +0000]
Import new pam-const.m4 from rra-c-util 3.8

Fixes detection of whether the PAM library uses const on FreeBSD and
possibly others.  Report and testing from Julien ÉLIE.

Change-Id: Ice01914f4a00f73e4e473934f4ad907da3a3493f
Reviewed-on: http://gerrit.openafs.org/5376
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

12 years agoWindows: add clean rule to src/afs/NTMakefile
Jeffrey Altman [Tue, 6 Sep 2011 15:57:18 +0000]
Windows: add clean rule to src/afs/NTMakefile

Change-Id: I433dee1e3f9e4b5774dc8011690b6c74162772ce
Reviewed-on: http://gerrit.openafs.org/5368
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

12 years agoWindows: correct comments in cm_BkgStore
Jeffrey Altman [Wed, 7 Sep 2011 17:33:36 +0000]
Windows: correct comments in cm_BkgStore

Change-Id: I1b74db2cc37626dad2e92e86facf7bbaf71d6177
Reviewed-on: http://gerrit.openafs.org/5369
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>