openafs.git
10 years agoWindows: version 1.7.29 (1.7.2900.0) openafs-devel-1_7_29
Jeffrey Altman [Mon, 13 Jan 2014 23:57:24 +0000]
Windows: version 1.7.29 (1.7.2900.0)

Change-Id: I002758189af88e10cc7c6fadb9a021245537119f
Reviewed-on: http://gerrit.openafs.org/10711
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: 1.7.29 (1.7.2900.0) ChangeLog
Jeffrey Altman [Mon, 13 Jan 2014 23:56:30 +0000]
Windows: 1.7.29 (1.7.2900.0) ChangeLog

Change-Id: I293e2ab9b7100a2bf0ca76098927572c6e878262
Reviewed-on: http://gerrit.openafs.org/10710
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: AFSCommonWrite STATUS_PENDING is Success
Jeffrey Altman [Thu, 9 Jan 2014 14:58:56 +0000]
Windows: AFSCommonWrite STATUS_PENDING is Success

AFSCommonWrite() can return STATUS_PENDING if the write has been
deferred.  In that case, the function exit must not:

 * Update the Valid Data Length

 * Purge the cache

 * or do anything else related to the request

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

Change-Id: I001fc3f4dc53df705ca93b7014aff59de8b17ffb
Reviewed-on: http://gerrit.openafs.org/10692
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Mark Irp Pending before Deferring
Jeffrey Altman [Thu, 9 Jan 2014 14:57:33 +0000]
Windows: Mark Irp Pending before Deferring

After CcDeferWrite() is called we no longer have access to the
current Irp.  If we mark it deferred after calling CcDeferWrite()
we might mark the wrong thing.

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

Change-Id: I3ad55fe0ea24bc44b94d5f356ef4f927c9bf1d1d
Reviewed-on: http://gerrit.openafs.org/10691
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: cm_ConnByServer fix search for replication
Jeffrey Altman [Tue, 7 Jan 2014 15:57:01 +0000]
Windows: cm_ConnByServer fix search for replication

Separate connection objects are maintained for use when accessing
replicated and single source volumes.   If the matching connection
type cannot be found while holding the cm_connLock shared a second
search is performed after the lock is upgraded to an exclusive lock.
This second connection search was not enforcing the replication criteria.

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

Change-Id: I12278e79a06cfd060951aef720e784658ccc1f12
Reviewed-on: http://gerrit.openafs.org/10690
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: cm_connLock not required for cm_GetUCell
Jeffrey Altman [Tue, 7 Jan 2014 15:53:37 +0000]
Windows: cm_connLock not required for cm_GetUCell

In cm_ConnByServer() there is no need to hold the cm_connLock across
the cm_GetUCell() call.  Obtain the cm_ucell_t object before the
cm_connLock is obtained.

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

Change-Id: I596334a6eaeb322791955b69bbf868900cd719d0
Reviewed-on: http://gerrit.openafs.org/10689
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Rewrite LargeSearchTime conversions
Jeffrey Altman [Wed, 27 Nov 2013 19:41:18 +0000]
Windows: Rewrite LargeSearchTime conversions

Use LARGE_INTEGER to avoid the need for shifting and DWORD casts.
Take into account the size of time_t.

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

Change-Id: I633ec1e9da5820bbb1f5d30a3854c7e906027602
Reviewed-on: http://gerrit.openafs.org/10674
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: RDR_EvaluateNodeByName out of order param
Jeffrey Altman [Fri, 27 Dec 2013 03:02:50 +0000]
Windows: RDR_EvaluateNodeByName out of order param

The bHoldFid parameter is after the bNoFollow parameter.  The
two values were swapped resulting in unnecessary VLDB lookups.

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

Change-Id: Iec84368c983bdeff96b9f83b4b42438c2cddbd7f
Reviewed-on: http://gerrit.openafs.org/10637
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: cm_SetupStoreBIOD compute correct scanEnd
Jeffrey Altman [Wed, 18 Dec 2013 13:48:44 +0000]
Windows: cm_SetupStoreBIOD compute correct scanEnd

The algorithm used to ensure "chunk size" operations attempts to
enforce aligned chunks.  There are two problems:

 1. an aligned chunk range may extend beyond the end of the file.

 2. an aligned chunk might end before the requested length of the
    active write.

Protect against scanning beyond the end of the file and do not truncate
writes.

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

Change-Id: I3c34f2bcbca6978d8205f7cd5bdd240ff6ab56be
Reviewed-on: http://gerrit.openafs.org/10627
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: BUF_HASH use opr_jhash_int2
Jeffrey Altman [Wed, 18 Dec 2013 05:07:55 +0000]
Windows: BUF_HASH use opr_jhash_int2

BUF_HASH takes to 4-byte integers not three and therefore cannot use
the basic opr_jhash which assumes a minimum of three 4-byte integers.

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

Change-Id: Ia1c879cb809fbad493398dc42127f32cf7a8ad13
Reviewed-on: http://gerrit.openafs.org/10626
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoopr: Add opr_jhash_int2 function
Simon Wilkinson [Mon, 29 Oct 2012 19:02:03 +0000]
opr: Add opr_jhash_int2 function

Add a function to jhash that can be used to hash a pair of unsigned
integers (or other stuff that can cast to them) without having to build
up an array.

Provide a couple of tests for the new function

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

Change-Id: I944d8308dbda1cf1989b1d8497486f8463d1aacb
Reviewed-on: http://gerrit.openafs.org/10630
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoopr: Add opr_jhash_opaque
Simon Wilkinson [Tue, 17 Jul 2012 16:20:13 +0000]
opr: Add opr_jhash_opaque

Add a function which can be used to obtain a hash of an arbitrary
opaque string of arbitrary length

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

Change-Id: Ie08c65c502da90ddcf02b5732104004a4b2e714a
Reviewed-on: http://gerrit.openafs.org/10629
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoopr: Convert jhash to use AFS types
Simon Wilkinson [Tue, 17 Jul 2012 16:15:15 +0000]
opr: Convert jhash to use AFS types

Convert the jhash.h header so that it uses afs types (afs_uint32)
rather than stdint types (uint32_t), so that we can use it in kernel

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

Change-Id: I6bae304954d0bf16d86d8c1a2acf2abe93d02690
Reviewed-on: http://gerrit.openafs.org/10628
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: RXAFS_GetVolumeStatus no PRSFS_READ check
Jeffrey Altman [Thu, 5 Dec 2013 05:41:10 +0000]
Windows: RXAFS_GetVolumeStatus no PRSFS_READ check

Since d2d591caf2c9b4cf2ebae708cc9b4c8b78ca5a5a the file server no
longer performs a PRSFS_READ access check for the GetVolumeStatus RPC.
The cache manager should no longer test for PRSFS_READ as a means of
avoiding RPCs that are known to fail.

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

Change-Id: Ie2d2e610017e5be82717c23d8f5742fa12d0b8f3
Reviewed-on: http://gerrit.openafs.org/10537
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: RDR capture Cc/Mm exceptions do not break
Jeffrey Altman [Wed, 27 Nov 2013 17:26:44 +0000]
Windows: RDR capture Cc/Mm exceptions do not break

All of the Cc and Mm functions are wrapped in try/except blocks.
The purpose is to ensure that Cc and Mm do not return an error as
an exception which could result in the afs redirector failing to
release a resource.   Instead of calling the AFS exception handler
just handle the exception with EXCEPTION_EXECUTE_HANDLER.  This permits
the __except block to capture the exception code.

The AFS exception handler will throw its own exception if the
AFSDebugFlags AFS_DBG_BUGCHECK_EXCEPTION bit is set.  This is helpful when
debugging exceptions thrown by errors in the afs redirector code.  It is
not helpful when a Cc function throws an exception.  For example,
CcReadCopy() will throw STATUS_DELETE_FILE as an exception if an attempt
to read from a deleted file is initiated.   This should simply fail the
read operation not BSOD the system.

Reviewed-on: http://gerrit.openafs.org/10524
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 9b6f79108725dc5b6d4cbea4697199e5e745dc99)

Change-Id: I444915bacd73a991860a9952aa932ad1b5ac0de7
Reviewed-on: http://gerrit.openafs.org/10536
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: AFSRDFSProvider NPOpenEnum vs no redirector
Jeffrey Altman [Tue, 26 Nov 2013 01:27:10 +0000]
Windows: AFSRDFSProvider NPOpenEnum vs no redirector

If there is no redirector device present, return WN_NO_NETWORK
to indicate that this network provider is not ready for browsing.

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

Change-Id: Ic46a279f7ac836a83e024f0b842039249bdeaeaa
Reviewed-on: http://gerrit.openafs.org/10535
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Rationalize Freelance vs "fs flush*"
Jeffrey Altman [Tue, 26 Nov 2013 15:52:45 +0000]
Windows: Rationalize Freelance vs "fs flush*"

Background:

cm_scache_t objects representing Freelance volume (cell=-1, volume=-1)
are special because they are populated from the Freelance mountpoint
and symlink tables.  These tables are in turn generated from the
registry.  The tables are regenerated on-demand after the execution of
cm_noteLocalMountPointChange() which increments cm_data.fakeDirVersion
which becomes the new data version value for the (-1.-1.1.1) directory
object.

The next time that cm_GetSCache() is called for a Freelance object
the fake root directory is rebuilt by cm_InitFakeRootDir().  Since the
vnode values are not persistent with regards to directory entry names the
FileId unique is used to distinguish the various versions.
cm_data.fakeUnique is incremented with each call to cm_InitFakeRootDir().

Each time cm_noteLocalMountPointChange() is executed the afs redirector is
notified of the data version change which will force the redirector to
rebuild its view of the directory the next time a path evaluation requires
evaluation of the root (\afs).  In other words, on the next request.

If cm_noteLocalMountPointChange() is executed multiple times there is the
possibility of a race between the redirector and the service.  When the
race is lost the redirector receives an invalidation event for -1.-1.1.1
as it is in the process of rebuilding the directory contents.  The
redirector ends up believing it has the most recent data version when it
doesn't but the service no longer has Freelance mountpoint and symlink
tables representing the requested data version.  Hence, the mountpoints
and symlinks end up as CM_SCACHETYPE_INVALID.

fs flushfile and fs flushvolume both had explicit checks to prevent
flushing Freelance objects because each call to cm_FlushFile() on a
Freelance object would execute cm_noteLocalMountPointChange() triggering
the race.

The Problem:

fs flushall is not executed on a specific object (volume or file).
Therefore there was no explicit check to prevent execution against
Freelance objects.  For each cm_scache_t in the cache cm_FlushFile() is
processed.  If there are N Freelance mountpoints and symlinks, there will
be N+1 calls to cm_noteLocalMountPointChange() in quick succession.  Not
only does this risk losing the race described above but it is extremely
wasteful as the Freelance tables may be repeatedly regenerated.

This Patchset:

This patchset re-organizes the Freelance processing in the flush code
paths.  cm_FlushFile() and cm_FlushVolume() can simply no longer be
successfully executed against a Freelance object.  Both will return
CM_ERROR_NOACCESS.

"fs flush <file>" is not permitted against Freelance objects.

"fs flushvolume <path>" will execute cm_noteLocalMountPointChange() once if
the path is a Freelance object.

"fs flushall" continues to execute cm_FlushFile() on all cm_scache_t
objects.  The calls on Freelance object will fail.  After all cm_scache_t
objects are flushed then cm_noteLocalMountPointChange() will be executed
once to force the Freelance directory to be rebuilt.

This patchset does not address the race but significantly reduces the
likelihood the race will be lost.

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

Change-Id: I9775d168664f2d47f6f410b09512fc38b200e63f
Reviewed-on: http://gerrit.openafs.org/10534
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Reset mp/symlink target during fs flush*
Jeffrey Altman [Tue, 26 Nov 2013 15:31:32 +0000]
Windows: Reset mp/symlink target during fs flush*

When processing a "fs flush*" command, reset the the cm_scache_t
mountPointStringp which contains the known mountpoint or symlink
target information.

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

Change-Id: I6e1b92ad6e9136ff8898d37dd2268b7b0b77cd26
Reviewed-on: http://gerrit.openafs.org/10533
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: 1.7.28 (aka 1.7.2800.0) openafs-devel-1_7_28
Jeffrey Altman [Wed, 20 Nov 2013 23:47:26 +0000]
Windows: 1.7.28 (aka 1.7.2800.0)

Change-Id: I2a8365b3dd82a61fcc9561a3df549f9f47eab05b
Reviewed-on: http://gerrit.openafs.org/10479
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: 1.7.28 ChangeLog
Jeffrey Altman [Wed, 20 Nov 2013 23:46:46 +0000]
Windows: 1.7.28 ChangeLog

Change-Id: I6cb3932788dbf341252fff451408b6b7a19fe48b
Reviewed-on: http://gerrit.openafs.org/10478
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: cm_Analyze retries vs CM_REQ_NORETRY
Jeffrey Altman [Mon, 18 Nov 2013 04:03:43 +0000]
Windows: cm_Analyze retries vs CM_REQ_NORETRY

CM_REQ_NORETRY is set by threads that want all errors returned
immediately.  However, there are some errors that should never
be returned:

  RX_MSGSIZE
  RX_CALL_BUSY
  VNOSERVICE
  RX_CALL_IDLE
  RXKADEXPIRED
  VICECONNBAD
  VICETOKENDEAD

For these errors even if the thread has requested no retries a RPC
retry must be performed.

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

Change-Id: I66ab3309be41e1862d9d7b617f885c5bbec5fd01
Reviewed-on: http://gerrit.openafs.org/10477
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: cm_FindVolumeByFID
Jeffrey Altman [Fri, 15 Nov 2013 23:32:37 +0000]
Windows: cm_FindVolumeByFID

cm_GetVolumeByFID() does not query the vldb if the volume group
is not known to the cache manager.   cm_FindVolumeByFID() is to
be used in cases where the volume group data must be known for the
operation to successfully complete.

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

Change-Id: I29a9c9fdd277789483cd5809b088c1f6441d344e
Reviewed-on: http://gerrit.openafs.org/10469
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Fix out of range pointer validation
Jeffrey Altman [Tue, 12 Nov 2013 14:58:44 +0000]
Windows: Fix out of range pointer validation

The ACL, Stat, and Volume pointer validation checks did not take
into account that NULL is a valid pointer value.  As a result the
cache validation failed.

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

Change-Id: Ic76a04565856e792304d2c33da14a10e6ed5d244
Reviewed-on: http://gerrit.openafs.org/10468
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows; GetSystemTimeAsFileTime
Jeffrey Altman [Mon, 4 Nov 2013 05:12:07 +0000]
Windows; GetSystemTimeAsFileTime

As per Raymond Chen's "The Old New Thing" blog

  http://blogs.msdn.com/b/oldnewthing/archive/2013/11/01/10462403.aspx

Calling GetSystemTime() followed by SystemTimeToFileTime() performs
two format translations which can be avoided by using
GetSystemTimeAsFileTime() directly.

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

Change-Id: I89b25cdc25ac6b4e4e37d1c2da48575ed4a21393
Reviewed-on: http://gerrit.openafs.org/10467
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: GiveUpAllCallBacks only if non-loopback
Jeffrey Altman [Wed, 30 Oct 2013 04:44:25 +0000]
Windows: GiveUpAllCallBacks only if non-loopback

If the only ip addresses are known to be loopback addresses, then
do not waste time by attempting to GiveUpAllCallBacks during suspend
or shutdown.

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

Change-Id: I7280f8849aebce2435d45f77942efdddd5bdc1cc
Reviewed-on: http://gerrit.openafs.org/10466
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: RDRLib Worker Thread shutdown
Jeffrey Altman [Mon, 28 Oct 2013 05:06:47 +0000]
Windows: RDRLib Worker Thread shutdown

The thread waiting to unload the library is polling the state of
the AFS_WORKER_INITIALIZED flag in the PoolContext->State field
for each worker.  Ensure that the thread performs no actions other than
PsTerminateSystemThread() after clearing the AFS_WORKER_INITIALIZED flag.

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

Change-Id: Idc6b873db6e07bcd3ed1139d736b75d3518b16ff
Reviewed-on: http://gerrit.openafs.org/10385
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Uninitialized TargetNameLength/Offset
Jeffrey Altman [Tue, 29 Oct 2013 12:24:06 +0000]
Windows: Uninitialized TargetNameLength/Offset

In RDR_PopulateCurrentEntry it is possible for TargetNameLength and
TargetNameOffset to be uninitialized resulting in stack garbage being
returned to the redirector.  This can result in a blue screen.

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

Change-Id: I17391f176118d89756773b62e5004dda0cfe1703
Reviewed-on: http://gerrit.openafs.org/10384
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: cm_NewSCache skip in hash recycled entries
Jeffrey Altman [Fri, 18 Oct 2013 23:26:56 +0000]
Windows: cm_NewSCache skip in hash recycled entries

If cm_RecycleSCache returns an in-hash entry it means that either
it wasn't recycled properly or somehow we raced this entry with
another thread.  Just skip it and keep searching.

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

Change-Id: I7a89745b8ebb338d7364cb978577e9d19b122604
Reviewed-on: http://gerrit.openafs.org/10368
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: cm_RemoveSCacheFromHashTable scp not found
Jeffrey Altman [Fri, 18 Oct 2013 23:14:00 +0000]
Windows: cm_RemoveSCacheFromHashTable scp not found

If the cm_scache_t has CM_SCACHEFLAG_INHASH flag set but cannot be
found in the CH_SCACHE_HASH(&scp->fid) hash chain then search the
entire hash table for the object.  At the end of the function we
will know that the CM_SCACHEFLAG_INHASH flag is safe to clear.

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

Change-Id: If54c57176a59ddd3581ea166dca94bb73da9b7b9
Reviewed-on: http://gerrit.openafs.org/10367
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: EOF for Synchronous Deferred Writes on XP/2003
Rod Widdowson [Sun, 20 Oct 2013 18:29:35 +0000]
Windows: EOF for Synchronous Deferred Writes on XP/2003

The Windows IO Manager is not supposed to issue multiple
outstanding cached writes to a file system for a synchronous
file object.  To do so would risk out of order application
of writes that extend the end of file and in turn risk data
corruption.  It turns out that on Server 2003 SP2 and more
than likely XP and 2000 as well, if a file system returns
STATUS_PENDING because a write was deferred due to the
Windows Cache Manager failing CcCanIWrite(), the IO Manager
will happily continue issue subsequent write requests.

On OSes older than Vista disable the use of deferred writes
and sit in a spin loop waiting for the Windows cache manager
to make room.  This is much less efficient and increases the
write latency but it is safe.

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

Change-Id: I1c50a281f0287e159b34845c9bcc214c8bfe20ef
Reviewed-on: http://gerrit.openafs.org/10366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Store OS version as a global
Jeffrey Altman [Mon, 21 Oct 2013 15:26:16 +0000]
Windows: Store OS version as a global

In DriverEntry() RtlGetVersion() is used to obtain the OS version
information.  Store the result in a global structure that can be
used elsewhere to make run time decisions based upon the OS.

Reviewed-on: http://gerrit.openafs.org/10350
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit e1f75c1401c5391a123daa2f59af7544a3418195)

Change-Id: Iac9a2c88f9d6afc662d2ecee1a59634412050846
Reviewed-on: http://gerrit.openafs.org/10365
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Version 1.7.27 (1.7.2700) openafs-devel-1_7_27
Jeffrey Altman [Sat, 28 Sep 2013 02:52:11 +0000]
Windows: Version 1.7.27 (1.7.2700)

Change-Id: Idb0254d9e015d2971905b3d133df0352e51ddc30
Reviewed-on: http://gerrit.openafs.org/10306
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: 1.7.2700 ChangeLog
Jeffrey Altman [Sat, 28 Sep 2013 02:51:24 +0000]
Windows: 1.7.2700 ChangeLog

Change-Id: Ie636ca155992bb53d8a7ad7482dd869713f8b72f
Reviewed-on: http://gerrit.openafs.org/10305
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: fix libafscp build directory
Jeffrey Altman [Wed, 11 Sep 2013 14:44:37 +0000]
Windows: fix libafscp build directory

NTMakefile specifed the directory as libacl not libafscp

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

Change-Id: Id04b2016223dff32d45d31ea34ffeba3bfd9ea30
Reviewed-on: http://gerrit.openafs.org/10304
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Freelance Do not chase mount points
Jeffrey Altman [Wed, 4 Sep 2013 19:53:57 +0000]
Windows: Freelance Do not chase mount points

When adding mount points or symlinks do not chase mount points
when attempting to determine the FID of the added object.

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

Change-Id: Ib2ed5491765bb75cc735ec894a306ac952db2993
Reviewed-on: http://gerrit.openafs.org/10303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: cm_MergeStatus avoid lock recursion
Jeffrey Altman [Fri, 27 Sep 2013 22:02:52 +0000]
Windows: cm_MergeStatus avoid lock recursion

It is possible for cm_MergeStatus() to be called while the
cm_buf_t.mx is already held.  If it is a panic occurs.  Test for
refcount == 0 before acquiring the lock in addition to afterwards.
If the refcount is not zero, then we do not need to acquire the
lock in any case.

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

Change-Id: I9414011f50f65ea3fd92b4c7b521e128d886a6db
Reviewed-on: http://gerrit.openafs.org/10302
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: AFSCreate avoid race leading to NULL dereference
Jeffrey Altman [Wed, 4 Sep 2013 17:11:24 +0000]
Windows: AFSCreate avoid race leading to NULL dereference

If a test for NULL is performed ahead of an assignment and then
use of the assigned value, there is a race which can result in
the assigned value being NULL if the value being assigned is
altered by another thread.

Perform the assignment first then test based upon that.

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

Change-Id: I192f0391be063fc41f6aac51a0f2f7b4dab3f66a
Reviewed-on: http://gerrit.openafs.org/10301
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: KFW_AFS_get_cred fail on error
Jeffrey Altman [Tue, 3 Sep 2013 19:35:33 +0000]
Windows: KFW_AFS_get_cred fail on error

If KFW_AFS_klog() fails and there is no password set, then goto
cleanup.

Change-Id: Iba3980c699b9a9b3de078d9187de40114bc33daf
Reviewed-on: http://gerrit.openafs.org/10224
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Do not leak activeRPC count
Jeffrey Altman [Tue, 3 Sep 2013 12:42:50 +0000]
Windows: Do not leak activeRPC count

If a callback race has been lost cm_MergeStatus is not executed.
In that case either the activeRPC count should not be incremented
or must be decremented to indicate that the current call has been
completed.

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

Change-Id: Ic3aeb797fa745cb65974890caa6a2615ec776d51
Reviewed-on: http://gerrit.openafs.org/10223
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Adjust setting of VERIFY_DATA flag
Jeffrey Altman [Mon, 2 Sep 2013 18:38:41 +0000]
Windows: Adjust setting of VERIFY_DATA flag

If the CcPurge operation fails or cannot be performed, in addition
to setting the purge on close flag, set the verify data flag.  This
ensures that the next attempt to access the file will retry the
purge.

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

Change-Id: Iccaa3ae61700ae943c9267788ba0595d981a6f11
Reviewed-on: http://gerrit.openafs.org/10222
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Add trace to track setting VERIFY flag
Jeffrey Altman [Mon, 2 Sep 2013 18:34:32 +0000]
Windows: Add trace to track setting VERIFY flag

Add trace statements at each location the VERIFY flag is set or
cleared.

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

Change-Id: Id1ebf51173857f671e855465b9bd345cf7b8c6ca
Reviewed-on: http://gerrit.openafs.org/10221
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Skip Extent operations if Direct IO
Jeffrey Altman [Mon, 2 Sep 2013 18:31:38 +0000]
Windows: Skip Extent operations if Direct IO

If the redirector is using Direct IO servicing there are no extents
in use.  Skip the AFSFlushExtents, AFSTearDownExtents, and related
calls unless extent processing is in use.  This will reduce lock
contention and reduce cpu processing.

Reviewed-on: http://gerrit.openafs.org/10215
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 6de822d647c2d2707f4f0af149579101dd0071f8)

Change-Id: I68c3ac0ae6230efb8b7439c55c0415856105739a
Reviewed-on: http://gerrit.openafs.org/10220
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Hold Fcb Resource across CcPurgeSection
Jeffrey Altman [Mon, 26 Aug 2013 00:07:44 +0000]
Windows: Hold Fcb Resource across CcPurgeSection

Now that the Fcb Resource and SectionObjectResource are held in
the FastIo pathway and the Trend Micro deadlock has been addressed
by holding a reference on the FileObject it is time to fix the
lock acquisition ordering.   For each CcPurgeSection call the
Fcb Resource will be held exclusive before the SectionObjectResource.

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

Change-Id: I263daaad723206c34f4ac72d47a902a94cc7b218
Reviewed-on: http://gerrit.openafs.org/10212
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Strip out unused ModWriter Fastio code
Rod Widdowson [Sun, 25 Aug 2013 20:20:28 +0000]
Windows: Strip out unused ModWriter Fastio code

The code is no longer used (the fcb->PagingIO resource is taken for
us by the modwriter) so we strip it out to save other making changes
and then remembering/discovering that this code isn't being used.

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

Change-Id: I81c872810aecb3f123473e9d4a48f47727b0beb1
Reviewed-on: http://gerrit.openafs.org/10211
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Take FCB resource in presection create.
Rod Widdowson [Sun, 25 Aug 2013 19:25:55 +0000]
Windows: Take FCB resource in presection create.

Fix a lock inversion in the paging query file information path (called
from within section create).

The query file takes the FCB resource, but that is a lower rank
lock than the SOP resource which is taken in AcquireFileForNtCreateSection,

We fix the inversion by grabbing the FCB resource in
AcquireFileForNtCreateSection.

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

Change-Id: I4d88b537bc388f34c6d1e228635f4e3188aae52b
Reviewed-on: http://gerrit.openafs.org/10210
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Pin the Cc FileObject during section create.
Rod Widdowson [Sun, 25 Aug 2013 16:16:39 +0000]
Windows: Pin the Cc FileObject during section create.

This means that if we purge the data cache while the section is being
created then the MJ_CLOSE will not happen until we unpin the FO.

Thus we can drop any embarsssing locks prior to the close and
meddling antivirus products can do odd stuff in the close path.

Note that there may not be a file object, but in that case there
will be no close on the purge since any CcInitialize operations
will wait on us dropping the SOP lock exe - hence the SOP cannot
be set up.

Also note that this only applies to the data section,
but we do not purge the image section.

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

Change-Id: I13edb7e33cd441f8c75f3c816dde11dc8ec36ce0
Reviewed-on: http://gerrit.openafs.org/10209
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: AFSPerformObjectInvalidate FILE processing
Jeffrey Altman [Mon, 26 Aug 2013 00:02:51 +0000]
Windows: AFSPerformObjectInvalidate FILE processing

Refactor AFSPerformObjectInvalidate so that all of the non-DIRECT_IO
processing variables are in the Extents processing section.  Remove
all references to Extents processing from the DIRECT_IO block.

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

Change-Id: I570e18e19dfd14e8ed244e2ef71c343d817ed72c
Reviewed-on: http://gerrit.openafs.org/10208
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: AFSVerifyEntry get rid of bPurgeExtents
Jeffrey Altman [Sun, 25 Aug 2013 23:54:52 +0000]
Windows: AFSVerifyEntry get rid of bPurgeExtents

The logic in AFSVerifyEntry is such that bPurgeExtents is always
set to true so simplify the code by removing it.

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

Change-Id: Ibc016eaf8cba65e27ede706c30b42e6301220b2e
Reviewed-on: http://gerrit.openafs.org/10207
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Fix trace messages in AFSSetEndOfFileInfo
Jeffrey Altman [Sun, 25 Aug 2013 00:20:54 +0000]
Windows: Fix trace messages in AFSSetEndOfFileInfo

The wrong function name was specified.

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

Change-Id: I8f464993b69f8dcf3a7b7fb239f318972e439312
Reviewed-on: http://gerrit.openafs.org/10206
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: AFSWrite comments
Jeffrey Altman [Fri, 23 Aug 2013 19:02:44 +0000]
Windows: AFSWrite comments

Add various comments regarding lock requirements

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

Change-Id: Ieaa7ee26ffa2e03881ffdc5aca1c193b670488af
Reviewed-on: http://gerrit.openafs.org/10205
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Missing try..except in AFSCachedWrite
Jeffrey Altman [Fri, 23 Aug 2013 19:00:17 +0000]
Windows: Missing try..except in AFSCachedWrite

Wrap another cache manager call with try..except

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

Change-Id: I2803068e9381827d6804c2a85d17234c408c91d0
Reviewed-on: http://gerrit.openafs.org/10204
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Refactor AFSVerifyEntry AFSValidateEntry
Jeffrey Altman [Thu, 22 Aug 2013 21:50:39 +0000]
Windows: Refactor AFSVerifyEntry AFSValidateEntry

Inside a big switch statement it is hard to follow when there
are multiple 'break' exits within a 'case'.   Reorganize the code
so that there is only a single exit for the FILE type.  Unnecessary
blocks are removed as well.

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

Change-Id: I30742bab1d6a71bfc4a2259a19cb61123e452ad6
Reviewed-on: http://gerrit.openafs.org/10203
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: introduce Section Object Resource Trace Subsystem
Jeffrey Altman [Thu, 22 Aug 2013 21:46:19 +0000]
Windows: introduce Section Object Resource Trace Subsystem

Section Object Resource acquires and releases are lost in the
noise of all of the rest of the locks.  Introduce a dedicated
subsystem just for Section Objects.

Add missing entries at the same time.

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

Change-Id: Iacfa2f0922265faa736980a9d1b3fdfe69c1f51e
Reviewed-on: http://gerrit.openafs.org/10202
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: afsredirlib afscommonwrite trace msg error
Jeffrey Altman [Thu, 22 Aug 2013 21:43:20 +0000]
Windows: afsredirlib afscommonwrite trace msg error

Specify the correct function name in the trace msg.

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

Change-Id: I849b58447f386c7f1ff84f1de54a70c38912225b
Reviewed-on: http://gerrit.openafs.org/10201
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Call AFSExeceptionFilter for all exceptions
Jeffrey Altman [Wed, 21 Aug 2013 16:27:35 +0000]
Windows: Call AFSExeceptionFilter for all exceptions

In many cases we capture exceptions record and the Exception Code
as ntStatus and move on with life.   This patchset changes that.
All exceptions are passed to AFSExceptionFilter so we do not miss
anything.

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

Change-Id: I62db65d8dc27c0f8e13f390bf281b644cfb7b083
Reviewed-on: http://gerrit.openafs.org/10200
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Delay MP Target evaluation until required
Jeffrey Altman [Sat, 17 Aug 2013 16:51:06 +0000]
Windows: Delay MP Target evaluation until required

Do not evaluate the Target FID of a mount point until such time
as the target directory must be accessed.

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

Change-Id: I51f4c08d1bcec49fc710d83e2c44e78653e607b7
Reviewed-on: http://gerrit.openafs.org/10164
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: modify PopulateCurrentEntry follow mp rules
Jeffrey Altman [Sat, 17 Aug 2013 15:35:39 +0000]
Windows: modify PopulateCurrentEntry follow mp rules

It is always safe to read the mount point target data, it is not
always safe to evaluate the volume id since the VLDB might not be
reachable.

For directory enumerations do not evaluate the target Fid.  Only
do so for eval by name and by id requests.

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

Change-Id: Ifa80adce31b003f015ae4d9f4d1333109f93ee0f
Reviewed-on: http://gerrit.openafs.org/10163
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: update GetFileVersionInformation fail msg
Jeffrey Altman [Sat, 17 Aug 2013 15:33:45 +0000]
Windows: update GetFileVersionInformation fail msg

Include the module name in the error message if GetFileVersionInformation
fails.  Its failure means the module has no file version resource data.

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

Change-Id: I9ab1145825b37bf20ab0cb7c8d21d60abeb9586b
Reviewed-on: http://gerrit.openafs.org/10162
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Cap Cache Size on X86
Jeffrey Altman [Sat, 17 Aug 2013 14:18:53 +0000]
Windows: Cap Cache Size on X86

Since we know the cache size cannot be arbitrary size because it
must fit into contiguous process memory and because it is difficult
to compute the actual size limit, cap the size to 716800KB.

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

Change-Id: I4d58dc00bb42929d0695eb84fd00814d6e8bc30e
Reviewed-on: http://gerrit.openafs.org/10161
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: do not return STATUS_RETRY for rx timeouts
Jeffrey Altman [Sat, 17 Aug 2013 04:08:30 +0000]
Windows: do not return STATUS_RETRY for rx timeouts

Report the RPC server unavailable instead.

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

Change-Id: I6d4a876a6ffd08178d76f86fcbe3dd441dc54648
Reviewed-on: http://gerrit.openafs.org/10160
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: np AddConnection error code
Jeffrey Altman [Sat, 10 Aug 2013 04:44:08 +0000]
Windows: np AddConnection error code

If AddConnection fails because DeviceIOcontrol fails, do not
return out of memory which is an unsupported error code.  Report
a network failure.

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

Change-Id: Ifadd9da11daac24b9bc61ce2cd2f6742388443a6
Reviewed-on: http://gerrit.openafs.org/10159
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Do not recycle deleted scache on refcnt 0
Jeffrey Altman [Fri, 16 Aug 2013 19:36:32 +0000]
Windows: Do not recycle deleted scache on refcnt 0

If the scache object with CM_SCACHEFLAG_DELETED set is recycled
then the deleted state is lost and the cache manager cannot prevent
unnecessary FetchStatus queries to the file server.

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

Change-Id: Ib90441f50322062e5567ee3e5fcc9074c1630c4e
Reviewed-on: http://gerrit.openafs.org/10158
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Do not remove scp from hash table on deletion
Jeffrey Altman [Fri, 16 Aug 2013 16:01:55 +0000]
Windows: Do not remove scp from hash table on deletion

If the CM_SCACHEFLAG_DELETED flag is going to have any benefit, the
cm_scache object must not be removed from the hash table in response
to a VNOVNODE error.  Otherwise, a new cm_scache object is allocated,
the CM_SCACHEFLAG_DELETED is not found, and a new callback request
is issued to the file server which in response returns VNOVNODE.

Do this enough times and the abort threshold is triggered and then
the application becomes very unhappy with performance.

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

Change-Id: I6357286c93fe1b6b8efc2e1a1a83c3d46c90a716
Reviewed-on: http://gerrit.openafs.org/10157
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: CM_SCACHEFLAG_DELETED use InterlockedOr
Jeffrey Altman [Fri, 16 Aug 2013 16:01:02 +0000]
Windows: CM_SCACHEFLAG_DELETED use InterlockedOr

When setting CM_SCACHEFLAG_DELETED use InterlockedOr.

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

Change-Id: I67469959153c682bd00d6e49383b76fed75561a6
Reviewed-on: http://gerrit.openafs.org/10156
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: buf_CleanLocked no callback for deleted file
Jeffrey Altman [Fri, 16 Aug 2013 15:58:18 +0000]
Windows: buf_CleanLocked no callback for deleted file

If the cm_scache flags indicate the object is CM_SCACHEFLAG_DELETED,
do not request a callback.  Simply invalidate the data in the buffer
and move on.

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

Change-Id: Ib4f281aa4db72f5d5f459dbad975394ff21dc881
Reviewed-on: http://gerrit.openafs.org/10155
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agorxkad: remove warnings from der-protos.h
Jeffrey Altman [Tue, 9 Jul 2013 21:50:26 +0000]
rxkad: remove warnings from der-protos.h

der-protos.h was generated from Heimdal headers which in turn were
auto-generated.  The included a large number of function prototypes
of the form

  ret-type func(parm-list, type */* comment */);

where the combination of */* is ambiguous.  Does it mean an end comment
followed by a pointer declaration or a pointer declaration followed by
a begin comment.  This combination generates warnings on Windows.  The
bug was fixed in Heimdal's code generator.  Fixing it here by editing
the code.

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

Change-Id: Ie66a5c70b0144173d70433adfbe3ed453672af81
Reviewed-on: http://gerrit.openafs.org/10102
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: fix cm_ServerFindByUUID
Jeffrey Altman [Wed, 17 Jul 2013 00:22:59 +0000]
Windows: fix cm_ServerFindByUUID

opr_uuid_equal() returns non-zero if equal.

Reviewed-on: http://gerrit.openafs.org/10090
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 1630ada4630a90aae64a63025f8e16dad1500490)

Change-Id: If1e3faa8970cc3d6ef76ed21d948b0ab964a9312
Reviewed-on: http://gerrit.openafs.org/10108
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: fix cm_ServerEqual bug
Jeffrey Altman [Sun, 14 Jul 2013 01:29:19 +0000]
Windows: fix cm_ServerEqual bug

must check svr2 not svr1 in the second uuid check.

Reviewed-on: http://gerrit.openafs.org/10086
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit b5df669801b8406dacd5d16b25d4f01a14a473f1)

Change-Id: Ic94559c0d50860f74b7bdf0de77ca347f4a4d9e1
Reviewed-on: http://gerrit.openafs.org/10103
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years ago1.7.26 (1.7.2600) version update openafs-devel-1_7_26
Jeffrey Altman [Tue, 23 Jul 2013 15:32:03 +0000]
1.7.26 (1.7.2600) version update

Change-Id: Ic234246c28afeb4816146b26108eb51afaa1faad

10 years agoWindows: 1.7.26 Change Log
Jeffrey Altman [Tue, 23 Jul 2013 15:20:48 +0000]
Windows: 1.7.26 Change Log

Change-Id: I4adc3d16a515bc776d3db45a4e2766af37ecfa88

10 years agoUpdate the asetkey man page for rxkad-k5
Ben Kaduk [Fri, 12 Jul 2013 16:43:57 +0000]
Update the asetkey man page for rxkad-k5

Also add the usage for the six-argument form while here.

Update some generic text to account for the existence of rxkad-k5,
and mention that the Update Server is not the only thing which can copy
around KeyFiles.  Give an example of the seven-argument form's usage for
rxkad-k5.

(cherry picked from commit 2a9a98f40514e36fd3a3a4b559de5c92d552dc8a)

Change-Id: I3156a4f27c4aa7a7db546dbd3d012eb7c39e37c5

10 years agoUse the string form of key types in asetkey
Ben Kaduk [Fri, 12 Jul 2013 16:53:46 +0000]
Use the string form of key types in asetkey

Check for rxkad-k5 keys in the six-argument form and warn they are
unsupported.  Do sanity-checking on the type.

(cherry-picked from fe73ac62fbda1d4e563ef03114813f148c7d321e)

Change-Id: I59fc1702dc1b201340dc033adeb8aa57251feee6

10 years agoDerive DES/fcrypt session key from other key types
Chaskiel Grundman [Mon, 18 Mar 2013 01:58:47 +0000]
Derive DES/fcrypt session key from other key types

If a kerberos 5 ticket has a session key with a non-DES enctype,
use the NIST SP800-108 KDF in counter mode with HMAC_MD5 as the PRF to
construct a DES key to be used by rxkad.

To satisfy the requirements of the KDF, DES3 keys are first compressed into a
168 bit form by reversing the RFC3961 random-to-key algorithm

Windows has three additional places to get tokens, who knew?

(cherry-picked from 7e4e06b87a09197816b0e1ae132e38dc30090574)

Change-Id: I4dc8e83a641f9892b31c109fb9025251de3dcb27

10 years agoKrb5 ticket support for server-to-server and localauth
Chaskiel Grundman [Sun, 28 Apr 2013 18:27:47 +0000]
Krb5 ticket support for server-to-server and localauth

Create a tkt_MakeTicket5 that creates a native krb5 rxkad token with
a service key supported by the rfc3961 library (session keys must be
provided as DES)

Update GenericAuth to search for rxkad_krb5 keys and call tkt_MakeTicket5
if it finds any.

(cherry-picked from 7ac5dddbfd439e5276ae5bea00ea22cd1b5897d3)

Change-Id: Ia9543fdcffcbf3ca899a003908662ff3daa8ee07

10 years agoAsetkey now handles afsconf_rxkad_krb5 keys too
Chaskiel Grundman [Thu, 11 Apr 2013 04:12:36 +0000]
Asetkey now handles afsconf_rxkad_krb5 keys too

afsconf_rxkad_krb5 keys can hold any kerberos enctype, not just des.
Allow asetkey to copy them into KeyFileExt and print them, too.

(cherry-picked from 538354d4749ffc0e7cc7e9552338b8f75ed01438)

Change-Id: I11a7dc7770da58c8381accd7fa2164cdfcea43ae

10 years agoUse rfc3961 library to decrypt kerberos 5 tickets
Chaskiel Grundman [Sat, 6 Apr 2013 17:42:23 +0000]
Use rfc3961 library to decrypt kerberos 5 tickets

Decrypt tickets with non-des enctypes by calling out to the rfc3961 library.
This requires the security object to be given an enhanced get_key callback
that supports looking up keys by enctype.
Include a wrapper around afsconf_GetKeyByTypes so rxkad doesn't have
to know anything about libauth internals/interfaces

(cherry-picked from ea4812f03d498b6a838440fa3349e085fa5ea8b5)

Change-Id: Id2b085fb41e2ed3576ec66b2914c03e78c0077ec

10 years agoUpdate the WiX installer to know about afsrfc3961.dll
Ben Kaduk [Wed, 29 May 2013 02:07:06 +0000]
Update the WiX installer to know about afsrfc3961.dll

(cherry-picked from 94635f727155830b636026441d6d9122803b2e39)

Change-Id: I73389ca6fc9b14be3102bdafe1fc26b85a340f10

10 years agolibafsrpc: link afsrpc.dll to afsrfc3961.lib
Chaskiel Grundman [Tue, 9 Jul 2013 23:02:00 +0000]
libafsrpc: link afsrpc.dll to afsrfc3961.lib

(cherry-picked from 292196ad944611796370ab1648650be147841194)

Change-Id: I5bf48ed29522c0cbdc43dda63487012f14d39bbf

10 years agoAllow some rfc3961 functionality to be disabled
Chaskiel Grundman [Tue, 9 Jul 2013 21:46:46 +0000]
Allow some rfc3961 functionality to be disabled

It conflicts with v5gen in rxkad/ticket5.c

Also add include guards, which were missed previously.

(cherry-picked from 0777382e8e2cc9b428034e0b55b91931b7d9c104)

Change-Id: I6390150d51f385a544bda75719d4202ee101ed8d

10 years agohcrypto: Add exports for more crypto algorithms
Simon Wilkinson [Tue, 9 Jul 2013 22:08:10 +0000]
hcrypto: Add exports for more crypto algorithms

Export some additional algorithms so we can make use
of them elsewhere in the code.

(cherry-picked from 08474dd0b51cfe26dfe2b5c661a2e9a4ca24267e)

Change-Id: Ie2dbbb5413ae4e190543fa0fea7dff1ccec4ae60

10 years agoWindows: build UNIX asetkey
Jeffrey Altman [Tue, 9 Jul 2013 13:55:51 +0000]
Windows: build UNIX asetkey

With roken and friends it is now possible to build the UNIX
asetkey on Windows.  Do so to reduce duplicate code.

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

Change-Id: I3b6cb6cb50e32391d8b84bc6336cb46ac4cbeba3
Reviewed-on: http://gerrit.openafs.org/10079
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agowindows: afsauthent.dll export afsconf_ functions
Jeffrey Altman [Tue, 9 Jul 2013 13:54:42 +0000]
windows: afsauthent.dll export afsconf_ functions

Export additional afsconf_ functions required for asetkey

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

Change-Id: If28da8d836401e21df0b2f00f08b9240af2d417c
Reviewed-on: http://gerrit.openafs.org/10078
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: afsrpc.dll export afs_set_com_err_hook
Jeffrey Altman [Tue, 9 Jul 2013 13:54:09 +0000]
Windows: afsrpc.dll export afs_set_com_err_hook

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

Change-Id: Ieea705f1c8ae333a7040b42af04ead59b69fecea
Reviewed-on: http://gerrit.openafs.org/10077
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: HAVE_TIMEGM provided by roken
Jeffrey Altman [Tue, 9 Jul 2013 13:53:25 +0000]
Windows: HAVE_TIMEGM provided by roken

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

Change-Id: I276b583c65516e9cae0c6cce3f8c502755e018ad
Reviewed-on: http://gerrit.openafs.org/10076
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoUpdate windows build documentation
Ben Kaduk [Wed, 26 Jun 2013 22:57:01 +0000]
Update windows build documentation

Mention Win7 in a few more places, and talk about VS 2010/2012.
I've had the best results with VS 2005, though.

Update dead URLs.

The old version of WiX 2.0 no longer seems available (at least not from
the listed URL); replace it with

Remove coverage of NSIS installers.

Update example OpenAFS version to 1.7.25.

De-emphasize VS 2003.

Update some ntbuild.bat settings and comments to be more useful and valid.

Reviewed-on: http://gerrit.openafs.org/10029
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 15b5353759984bf0942dff9c3df2959f0a59b405)

Change-Id: I0a7dabad364a298cc1905709b3cffadbb5af99a3
Reviewed-on: http://gerrit.openafs.org/10066
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoBuild 3961 library in userspace, and add enctypes
Chaskiel Grundman [Sat, 6 Apr 2013 00:12:12 +0000]
Build 3961 library in userspace, and add enctypes

Build the 3961 library in userspace, with support for the common
kerberos enctypes des3-hmac-sha1, arcfour-hmac-md5, and aesXXX-cts-hmac-sha1-96.
Export new symbols as well, and suppress deprecated warnings.

Rename all symbols, both exported and not, with an oafs_h_ prefix
so as to reduce the chance of conflicts.

Rename heim_octet_string to avoid confusion about where things are coming
from.

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

Change-Id: Ic479f9c37f79ed8bde3e59e5acd65518773e811b
Reviewed-on: http://gerrit.openafs.org/10065
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agohcrypto: export weak key routine
Ben Kaduk [Mon, 8 Jul 2013 15:56:26 +0000]
hcrypto: export weak key routine

We only export it on Windows, but the DES3 routines in the rfc3961
library need it everywhere.

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

Change-Id: I55503c7074e13abff3633b79910dbe19f2911ffc
Reviewed-on: http://gerrit.openafs.org/10064
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoExport RAND_bytes from hcrypto on Windows
Ben Kaduk [Mon, 8 Jul 2013 15:39:52 +0000]
Export RAND_bytes from hcrypto on Windows

Unix already did so, and we need it for the rfc3961 library.

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

Change-Id: Iaa5fbe9bcd969ea235537341b7ec98d4b661d61a
Reviewed-on: http://gerrit.openafs.org/10063
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoDisable some heimdal bits
Ben Kaduk [Tue, 2 Jul 2013 15:13:25 +0000]
Disable some heimdal bits

For the rfc3961 library, we don't want linker exposure to an
entropy-gathering daemon, and we don't want to be leaving entropy
seed files around in user homedirs.

Reviewed-on: http://gerrit.openafs.org/10049
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit ef860802add62076ca6097808458706d3db8d0da)

Change-Id: I0404b4871f86b324782bd8f42f38ae5fb125252e
Reviewed-on: http://gerrit.openafs.org/10062
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoAdd krb5_free_context stub to rfc3961
Chaskiel Grundman [Sun, 28 Apr 2013 13:31:12 +0000]
Add krb5_free_context stub to rfc3961

Reviewed-on: http://gerrit.openafs.org/10048
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit f388f0a85a53a42c3e8f4075d4228b64d0fc558c)

Change-Id: Id1fd9ad4b226c90dddee779b1d31be353e49ec9e
Reviewed-on: http://gerrit.openafs.org/10061
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agohcrypto: Add exports for more crypto algorithms
Simon Wilkinson [Fri, 12 Apr 2013 13:57:44 +0000]
hcrypto: Add exports for more crypto algorithms

Export some additional algorithms so we can make use
of them elsewhere in the code.

Reviewed-on: http://gerrit.openafs.org/10047
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 09912a3fcc9ae5f0995fb47aedc3b7279b663ad2)

Change-Id: I958101034a3880d01b05eef21834cfcb2ab071fe
Reviewed-on: http://gerrit.openafs.org/10060
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoUse rk_mkdir from libafsroken
Ben Kaduk [Fri, 5 Jul 2013 18:06:33 +0000]
Use rk_mkdir from libafsroken

The latest import added it; add it to the build and export list.

Reviewed-on: http://gerrit.openafs.org/10046
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit a25434430815ebf020407fdfaedd46db94475412)

Change-Id: Ia1c680ec8a7f8be09a2d231e2501469362f4371d
Reviewed-on: http://gerrit.openafs.org/10059
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoroken: export rk_vasprintf
Jeffrey Altman [Wed, 15 May 2013 19:37:39 +0000]
roken: export rk_vasprintf

missing on windows

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

Change-Id: I8bfebf7bd998099b307bb824f4b9d9c8f7dd2e86
Reviewed-on: http://gerrit.openafs.org/10058
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoUse rk_rename from roken
Simon Wilkinson [Sat, 19 May 2012 19:36:12 +0000]
Use rk_rename from roken

Rather than using our own renamefile() implementation on Windows,
pull in rk_rename() from libroken wherever a rename which unlinks
the destination file is required.

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

Change-Id: I861f2ddf026249b918a5273d10eda2da0b6447a5
Reviewed-on: http://gerrit.openafs.org/10057
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoImport of code from heimdal
Heimdal Developers [Fri, 5 Jul 2013 20:39:34 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
5dfaa0d10b8320293e85387778adcdd043dfc1fe (git2svn-syncpoint-master-311-g5dfaa0d)

Upstream changes are:

Ben Kaduk (1):
      Be friendly to krb5_generate_random_block consumers

Jeffrey Altman (6):
      roken: include limits.h unconditionally
      Avoid unused variable warning on Windows
      roken: include direct.h if HAVE_DIRECT_H
      roken: Define S_IRWXU and friends on Windows
      roken: Add rk_mkdir()
      libkrb5: Add missing KRB5_LIB_FUNCTION/KRB5_LIB_CALL

New files are:
krb5/crypto-algs.c
krb5/crypto-arcfour.c
krb5/crypto-des-common.c
krb5/crypto-des.c
krb5/crypto-des3.c
krb5/crypto-null.c
krb5/crypto-rand.c
roken/mkdir.c

Reviewed-on: http://gerrit.openafs.org/10045
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 6c6e01a87fd58d09c1b8f6022e43b6d2bb9f4f73)

Change-Id: I16b28382f5979e2f595686f28c4db05e97eb81f5
Reviewed-on: http://gerrit.openafs.org/10056
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoAdd additional files to import from Heimdal
Simon Wilkinson [Fri, 12 Apr 2013 12:02:40 +0000]
Add additional files to import from Heimdal

Import more RFC3961 crypto definitions from Heimdal, so we can
support a wider variety of encryption algorithms

Also pick up the new mkdir, otherwise we get linker errors.

Reviewed-on: http://gerrit.openafs.org/10044
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 50fa08813b0fa68135e292fa76ce50ee75142884)

Change-Id: I73b85e75f608a0987936a3af432444d0b3fe332d
Reviewed-on: http://gerrit.openafs.org/10055
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: validate pointer consistency
Jeffrey Altman [Sat, 29 Jun 2013 04:26:52 +0000]
Windows: validate pointer consistency

When cm_ValidateCache() is executed validate pointers to ensure
that they are in the valid range for the class of pointer.

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

Change-Id: I4e78ef473f6cb9210ea912ec8a97d0eb05bd4e34
Reviewed-on: http://gerrit.openafs.org/10042
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Protect all Mm and Cc calls with try..except
Jeffrey Altman [Wed, 26 Jun 2013 15:00:00 +0000]
Windows: Protect all Mm and Cc calls with try..except

Wrap all Memory Manager and Cache Manager operations in a try..except
block to protect against leaking the SectionObjectResource if an exception
is thrown.  Failure to release the SectionObjectResource will result in
subsequent deadlocks.

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

Change-Id: I4123d6cf9a2cdde1c81adcb1dd160c593abe8f26
Reviewed-on: http://gerrit.openafs.org/10041
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agorx: Add rx_GetNetworkError
Andrew Deason [Tue, 13 Nov 2012 20:54:10 +0000]
rx: Add rx_GetNetworkError

Add the function rx_GetNetworkError to rx, to allow callers to
retrieve some information about the last ICMP error received for a
connection's peer. This can be useful if a call on that connection was
recently ended due to ICMP errors.

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

Change-Id: Icfb88e5ec6797d5dcec14e608d9b75e7983077fd
Reviewed-on: http://gerrit.openafs.org/10038
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Export a few more functions to afsauthent and afsrpc
Marc Dionne [Tue, 25 Sep 2012 00:47:00 +0000]
Windows: Export a few more functions to afsauthent and afsrpc

The following exports are added:

libafsauthent:
    afsconf_SetExtendedCellInfo
    afsconf_PickClientSecObj
    afsconf_SawCell
    ka_PrintBytes
    ka_KeyIsZero

libafsrpc;
    initialize_RXK_error_table

Those functions are referenced by the bos code.

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

Change-Id: Ibd4c63c1d8cbef77233d5d74bed057a48324368f
Reviewed-on: http://gerrit.openafs.org/10037
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>