Memory allocated by SeQueryInformationToken() must be freed with
ExFreePool() and not AFSExFreePool().
Change-Id: Iece2c37d5dc524204cbf3d8d6869148e1a0ce88e
Reviewed-on: http://gerrit.openafs.org/7806
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
patchset 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1 introduced
the possibility that a NULL connection pointer could be dereferenced.
Prevent it.
Change-Id: Ic813642c8073cedc3e4df578c1b06fecd22cfbdf
Reviewed-on: http://gerrit.openafs.org/7794
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
In KERNEL builds if there are no available packet buffers the
new packet is dropped on the floor. In that case, the call's
rprev field should not be updated because the packet was never
"received" for delivery to the application.
Remove a dead comment from the same block of code.
Change-Id: I12a2b1618a430880d18efee48e6348e6f9ba8119
Reviewed-on: http://gerrit.openafs.org/7784
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
While tearing down extents, if an extent is found to be in use
it will be skipped. Must use 'ulReleaseCount' as the index
into the released extent array.
Change-Id: Iaf8a82c77ac8f4ddb30b35f43a4ce7a70f4a32a8
Reviewed-on: http://gerrit.openafs.org/7796
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
There's no need to declare a separate buffer and initialize a structure
inside it when we can just instantiate the structure directly.
Change-Id: Idbcad31343ce7f074015f5921a4997d3f6c9799a
Reviewed-on: http://gerrit.openafs.org/7798
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
i have a bulkstat refactor in mind, but this *still* isn't safe
on osx. disable as is on 1.6
Change-Id: I9446a6307e4890e4f7a78ab7fc054d84c39c992b
Reviewed-on: http://gerrit.openafs.org/7792
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Originally, the first store to "code" was dead here. Refactor the
error exits to follow the non-error exit path, which has the effect
of making the store to "code" live again (and also makes it less
likely that any new cleanup code will be unintentionally omitted).
In the ubik_ClientInit recovery case, handle the possibility that
aproc() returned zero and return UINTERNAL rather than letting the
caller think that this operation succeeded.
Change-Id: Idc198aa7a6e21975faaca9f159e822c9e3f66d98
Reviewed-on: http://gerrit.openafs.org/7776
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
the installer bundle, prefs pane and backgrounder all need to be 64 bit
mode since the system uses them as plugins
Change-Id: Ic2242ed8c993b7ed0a7c15ada78b625799bb446a
Reviewed-on: http://gerrit.openafs.org/7787
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
the whole of the api used for icon handling when you steal it
from a resource fork is deprecated in new macos. fine. we'll just make
an app bundle by cheating, move andy into a standalone icns file,
install him into the "bundle" and open it the macos way.
Change-Id: I94b3fdb5fdb08b28400bd0f6f6a18a07840124df
Reviewed-on: http://gerrit.openafs.org/7786
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
afs_server.c:1054: error: 'struct usr_in_ifaddr' has no member named 'ia_dstaddr'
well, for now, bye bye!
Change-Id: I3246a52e0bbdcfb92045de7e21febe0e65255db2
Reviewed-on: http://gerrit.openafs.org/7783
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
if new cases show up which match the current ones, they just work.
darwin60 and older were already killed from the tree, kill here also
Change-Id: Id246e13985c4752e99f606efd009bc5ce2871691
Reviewed-on: http://gerrit.openafs.org/7782
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Don't do in the body of the loop that which the loop itself
already does.
Change-Id: I41b5cbee86ab783d59024d8961c933525a5128d7
Reviewed-on: http://gerrit.openafs.org/7780
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
The assignments to conns, rxconns, and conntimer are all dead, so
remove them. The assignment to nconns is live, but rather far from
the for loop that actually uses it; move it to just before the loop.
Change-Id: I8daf642630cc2d468ba7db42de46b69cd88fac28
Reviewed-on: http://gerrit.openafs.org/7777
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Fix several off-by-one errors when traversing the IpMappedAddr
table in vldb_check. The last index (254) was not checked
in several places.
Change-Id: Ida5039fefa1fa55f6f647dee4ed3a26dd84a85d0
Reviewed-on: http://gerrit.openafs.org/7614
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Remove some code duplication by using afs_ResetVCache
in the flush volume data pioctl. Adds a flag to
ResetVCache to avoid unneeded calls to purge dnlc
when reseting all the vcaches in a volume.
Adds freeing of vcache link data in the flush volume
data pioctl.
Change-Id: Ib94e6b4d28078a03d2ffd217998bbc345c4968e4
Reviewed-on: http://gerrit.openafs.org/7538
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Actually, all of the initializers in this small function are dead.
Change-Id: If89fe3222ec39b34233f92f3aafd458f5723b0c5
Reviewed-on: http://gerrit.openafs.org/7771
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Near as I can tell, sdl is only assigned once, and is never read.
Change-Id: I145be12aef902db3ad149be39c1db360775d4456
Reviewed-on: http://gerrit.openafs.org/7775
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
In practice, argc should never be negative, but by convention it's
a signed int, so change the assertion to require it to be positive
rather than merely nonzero to get some help to the static analyzer.
Change-Id: I2d6c00b8ad2f8d573d717f1e2b88a4bb902f125c
Reviewed-on: http://gerrit.openafs.org/7765
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
malloc(0) is non-portable (may return a pointer to no space, or it
may return NULL. Just set the result to NULL without bothering to
call malloc(), as is done earlier in this function.
Change-Id: Ic3562e722113a1409ec7c30bd571e9470b3e092b
Reviewed-on: http://gerrit.openafs.org/7766
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
It is unlikely that this memory leak actually matters as the caller
will normally just exit.
This whole source file could stand to be reformatted.
Change-Id: Ic5cb52a73ac09ae492c6e6ab606dfaf92a1ab8bf
Reviewed-on: http://gerrit.openafs.org/7767
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
If getsockname() returns an error (which shouldn't be possible),
rx_InitHost would leak a connection hash table (which probably
doesn't matter because the caller will just exit anyway). Make
the analyzer happy by freeing the memory anyway.
Change-Id: If8e78ebfb787d2dc1c0b9f95f91b6e7510c9e307
Reviewed-on: http://gerrit.openafs.org/7768
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
split_volume() can call copyVnodes() with parVnode == NULL, so guard
the one reference to parVnode (a memcpy()) to avoid a fault.
Change-Id: I631a78bcfa6a7a465e997a6714849ca0d2d86f86
Reviewed-on: http://gerrit.openafs.org/7769
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
The AFS file server had always performed a PRSFS_READ permission
check on the volume's root directory (1.1) vnode before responding
succesfully to the client. A successful response contains the
following volume state information:
Message of the day (if any)
Offline message (if any)
Online flag
InService flag
Blessed flag
NeedsSalvage flag
Type
MinQuota
MaxQuota
BlocksInUse
PartBlocksAvail
PartMaxBlocks
All of this information is publicly available to anonymous users
via other services so it is odd that it is hidden from anonymous
cache managers.
As sites begin to tighten the ACLs on volumes due to privacy
and security concerns this READ permission check is begin to
cause problems for Windows clients that rely upon the quota and
block counts to determine whether or not it is likely to be safe
to perform an extending write. In many environments volumes are
being configured such that the root directory is 'l' for all and
only the subdirectories provide for 'ridw'. Under these situations
the user is able to read/write the data but cannot determine how
much free space is available. Since all of the data returned by
RXAFS_GetVolumeStatus is publicly available, the patchset removes
the access check entirely.
Change-Id: Ic8a8d755b0ed61789a49243827083ae97c137560
Reviewed-on: http://gerrit.openafs.org/7705
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Nobody can possibly be using this program, but even so, don't ignore
return values. Unfortunately, the return value of system() is a bit
complicated to interpret.
Change-Id: I6edbbb7c010b4e534de9033b91849e2d54bf4b25
Reviewed-on: http://gerrit.openafs.org/7778
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
The interface flag has one fewer T than normal English usage would
suggest, so this code was never compiled on systems that don't have
the normally-spelled version as an alias.
Change-Id: I7ae4ab45eda937d122894828ec8fdc104f43392f
Reviewed-on: http://gerrit.openafs.org/7772
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
libc_r is the old user-mode threading library. Modern versions of
FreeBSD don't include it, and the conditionals here that (nearly
always) override it with the correct library, libpthread, are true
on every version of FreeBSD for which OpenAFS might plausibly be
compiled. So just use the correct library all the time.
Change-Id: I8f813814973cec3173f44636523c3bf0bee27b3e
Reviewed-on: http://gerrit.openafs.org/7764
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Given a file id indicates whether the volume it is located on
is replicated or not.
Change-Id: Icae0a387fc26e2a76b4b6f87fdb5c330da31a96b
Reviewed-on: http://gerrit.openafs.org/7758
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Server rankings should be composed from three values:
1. administrative preferences
2. network address locality
3. peer performance (rtt and congestion window)
This ensures that local subnet servers are always
preferred.
Add a new rank for down servers so they are always
sorted las in cm_serverRef lists.
Change-Id: Id00e151fc1acd65db558571e6a3a0e7cfbf3c6ca
Reviewed-on: http://gerrit.openafs.org/7757
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Remove the spurious dates surrounding IP addresess in the VLLog.
Instead of multiple calls to the logging function for a given log
line, format a string containing the addresses and call the log
function once.
Changes the log output from,
... The following fileserver is being registered in the VLDB:
... [Tue Jul 4 14:11:43 2012 192.168.10.128Tue Jul 4 14:11:43 2012 ]
... It will create a new entry in the VLDB.
to,
... The following fileserver is being registered in the VLDB:
... [192.168.10.128]
... It will create a new entry in the VLDB.
Change-Id: I6c4ac2dcc60fe4c5ced79017b91049f0c327e935
Reviewed-on: http://gerrit.openafs.org/7750
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Use interlocked increment and decrement to track the waiters
and use the wait queue itself to determine if there are waiters
instead of the CM_SCACHEFLAG_WAITING flag.
Change-Id: I9c570cb228d73253989932149346ecfc45804267
Reviewed-on: http://gerrit.openafs.org/7752
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
CM_SCACHEFLAG_CALLBACK and CM_SCACHEFLAG_STATD were cleared at
various points and tested at various points but never set.
Remove them.
Change-Id: I018c51febf01e1311dc38e3779e8c8880890f20a
Reviewed-on: http://gerrit.openafs.org/7751
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
When performing a RXAFS_FetchData[64] RPC, a short read from
rx_Read[v] is not a reason to stop processing the call unless
it is the first read and the file server FetchData offset bug
has been detected. If not, only stop processing if the
rx_Read[v] return value is <= 0.
Change-Id: I5b10ce7903686fa3d9c251e6c92c4bcec376ed40
Reviewed-on: http://gerrit.openafs.org/7749
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
The Windows cache manager stores the mount point or symlink target
string in the cm_scache_t object. If the string is the empty string
then the target needs to be resolved. Otherwise it is considered
up to date. With this approach, care must be taken to ensure that
the string is erased whenever the data version changes.
This patchset records the data version of the mount point target
string in the cm_scache_t object. Being up to date is determined
by comparing the current data version of the object to the mount
point string version. A match and the string is up to date.
Change-Id: I4dfdc1af5894548afb35e84e77f7f607674bd7af
Reviewed-on: http://gerrit.openafs.org/7745
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Ignore status information if the interface number is unknown.
Currently only version 1 is recognized.
Change-Id: I02618ef81e42ad5b6ef903e2f25598dfb7053ca4
Reviewed-on: http://gerrit.openafs.org/7743
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
If we specified an RW id of 5, an RO id of 6, and no BK id, this code
would assign the BK id to RW+1, or 6. This gives the RO and BK volumes
the same volume id, which is a mistake. Choose a different id instead.
Change-Id: I7910008dd6147a95d482337f91926e9e0d924b9e
Reviewed-on: http://gerrit.openafs.org/7603
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
fsprobe is built pthreaded, so it needs MT_LIBS; otherwise HP-UX and
possibly other platforms complain about missing pthread symbols. Just
copy the libs from the fileserver link line.
Change-Id: I78e69c9ea45e983e997b1bc1bb59f97ee07c3e2f
Reviewed-on: http://gerrit.openafs.org/7609
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Third declaration of 'eid_s' in WalkNextChain() set but unused.
[-Werror=unused-but-set-variable]
Change-Id: I7a4e2ea3dea3d58379e31d3c6cb4b3169a882bce
Reviewed-on: http://gerrit.openafs.org/7737
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Use interlocked operations to set and clear the flags in the osi
mutex and readwrite lock objects.
Change-Id: I92089650d3474efb76c45293b5209b3e2350d983
Reviewed-on: http://gerrit.openafs.org/7720
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>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
On multiprocessor systems, spin counts are faster than entering
a processor wait state when there is critical section contention.
Microsoft recommends a count of 4000. This feature is only available
on XP and above which is fine since OpenAFS master and 1.7 no longer
support Windows 2000.
Change-Id: I1b40d00b2a91e60e1676a53e1c38eb5f9bfadc69
Reviewed-on: http://gerrit.openafs.org/7719
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>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>