openafs.git
11 years agoubik: Don't leak memory if mutex init fails
Simon Wilkinson [Tue, 19 Feb 2013 16:15:29 +0000]
ubik: Don't leak memory if mutex init fails

If we can't initialise the ubik_client mutex, don't leak the
structure when returning an error.

Caught by clang-analyzer

Change-Id: Ib36d2ddf585a31b628e56dce1f33ee859fc835bc
Reviewed-on: http://gerrit.openafs.org/9182
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoubik: Don't record result of select()
Simon Wilkinson [Tue, 19 Feb 2013 16:13:34 +0000]
ubik: Don't record result of select()

We never do anything with the return value from select(), so don't
bother storing it into code.

Caught by clang-analyzer

Change-Id: I6e0352b74f0e90b62ad32a3ef1a9d0173bf307ee
Reviewed-on: http://gerrit.openafs.org/9181
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agokauth: Don't ignore GetExtendedCellInfo failures
Simon Wilkinson [Fri, 22 Feb 2013 09:51:24 +0000]
kauth: Don't ignore GetExtendedCellInfo failures

Don't ignore a failure from afsconf_GetExtendedCellInfo, as it will
leave buffers that we later read uninitialised.

Caught by clang-analyzer

Change-Id: Ia0c2675a3083385d011fd340f36bf13373f89feb
Reviewed-on: http://gerrit.openafs.org/9180
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agokauth: Catch ka_KeyCheckSum failures
Simon Wilkinson [Fri, 22 Feb 2013 09:47:57 +0000]
kauth: Catch ka_KeyCheckSum failures

If ka_KeyCheckSum fails, typically because the key being used is bad,
catch the failure rather than just silently ignoring it.

Caught by clang-analyzer

Change-Id: Id51174fdf94356db10961690808670da372bc60e
Reviewed-on: http://gerrit.openafs.org/9179
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agokauth: Fix some unnecessary variable assignments
Simon Wilkinson [Tue, 19 Feb 2013 15:15:42 +0000]
kauth: Fix some unnecessary variable assignments

Remove various places where a variable is assigned to, and then the
result never read.

Caught by clang-analyzer

Change-Id: Id8b7aeb6c54b7c93093ad44df5a9fe01575f2fbe
Reviewed-on: http://gerrit.openafs.org/9172
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoUnix CM: Fix byte accounting for storebehind
Simon Wilkinson [Fri, 22 Feb 2013 16:54:17 +0000]
Unix CM: Fix byte accounting for storebehind

In the current version of CacheStoreDCaches, the stored variable is
maintained within the for loop that iterates over the chunk list. This
means that it is reset to 0 each time we handle a new chunk.

However, this means that our progress is no longer accurately tracked,
as (bytes - stored) no longer gives the number of bytes which remain to
be transfered. In fact, as stored is zeroed with each loop iteration,
(bytes - stored) == bytes. This means that store behind is no longer
activated according to the users settings.

Prior to commit 334114ac58b0039ae90d7e29fa2f019fe068bd79, the
stored variable was maintained within the outer, function, scope.
Just move it back there to restore the previous behaviour.

Caught by clang-analyzer

Change-Id: I248ed81f1331f4d3d4ed2e1206acebb0a8200762
Reviewed-on: http://gerrit.openafs.org/9237
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoUnix CM: Don't zero args on dcache failure
Simon Wilkinson [Thu, 21 Feb 2013 22:15:11 +0000]
Unix CM: Don't zero args on dcache failure

Even if allocating the dcache fails, there's no point zeroing the
parameters to the allocation function, as those changes aren't
visible outside of that function.

Caught by clang-analyzer

Change-Id: Ieb91b525e818b73e38b8d78a55d170d36273177c
Reviewed-on: http://gerrit.openafs.org/9234
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoUnix CM: Fix bogus character in license string
Simon Wilkinson [Thu, 21 Feb 2013 22:10:38 +0000]
Unix CM: Fix bogus character in license string

A stray $ had crept into the license string in afs_dcache.c. Fix it.

Change-Id: I1ab096aadb947cb08318a56b9ae21ed0786d3339
Reviewed-on: http://gerrit.openafs.org/9233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agobos: Don't set up the conenction twice in AddKey
Simon Wilkinson [Thu, 21 Feb 2013 21:29:56 +0000]
bos: Don't set up the conenction twice in AddKey

AddKey calls GetConn twice - once at the start of the function,
and then again immediately before calling BOZO_AddKey. This leaks
a connection...

Caught by clang-analyzer

Change-Id: I5c593de56e7f61fb21b973a34bea1a5b4f4a3177
Reviewed-on: http://gerrit.openafs.org/9230
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agobosserver: Don't check if daemon thread starts
Simon Wilkinson [Thu, 21 Feb 2013 21:24:33 +0000]
bosserver: Don't check if daemon thread starts

We don't do anything with the return code from the LWP_CreateProcess
that starts the daemon thread, so don't bother recording it at all.

Caught by clang-analyzer

Change-Id: I9310bdd90236a90d71dc202c73d7e06ea58a31f8
Reviewed-on: http://gerrit.openafs.org/9229
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agovlserver: Remove dead assignment
Simon Wilkinson [Thu, 21 Feb 2013 21:16:40 +0000]
vlserver: Remove dead assignment

Don't assign the serverNumber to j, when we're just about to try
and get it from a multi homed extent record

Caught by clang-analyzer.

Change-Id: I79349ff211b5df2d16e6ee9122dbb28b04ad7823
Reviewed-on: http://gerrit.openafs.org/9228
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agobosserver: Remove a couple of dead assignments
Simon Wilkinson [Thu, 21 Feb 2013 20:55:35 +0000]
bosserver: Remove a couple of dead assignments

Remove a couple of places where we initialise a variable, only to
assign a new value to it a few lines later.

Caught by clang-analyzer

Change-Id: I096b80cce851f3494475e6f9683715b081ff8375
Reviewed-on: http://gerrit.openafs.org/9208
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoafsio: Remove redundant assignment
Simon Wilkinson [Tue, 19 Feb 2013 17:12:54 +0000]
afsio: Remove redundant assignment

tbuf is assigned to during the initialisation phase of all of the
for loops that follow, so just remove this assignment

Caught by clang-analyzer

Change-Id: I3f2ffc8cee93768bd03e0abf3b391e1f6c45c70f
Reviewed-on: http://gerrit.openafs.org/9189
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoWindows: ReleaseNotes reformatting
Jeffrey Altman [Sun, 17 Feb 2013 01:22:27 +0000]
Windows: ReleaseNotes reformatting

Oxygen 14.2 automatically reformatted the text.

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

11 years agoWindows: Direct IO Support for Service
Jeffrey Altman [Sun, 16 Dec 2012 17:42:17 +0000]
Windows: Direct IO Support for Service

This patchset implements and enables by default the new
Direct IO pathway between the AFS redirector and the afsd_service.exe.
When Direct IO is enabled all reads and writes are performed by the
AFS redirector locking memory allocated by the kernel and mapping it into
the service's memory address space.

The service supports cache bypass in this mode when the
AFS_REQUEST_FLAG_CACHE_BYPASS flag is set in the request from the
redirector.  When cache bypass is active, the AFSCache file is ignored and
data is either directly fetched from or stored to the file server.  Cache
bypass is enabled by IIS and other applications that request no
intermediate buffering when opening file handles.   This is often done
because the application implements its own data caching.  All cache bypass
store operations are synchronous.

When cache bypass is not enabled, the memory region provided by the AFS
redirector is either used to populate the cm_buf_t objects or is populated
by them.  When cache bypass is not enabled, one outstanding store
operation can be in flight asynchronously to improve performance.

Direct IO is enabled by default and can be disabled by creating the
registry value.

  ..\Services\TransarcAFSDaemon\Parameters
  "DirectIO"  DWORD  0x0

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

11 years agoWindows: Direct IO for AFS Redirector
Peter Scott [Fri, 25 Jan 2013 05:46:37 +0000]
Windows: Direct IO for AFS Redirector

Implement a new IO processing model in which extents are not passed between
afsredirlib.sys and afsd_service.exe.  Instead the AFSCache file is
maintained exclusively by the service and the redirector locks kernel
memory, maps it into the service's address space, and permits the service
to manage all IO directly.

This interface adds an AFS Cache Bypass option to the AFS Redirector which
is activated when the file handle has been opened with the no intermediate
buffering option.

This patchset implements the kernel interface.  A subsequent
patchset will implement the service component.

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

Change-Id: I25a4764db060b3b3f2b0de4006479dd3a220c6eb
Reviewed-on: http://gerrit.openafs.org/9210
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Add flag BUF_GET_FLAG_BUFCREATE_LOCKED
Jeffrey Altman [Fri, 25 Jan 2013 07:21:27 +0000]
Windows: Add flag BUF_GET_FLAG_BUFCREATE_LOCKED

Modify the buf_Get() and buf_GetNewLocked() interfaces to
permit the cm_scache.bufCreateLocked lock to be held prior to
calling to buf_Get().  Holding the cm_scache.bufCreateLocked lock
before the buf_Get() call prevents a race with another thread
that attempts to set the file size.

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

11 years agoWindows: Set AFS_OBJECT_FLAGS_DIRECTORY_ENUMERATED
Jeffrey Altman [Sat, 16 Feb 2013 22:51:12 +0000]
Windows: Set AFS_OBJECT_FLAGS_DIRECTORY_ENUMERATED

Set the ObjectInformationCB AFS_OBJECT_FLAGS_DIRECTORY_ENUMERATED flag
from within the AFSEnumerateDirectory() function and not from its callers.

Change-Id: I2bddedba1165557679ddd9c637dbeb85cd74e1de
Reviewed-on: http://gerrit.openafs.org/9119
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Permit direct to service non-wildcard lookups
Peter Scott [Fri, 15 Feb 2013 13:44:06 +0000]
Windows: Permit direct to service non-wildcard lookups

The AFS redirector has required that directories be fully enumerated
when the directory object is opened.  This is a very expensive
operation involving large numbers of file server RPC round trips for
directories with tens of thousands of objects and those containing
symlinks.

This patchset delays directory enumeration for the last component
in a path until such time as dirctory data is requested by the
application.  If the request is for a non-wildcard pattern, the
service will be asked to provide the details for just the one required
object.

Delaying the directory enumeration improves performance for
GetFileAttributes[Ex], GetDiskFreeSpace[Ex], GetVolumeInformation,
and GetNamedSecurityInfo Win32 API calls.   In those cases it is
no longer necessary to enumerate the target directory at all.

Change-Id: I7ef2fbafff925697d8b40e56837ef53bfcc78542
Reviewed-on: http://gerrit.openafs.org/9118
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: EvalByName pass LastComponent flag
Jeffrey Altman [Tue, 19 Feb 2013 04:11:27 +0000]
Windows: EvalByName pass LastComponent flag

Add AFS_REQUEST_FLAG_LAST_COMPONENT flag for use with
AFS_REQUEST_TYPE_EVAL_TARGET_BY_NAME requests to the service.
When set the service will perform cm_Lookup calls without the
CM_FLAG_CHECKPATH flag set.

Change-Id: I47ec2fb8b1e2699f2d87a6625b1db549ecb4e03d
Reviewed-on: http://gerrit.openafs.org/9133
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: EvaluateByName support case-insensitive lookups
Jeffrey Altman [Tue, 19 Feb 2013 02:26:23 +0000]
Windows: EvaluateByName support case-insensitive lookups

Directory lookups in AFS should favor case-sensivite matches
but permit case-insensitive matches otherwise.  The service
should not follow mount points.  The redirector exposes mount
points as junctions.

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

11 years agoWindows: IO Subsystem Trace modifications
Jeffrey Altman [Mon, 18 Feb 2013 15:37:49 +0000]
Windows: IO Subsystem Trace modifications

Display file offsets consistently as %0I64X.

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

11 years agoWindows: Move work item queues over to the Control Device
Rod Widdowson [Tue, 19 Feb 2013 16:12:26 +0000]
Windows: Move work item queues over to the Control Device

Currently, when the library is unloaded it stops all worker
threands and then evaporates the work item queues.  Thus
any work items which are pending will disappear.

Whilst it is OK that the threads going away, any work items need to
remain queued so that when the library is restarted the work
can continue.  This checkin does this by moving the work item
queues and their synchronization primitives into the FS maintained
Control Device Object Extension.  The list of worker threads
remains in the Library Device Object Extension.

Change-Id: If5c7cd3bdfea1a368c8df69649e627bac3a9585f
Reviewed-on: http://gerrit.openafs.org/9139
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Initialize Irp->IoStatus.Information earlier
Jeffrey Altman [Mon, 18 Feb 2013 15:34:59 +0000]
Windows: Initialize Irp->IoStatus.Information earlier

Initialize Irp->IoStatus.Information to zero immediately upon
beginning processing of the IRP in the write path.

Change-Id: I8d5a717ae8cd3bc44c2a9a65b34fd0549862d293
Reviewed-on: http://gerrit.openafs.org/9128
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Call CcDeferWrite rather than loop
Rod Widdowson [Mon, 18 Feb 2013 15:33:29 +0000]
Windows: Call CcDeferWrite rather than loop

If we are about to write into the cache and we do not have enough
memory we call CcDeferWrite and return STATUS_PENDING.  This allows
the cache to call us back when there is memory.

The write is performed on the IO queue which is shared wth paging
writes.  However this does not cause paging writes to block in a
memory shortage situation since the request will either be deferred
again (releasing a thread to service a paging write) or will complete
quickly.  Further we allocate all our resources upfront so we fail
fast and in the appropriate place.

Change-Id: I4efbc14a97d3b34236643973f1f8f85c7ea194a6
Reviewed-on: http://gerrit.openafs.org/9127
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Allow the Library to pend a write request
Rod Widdowson [Fri, 15 Feb 2013 10:57:29 +0000]
Windows: Allow the Library to pend a write request

If the library pends a request pending memory becoming available
then the FS must ensure that the library stays loaded until the
IRP is completed.

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

11 years agoWindows: AFSWriteCommon collapse redundant condition
Rod Widdowson [Fri, 15 Feb 2013 11:48:08 +0000]
Windows: AFSWriteCommon collapse redundant condition

We never get non cached and yet paging IO.  Even if we did it would
be inappropriate to call CcCanIWrite.  Therefore, collapse two if
statements into one.

Change-Id: I95c9030836e4f7dc4f7867a8b8b09b97bf57b429
Reviewed-on: http://gerrit.openafs.org/9125
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoafsio: Ignore return values from afscp_SetDefault*
Simon Wilkinson [Tue, 19 Feb 2013 17:11:50 +0000]
afsio: Ignore return values from afscp_SetDefault*

We don't do anything with the return values from afscp_SetDefaultCell
or afscp_SetDefaultRealm, so just ignore them.

Caught by clang-analyzer

Change-Id: Ib7d9e637e5d08df28ad0085302811b243fb21768
Reviewed-on: http://gerrit.openafs.org/9188
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoafsio: Don't leak memory on GetVenusFidBy* failure
Simon Wilkinson [Tue, 19 Feb 2013 17:09:15 +0000]
afsio: Don't leak memory on GetVenusFidBy* failure

The GetVenusFid functions all allocate the fid structure immediately
upon entry to the function. When we return with an error, that structure
is never freed.

Update the call sites so that we don't leak this memory.

Caught by clang-analyzer

Change-Id: Iec62316d0fd542e70634f384c8319f90ba6b2649
Reviewed-on: http://gerrit.openafs.org/9187
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agolibafscp: Actually return callback from FindCallback
Simon Wilkinson [Tue, 19 Feb 2013 17:53:11 +0000]
libafscp: Actually return callback from FindCallback

Fix FindCallback so that it actually returns the callback that it
found. This requires changing the function prototype so that the
third parameter is passed by reference, and updating the single
call site.

Caught by clang-analyzer

Change-Id: I420647e9cfd119cf1a26456a91d595b8154ddd85
Reviewed-on: http://gerrit.openafs.org/9198
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agolibafscp: Move server lookup inside AFSCP_DEBUG
Simon Wilkinson [Tue, 19 Feb 2013 17:46:04 +0000]
libafscp: Move server lookup inside AFSCP_DEBUG

We only use the results of the server lookup when AFSCP_DEBUG
is defined, so only bother actually doing the lookup when that
is set.

Caught by clang-analyzer

Change-Id: If79177e9d06817592b0630db7050cf3d40f3ee5f
Reviewed-on: http://gerrit.openafs.org/9197
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agolibafscp: Don't free bogus ptr in ResolvPathFromVol
Simon Wilkinson [Tue, 19 Feb 2013 17:30:14 +0000]
libafscp: Don't free bogus ptr in ResolvPathFromVol

afscp_ResolvPathFromVol makes a copy of the path passed to it using
strdup. It then iterates across that, removing initial '/' characters.
However, this iteration means that 'p' no longer points to the start
of the allocated memory - when we free 'p', we may actually be freeing
an offset into the block, which will make malloc unhappy.

Make a copy of the result from strdup, and use that to free the block.

Caught by clang-analyzer

Change-Id: I0e7d8c7cf3b70baa4868c65fb4c3a32474557628
Reviewed-on: http://gerrit.openafs.org/9196
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agolibafscp: Fix leak when afscp_ResolvPath errors
Simon Wilkinson [Tue, 19 Feb 2013 17:28:12 +0000]
libafscp: Fix leak when afscp_ResolvPath errors

If afscp_DefaultCell fails, then afscp_ResolvPath returns without
freeing the memory allocated to 'p' by strdup.

Fix this by adding a free() in the appropriate place.

Caught by clang-analyzer

Change-Id: Ic2691d209c913cd600d9a9a1ebb4614dff35aa3b
Reviewed-on: http://gerrit.openafs.org/9195
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agoptserver: Don't ignore ubik_Write failures
Simon Wilkinson [Tue, 19 Feb 2013 15:43:29 +0000]
ptserver: Don't ignore ubik_Write failures

If we can't write to the ubik database, then that's a bad thing.
Don't ignore it.

Caught by clang-analyzer

Change-Id: I08b57a74405cc563c6141251fd3d433b2904ea0e
Reviewed-on: http://gerrit.openafs.org/9176
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoptserver: Tidy malloc handling in readpwd
Simon Wilkinson [Tue, 19 Feb 2013 15:46:52 +0000]
ptserver: Tidy malloc handling in readpwd

Tidy up the malloc handling in readpwd, so that we don't leak memory
if the user specifies multiple -c arguments. Also avoid assuming that
free(NULL) will always work.

Change-Id: I95f3fe908572cb5be2d30345ccae0a2858622bd5
Reviewed-on: http://gerrit.openafs.org/9178
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoptserver: Remove some unnecessary assignments
Simon Wilkinson [Tue, 19 Feb 2013 15:44:21 +0000]
ptserver: Remove some unnecessary assignments

Remove some assignments where we do nothing with the results

Caught by clang-analyzer

Change-Id: I6990a6b21ced10500275176af3f85b7f1cabd334
Reviewed-on: http://gerrit.openafs.org/9177
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agolibacl: Remove unnecessary assignment
Simon Wilkinson [Tue, 19 Feb 2013 15:27:58 +0000]
libacl: Remove unnecessary assignment

Don't assign i to j, when we never use j again in the function

Caught by clang-analyzer

Change-Id: I9dd2d929019ac3cc84cde4e44c4883806bd5964a
Reviewed-on: http://gerrit.openafs.org/9175
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agokauth: Don't store the old signal routine
Simon Wilkinson [Tue, 19 Feb 2013 15:23:25 +0000]
kauth: Don't store the old signal routine

If we're not going to make use of the return from signal() don't
bother assigning it to a variable

Change-Id: I03cae7ab91d49e90f150a9dc4358c173920adc28
Reviewed-on: http://gerrit.openafs.org/9173
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agokauth: Remove unused assignments to bp
Simon Wilkinson [Tue, 19 Feb 2013 15:11:33 +0000]
kauth: Remove unused assignments to bp

We never use the character pointer once we've advanced it past the
slash, so don't bother doing the work of advancing it.

Caught by clang-analyzer

Change-Id: I8ea561d6756685a13892f0635fa2e19b3f1233ab
Reviewed-on: http://gerrit.openafs.org/9171
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agokauth: Remove unused lclpw structure from klog
Simon Wilkinson [Tue, 19 Feb 2013 15:09:41 +0000]
kauth: Remove unused lclpw structure from klog

klog assigns into, but never references, the lclpw structure. Just
remove it.

Caught by clang-analyzer

Change-Id: I8e94f97ee3ee6cb15193ad80dd9aef39e6f8490b
Reviewed-on: http://gerrit.openafs.org/9170
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agovolser: Remove needless initialisation
Simon Wilkinson [Tue, 19 Feb 2013 14:59:10 +0000]
volser: Remove needless initialisation

Remove a number of places where we initialise a variable to NULL
immediately before we assign a real value to it.

Caught by clang-analyzer

Change-Id: I74ece8f3a82a5c768d769b74b4ccce12195fc216
Reviewed-on: http://gerrit.openafs.org/9169
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agovolser: Remove masked assignment in vol_split
Simon Wilkinson [Tue, 19 Feb 2013 14:51:30 +0000]
volser: Remove masked assignment in vol_split

The declaration (and assignment) to size at the outermost scope
in the copyVnodes function is masked by a later declaration at a
inner scope.

Just remove the outer declaration to clarify what's happening.

Caught by clang-analyzer

Change-Id: If23bdcf8a4c2d23d6224762fecce35be9cf15873
Reviewed-on: http://gerrit.openafs.org/9168
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agovos: aserver is private
Simon Wilkinson [Tue, 19 Feb 2013 14:44:14 +0000]
vos: aserver is private

The server specified on the command line is used directly to
initialise the attributes structure. Move the variable so it's
local to the block which uses it, and remove the function-wide
initialiser.

Caught by clang-analyzer

Change-Id: Ia636fae2ed505f6958cefbfbaa72ef7e37edec98
Reviewed-on: http://gerrit.openafs.org/9165
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoauth: Avoid double free in key parsing
Simon Wilkinson [Tue, 12 Feb 2013 12:59:08 +0000]
auth: Avoid double free in key parsing

There was an error path whilst reading an extended key file which could
result in a key being freed using free(key), and then freed again
through the afsconf_typedKey_put() mechanism. Remove this double free.

Caught by clang-analyzer

Change-Id: I40bff56eddf4cb499ae5b7effdaf82f22379109d
Reviewed-on: http://gerrit.openafs.org/9147
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoptserver: Use correct structure type in malloc
Simon Wilkinson [Tue, 12 Feb 2013 13:54:18 +0000]
ptserver: Use correct structure type in malloc

prentries is a list of 'struct prlistentries' objects, not a list of
'struct prentry'. Use the correct type in our call to malloc.

Caught by clang analyzer

Change-Id: I6c36e4b875eafb8aff6506cf800d47b45a79825d
Reviewed-on: http://gerrit.openafs.org/9150
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agovol: nuke() doesn't need to zero code
Simon Wilkinson [Tue, 19 Feb 2013 14:48:59 +0000]
vol: nuke() doesn't need to zero code

We don't need to zero the result code two lines before we assign
a new value to it - just remove the pointless assignment

Caught by clang-analyzer

Change-Id: I8fefdc839ef9980d7f7703add3b11b089d524d38
Reviewed-on: http://gerrit.openafs.org/9167
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agovol: nuke() doesn't need to maintain next inode ptr
Simon Wilkinson [Tue, 19 Feb 2013 14:47:56 +0000]
vol: nuke() doesn't need to maintain next inode ptr

ni is unused on the true side of the if expression in nuke() - so
just don't bother populating it.

Caught by clang-analyzer

Change-Id: Idfd088f999f4c4bcdabc03b8b86636aa02541343
Reviewed-on: http://gerrit.openafs.org/9166
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agorxgen: Remove pointless assignment
Simon Wilkinson [Fri, 15 Feb 2013 16:35:08 +0000]
rxgen: Remove pointless assignment

The value we assign to defp is never used (it's almost immediately
overwritten), and it is guaranteed to be the same as the existing
value. So, just remove the assignment.

Caught by clang-analyzer

Change-Id: I362fe08c623b5046f2c8b0b16c42dcfa12009981
Reviewed-on: http://gerrit.openafs.org/9162
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agorxgen: Fix memory leak
Simon Wilkinson [Fri, 15 Feb 2013 16:10:18 +0000]
rxgen: Fix memory leak

Don't leak the definition structure when we hit the end of the file

Change-Id: Ief44bb3bdff274167760fda5bcc16903ef8c11ce
Reviewed-on: http://gerrit.openafs.org/9159
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agorxgen: Fix NULL pointer dereference
Simon Wilkinson [Fri, 15 Feb 2013 16:05:33 +0000]
rxgen: Fix NULL pointer dereference

Avoid a NULL pointer dereference if strchr doesn't find any occurence
of '*' in the string. Whilst we handle the not found case when inserting
a mid string terminator, we don't handle it when restoring the string to
its previous value.

Change-Id: Ie0b3e18d89073a1694bba2749111c73f59150bdb
Reviewed-on: http://gerrit.openafs.org/9158
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agorxgen: Silence some uninitialised variable warnings
Simon Wilkinson [Fri, 15 Feb 2013 16:01:26 +0000]
rxgen: Silence some uninitialised variable warnings

Change-Id: Ida939533afbbf2afb81cce44ea6693d33c172062
Reviewed-on: http://gerrit.openafs.org/9157
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoFix incorrect sizeof() arguments in allocations
Simon Wilkinson [Fri, 15 Feb 2013 11:55:37 +0000]
Fix incorrect sizeof() arguments in allocations

In a number of places we have

struct X *val;
val = malloc(sizeof(struct Y));

If sizeof(struct Y) < sizeof(struct X) this is obviously dangerous,
but it is incorrect regardless of the relative sizes of the
structures. Fix all of the occurences of this that clang points out
to us.

Caught by clang-analyzer

Change-Id: Iad32b4ae460d3f40a45cf33624973bf52fd167d4
Reviewed-on: http://gerrit.openafs.org/9156
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoDon't allocate objects of 0 length
Simon Wilkinson [Fri, 15 Feb 2013 11:37:47 +0000]
Don't allocate objects of 0 length

Fix assorted places in the code where we might have asked malloc to
allocate a block of zero length.

Caught by clang-analyzer

Change-Id: I6e1226ad83a52984ee7c53cbed8c867f38e4f866
Reviewed-on: http://gerrit.openafs.org/9155
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoaklog: Don't reference freed node whilst deleting
Simon Wilkinson [Fri, 15 Feb 2013 16:23:16 +0000]
aklog: Don't reference freed node whilst deleting

Because deletion is implemented using a for loop, the step of the
loop that moves us to the next node references freed memory when
we've deleted an element. Fix this by just shortcircuiting the
return from the function so we immediately exit.

Change-Id: Ia820b20ce5937ac86d849cb746b3bc21f46550fa
Reviewed-on: http://gerrit.openafs.org/9161
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agovos: Remove unused 'done' loop variable
Simon Wilkinson [Tue, 19 Feb 2013 14:41:26 +0000]
vos: Remove unused 'done' loop variable

In SendFile we break at the same time as setting the done flag,
so its value is never checked. Just remove it as it is redundant
with the current loop logic.

Caught by clang-analyzer

Change-Id: Ibf8f756b06fd26cb2013ece97eb9196c71ad88bd
Reviewed-on: http://gerrit.openafs.org/9164
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agolibadmin: Don't try to release garbage connection
Simon Wilkinson [Fri, 15 Feb 2013 22:34:36 +0000]
libadmin: Don't try to release garbage connection

In bos_ServerOpen, initalise the contents of bos_server structure
to 0 using calloc, so that if we jump to the error handling stuff
before they are assigned real values we don't end up trying to
release garbage.

Change-Id: I687d0b637833a08425e75391eb92a2dd4a150301
Reviewed-on: http://gerrit.openafs.org/9163
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoasetkey: Handle unknown key types
Simon Wilkinson [Fri, 15 Feb 2013 16:13:20 +0000]
asetkey: Handle unknown key types

If the user tries to create a key which is not rxkad, error out
rather than attempt to add a random blob of memory to the KeyFile.

Caught by clang-analyzer

Change-Id: Id2803fe29153f01ab352747caed31b0d0cb4f573
Reviewed-on: http://gerrit.openafs.org/9160
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoUnix CM: Don't check if var is 0, then zero it
Simon Wilkinson [Thu, 14 Feb 2013 20:08:07 +0000]
Unix CM: Don't check if var is 0, then zero it

There's a couple of places in afs_daemons.c where we do:

    if (code != 0)
        return;
    code = 0;

The final line is obviously redundant, and makes clang sulk at us.
So, remove it.

Caught by clang-analyzer

Change-Id: Ic55edf1b05f3f45eb1f0cecdb3c2318e6f7bd0ec
Reviewed-on: http://gerrit.openafs.org/9154
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agoUnix CM: Remove unecessary lastXMinCheck init
Simon Wilkinson [Thu, 14 Feb 2013 20:05:43 +0000]
Unix CM: Remove unecessary lastXMinCheck init

Don't init stuff to 0 that's then immediately reinitialised with
a proper value.

Caught by clang-analyzer

Change-Id: Ic0d8b227908fa716167acf64d7653b636e406816
Reviewed-on: http://gerrit.openafs.org/9153
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoUnix CM: Remove unused security class initialisation
Simon Wilkinson [Thu, 14 Feb 2013 20:04:05 +0000]
Unix CM: Remove unused security class initialisation

Caught by clang-analyzer

Change-Id: Iab28a305ae377cabc455132fde3b90146921100b
Reviewed-on: http://gerrit.openafs.org/9152
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agousd: Can't call usd_FileStandard* with NULL
Simon Wilkinson [Tue, 12 Feb 2013 14:07:10 +0000]
usd: Can't call usd_FileStandard* with NULL

It doesn't make sense to call usd_FileStandard{Input,Output} with
a NULL usd_handle_t (and doing so would crash later in the
function), so don't check for attempts to do so.

Caught by clang-analyzer

Change-Id: I03c0b627056108fe0d6f78d8028323cc4ed74758
Reviewed-on: http://gerrit.openafs.org/9151
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agovlserver: bulkaddrs are unsigned ints
Simon Wilkinson [Tue, 12 Feb 2013 13:15:16 +0000]
vlserver: bulkaddrs are unsigned ints

bulkaddrs_val is a pointer to an array of unsigned ints, not to
an array of ints. Fix the sizeof() used in the call to malloc to silence
a clang warning.

Change-Id: If39f34756984200fed1cd3f3de5833012b86af21
Reviewed-on: http://gerrit.openafs.org/9149
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agoptserver: Simplify malloc assignment to shut up clang
Simon Wilkinson [Tue, 12 Feb 2013 13:12:47 +0000]
ptserver: Simplify malloc assignment to shut up clang

Using a temporary variable of type (char *) to store the results
of malloc and realloc, and then casting the tmp variable to the
real type causes clang-analyzer to complain. Just simplify this
code by always using the real type in order to shut it up.

Change-Id: I607bb36d1899dc617fdbd9e09e18ff10c9fa9ce9
Reviewed-on: http://gerrit.openafs.org/9148
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agoauth: Handle memory errors when parsing key file
Simon Wilkinson [Tue, 12 Feb 2013 12:24:44 +0000]
auth: Handle memory errors when parsing key file

Return an IO error if we run out of memory whilst parsing a key file

Caught by clang-analyzer

Change-Id: I783a193fe9315f08d76d1be9b1c77089df25fd64
Reviewed-on: http://gerrit.openafs.org/9146
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoauth: Remove unecessary assignment
Simon Wilkinson [Tue, 12 Feb 2013 12:19:42 +0000]
auth: Remove unecessary assignment

When we're counting the number of keys available, we don't need to
actually extract each key entry - remove the unused assignment.

Caught by clang-analyzer.

Change-Id: I98a30afccaf9a455ea0a7e77e7ca0d648abe4e70
Reviewed-on: http://gerrit.openafs.org/9145
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agodumpscan: Unsigned ints can't be less than 0
Simon Wilkinson [Fri, 15 Feb 2013 17:23:51 +0000]
dumpscan: Unsigned ints can't be less than 0

'y' is an unsigned int, and therefore can never be less than 0, so
don't bother checking if it is.

Caught by clang-analyzer

Change-Id: I65e9e6e2a6f72a4a1a861234c5db89cc9d99ef15
Reviewed-on: http://gerrit.openafs.org/9138
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agovol: Don't assume enum is an int
Simon Wilkinson [Fri, 15 Feb 2013 17:22:02 +0000]
vol: Don't assume enum is an int

The type that an enum is promoted to for arithmetic is compiler
dependent. We can't assume that it's an int, or a short.

Explicitly cast the volume state enum where clang gets upset.

Change-Id: Iab285d3a04dac698797ab0df2337aee75e3876b2
Reviewed-on: http://gerrit.openafs.org/9137
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agoviced: Avoid clang errors with modeBits
Simon Wilkinson [Fri, 15 Feb 2013 17:12:45 +0000]
viced: Avoid clang errors with modeBits

The modeBits element of the VnodeDiskObject structure is defined as
a 12 bit wide bitfield. This causes clang some problems when doing
integer arithmetic, as it appears to the compiler that the field is
being overflowed. For example...

    targetptr->disk.modeBits &= ~04000;

Produces the error:
    implicit truncation from 'int' to bitfield changes value
from -2049 to 2047

Marc Dionne suggested changing this to
    targetptr->disk.modeBits = targetptr->disk.modeBits & ~04000;

in order to suppress the clang error.

Change-Id: Iadb53a3db911f5771d3ab2437ccd43abce2a8ecb
Reviewed-on: http://gerrit.openafs.org/9136
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoFix warnings-as-errors for clang
Simon Wilkinson [Fri, 15 Feb 2013 17:08:45 +0000]
Fix warnings-as-errors for clang

It seems like some versions of clang have a problem with using
pragmas to stop particular warnings being converted to errors with
-Werror. These compilers require that the warning be ignored completely
in order to suppress it.

Make the necessary changes to afsd and bozo, and update README.WARNINGS
to note the problem.

Change-Id: I66038130695d2ad27c289f29bcd8f6f2eddf1ded
Reviewed-on: http://gerrit.openafs.org/9135
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agohcrypto: Suppress empty body warning
Simon Wilkinson [Tue, 19 Feb 2013 10:15:33 +0000]
hcrypto: Suppress empty body warning

clang now complains about statements of the form
    if (blah)
;

There's one of these in hcrypto. Until we can get this fixed upstream,
just mark the file as no-error.

Change-Id: I86d1362552ca9ee7b2c47a7c92bd8d6484ab7dbd
Reviewed-on: http://gerrit.openafs.org/9134
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

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

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

Change-Id: Ia073157488ac6b887f972448074ad1615422e26e
Reviewed-on: http://gerrit.openafs.org/9140
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agorx: Assert call error for RXS_PreparePacket error
Andrew Deason [Mon, 18 Feb 2013 01:34:06 +0000]
rx: Assert call error for RXS_PreparePacket error

If we've received an error from the underlying security class, we must
not try to send the given packet, or we risk security issues. We
currently achieve this by setting an error on the connection. It is
slightly indirect in how this yields an error on this specific call,
and so it may not be immediately clear, but doing so is critical. If
somehow the call does not have an error by the end of this, we cannot
proceed as this is an error condition we do not handle. So, assert.

Change-Id: Ie0106ab170ecb77bb102c5afa3ec44ba2b704283
Reviewed-on: http://gerrit.openafs.org/9122
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agorx: Honor RXS_PreparePacket errors
Andrew Deason [Mon, 14 Jan 2013 18:45:04 +0000]
rx: Honor RXS_PreparePacket errors

rxi_PrepareSendPacket calls RXS_PreparePacket to allow the security
class to modify the given packet appropriately (to be undone by
CheckPacket on the other endpoint). However, currently
rxi_PrepareSendPacket ignores all errors generated by
RXS_PreparePacket, and processing continues as if there was no error.

For rxkad, an error often results in the given packet being untouched.
This means that the security checksum is not calculated, and thus not
populated in the packet, and for encrypted connections means that the
packet contents are not encrypted.

This occurs for any error generated by the security class
PreparePacket routine. For rxkad, the most common error is probably
RXKADEXPIRED, though some other internal errors are possible as well.

This behavior has a few effects for rxkad:

 1. When any error is generated by PreparePacket, the other endpoint
 generally bails out with the error RXKADSEALEDINCON, since the
 security checksum of the packet is 0, which does not match what the
 checksum should be. This results in error messages like 'rxk: sealed
 data inconsistent'. This can be very confusing if the actual error
 is, say, just that the given credentials have expired.

 2. For connections requiring encryption (rxkad_crypt), an error from
 PreparePacket means that the packet payload is sent in the clear.
 This can happen for about a window size's worth of packets.

 3. If a client ignores errors/inconsistencies with the checksum and
 encryption, etc, they can keep reading data for the call forever,
 even after their credentials have expired.

To fix this, make an error from RXS_PreparePacket cause a connection
error for the given connection, and immediately send a connection
abort. No further error checking should be necessary for the callers
of rxi_PrepareSendPacket, since they already check for call/conn
errors before sending any actual packets.

Change-Id: I87de833730424881dcd3d659870f71191eabafe4
Reviewed-on: http://gerrit.openafs.org/8909
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agotests: Improve failure mode for unresolvable hostname
Marc Dionne [Sun, 17 Feb 2013 18:29:38 +0000]
tests: Improve failure mode for unresolvable hostname

In the case of a host where gethostbyname is unable to resolve
the hostname, afstest_BuildTestConfig() may return NULL which
can cause several tests to crash.

Add a common function to look out for this condition and use it where
appropriate.  When it occurs, the current module is skipped and
the user gets an error message that indicates the configuration
problem.

Change-Id: I7216876eb2424368f415e5759e2b95009ad055b2
Reviewed-on: http://gerrit.openafs.org/9120
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agosalvager: incorrect comment
Mark Vitale [Thu, 14 Feb 2013 15:51:34 +0000]
salvager: incorrect comment

The comment for the code handling the -showsuid option was incorrect.

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

11 years agoWindows: Ensure pResultCB exists before Authentication
Jeffrey Altman [Thu, 14 Feb 2013 19:43:58 +0000]
Windows: Ensure pResultCB exists before Authentication

When processing requests from the redirector it is possible for
the ResultCB to not be allocated.  This can occur either due to
an out of memory condition in a synchronous request or due to
an asynchronous extents or byte range lock request.

Move the assignment of the Authenticated state after the allocation
of the ResultCB from the stack in case of out of memory conditions.

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

11 years agoWindows: Unique file ID is per volume
Jeffrey Altman [Thu, 14 Feb 2013 14:26:16 +0000]
Windows: Unique file ID is per volume

The unique file ID returned as part of the BY_HANDLE_FILE_INFORMATION
data structure obtained via GetFileInformationByHandle() is only
guarranteed to be unique within the volume where volume uniqueness is
determined by the volume's serial number.

It therefore doesn't make sense to return the volume id as part of
FILE_INTERNAL_INFORMATION IndexNumber.  Instead return Vnode and
Unique as that is what ensures uniqueness within an existing AFS
volume.

Unfortunately, {VolId, Vnode, Unique} does not guarantee uniqueness
for when multiple cells are in use.

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

11 years agoWindows: RXAFS_BulkStat failures
Jeffrey Altman [Thu, 7 Feb 2013 21:53:45 +0000]
Windows: RXAFS_BulkStat failures

The RXAFS_BulkStat RPC is quite brain dead. The client requests
status information on up to AFSCBMAX FIDs.  The file server replies
success only if all of the client credentials provide access to
all of the requested FIDs.  If status info cannot be provided
for any one of the FIDs, the error code of the failure is returned
with no context as to which FID failed.

To simplify the logic within the cache manager a new local error
code, CM_ERROR_BULKSTAT_FAILURE is introduced to replace whatever
error was received from the file server.  This error is returned
by cm_TryBulkStat and cm_TryBulkStatRPC.  The caller of either of
those functions should interpret the error to mean that the current
user context cannot be used to perform a bulkstat operation against
the provided cm_scache directory.  Instead, individual RXAFS_FetchStatus
operations must be performed.

This patchset implements such error handling for both the SMB and
RDR interfaces.  This change permits the Windows cache manager to
properly enumerate a directory for which the user only has list
permission and cannot read the status info for files and symlinks.

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

11 years agoWindows: cm_BPlusDirNextEnumEntry return all errors
Jeffrey Altman [Tue, 12 Feb 2013 21:32:18 +0000]
Windows: cm_BPlusDirNextEnumEntry return all errors

Return all entries in the directory enumeration regardless of any
errors returned from cm_BPlusDirEnumBulkStatNext().  Set the error
code in the returned cm_direnum_entry_t.errorCode field so that
the caller can determine how the error should be handled on a
per entry basis.

Change-Id: I90a90ab0b0220c8d1e045f9473f5edd0bd01e45e
Reviewed-on: http://gerrit.openafs.org/9103
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Add Cell name to AFSProcessRequest parameters
Jeffrey Altman [Wed, 13 Feb 2013 19:04:28 +0000]
Windows: Add Cell name to AFSProcessRequest parameters

Knowing the cell name for the request can be useful to the file
system driver which otherwise does not have access to a conversion
from FileID.CellID to Cell name.

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

11 years agoWindows: Add Cell to FS Volume Information Label
Jeffrey Altman [Thu, 14 Feb 2013 02:53:46 +0000]
Windows: Add Cell to FS Volume Information Label

Add the Cell name to the VolumeLabel field of the
FILE_FS_VOLUME_INFORMATION structure.  This permits "cell#volume" to be
displayed by cmd.exe's DIR command and other applications that call the
GetVolumeInformation() or GetVolumeInformationByHandle() Win32 APIs.

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

11 years agoWindows: CellLength reported in octets
Jeffrey Altman [Wed, 13 Feb 2013 18:12:34 +0000]
Windows: CellLength reported in octets

CellLength must be converted from WCHARs to BYTEs in the response
to the redirector.

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

11 years agolibafs: cleanup redundant assignment
Michael Meffie [Fri, 8 Feb 2013 22:08:28 +0000]
libafs: cleanup redundant assignment

Cleanup redundant clearing of the avcp pointer in lookup, which
looks to be a cut and paste error from the ibm afs days.

Change-Id: Ib554d862bd8485be2a4dbeb38fcaacac57c1e818
Reviewed-on: http://gerrit.openafs.org/9085
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoafs: Avoid SetupVolume panic
Andrew Deason [Fri, 8 Feb 2013 23:24:28 +0000]
afs: Avoid SetupVolume panic

Currently SetupVolume panics if it cannot successfully read a
volumeinfo entry from disk. Try to return an error instead, so we
don't panic the machine.

Change-Id: Iad3c2c857f1b736fcf4a142338d9e219bab68969
Reviewed-on: http://gerrit.openafs.org/9094
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoafs: Move SetupVolume tv initialization after loop
Andrew Deason [Fri, 8 Feb 2013 23:26:32 +0000]
afs: Move SetupVolume tv initialization after loop

The fields in tv are not used by the loop looking for the given volume
on disk. If we wait until after that loop to initialize the fields in
tv, it is easier to handle errors encountered in the loop.

This should incur no functional change.

Change-Id: Ib678542bfebaa89ecfa4aad39230fc502ec83edb
Reviewed-on: http://gerrit.openafs.org/9093
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoLinux: Add missing semi-colon
Marc Dionne [Mon, 11 Feb 2013 23:49:21 +0000]
Linux: Add missing semi-colon

Add a missing semi-colon in the error case when missing symbols
are detected.  The effect is strictly cosmetic - a few additional
error messages would follow the "undefined symbols" error.

Change-Id: I2a8bfb0a3ef12b5bcee6946804df025c75d84830
Reviewed-on: http://gerrit.openafs.org/9095
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoWindows: Do not pass relative paths to redirector
Jeffrey Altman [Wed, 6 Feb 2013 16:58:55 +0000]
Windows: Do not pass relative paths to redirector

RDR_SetInitParams provides two paths to the redirector, the AFSCache
file path and the path of the %TEMP% environment variable.  If either
of these paths are relative paths and not absolute (or full) paths,
the redirector and the service will interpret them differently.
Ensure that the full paths are delivered to the redirector.

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

11 years agoWindows: Move Authenticated field to CommResultCB
Jeffrey Altman [Mon, 11 Feb 2013 01:05:49 +0000]
Windows: Move Authenticated field to CommResultCB

Add the Authenticated state of the request to the CommResultCB
so the redirector knows the state of all requests.

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

11 years agoWindows: Do not double increment cm_data.currentCells
Jeffrey Altman [Mon, 11 Feb 2013 21:40:36 +0000]
Windows: Do not double increment cm_data.currentCells

During cm_cell generation the cm_data.currentCells value was
incremented twice.  As a result cm_currentCells did not equal the
number of cm_cell objects allocated.  Upon restart the AFSCache
contents would be discarded.

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

11 years agoWindows: Move Trace Stmts from FILE to CLEANUP
Jeffrey Altman [Fri, 8 Feb 2013 19:17:12 +0000]
Windows: Move Trace Stmts from FILE to CLEANUP

Relabel trace statements in AFSRemoveDirNodeFromParent,
AFSRemoveNameEntry, AFSDeleteDirEntry, and AFSRemoveFcb from the
FILE subsystem to the CLEANUP subsystem.   This assists in reducing
the noise when attempting to watch the file system requests that
are received by the afs redirector.

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

11 years agoWindows: AFSLocateNameEntry tracking DirectoryCB IN/OUT
Jeffrey Altman [Sat, 9 Feb 2013 04:46:44 +0000]
Windows: AFSLocateNameEntry tracking DirectoryCB IN/OUT

AFSLocateNameEntry previously accepted ParentDirectoryCB as an IN/OUT
parameter in which a reference count was passed in but a reference
count was not passed back out.  The DirectoryCB parameter is an OUT
parameter for which a reference count should be returned on success.

This patchset simplifies the logic.  ParentDirectoryCB is IN only
and OutParentDirectoryCB and DirectoryCB are out only.  AFSLocateNameEntry
never releases a reference count provided by the caller and it always
returns OutParentDirectoryCB and DirectoryCB with a new reference count
unless they are NULL.  It is the callers responsibility to determine if
ParentDirectoryCB has changed and to release all of the references.

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

11 years agoWindows: AFSLocateNameEntry separate VolumeCB In/Out
Jeffrey Altman [Fri, 8 Feb 2013 22:28:09 +0000]
Windows: AFSLocateNameEntry separate VolumeCB In/Out

Tracking the VolumeCB references within AFSLocateNameEntry has
proven to be very error prone.  When the VolumeCB parameter is
an in/out parameter the caller cannot reliably determine whether
or not AFSLocateNameEntry replaced the updated the pointer and
whether it properly released the references.  This patchset
changes the interface so that VolumeCB and ParentDirectoryCB
have separate in and out parameters.  The caller is now responsible
for tracking its own Volume reference counts and AFSLocateNameEntry
obtains its own which will either be returned to the caller as a
non-NULL OutVolumeCB or released.

This patchset turns ParentDirectoryCB into an IN only parameter
and adds OutParentDirectoryCB as a dedicated OUT parameter.  However,
it does not alter any associated reference count logic.  That will
be implemented in a subsequent patchset.

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

11 years agorx: remove rx_misc.h define trailing semicolons
Jeffrey Altman [Sun, 10 Feb 2013 16:54:44 +0000]
rx: remove rx_misc.h define trailing semicolons

PIN and UNPIN macro definitions should not have trailing
semicolons.

Change-Id: I242c0a7a40cbabe852ed975eb64df52dbb585624
Reviewed-on: http://gerrit.openafs.org/9088
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agorx: Remove rx_atomic_add_and_read trailing semi-colon
Marc Dionne [Wed, 6 Feb 2013 23:44:35 +0000]
rx: Remove rx_atomic_add_and_read trailing semi-colon

Remove a stray trailing semi-colon from the definition of
rx_atomic_add_and_read.

Change-Id: Iae9c62c132bcbb3d2e609dde2d54e0435d36cc03
Reviewed-on: http://gerrit.openafs.org/9075
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: GetVolumeInfo cell name
Jeffrey Altman [Thu, 7 Feb 2013 03:44:44 +0000]
Windows: GetVolumeInfo cell name

The service was supposed to provide the redirector the cell name
as part of the AFSVolumeInfoCB response from RDR_GetVolumeInfo.
Add a new field to store it and populate it.

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

11 years agoWindows: Return full volume name for RO and BK
Jeffrey Altman [Thu, 7 Feb 2013 03:43:16 +0000]
Windows: Return full volume name for RO and BK

RDR_GetVolumeInfo must return the full volume name (not the volume
group name) for RO and BK volume types.

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

11 years agoWindows: AFSFileOpenResultCB.Authenticated
Jeffrey Altman [Thu, 7 Feb 2013 00:35:00 +0000]
Windows: AFSFileOpenResultCB.Authenticated

Notify the redirector whether the the result of a file open
request is the result of a user authenticated action.

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

11 years agoLinux: Detect undefined symbols in kernel modules
Marc Dionne [Mon, 28 Jan 2013 01:52:39 +0000]
Linux: Detect undefined symbols in kernel modules

Undefined symbols in the kernel modules are not currently detected
at build time.  As a result, buildbot may indicate success while
the resulting kernel modules are unusable.

In the kernel build process, modpost warns about missing symbols
but does not return an error in the case of external modules.
Detect these warnings and cause the libafs build to fail.

Change-Id: I2c428a5ce7e3a0d10178679f789b3d787719c397
Reviewed-on: http://gerrit.openafs.org/8981
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoWindows: add cm_HaveToken
Jeffrey Altman [Thu, 7 Feb 2013 00:32:28 +0000]
Windows: add cm_HaveToken

cm_HaveToken answers the question of whether a cm_user_t has a
token for a specified cell.

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

11 years agopam: Build using libtool
Simon Wilkinson [Tue, 8 Jan 2013 14:38:34 +0000]
pam: Build using libtool

Build the pam_afs and pam_afs.krb modules using libtool, so they
fit in with the rest of the new build infrastructure.

This requires some additonal symbol exports from auth and kauth,
which are included

Change-Id: I97a130ba69216cd63ba388f2aaabe830a0c4543f
Reviewed-on: http://gerrit.openafs.org/8900
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>