Peter Scott [Mon, 31 Oct 2011 22:07:23 +0000]
Windows: correct ordering of reparse point tests
Test for whether an object is a reparse point before testing
whether the provided buffer is large enough to hold the result
if it is.
FSCTL_GET_REPARSE_POINT
FSCTL_SET_REPARSE_POINT
FSCTL_DELETE_REPARSE_POINT
Change-Id: If6c1b9b6e5853d7759f169943310321d408190e0
Reviewed-on: http://gerrit.openafs.org/5748
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Peter Scott [Mon, 31 Oct 2011 22:05:31 +0000]
Windows: log FSCTL_CSC_INTERNAL requests
FSCTL_CSC_INTERNAL requests are not supported and will
return STATUS_INVALID_DEVICE_REQUEST. However, log them
for easier debugging.
FSCTL_CSC_INTERNAL is defined in ntifs.h only for
Vista and above. Since afsredir is built for XP
and above its value must be conditionally defined
by us.
Change-Id: I39cf1f9d068d28ab6c9267c302d49feece6af700
Reviewed-on: http://gerrit.openafs.org/5773
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Peter Scott [Mon, 31 Oct 2011 21:59:51 +0000]
Windows: add braces to case statements
A number of case statements did not have braces protecting
the block. Add them.
Change-Id: I313462ca0c7490931e7c994ec45e39be071e782b
Reviewed-on: http://gerrit.openafs.org/5772
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Peter Scott [Sat, 29 Oct 2011 17:55:46 +0000]
Windows: Directory Entry Processing
Memory corruption was detected due to improper handling
of directory entries and the short name b-tree during
directory revalidation and tear down. The problem
resulted in a BSOD most frequently when roaming profiles
were written back to the file server or when multiple
clients were actively modifying the contents of a directory
simultaneously.
This patchset makes a number of changes:
. rename processing no longer handles collisions locally.
the file server replaces a target atomicly when there
is a collision.
. directory validation is no longer delayed until
a handle is closed
. data version numbers are checked for implied
invalidation
Change-Id: Ib4b281bfb5da4b5a5ce735e85d85c50e15fbcde1
Reviewed-on: http://gerrit.openafs.org/5736
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Peter Scott [Sat, 29 Oct 2011 17:29:55 +0000]
Windows: additional trace logging for afsredirlib
A large number of addition trace log entries were added
to assist in diagnosing problems in the dir entry processing.
Change-Id: I85cab4d66680eb5b9c00843c49c33a81acb18bc2
Reviewed-on: http://gerrit.openafs.org/5739
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Peter Scott [Sat, 29 Oct 2011 15:34:07 +0000]
Windows: Reimplement AFSGenerateCRC()
Replace the home grown CRC generation with a call to
RtlHashUnicodeString() which is present on Windows XP
and above.
Change-Id: Id98a1223e0aad54b3c43a16653ab888ac883639f
Reviewed-on: http://gerrit.openafs.org/5738
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Marc Dionne [Sat, 29 Oct 2011 23:23:07 +0000]
Linux: 3.1: update RCU path walking detection in permission i_op
The permission() inode operation changed again with kernel 3.1,
back to the form it had before 2.6.38. This compiles fine,
but is missing the new way of detecting when we get called in
RCU path walking mode, resulting in system hangs.
Change-Id: I9a9a0c13aa3b35d8fe2bd592e2bca8187eacacc5
Reviewed-on: http://gerrit.openafs.org/5740
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Tue, 21 Jun 2011 17:32:02 +0000]
rx: Remove the ADAPT_WINDOW code
RX still has the remnants of an old mechanism for doing RTT and
congestion window detection. This code is #ifdef'd out using
the ADAPT_WINDOW define, but is pretty much unservicable these days,
as it collides with the TCP style implementation (with ADAPT_WINDOW
enabled, both will attempt to manipulate a connections RTT and
window size)
As the current TCP-style RTT and window calculation seem to work
much better in deployment, and there isn't much hope for us being
able to maintain two different congestion mechanisms, just remove
ADAPT_WINDOW. It is in git, if we ever want it back (not that I
think we ever would).
Change-Id: I4a22354e362fde8021f7d8b19e099a0f7b4fba3b
Reviewed-on: http://gerrit.openafs.org/5737
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Fri, 28 Oct 2011 21:43:24 +0000]
Windows: cm_Rename break in
9cf7a628c2ff178b2fa236d2c0a41ca9be315036
9cf7a628c2ff178b2fa236d2c0a41ca9be315036 broke renaming of
a file to a name that does not exist. Put back the code that
makes that possible with a comment.
Change-Id: I6c13c0150d2366c9578502d0c8f6188bdc40a9c8
Reviewed-on: http://gerrit.openafs.org/5735
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Fri, 28 Oct 2011 15:36:10 +0000]
Windows: out of date version not in current chunk
In buf_GetNewLocked(), the comparision to decide whether a
cm_buf_t is a member of the current chunk must take the data
version into account. If the data version is out of date, it
is not part of the current chunk and is an object that can be
safely recycled.
Change-Id: Id8ca0a897a0a65efc1cabbe39107ca210b48bd4e
Reviewed-on: http://gerrit.openafs.org/5734
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Edward Z. Yang [Tue, 18 Oct 2011 03:16:15 +0000]
linux: Update Packaging to build OpenAFS services for Fedora's systemd
Fedora 15 now uses systemd (see http://fedoraproject.org/wiki/Systemd)
for the OS init system. While it currently has backwards
compatibility with older SysV-style init scripts, future versions of
Fedora may no longer support it, and OS startup tends to be faster
with the systemd service units. Also, systemd runs all the service's
processes within a linux kernel cgroup.
(see http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt)
This change includes an openafs-client.service and
openafs-server.service unit files for the client and server packages
respectively.
Client
- Loading the openafs module was moved into
/etc/sysconfig/modules/openafs-client.modules. This causes the OS to
load the module on boot. This is the preferred way for modules to be
loaded with Fedora. (See
http://docs.fedoraproject.org/en-US/Fedora/15/html/Deployment_Guide/sec-Persistent_Module_Loading.html
for more details)
- The CellServDB file is generated with sed rather than cat.
This change was made because Systemd doesn't execute as a shell
script, but rather executes processes directly. Rather than invoking
a shell to concatenate the CellServDB.* files, they're written to the
CellServDB file using a sed oneliner.
- Do all of the proper kernel module loading and unloading.
Server
- Since systemd uses cgroups, when the service is shut down, all
processes in the openafs-server.service cgroup will be terminated.
The other changes are standard as per:
http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
Original version by Jonathan Billings <jsbillin@umich.edu>.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Change-Id: Ifb41790ffe107b319097b9750273aecfe82c3349
Reviewed-on: http://gerrit.openafs.org/5637
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Alex Chernyakhovsky <achernya@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Jeffrey Altman [Thu, 27 Oct 2011 21:57:25 +0000]
Windows: only flush buffers on shutdown if running
If a service shutdown message is received prior to the
service entering the running state, do not attempt to
buf_CleanAndReset() because the required data structures
and locks are not initialized.
Change-Id: I29f20dbe91230f078334ca58e8791d2422cdecfd
Reviewed-on: http://gerrit.openafs.org/5733
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Tue, 25 Oct 2011 19:32:11 +0000]
Windows: Do not EEXIST exact match during rename
AFS Rename operations on the file server will delete a
target file if it exists. Do not prevent renames because
an exact match of the target name exists in the target
directory.
Change-Id: I680f8886575a9276a8df05965d14bbe7f24fba5d
Reviewed-on: http://gerrit.openafs.org/5731
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Tue, 25 Oct 2011 19:42:44 +0000]
opr: build on Windows after queue.h move
55efff93fe2762b58dc70cdd20aaf97e39825929 broke Windows.
update the NTMakefile in src/util and src/opr to correspond
to the move of queue.h.
Change-Id: I3379c131ee39758a36cf8574aff5766f79497236
Reviewed-on: http://gerrit.openafs.org/5732
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Rod Widdowson [Sat, 22 Oct 2011 15:46:26 +0000]
Windows: Look for 8.3 name when doing a rename
If we are doing a destructive rename we need to find whether the
target file exists. This is done in the usual way (case sensitive
case insensitive), but the short name is not looked for.
This means that the rename of a file to a short name will not
supersede correctly; rather the service refuses the rename since
the target existed already.
This patch looks the target name up in the shortname tree if the
target name is short and all else has failed.
Change-Id: Ie054516a378edf52938d3465143a16107a99c0f6
Reviewed-on: http://gerrit.openafs.org/5652
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Peter Scott [Thu, 20 Oct 2011 18:39:31 +0000]
Windows: New Trace for DirEntry tracking problem
Incuded in this patch is additional trace for logging how
directory entries are added, modified and deleted throughout
the redirector
Change-Id: I7ea80331ca24d543579603986f4eb6bcdd0bf072
Reviewed-on: http://gerrit.openafs.org/5640
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 17 Oct 2011 13:29:37 +0000]
Windows: Free work item memory with tag value
For consistency throughout the source module, free all work
item memory allocations with ExFreePoolWithTag.
Change-Id: I4e9b275bb8b92a81884d36ce4c8ed754d281bbf8
Reviewed-on: http://gerrit.openafs.org/5627
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 17 Oct 2011 13:28:11 +0000]
Windows: free pointer after last reference
This is a superficial change but is being done for readability.
If given the choice of freeing memory and then testing the pointer
value or vice-versa, test the pointer value first.
Change-Id: I189851c265a257d433df111622837db1d706c054
Reviewed-on: http://gerrit.openafs.org/5626
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 17 Oct 2011 13:26:13 +0000]
Windows: AFSInitPIOCtlDirectoryCB free in try_exit
Process all conditional release of allocated memory on
failure within the try_exit on failure.
Change-Id: I4a29f6e9d2506c00713558849c49c377a74d607a
Reviewed-on: http://gerrit.openafs.org/5625
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Tue, 25 Oct 2011 17:30:19 +0000]
Windows: close leak in AFSPrimaryVolumeWorkerThread
Prevent a leak of the non-paged pool and a Resource by freeing all
allocations within the Specific.Directory.PIOCtlDirectoryCB object.
Use AFSExFreePool() instead of ExFreePool() because the objects
are allocated from the AFSRedir.sys driver allocator.
FIXES 130280
Change-Id: I3b1c8fa838cfdf434bf7c08bb8935999cf328357
Reviewed-on: http://gerrit.openafs.org/5730
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Tue, 25 Oct 2011 01:14:59 +0000]
Windows: afsredir only wants shortName if not 8.3
When performing a directory enumeration for the afs redirector
only specify a shortname if the name is not valid 8.3.
Change-Id: I650be75b9ea8e41721272cd8bd426f1989ca01fb
Reviewed-on: http://gerrit.openafs.org/5727
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Thu, 20 Oct 2011 18:06:47 +0000]
Windows: Use SetFlag macro when setting flag
Change-Id: Ibda7ac5e30a623dc26f031831e75380fdf700a88
Reviewed-on: http://gerrit.openafs.org/5642
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Thu, 20 Oct 2011 18:05:59 +0000]
Windows: minor type in trace output
Change-Id: I72b348dea83547260575c0bd2aca327ea4f72532
Reviewed-on: http://gerrit.openafs.org/5641
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Peter Scott [Tue, 18 Oct 2011 14:04:48 +0000]
Windows: AFSRemoveCaseInsensitiveDirEntry corrections
If there is a fLink but no parentLink for the DirEntry being
removed, return the fLink as the new value for *RootNode.
This patch set also includes two changes that improve readability
but do not alter the behavior.
Change-Id: I112265798df9d46c83ffacddc7d97ad0f6fce5bf
Reviewed-on: http://gerrit.openafs.org/5638
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Peter Scott <pscott.kd@gmail.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 17 Oct 2011 13:22:53 +0000]
Windows: AFSEvaluateTargetByName free buffer if no return
For consistency with other functions in AFSCommSupport
modify AFSEvaluateTargetByName to free the DirEntry on
completion if the caller has not provided an out parameter
to accept it.
Change-Id: Ic5b6cc655fd47b95493e6aadb7b23481d0187d5c
Reviewed-on: http://gerrit.openafs.org/5624
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 17 Oct 2011 13:19:33 +0000]
Windows: remove unused code block
A small bit of dead code in the redirector.
Change-Id: Ieeea58e7681e8b0bd043794f1aa51c112c212497
Reviewed-on: http://gerrit.openafs.org/5623
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jeffrey Altman [Mon, 17 Oct 2011 13:10:17 +0000]
Windows: re-indent afsredir log message params
convert tabs to spaces for consistent indentation
make use of braces be consistent
Change-Id: I76e2c6427c02cb50f1eb4e6ab57e484a4bfa3c65
Reviewed-on: http://gerrit.openafs.org/5621
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Rod Widdowson [Sat, 22 Oct 2011 14:00:03 +0000]
Windows: Defer deref of a directoryEntry
During the handling of SL_OPEN_TARGET opens (usually associated
with a rename) a directory entry was deferenced prior to its
contents being used (to set up a seconding inforation field).
This change just holds on to the reference until after that processing.
Change-Id: I26dbd4bfb6595863109e549893f2367f71ad6404
Reviewed-on: http://gerrit.openafs.org/5651
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Rod Widdowson [Fri, 21 Oct 2011 15:57:02 +0000]
Windows: Set new file index correctly during rename
Directory entries are required to have a file index which is used during
directory enumeration. When inserting into a new directory we have to
update this from the target directory.
This code fixes a bug whereby it was being set from the source FCB, rather
than the target one. On failure we now also reset the value to its old value.
Change-Id: I726dd2e7ecc84e4a8b28f1f551c89fc6e815d853
Reviewed-on: http://gerrit.openafs.org/5646
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Jacob Thebault-Spieker [Tue, 19 Jul 2011 22:01:26 +0000]
allow cloning of any volume to any volume with same parent ID
remove checks to disallow cloning of ro volumes to rw volumes,
which allows cloning of any volume within the same parent ID
grouping, including allowing destruction of newer version of the
volumes.
Change-Id: I13f600c33934b9af8237f049225d6bacfbbb5690
Reviewed-on: http://gerrit.openafs.org/5049
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Jacob Thebault-Spieker [Tue, 19 Jul 2011 16:02:49 +0000]
remove check for disallowing clones of backup or ro volumes
removes the if-statement ensuring that the volume being cloned is
not a backup volume, nor a read-only volume. This allows clones
from any type of volume to a given volume. Parent volume meta-data
is maintained, only the cloneId value changes.
Change-Id: If8444fcabc9b9106db7db7df881ae07e8d287915
Reviewed-on: http://gerrit.openafs.org/5046
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Michael Meffie [Thu, 6 Oct 2011 12:33:37 +0000]
bozo: build notifier sample program
Build the smail-notifier sample program.
Change-Id: Ida2fd16e486934c984b2431c95c3a24966b3b2b7
Reviewed-on: http://gerrit.openafs.org/5555
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Michael Meffie [Thu, 6 Oct 2011 11:55:21 +0000]
bozo: test program update
Add -file option to test program to simulate program crashes.
Change-Id: I1ba14152438e2f857fdf5d181023266b3ab64fa3
Reviewed-on: http://gerrit.openafs.org/5533
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Mon, 29 Aug 2011 22:41:31 +0000]
DAFS: Remove VOL_SALVAGE_INVALIDATE_HEADER
Currently VRequestSalvage_r takes a flag,
VOL_SALVAGE_INVALIDATE_HEADER, which causes the header for the
specified volume to be freed (via FreeVolumeHeader). This is almost
never safe to do, since there may be other users of the specified
volume that can be accessing the volume header at the same time.
There is also no reason to invalidate the header at the time of the
VRequestSalvage_r call, since the header must be invalidated when we
detach the volume (other utilities may change header information). So,
if there are any problems in the future because we do not invalidate
the header at the time of VRequestSalvage_r, it is the fault of the
detachment/offlining logic.
So, remove VOL_SALVAGE_INVALIDATE_HEADER and all of its users. Take
this opportunity to correctly document the VRequestSalvage_r headers
in the VRequestSalvage_r comment, as it was previously missing the
VOL_SALVAGE_NO_OFFLINE flag.
Change-Id: I65c4cc0e81171aafa7b78ae9e1f503edb2f3f2c3
Reviewed-on: http://gerrit.openafs.org/5319
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Michael Meffie [Thu, 13 Oct 2011 16:23:35 +0000]
DAFS: fssync online requires a partition name argument
fssync-debug online silently fails when run without a partition name.
Check for the required partition name on the server side and the client
side. Report errors back to the client when the server side fails to
pre-attach the volume.
Change-Id: I454b202ac83893b1ee54d586a46d891773090a64
Reviewed-on: http://gerrit.openafs.org/5615
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Tue, 11 Oct 2011 15:51:14 +0000]
volser: Remove ExtractVolId
volser was using its own function to extract a volume ID from a
filename string, and was using atol to do so. The ato* family of
functions can have problems with larger volume IDs, not to mention a
lack of error checking, so don't use it. Since we already have the
function VolumeNumber in the vol package to do the very same thing,
just use that instead.
Change-Id: I40953d3533454503583685eb3adeb0079137c8a1
Reviewed-on: http://gerrit.openafs.org/5594
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Andrew Deason [Mon, 3 Oct 2011 18:10:44 +0000]
viced: Check for HOSTDELETED in stillborn check
h_FindClient_r checks the connection rock for a client object twice.
First it sees if we already have a client object, and if we don't, we
effectively create one (or find a suitable one). Then we check again,
to see if someone else set the rock while we were creating a client
structure.
Currently, the first check checks if client->host->hostFlags has
HOSTDELETED set, but the second check does not. So, if the host
associated with the client has been deleted by someone else, currently
we will unnecessarily log a "stillborn client" message, and we will
continue to use the deleted host. If the host continues to be held by
someone, we will run into the same situation repeatedly on future
requests until all of the host references go away.
To fix this, also ignore HOSTDELETED clients when performing the
stillborn race check.
Change-Id: Id72e83cb55b99a686d4179905116592e80eb9ac7
Reviewed-on: http://gerrit.openafs.org/5614
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Andrew Deason [Thu, 13 Oct 2011 16:45:58 +0000]
vlserver: Log to VLLog by default, not PtLog
Change-Id: I25c13a4461fc5a6ba2809b6937cbc18ed9c6ed53
Reviewed-on: http://gerrit.openafs.org/5616
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Andrew Deason [Fri, 14 Oct 2011 16:32:34 +0000]
vos offline: Bring volume back online for -busy
vos offline is supposed to bring a volume back online from "busy"
status before exiting, as volumes should not be in "busy" status for
extended periods of time. This was being enforced by required that
-sleep be specified; however, -sleep only results in the volume being
brought back online if a non-zero sleep time was specified. So, make
sure the volume is brought back online if -busy was specified.
Change-Id: I6e605771fcfcabbb09f6dcfd0576c062f64ad93f
Reviewed-on: http://gerrit.openafs.org/5620
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Marc Dionne [Sat, 22 Oct 2011 13:32:33 +0000]
cache bypass: don't define iovecp for UKERNEL
iovecp is defined but not used for UKERNEL. Define it conditionally
to avoid gcc warnings and --enable-checking failure.
Change-Id: I109ada36d0ab75e8a477498900dfaf85589e20e2
Reviewed-on: http://gerrit.openafs.org/5650
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Rod Widdowson [Sat, 22 Oct 2011 13:27:41 +0000]
Windows: Remove unused cleanup flag
In AFSOpenTargetDirectory the flag bRemoveShare was initialized
FALSE and never set TRUE. In teardown after failure some code
did listen to the flag, but the operation (IoRemoveShareAccess)
was not protected by the FCB mainlock which it should have been.
Rather than get the locking correct, just remove the flag entirely.
Change-Id: I097f15bb0903f3c0889b62427d2169cf84aa04a0
Reviewed-on: http://gerrit.openafs.org/5649
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Derrick Brashear [Sun, 23 Oct 2011 23:15:16 +0000]
bypasscache: allow arbitrary sized iovecs
instead of binding outselves to PAGE_SIZE, just fill any size
Change-Id: I01385df372ac2bda6d8ea24381bf38102c12615f
Reviewed-on: http://gerrit.openafs.org/5658
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Derrick Brashear [Thu, 6 Oct 2011 08:04:36 +0000]
bypasscache: do errors correctly
do set errors when we bomb out early
do not unlock and return early when we happen to do a correct zero
length read
do set errors the kernel can deal with if we're feeding a page routine
Change-Id: I1dca1f9e3b0f3d24da3e4f55b473775a737370b4
Reviewed-on: http://gerrit.openafs.org/5554
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Derrick Brashear [Tue, 11 Oct 2011 19:37:57 +0000]
ukernel: get an ip address even when dns and hosts suck
gethostname plus gethostbyname being useless make things fun
make things less fun
Change-Id: I5595698b0b7f2448b8c86448bedd8b16ab088510
Reviewed-on: http://gerrit.openafs.org/5600
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Marc Dionne [Mon, 24 Oct 2011 02:45:21 +0000]
dir: add missing return in DRead
A missing return in the kernel version of DRead causes the code to
think that no entry exists for a dir and proceed to allocate a new
one, if the entry is the third one in the hash chain.
If the existing entry is dirty, its contents are never written back,
and the pending changes to the directory are not seen by the client.
Change-Id: I8b0f86b04d6ac8f75720933308a0983810974ff4
Reviewed-on: http://gerrit.openafs.org/5666
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Sun, 23 Oct 2011 16:41:27 +0000]
tests: volser doesn't need rxgk yet
An rxgk dependency has crept in to the volser tests. Remove it for
now.
Change-Id: I0439ab5cf6deb335ebe76fb5a6736c9905312eec
Reviewed-on: http://gerrit.openafs.org/5665
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Sun, 23 Oct 2011 16:40:20 +0000]
tests: Add opr library for ktime test
The ktime tests need libopr for the lcstring routines. Add the
dependency.
Change-Id: I6902537236fbf35a654a3a4d70fa8f2df89e2a92
Reviewed-on: http://gerrit.openafs.org/5664
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Sun, 23 Oct 2011 23:09:32 +0000]
rpm: Add new libraries
Add the new libopr.a and libubik_pthread.a libraries
Change-Id: Ia91c67d72f1ac98060af60b6535db008911d3b1a
Reviewed-on: http://gerrit.openafs.org/5663
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Sun, 23 Oct 2011 23:07:33 +0000]
rpm: Turn on debugging
Now that we build with a blank CFLAGS line, we need to make sure and
actually turn on debugging in the build system, so that our debuginfo
files are vaguely useful
Change-Id: Ic2ebd0ebe866d511c4b0aef15845a85d95bacb5b
Reviewed-on: http://gerrit.openafs.org/5662
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Sun, 23 Oct 2011 21:49:08 +0000]
roken: Add *progname() to shared library exports
Add rk_getprogname and rk_setprogname to the set of shared
library exports in libroken
Change-Id: I1fd26c59b26a256b2070bfdc14dfaa5f82fb8002
Reviewed-on: http://gerrit.openafs.org/5661
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Sun, 23 Oct 2011 20:23:34 +0000]
rx: Define afs_kmutex_t for LWP too
afs_kmutex_t is used for lock definitions in the kernel, and in
pthreaded builds. LWP doesn't have any equivalent, and all structure
members using this type have to be protected with RX_ENABLE_LOCKS, which
starts to become untidy.
Just make afs_kmutex_t an int for LWP, so that we can simplify our
headers, at the expense of some additional storage on LWP builds (which
are going away at some point, anyway)
Change-Id: Iaa5683bdfd932c78a9a5d35b8a4530cecf5bdb37
Reviewed-on: http://gerrit.openafs.org/5660
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Sun, 23 Oct 2011 15:38:13 +0000]
dir: Don't leak a buffer on a failed Enumerate
If, for some reasons, Enumerate encounters a hash object with a NULL
buffer pointer, that's no reason to leak the hash object. Make sure
that we DRelease it before failing
Change-Id: I9ba6c69ca524937a6068d33a0ec0a90eef5b88ea
Reviewed-on: http://gerrit.openafs.org/5659
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Simon Wilkinson [Wed, 12 Oct 2011 13:50:18 +0000]
rx: ackall handling
If we ACKALL a stream, then we're sending a hard ACK for all of the
packets in the stream. We shouldn't send that hard ACK, and then a
load of soft ACKs for packets that don't actually exist.
Change-Id: Ibe0c76b4e92c5baa8801cfd12f961fabce223039
Reviewed-on: http://gerrit.openafs.org/5604
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Andrew Deason [Fri, 21 Oct 2011 20:05:06 +0000]
LINUX: Fix afs_linux_pag_to_groups signature
"new" is a struct group_info**, not a struct group_info*
Change-Id: I606afce74be6820b99b151b6077cf23d06e8e2d6
Reviewed-on: http://gerrit.openafs.org/5648
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Fri, 12 Aug 2011 19:50:26 +0000]
LINUX: Revert group changes on keyring failure
On Linux kernels that support keyrings, when we setpag we try to add
the PAG to the session keyring and to the supplemental group list.
Currently, if we fail to add the PAG to the keyring (which may happen
due to key quotas, or possibly other reasons), we return failure but
the group list is still modified with the new PAG in it.
Therefore, if the keyring-based approach fails, the new PAG may still
be in use, but there are no keyring keys associated with that PAG, so
the PAG may never get destroyed. This can cause a large number of PAGs
to accumulate over time, causing performance problems.
So, change this so that, in the event that keyring installation fails,
we revert the group list back to what it was before we touched it.
Also mark all unixusers with the new PAG as expired, in case one got
created during processing. Thus, the new PAG never gets used.
Change-Id: I61993edf705209e1a5d8dee638a9003690017c35
Reviewed-on: http://gerrit.openafs.org/5238
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Thu, 20 Oct 2011 21:57:14 +0000]
viced: Do not swallow errors on StoreData recovery
When we encounter any error in the StoreData fetch/store loop, we
reset the disk usage to ensure it remains correct, even in the face of
unexpected errors. However, when we do so, we use the errorCode from
VAdjustDiskUsage as our return value; if it is 0, we return success,
ignoring the error that got us in this code path in the first place.
Instead, keep track of a temporary errorCode for the disk usage
adjustment, and do not override our return value if there was no error
in the disk usage numbers.
Change-Id: Ifbe2377f2750b508d48e535215be3583d1d78e65
Reviewed-on: http://gerrit.openafs.org/5645
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Sat, 22 Oct 2011 08:43:41 +0000]
opr: Move queue header out of util
Move the header which is installed as opr/queues.h out of util/ and
into the new, top level, opr/ directory. Similarly move the tests out
of the util/ test suite, and into the opr/ tests
Change-Id: I81af487f09e1f0f4b25654a1f64c5ac75fd5a95b
Reviewed-on: http://gerrit.openafs.org/5656
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Simon Wilkinson [Tue, 11 Oct 2011 00:01:26 +0000]
dir: Remove double release in FindBlobs
When DRead() fails, we DRelease the entrybuf, then break. However,
this break takes us to the end of the function, where we promptly
DRelease again, causing a double free
Change-Id: I5a0293990e01376525d8adae25477c64e2cc93ad
Reviewed-on: http://gerrit.openafs.org/5655
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Wed, 12 Oct 2011 13:44:37 +0000]
linux: makesrpm should cope with releases with letters
don't just deal with numbered releases.
Change-Id: Iab97e4a7bebebf97d367243501aaf2a0b4b0476c
Reviewed-on: http://gerrit.openafs.org/5602
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Derrick Brashear [Wed, 12 Oct 2011 18:34:55 +0000]
afs: don't try GetDownD if nothing to get
if we "need" negative slots or caches, don't run. also,
don't stay "too full"
Change-Id: I29ef8d5fd9844a878d0c804d06aed5862a2d0df4
Reviewed-on: http://gerrit.openafs.org/5612
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Wed, 12 Oct 2011 19:26:23 +0000]
ukernel: don't define rdwr env on linux
We're not vm rdwr env in ukernel. Don't claim we are, otherwise we
will never push chunks out to the fileserver when our cache is full
Change-Id: I1c52ef502d42a4a2b63e786471fa487b88712e9d
Reviewed-on: http://gerrit.openafs.org/5613
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Derrick Brashear [Wed, 12 Oct 2011 17:09:42 +0000]
ukernel: set pthread stacksize to an integer multiple of 8k
because some pthread stacks require this to be in units of page size,
guess that page sizes will be 4k or 8k, and use the larger as a divisor
Change-Id: I9f89f7e32e2a70e12f1ed7a7fb86cab171b61e07
Reviewed-on: http://gerrit.openafs.org/5606
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Wed, 12 Oct 2011 17:04:28 +0000]
ukernel: add morepackets check in listener
Make the listener loop actually check for more packets needed,
like kernel, pthreads and lwp. Only checking for new packets every
20 seconds isn't sufficient on today's networks!
Change-Id: I80319cfd9d540c9a56b0dd8d948a380665426409
Reviewed-on: http://gerrit.openafs.org/5605
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Derrick Brashear [Tue, 11 Oct 2011 19:21:12 +0000]
afs: on uuid init fail, don't leave garbage behind
make sure we zero the uuid if we failed
Change-Id: I9d21e003b68eff0ce9bea4634c601c4663a0c078
Reviewed-on: http://gerrit.openafs.org/5599
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Derrick Brashear [Tue, 11 Oct 2011 18:32:04 +0000]
ukernel: set close-on-exec on our socket
if the process we are in execs a child, it doesn't get our socket
Change-Id: Iaf1831866e0dcda0449e75d89c576557c61090dd
Reviewed-on: http://gerrit.openafs.org/5598
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Wed, 12 Oct 2011 13:47:14 +0000]
rx: Don't clear the receive queue when out of packets
We can end up discarding a receive queue that's been soft acked,
effectively taking back soft acks we sent. Whilst the RX
documentation says that a client can drop soft acked packets at
will, our RX implementation assumes that if the final packet in
a call has been soft acked, we won't clear the queue. If a client
clears the queue in this situation, the call will hang.
What *should* happen is that we should take necessary locks,
confirm that we have not soft-acked all of the packets in a flow,
and then discard, or, if we're just going to discard, error the
call.
Change-Id: Ic8e358b8648c1a6f0154009093468531a9e3cf74
Reviewed-on: http://gerrit.openafs.org/5603
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Thu, 14 Apr 2011 20:36:50 +0000]
auth: Get correct viceid in legacy GetToken
When ktc_GetTokenEx needs to get tokens via the legacy ktc_GetToken
interface, it was not extracting the viceid. Make it set the viceid so
the caller gets the correct id.
Normally this would require parsing the given client name. To reduce
the amount of times we store and extract the viced from the "AFS ID
%d" string, create a helper GetToken function that can store the
viceid directly, without storing it in a string.
Change-Id: Ib03a419aee6eaed3b253c4d5d575d4dd8d3b8ddc
Reviewed-on: http://gerrit.openafs.org/4482
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Thu, 14 Apr 2011 20:05:37 +0000]
auth: Force correct evenness on rxkad tokens
Rxkad tokens historically have forced odd lifetimes when the given
viceid is actually an AFS ID, and even lifetimes when it is not. Force
this when the new token-handling functions are used (so the viceid is
correctly interpreted by users of the old token format), by creating
rxkad tokens with token_importRxkadViceId.
Slightly reworked by Simon Wilkinson to provide a generic token
destructor function.
Change-Id: I9f6aa518b8ae51a3772b69a0722a28bff6b47128
Reviewed-on: http://gerrit.openafs.org/4481
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Mon, 10 Oct 2011 22:19:13 +0000]
docs: Refer to dafs binaries by their real names
(Most of) the dafs binaries are called da(something). Update the
example in the dafileserver documentation so that we call the binaries
by the names that they are actually installed with on the system.
Change-Id: I05906758aa2b00ea7bc7f9be10414c8ad1a5a11a
Reviewed-on: http://gerrit.openafs.org/5654
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Simon Wilkinson [Mon, 10 Oct 2011 21:09:40 +0000]
ptserver: Don't check for noauth before rebuilding
The ptserver database building scripts would check to see if the server
was running from a bosserver with the noauth flag set before performing
a database rebuild.
This means that you can't start ptserver normally, and then configure
the database using pts -localauth, which is the preferred method for
configuring new cells.
Remove the check for noauth. This is slightly risky, as it means that a
corrupt database could be completely erased upon restart. However, we
already check that the dbheader (65k) is entirely blank - which will
protect us against any single page corruption errors.
Change-Id: I45dbb53d7f80b0b307f88941cb1e061967fcac81
Reviewed-on: http://gerrit.openafs.org/5653
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Ben Kaduk [Sun, 23 Oct 2011 15:22:07 +0000]
FBSD: typo fix
Gerrit/5572 added conditionals on __FreeBSD_version >= 900044, which
is (approximately) when a bunch of kernel API renames happened.
(There has since been a dedicated version bump to 900045 a month
or two post-facto, but 900044 should be fine for now.)
However, 900044 is not 90004.
Change-Id: I566186a7b53fd3b605a0f531e241eaf54a96bba3
Reviewed-on: http://gerrit.openafs.org/5657
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Rod Widdowson [Wed, 12 Oct 2011 10:04:33 +0000]
Windows AFSRDR: Log before decrementing refcount
The library support package keeps count of the number of times
the library code is active. When this goes to zero this means
that unload of the library can continue.
Although I cannot see it in the code it seems reasonable to assume
that at that stage the device object might go away so (and if it
doesn't do now it may in the future). This potentially renders it
unsafe to do anything after InflightLibraryEvent has been signalled.
This patch moves the logging up to above the decrement of the refcount.
Change-Id: I9493d970cec4a025ca9e4c5542e2d838c87f7817
Reviewed-on: http://gerrit.openafs.org/5601
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Derrick Brashear [Tue, 11 Oct 2011 18:03:29 +0000]
ukernel: don't enforce thread lockers in remove vop
we enforce locking by pid. when we are ukernel, MyPidXX is stupid.
don't bother.
Change-Id: Iddefd5d63edd6cc35a3c8112cb2cfbf3d47031aa
Reviewed-on: http://gerrit.openafs.org/5597
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Derrick Brashear [Mon, 10 Oct 2011 21:56:20 +0000]
ukernel: install our sysincludes to root.perf
otherwise, we can't actually include sysincludes from something
linking libuafs
Change-Id: Ia6565dda8390ef6510aa2170e36ff12ddb19fc9b
Reviewed-on: http://gerrit.openafs.org/5593
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Derrick Brashear [Mon, 10 Oct 2011 20:35:45 +0000]
ukernel: add uafs_access
we don't have an access vop. add one.
Change-Id: I813fb941608b5e49a0f23730414854602630fdee
Reviewed-on: http://gerrit.openafs.org/5589
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Derrick Brashear [Mon, 10 Oct 2011 20:57:35 +0000]
volinfo: fix bad format string
we need a format string; currently here we have none, which is no good
Change-Id: Ib097100383dba9d56056b96c5322734abb765f9d
Reviewed-on: http://gerrit.openafs.org/5591
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Hartmut Reuter [Wed, 5 Oct 2011 14:06:05 +0000]
vol_split: avoid using stale open directory vnodes
we could in case of multiple splits end up using a stale open
vnode for a directory; attempt to close and thus force-reopen
any fdhandles backing ihandles.
Change-Id: I50ff39873b523b05287c7a183d84e6f16eb7cd90
Reviewed-on: http://gerrit.openafs.org/5553
Reviewed-by: Hartmut Reuter <reuter@rzg.mpg.de>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Ben Kaduk [Sat, 8 Oct 2011 21:16:26 +0000]
FBSD: deal with kernel API rename
Upstream decided to rename the kernel functions that implement
syscalls to have a sys_prefix (including afs3_syscall!).
We use a couple of them, so we need to conditionalize accordingly.
Unfortunately, __FreeBSD_version was not bumped with the change,
so we use something close to it and hope it's close enough.
Change-Id: I228805a813af70b30f94f659e4da602210a6d6df
Reviewed-on: http://gerrit.openafs.org/5572
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Michael Meffie [Thu, 6 Oct 2011 10:03:07 +0000]
bozo: bosserver man page updates
Add the new -pidfiles option to the man page. Add a few other missing
options as well.
Change-Id: I2d72ec9948edb4dce4c6b6d974915d4ac7560b0b
Reviewed-on: http://gerrit.openafs.org/5587
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Jeffrey Altman [Fri, 7 Oct 2011 15:23:57 +0000]
Windows: correct use of krb5_init_context in aklog
A zero return code is success. Apply ! to obtain proper
conditional test.
Change-Id: Idd60fd2476a36ec36f7b5e250e9f8b8531c80611
Reviewed-on: http://gerrit.openafs.org/5570
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Jeffrey Altman [Sat, 8 Oct 2011 08:01:07 +0000]
Correct Heimdal conversion of libadmin/adminutil
Patchset
4251e386aa25bb3fc02fa255e92327fffc8b954d converts to
using Heimdal. The conversion undid the introduction of the
abstraction function fetch_krb5_error_message() which is
implemented in src/util. Restore the use of fetch_krb5_error_message()
and modify src/util/krb5_nt.c to use the Kerberos Compat SDK
interface.
Change-Id: I67fe7a309727f67a1da3705e1e485e64747c325c
Reviewed-on: http://gerrit.openafs.org/5571
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Derrick Brashear [Fri, 7 Oct 2011 12:11:34 +0000]
bypasscache: free in order
we need to free this, but while the pointer is still good
Change-Id: I5afa3505b764c5bf72811f60f63e29c80a29c5af
Reviewed-on: http://gerrit.openafs.org/5562
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Michael Meffie [Fri, 7 Oct 2011 09:50:37 +0000]
doc: fileserver synopsis typo
Fix a fileserver synopsis typo noticed during Derrick's EACK2011
debugging session.
Change-Id: I73ed6bd93f644689acbdeeb4293a22b3b6752ba6
Reviewed-on: http://gerrit.openafs.org/5558
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Fri, 7 Oct 2011 08:04:03 +0000]
RedHat: Add xstat_*_test commands to RPMs
Install the xstat_*_test commands in the 'openafs' RPM.
Change-Id: Idec42e133dd3f27c72f06c5411dd12acc163ef93
Reviewed-on: http://gerrit.openafs.org/5557
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Derrick Brashear [Wed, 21 Sep 2011 19:02:40 +0000]
bypasscache for ukernel
simple (read) bypasscache for ukernel.
does not bother trying any buffercache stuff.
Change-Id: Ie75572da7efdb871a4ce807f02fbbb5bd7744c66
Reviewed-on: http://gerrit.openafs.org/5484
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Jeffrey Altman [Tue, 4 Oct 2011 23:01:50 +0000]
Windows: Explorer shell GetUnixModeBits()
actually append the unix mode string elements to the
respective strings.
Change-Id: I32d69f824f01e8cfacbf811a4bb14e01e3b6b9a3
Reviewed-on: http://gerrit.openafs.org/5552
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Jeffrey Altman [Tue, 4 Oct 2011 21:29:26 +0000]
Windows: char* is not a Unicode string
Do not treat the output of NetbiosName() as a wide_t when
it is a char*.
Change-Id: Iba4f1f30f1de4a9c3ded2f1e440ca9e4bc014379
Reviewed-on: http://gerrit.openafs.org/5549
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Andrew Deason [Tue, 12 Apr 2011 22:47:51 +0000]
tsm41: Add options for uidpag and localuid
Add runtime options to aklog_dynamic_auth. Commit
3a541eb11d1bc7bd05b85635315214218d3b5d6f changed the behavior of
aklog_dynamic_auth to be more friendly to the CDE screenlocker, but
forced the use of UID-based PAGs.
Since some users like to use real PAGs and don't care about the CDE
screenlocker, made this behavior a runtime decision instead.
Change-Id: I28264e2e80258f962d02ed9a6a40c4d789179c06
Reviewed-on: http://gerrit.openafs.org/4484
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Thu, 14 Apr 2011 16:29:26 +0000]
aklog_dynamic_auth: Support new SetToken pioctl
Make aklog_dynamic_auth use the new SetTokenEx method of storing
tokens.
Change-Id: I843ecd206ef4673ff9e5df5419daa9ee5b31f060
Reviewed-on: http://gerrit.openafs.org/4483
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Jeffrey Altman [Sat, 1 Oct 2011 18:05:31 +0000]
Windows: Explorer Shell Extension enhancements
Redesign the AFS Volume Tab to report:
. Volume name
. Volume ID
. Cell
. Server
. Availability
. Quota
. Partition Info
. Replica Server List
Properly handle multiple selections to report the volume info
of the parent object and not the actively selected object.
When a mount point is selected, display the volume information
for the target volume.
Remove file server from AFS tab.
Modify the AFS tab to better handle multiple selections including
mount points.
Extend many gui2fs functions to implement a poor man's "follow"
option. This really should be done with the pioctl 'literal'
capability but this is an improvement. The pioctl modifications
will require a major redesign of gui2fs.c and all of the dialogs.
Change-Id: Ib009beb81d841fb3bbbd35b1eb0faec2c40eaf4e
Reviewed-on: http://gerrit.openafs.org/5531
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Andrew Deason [Thu, 29 Sep 2011 17:14:15 +0000]
Remove a few extra trailing backslashes
In a few different places, moving libutil before libafshcrypto_lwp
caused a variable definition to have a trailing \ on the last line of
the definition. This can confuse make (at least, the HP-UX make) to
think the next following definition is also part of the current
definition. Remove the trailing "\"s.
Change-Id: I235f95813e303bc3805b5d9fc8d7861e812613e2
Reviewed-on: http://gerrit.openafs.org/5523
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Wed, 28 Sep 2011 20:02:48 +0000]
vol: Only check "logging" on vice partitions
We don't care about non-vicepX partitions, so move part of the UFS
"logging" check into VCheckPartition. This API should probably redone
so the "am I a vicepX partition" check is done completely separately,
but for now, this will do.
Change-Id: Ib2df2079a392d7ed1a8c2aded34f2a7265215ecd
Reviewed-on: http://gerrit.openafs.org/5514
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Rod Widdowson [Thu, 29 Sep 2011 14:34:48 +0000]
FSSYNC-Client: Consistent use of partition name
Over time the FSSYNC code has collected examples where the partition
path is passed rather than the partition name. In Unix this is the
same (/vicepX), but on windows the path is the DOS device (C:).
This checkin changes FSSYNC client code to always use the partition
name.
This checkin does not address FSSYNC server or SALVSYNC.
Change-Id: I3c5b63103ab0cbd6c2c6c73b9dc737eca22b7d4c
Reviewed-on: http://gerrit.openafs.org/5521
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Jeffrey Altman [Fri, 30 Sep 2011 07:43:24 +0000]
Windows: register Shell Ext handlers
Add registry keys and values to enable use of the overlay
handlers for symlinks and mount points.
Add registry keys and values to enable use of the property
sheet handlers.
Correct registry keys for the Folder background context menu
handler.
Change-Id: Icac560fc6ffcec6bcc41f64adeae3ee2e5884fdb
Reviewed-on: http://gerrit.openafs.org/5530
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Jeffrey Altman [Tue, 27 Sep 2011 17:49:52 +0000]
Do not call krb5_get_error_message with NULL context
MIT's krb5_get_error_message() ignores the context and can
be called with a NULL context. Heimdal's version does not.
Change-Id: I31801b0e0044e5e724298404645517e4425b0f09
Reviewed-on: http://gerrit.openafs.org/5508
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Jeffrey Altman [Wed, 21 Sep 2011 03:54:08 +0000]
kauth: permit kauth/test to build on Windows (again)
Change-Id: I28f7bc93e189a2fcf3651552e00b4214bb6ec799
Reviewed-on: http://gerrit.openafs.org/5473
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Jeffrey Altman [Sat, 24 Sep 2011 15:12:09 +0000]
Windows: add krb5_enctype_enable(DES) calls
Heimdal disables DES by default. Enable DES-CBC-CRC by
calling krb5_enctype_enable() so that the active profile
does not require
[libdefaults]
allow_weak_enctypes = 1
Change-Id: I75d7b6bd7269081c7b1fcaafe05074dcdcc9a7e0
Reviewed-on: http://gerrit.openafs.org/5501
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Asanka C. Herath [Fri, 8 Oct 2010 21:46:02 +0000]
Windows: Build against KerbCompatSDK instead of KFW
Build OpenAFS for Windows against the Secure Endpoints
Kerberos Compatibility SDK instead of the in tree
Kerberos for Windows SDK.
The compatibility layer is available from:
http://github.com/secure-endpoints/heimdal-krbcompat
The SDK location must be specified with the
KERBEROSCOMPATSDKROOT environment variable.
The benefits of building against the Kerberos Compatibility
SDK are:
* Heimdal 1.5.1 or later assemblies will be used
if available
* MIT KFW 3.2.x will be searched for if Heimdal 1.5.1
is not installed
Version 1.0 of the SDK is supported.
Change-Id: I393e20d8bfb9ee1ca749cc54ecc1341927abaf82
Reviewed-on: http://gerrit.openafs.org/2867
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Andrew Deason [Thu, 29 Sep 2011 19:49:53 +0000]
DAFS: Do not serialize state for invalid hosts
When we serialize host information for DAFS during shutdown, we have
no guarantee that the host is in a valid state when we look at it.
This can result in a host being saved to disk when we are waiting for
the host to respond to an RPC, and so the information about the host
is invalid. For example, we can save a host that has the
HWHO_INPROGRESS flag set, and when it is restored later, this can
cause odd behavior since the flag is set but no thread is actually
waiting for the host to respond.
So instead, during state serialization, try to determine if a host may
be in an invalid state, and simply skip the host if it may.
Change-Id: I755640ea4ce607245ae98cc7455472ef781271e7
Reviewed-on: http://gerrit.openafs.org/5528
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Andrew Deason [Thu, 29 Sep 2011 21:04:54 +0000]
DAFS: Skip hosts with invalid flags on restore
Host entries with HWHO_INPROGRESS set or ALTADDR unset do not have
valid state, since those flags indicate that the fileserver was in the
middle of identifying the host when the host struct was serialized.
Skip entries from the on-disk host data that have such invalid flags
set when restoring state, so we do not load invalid data.
Change-Id: I26b88256679f4596598e6e3e6b68af7e8e5e387d
Reviewed-on: http://gerrit.openafs.org/5527
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>