Commit Graph

11249 Commits

Author SHA1 Message Date
Marc Dionne
0a528a52f5 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>
2013-02-17 20:51:15 -08:00
Mark Vitale
4051c5e96e 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>
2013-02-15 15:24:59 -08:00
Jeffrey Altman
7c31bd5e2d 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>
2013-02-14 12:29:20 -08:00
Jeffrey Altman
9b48daff34 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>
2013-02-14 06:58:24 -08:00
Jeffrey Altman
cb414f6899 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>
2013-02-14 06:53:52 -08:00
Jeffrey Altman
3eb7c4f429 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>
2013-02-14 06:53:35 -08:00
Jeffrey Altman
210ebcfbe4 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>
2013-02-14 06:47:25 -08:00
Jeffrey Altman
4382c9902f 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>
2013-02-14 06:46:58 -08:00
Jeffrey Altman
6373d01ca0 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>
2013-02-14 06:46:45 -08:00
Michael Meffie
85bac1ae40 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>
2013-02-12 11:39:49 -08:00
Andrew Deason
6f7ae535bb 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>
2013-02-12 11:39:19 -08:00
Andrew Deason
8f95dc9eb9 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>
2013-02-12 11:38:53 -08:00
Marc Dionne
50879d5727 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>
2013-02-12 11:38:30 -08:00
Jeffrey Altman
e9af3e6442 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>
2013-02-11 22:19:41 -08:00
Jeffrey Altman
351cefe9b6 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>
2013-02-11 20:21:12 -08:00
Jeffrey Altman
d8f47f05d4 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>
2013-02-11 20:20:53 -08:00
Jeffrey Altman
f9f9a7ab17 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>
2013-02-11 20:16:20 -08:00
Jeffrey Altman
a1b6015cec 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>
2013-02-11 20:16:06 -08:00
Jeffrey Altman
ef02d3845b 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>
2013-02-11 20:15:53 -08:00
Jeffrey Altman
76fb036f4e 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>
2013-02-11 15:02:34 -08:00
Marc Dionne
948cc20c8e 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>
2013-02-10 08:03:15 -08:00
Jeffrey Altman
a5865493a2 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>
2013-02-07 19:03:32 -08:00
Jeffrey Altman
c0f465cc3a 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>
2013-02-07 19:03:18 -08:00
Jeffrey Altman
aa5d0d708f 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>
2013-02-07 19:03:02 -08:00
Marc Dionne
dbdee60a83 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>
2013-02-07 15:27:11 -08:00
Jeffrey Altman
748e07d243 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>
2013-02-07 08:11:13 -08:00
Simon Wilkinson
aea9e64147 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>
2013-02-06 06:10:59 -08:00
Jeffrey Altman
028258e639 Windows: AFSLocateNameEntry double free Volume RefCount
If AFSBuildMountPointTarget fails when called from AFSLocateNameEntry
the pCurrentVolume reference count will have been freed even though
the pointer has not been updated.   If the failure is
STATUS_OBJECT_NAME_NOT_FOUND and AFSLocateNameEntry was called
by AFSCreateCommon, the Volume reference count will be freed twice.

Change-Id: I0b5ccb512ea0ec2e24099dff38bbbeddebf0bee3
Reviewed-on: http://gerrit.openafs.org/9069
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-05 21:15:12 -08:00
Jeffrey Altman
e7df2fcedc Windows: AFSObjectInfoDecrement correct return value
The return value must be the new ObjectReferenceCount value not
the value of the Reason counter.  This was broken by patchset
e267774f1a.

Change-Id: I9dd3cd56f6c7d43f061bdda8e24666b5f9a4ed9b
Reviewed-on: http://gerrit.openafs.org/9068
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-05 21:14:43 -08:00
Jeffrey Altman
d0e7d8c76e Windows: AFSVolumeCB track RefCount reasons
Introduct AFSVolumeIncrement and AFSVolumeDecrement functions
which are used to increment not only the AFSVolumeCB.VolumeReferenceCount
but also a new VolumeReferences[Reason] counter.  In the future when
a VolumeReferenceCount error occurs it may be possible to isolate the
cause to a subset of the code.

In the process, the VolumeReferenceCount necessary to free the
AFSVolumeCB object is changed from 1 to 0 and AFSInitVolume no longer
initializes the AFSVolumeCB count to 2.

The signature for AFSInitVolume and AFSLocateNameEntry are modified
to permit a volume reference reason to be provided.  This permits
the reference to be allocated in one function and released in another
without resulting in count imbalances.

Change-Id: I021a6efe061817ff044c18a699ee63a7ffbfc7bf
Reviewed-on: http://gerrit.openafs.org/9067
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-05 21:14:05 -08:00
Antoine Verheijen
20a54b0252 OpenBSD: Add config headers for new(er) OS versions.
The OS-specific config header files have not kept up with the
newer releases of OpenBSD. This patch corrects that by adding
header files for OpenBSD versions from 4.9 to 5.3 (the newest
version currently under development).

Change-Id: I5e233cc7b96be2c1c52824653c42d3c6d77d6f50
Reviewed-on: http://gerrit.openafs.org/8927
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>
2013-02-05 05:49:28 -08:00
Simon Wilkinson
dfd9d79524 Build system: Add LT_LDRULE_shlib_missing
Add a new LT_LDRULE which can be used to build shared libraries which
may not contain all of the symbols listed in their .sym files. This
allows us to build a library like roken, where different symbols
will be present on different operating systems.

Change-Id: I82e0df49131aa7184360130547c82052a6dd704b
Reviewed-on: http://gerrit.openafs.org/8901
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-02-05 05:49:20 -08:00
Marc Dionne
3b733db8bf Linux: crset should use passed credentials
When copying credentials in crset, take the passed credentials as
the source instead of the current process credentials.

This doesn't cause any problems currently since crset always gets
called with the current credentials.

Change-Id: Ia6a341e96d00071587443f8eef4a99992b368abc
Reviewed-on: http://gerrit.openafs.org/8980
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-02-05 04:21:29 -08:00
Chas Williams (CONTRACTOR)
7d8b636d94 LINUX: ifconfig's output has changed
net-tools in Fedora 18 has changed 'inet addr' to just 'inet' (possibly
to more closely match the ip command).

Change-Id: I9224d0eb4dd77e248c8f8eed966fa26ec7dda08c
Reviewed-on: http://gerrit.openafs.org/8987
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-02-05 04:21:05 -08:00
Simon Wilkinson
ee7b4467db Build system: ADd LT_LDRULE_static_NOQ
Add a NOQ variant of the LT_LDRULE_static build macro, so that it
can be used as part of compound rules.

Change-Id: I45b3d4ff09465d2d472e27c2fd290e0311791403
Reviewed-on: http://gerrit.openafs.org/8902
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-02-05 04:10:44 -08:00
Mark Vitale
1f891b622e dafs: preattach should wait for exclusive states
In rare circumstances an FSYNC_VOL_ON operation may fail silently,
leaving the volume in its previous state.  The only clue is a FileLog
message "volume <nnnn> not in quiescent state".

This is caused by a race condition in the volume package: an
FSYNC_VOL_ON operation is attempting to preattach a volume
(in VPreAttachVolumeByVp_r()) at the same time a fileserver RPC
(e.g. FetchStatus) is detaching the volume (in VReleaseVolumeHandles_r())
at the conclusion of attach2() logic.

The fix calls VWaitExclusiveState_r() before calling
VPreAttachVolumeByVp_r().

Change-Id: Ib66859381d29311fda3e08984dcb740eadafb340
Reviewed-on: http://gerrit.openafs.org/8814
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-02-05 03:48:42 -08:00
Marc Dionne
804a0db1bb Parallel libtool build fixes
Serialize the use of libtool in a few places to avoid having
concurrent libtool instances in the same directory..

Change-Id: I5abaeae8f6a31cd84643b7df39c77493d198b600
Reviewed-on: http://gerrit.openafs.org/9024
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-02-05 03:42:38 -08:00
Jeffrey Altman
52cc798837 Windows: Use AFS_OBJECT_REFERENCE_MAX in struct
Use AFS_OBJECT_REFERENCE_MAX to size the array in the struct.
This should have been a part of patchset
e267774f1a.

Change-Id: I9323387a27a5bc2e708f8a8424cb38b491d542d7
Reviewed-on: http://gerrit.openafs.org/9066
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-04 17:47:52 -08:00
Thorsten Alteholz
dc32caae77 Beautify ubik_print()
After lots of intermediate steps a call to ubik_print(), ubik_vprint()
and ubik_dprint*() ends in vFSLog() which adds a timestamp to the output.
So any call to ubik_print(), that does not contain a \n at the end,
makes a mess of the logfile.
The least invasive change will simply add this newline at the end
of any ubik_print() call.
This also prevents long lines in the log, which might appear on
multi-homed hosts with lots of interfaces.

FIXES 1446

Change-Id: I2e44588fcc5b27704dd5fec5a83d99d3a86f86e4
Reviewed-on: http://gerrit.openafs.org/9059
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-02-04 10:11:58 -08:00
Jeffrey Altman
4b3f499b20 Windows: cm_SetupFetchBIOD reserving type
Change type of 'reserving' to afs_uint64 to match the return type
of buf_TryReserveBuffers().

Change-Id: I8aaac5a763ec55acada2702b898a9bcd50f82ed0
Reviewed-on: http://gerrit.openafs.org/9062
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-03 11:54:14 -08:00
Jeffrey Altman
e4d97fa3e4 Windows: cm_user interlocked operations
Convert cm_user refcnts to use interlocked operations.

Change-Id: Ib40d2446792dcde3038ea601281406e013147595
Reviewed-on: http://gerrit.openafs.org/9061
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-03 11:53:55 -08:00
Jeffrey Altman
5f17b9f929 Windows: Fix RDR_BkgFetch rock assigment
The wrong variables were assigned to the rock base and offset
in the final queuing of a RDR_BkgFetch request within
RDR_RequestFileExtentsAsync.

Introduced in 8b874aa205.

Change-Id: I77af22caed9eceb4c90b8fa18b91945d059995e5
Reviewed-on: http://gerrit.openafs.org/9058
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-03 05:20:14 -08:00
Jeffrey Altman
3ecdfadded Windows: dirty threshold 64 * chunksize
must be large enough to keep the pipe full

Change-Id: I1bf8b5800ff286e74dbe57ced19943db891b715f
Reviewed-on: http://gerrit.openafs.org/8996
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-02 09:34:00 -08:00
Jeffrey Altman
2e7c203a6c Windows: More RDR Garbage Collection
This patchset addresses the failure of AFSVolumeCB, AFSDirectoryCB,
and AFSObjectInformationCB objects to be garbage collected by the
AFSPrimaryVolumeWorker thread.  The AFSPrimaryVolumeWorker thread
is broken up into smaller pieces.

Change-Id: I54749960be8f22313ba7ee5f9f96438be6321f25
Reviewed-on: http://gerrit.openafs.org/8995
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-02 09:33:44 -08:00
Jeffrey Altman
8099525c4a Windows: AFSEvaluateTargetByID Sanity Check Result
If the file server provides the service with bogus status info
and that status info is inconsistent with the allocated fields
in the associated ObjectInformationCB and FCB structures, it can
result in a BSOD.  Perform some basic sanity checks and if an
inconsistency is discovered, fail the request.  This may result
in the inability to access a file/directory but will prevent a
BSOD.

Change-Id: Iabf66adc5e953dc4ae27ed701148a9ffbf55abcc
Reviewed-on: http://gerrit.openafs.org/8994
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-02 09:24:40 -08:00
Jeffrey Altman
5649d84f1a Windows: Replace ParentObjectInformation pointer
Although rare there have been crashes which were the result of
the ObjectInformationCB being freed while another ObjectInformationCB
is pointing to it via the ParentObjectInformation pointer.

This patchset removes the pointer and replaces it with the ParentFileId
which is used to lookup the Parent ObjectInformationCB via the VolumeCB
BTree of all volume objects. The reference counting rules remain the
same.

Change-Id: Iaf66587be2619c8c2f06cd586ef8d423b76d1e79
Reviewed-on: http://gerrit.openafs.org/8993
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-02 09:24:09 -08:00
Jeffrey Altman
a5378b71ee Windows: Test for PRSFS_INSERT in redirector interface
If a test for PRSFS_WRITE fails and the cm_scache.creator is the
current user, then also test for PRSFS_INSERT privilege.

Change-Id: Ib3e34f7ce50216cd9ff82afe9a7184f79d46ce15
Reviewed-on: http://gerrit.openafs.org/8978
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-02 09:23:54 -08:00
Jeffrey Altman
7c3f5bfba6 Windows: Additional I/O subsystem trace messages for AFSWrite
When debugging be able to obtain additional details about the
I/O subsystem.

Change-Id: Ie875870cb874c6df0d8f94781656af8a34eeddf5
Reviewed-on: http://gerrit.openafs.org/8977
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-02 09:23:28 -08:00
Jeffrey Altman
ed6354881d Windows: .readonly space reporting
.readonly volumes can be stored on multiple partitions which each
have a different size and free space available.  To ensure consistency
regardless of which partition the .readonly is accessed from and
because .readonly volume sizes cannot change, report the allocation
size of the volume as the partition size.  Continue to report that
volume has zero free sectors because the volume cannot be written to.

Change-Id: Ib57b1175da048344af615b9350d72d9eb3ffe97d
Reviewed-on: http://gerrit.openafs.org/8976
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-02 09:22:53 -08:00
Jeffrey Altman
ddba1a1f06 Windows: FILE_READ_ONLY_VOLUME not FILE_DEVICE_READ_ONLY
Instead of stating that the AFS device is read only; report
that the volume in question is read only using the FILE_READ_ONLY_VOLUME
file system characteristic.

Change-Id: I0b172f8a984802a3cefdea84436c9ed44f34d7f1
Reviewed-on: http://gerrit.openafs.org/8975
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-02-02 09:22:39 -08:00