Commit Graph

8394 Commits

Author SHA1 Message Date
Derrick Brashear
91f9a7f64b 1.6.0pre2 release notes
add release notes for 1.6.0pre2

Change-Id: I05eb7d02b3daa9935eec6cbc7f6b8f1de78c23f0
Reviewed-on: http://gerrit.openafs.org/3940
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-14 10:20:43 -08:00
Jonathan Billings
da912adbf1 RedHat: Change the defined initdir path to /etc/rc.d/init.d
On Red Hat systems, /etc/init.d is a symlink to /etc/rc.d/init.d.  We
should use the actual path for packaging the init scripts, to avoid
any issues with package verification.

Change-Id: I476193b3fd534c8aa70c67970bf2765a30f4c4d5
Reviewed-on: http://gerrit.openafs.org/3625
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-02-13 21:29:32 -08:00
Andrew Deason
8eca6a1153 Add PIC variant for libuafs
Build a libuafs that is built with PIC, so it can be used in shared
libraries on all platforms. Also build PIC variants for libafsutil and
libcmd, since we need them for a PIC libuafs anyway.

Change-Id: I017fa22c3b4dd661123ea92da7b3e5b69ee5c170
Reviewed-on: http://gerrit.openafs.org/3896
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-13 10:45:09 -08:00
Simon Wilkinson
adca541d70 auth: Rewrite KeyFile handling code
Extend the KeyFile API so that we can support arbitrary numbers of
different key types, each with their own key version numbers and
sub types. Completely rewrite the KeyFile implementation with this
in mind, but implement all of the "old" API in terms of the new one.

Given that the existing KeyFile is modified by third party programs,
we retain that as the storage location for all afsconf_rxkad keys.
Only keys with a type of 1, or above are stored in the new extended
keyfile.

Change-Id: I903a1de938544541a1bfecedb2a039ba24bdfdbc
Reviewed-on: http://gerrit.openafs.org/3772
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-13 10:39:53 -08:00
Jeffrey Altman
278798be3f Windows: Release Notes updates for 1.6pre2
A fairly thorough review of all sections to ensure that the information
is up to date.

Significant reformatting caused by XML editor.

Change-Id: Iad988b91091a02a7b5de2a1d1fae052fc5ee897f
Reviewed-on: http://gerrit.openafs.org/3936
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-12 20:04:42 -08:00
Marc Dionne
281f5bf5fb Linux: 2.6.38: dentry->d_count is not an atomic
d_count is now an int protected by the dentry's d_lock.
Take the lock when we use it, instead of using an atomic_*
function.

Change-Id: Ib70e4a5315cc343518fa983e47bc7ff925acfc7f
Reviewed-on: http://gerrit.openafs.org/3883
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-12 14:38:28 -08:00
Jeffrey Altman
c4ceaa632d Windows: ChangeLog updates for 1.6.pre1
Change-Id: I17de717ffd597c45720a4fbd39a14c5df67f870c
Reviewed-on: http://gerrit.openafs.org/3926
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-12 11:25:39 -08:00
Jeffrey Altman
e4119971b0 Windows: Fix GetIoctlHandle path construction
GetIoctlHandle() is used to construct the magic pioctl file
path used to initiate pioctl operations with the cache manager.
The first error introduced double directory separators.  The
second error was testing an uninitialized value which could
have resulted in a missing directory separator.

Change-Id: I4e863b854ea12b69858be712455dc6b6a0d36c39
Reviewed-on: http://gerrit.openafs.org/3925
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-12 11:25:22 -08:00
Jeffrey Altman
e6411317ce Windows: Fix symlink and mount point make \\afs\xxx handling
When processing a request to make a symlink or a mount point
in the afs root volume (\\AFS) the smb redirector will fail
the request because a server name by itself is not a valid path.
Therefore, we insert the "all" share component to refer to the
root volume as a valid path.  \\AFS\foobar becomes \\AFS\all\foobar.

A recent change stripped the trailing slash from the string
returned by Parent().  This broke the test that determines
whether or not the provided path that failed the IsAFS() test
is in fact referring to the \\AFS server and requires the insertion
of the "all" share name.

This patchset permits the test to work with \\AFS or \\AFS\
and removes extraneous directory separators from the generated
path containing the "all" share.

Change-Id: Ia3b28d83302d9737bd149b4a22bc3ee3a6c8da46
Reviewed-on: http://gerrit.openafs.org/3924
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-12 11:25:07 -08:00
Simon Wilkinson
1a474ac287 util: Actually install thread_pool_types.h
The action portion of the rule for thread_pool_types.h was missing,
so the file was never installed. As that file is a dependency for the
whole of the util directory, it would result in util being completely
rebuild with every make invocation.

Add the missing installation rule, so we don't rebuild quite so often!

Change-Id: Idb201c239b6b37a25567cf231059ef05536fc258
Reviewed-on: http://gerrit.openafs.org/3921
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 20:09:46 -08:00
Marc Dionne
f132054e4f scout: restore parallel make
Restore the + in the scout Makefile section, lost with commit
4a6a00d6.
Lets scout benefit from a parallel make and avoids a warning.

Change-Id: Ie4c35c93afae4bfefaae0a0db9d676200cb3ee7b
Reviewed-on: http://gerrit.openafs.org/3910
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 06:49:25 -08:00
Marc Dionne
296cf7d163 ubik: always prefer a dirty cache page for write transactions
If a write transaction is running concurrently with a read transaction,
a DRead in the write transaction may return a clean cache page brought
in by the read transaction, instead of a previously written dirty page
from the same transaction.  This can result in loss of the written data.

Fix by making sure there is not a dirty version of the requested page
before returning a clean one.

Bug spotted by Jeffrey Hutzelman.

Change-Id: I20543693c98218d8ec1f791508d9404043819376
Reviewed-on: http://gerrit.openafs.org/3764
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 19:04:08 -08:00
Rainer Toebbicke
be4abb4ec8 Early dispose of replies in rx_Multi
Handles replies as soon as they arrive in rx_Multi, limiting
strain on RX packet queues on massive rx_Multi loops.

Change-Id: I345f7dba1707beeb75bcc65bb519afb9dc741973
Reviewed-on: http://gerrit.openafs.org/3765
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 19:01:58 -08:00
Derrick Brashear
bf72dbf3d5 evalmountdata null pointer before use
volnamep can be used uninitialized. fix that.

Change-Id: I4aafb3bc56241b4cfc7ccd0a9cfa9e57bd97157a
Reviewed-on: http://gerrit.openafs.org/3777
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 19:00:39 -08:00
Marc Dionne
2eca7aef7b Linux: 2.6.38: deal with dcache_lock removal
dcache_lock is gone in 2.6.38, and some of the vfs locking rules
have changed.

Of interest for openafs:
- inode->i_lock protects the d_alias list
- dentry->d_lock protects d_unhashed()

Add a new configure test for dcache_lock, and replace its use by
the appropriate new lock(s).

Change-Id: Ic8d860d4f9f6438e966c15f5178c0d82343e3e1c
Reviewed-on: http://gerrit.openafs.org/3771
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 18:58:56 -08:00
Marc Dionne
5bcc0ea735 Linux: 2.6.38: Adjust for permission inode operation changes
The permission i_op has a new signature with a flags argument, and
must now deal with RCU path walking.
- Fix existing configure test for this i_op, it succeeds when it
shouldn't
- Add a new configure test for the new signature
- Make our permission i_op "RCU-walk aware" - return ECHILD if
called in that mode

Change-Id: I42a171694717f4621f29f9f59e4f6049926862a3
Reviewed-on: http://gerrit.openafs.org/3770
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 18:58:38 -08:00
Marc Dionne
ca38c9546e Linux: allow compile flags to be passed to AC_CHECK_LINUX_BUILD
Some linux autoconf tests require particular compile flags such as
-Werror.  Add a parameter to the AC_CHECK_LINUX_BUILD macro that
lets the caller pass in any needed special flags.

Adapt a few existing tests that were still using AC_TRY_KBUILD
directly.

Change-Id: I4a5e3db74f6fb9c35bfa7b2964a294f646e78626
Reviewed-on: http://gerrit.openafs.org/3769
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 18:58:20 -08:00
Andrew Deason
f47487db05 ConvertROtoRW: Use old copyDate for creationDate
When we convert an RO volume to an RW, currently we just copy the
copyDate and creationDate from the RO metadata into the RW. But the
copyDate and creationDate fields have different meanings for RW and RO
volumes: for ROs, the creationDate is merely the last time the data
was updated from the RW during a release operation.

So, if the copyDate is older than the creationDate, use the copyDate
as the new RW creationDate instead. This will probably not match the
creationDate of the original RW, but it will be closer to it, and it
will more accurately represent the conceptual "created time" of the
new RW.

Doing this can avoid forcing an unnecessary full dump on a subsequent
release of the resultant RW volume, since the creationDate is more
accurate.

Change-Id: Ibfffbdc4a79a568261e9e116f6991a3af9db5e0c
Reviewed-on: http://gerrit.openafs.org/3891
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 18:57:23 -08:00
Jeffrey Altman
ae11ef7898 Windows: correct pthread_xxx_init semantics
pthread lock and conditional initialization semantics
do not require that the lock structure be zeroed before
pthread_xxxx_init() functions are called.  Since the Windows
CriticalSection initialization does require that the memory
be zeroed, the pthread_xxxx_init() functions must zero the
memory just in case before performing the CriticalSection
initialization.

Change-Id: I61e78ca7cbc10f7d4144b8efcbb38f67bb8fd695
Reviewed-on: http://gerrit.openafs.org/3904
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-08 06:36:12 -08:00
Andrew Deason
380cc22a45 afscp: Fix -s option for writes
When writing to AFS with afscp, the -s option was sleeping before any
StoreData RPCs actually got issued to the fileserver. Move the sleep
to after we have done one rx_Read/rx_Write, so we sleep after starting
to contact the fileserver, to make sleeping while writing more
consistent with sleeping while reading.

Change-Id: Ib4e93b65f50cbad30d057ad7905617d00070c1a4
Reviewed-on: http://gerrit.openafs.org/3762
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-07 22:42:16 -08:00
Jeffrey Altman
15c497e90e Windows: remove duplicate advapi32.lib references
advapi32.lib is included in the conlibsdll macro.
No need to include it in the link list twice.

Change-Id: I2f9725f8b48b26afc959477d2fe2f2925f357ee7
Reviewed-on: http://gerrit.openafs.org/3882
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-03 13:20:53 -08:00
Ken Dreyer
dca093a170 spelling/grammar fixes for manpages
Several small fixes for spelling and grammar.

Change-Id: I5c1cbc933cd683f997b8bb649408d57d84a110f2
Reviewed-on: http://gerrit.openafs.org/3890
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-02-03 12:29:34 -08:00
Ken Dreyer
ad05600d86 spelling/grammar fixes for vos_clone manpage
Small spelling/grammar fixes for the vos_clone manpage.

Change-Id: If312799b9e95476a1de2d386e6d51cd800c7e069
Reviewed-on: http://gerrit.openafs.org/3879
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-02 09:23:52 -08:00
Andrew Deason
ba51b43e35 Rx: Do not stop keepalives on ACKALL receipt
We need to still keep sending periodic keepalives after receiving an
ACKALL, since the call is not done yet. ACKALLs can be received when
the peer has received all data from us, well before the call has
finished. This is particularly noticeable for long-lived calls that
have little data transfer, such as AFSVolForward and
AFSVolForwardMultiple.

This reverts commit b1549f29a9, which
was intended to be part of a fix for RT 20727.

FIXES 128848

Change-Id: I319e6e95d699ea87ecc72888452b5e1e6fcd88b0
Reviewed-on: http://gerrit.openafs.org/3876
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-01 19:25:55 -08:00
Andrew Deason
c15468e260 afsd: Do not check for /afs if -nomount
If -nomount was passed, we don't try to mount /afs. So, there is no
reason to require its existence.

Change-Id: Id426f345b94de8f2d673af62fe14f803d1c77752
Reviewed-on: http://gerrit.openafs.org/3822
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-01 06:18:20 -08:00
Jeffrey Altman
efe4a20c46 Windows: No NCBRESET when probing Loopback after start
The Netbios NCBRESET command resets all of the Netbios state
associated with the LAN adapter including the name bindings.
In response to a detected LAN adapter IP address change, the
smb_LanAdapterChange() function is called to determine if any
Netbios LAN adapter bindings that were in use or should be in
use by afsd_service were altered.  As part of the check,
lana_GetUncServerNameEx() is called which in turn calls
lana_FindLoopback() which in turn issued a lana_IsLoopback()
for each LAN adapter with the 'reset adapter' flag set to TRUE.

Calling lana_IsLoopback() with 'reset' equal TRUE was fine
when lana_GetUncServerNameEx() was only called from smb_Init(),
but it is not fine when called after the service is processing
calls.  By resetting the adapter the binding of the netbios name
"AFS" (or "<MACHINE>-AFS") is removed and all outstanding calls
are canceled.  If the SMB redirector attempts a reconnect during
the window before NCBADDNAM is called to re-bind the name, a
negative cache entry will be placed in the netbios name lookup
table that will prevent the SMB redirector from connecting to
the client for several minutes.

If the environment is one in which frequent IP address change
events are triggered, it is possible that the SMB redirector
will never be able to reconnect to the service.

This patchset adds a flag, LANA_NETBIOS_NO_RESET, to the
lana_GetUncServerEx interface which permits smb_LanAdapterChange()
to avoid the undesirable reset.  This negative flag was selected
in order to avoid changing the current default behavior as the
lanahelper library is used by out of tree installers and it
is preferred that OpenAFS avoid breaking them unnecessarily.

Change-Id: I094af7b342d27c65025235888705af8af1a7d56e
Reviewed-on: http://gerrit.openafs.org/3821
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-01 06:18:08 -08:00
Derrick Brashear
d12d2c08ee evalmountdata: put back colon in .:mount syntax only if we removed it
we looked for a set character (not NULL) at cpos before, instead
of looking for a non-NULL pointer. fix it.

Change-Id: Iaa370980b6482f1c50e11f161e3208c039043a6f
Reviewed-on: http://gerrit.openafs.org/3874
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-01-31 12:18:40 -08:00
Simon Wilkinson
66bd7cf95e tests: Fix auth/superuser-t.c to work on Linux
Fix the superuser tests so that they can be run on Linux. This
requires explicitly including sys/wait.h so we can use waitpid,
and changing some initialisation ordering so that we initialise
the RX library before we try and fake an rxkad token.

Change-Id: I8439ff6211a50c749ea22819e2d836409a64d2ad
Reviewed-on: http://gerrit.openafs.org/3776
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-31 09:45:43 -08:00
Simon Wilkinson
60eff137a9 bozo: Fix linker problem on Linux
Some unconnected changes break the Linux linker when faced with this
library list. librx is included too early, and liblwp isn't included
after the second inclusion of librx. Reorder the library list to fix
this problem, and so it matches the library order in the rest of our
modules.

Change-Id: Iba19111f613c70c8a6e66539b437a99d58faf7f4
Reviewed-on: http://gerrit.openafs.org/3775
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-31 09:45:30 -08:00
Simon Wilkinson
c8b0c9ca94 Windows: Install rx_atomic.h
Install the rx_atomic.h header into the build-wide header directory,
so that modules other than RX can make us of it.

Change-Id: Id3c3d0c486412942fb0772d7a8cf5d2fc1bf8876
Reviewed-on: http://gerrit.openafs.org/3774
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-31 09:45:17 -08:00
Simon Wilkinson
c0254b5652 Unix CM: Move kernel crypto include files
Move the crypto include files which are used for kernel builds into
the hcrypto directory where they logically belong.

Change-Id: Ic904e63e48d09e6a2049f4e1c4433980ecf0fa1e
Reviewed-on: http://gerrit.openafs.org/3767
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-31 09:45:09 -08:00
Jeffrey Altman
67195401c9 Windows: out of order locks cm_CheckCBExpiration
The recent refactoring of cm_CheckCBExpiration introduced
a lock ordering error between the cm_scache_t rw lock and the
cm_scacheLock.  This patchset fixes the error by dropping the
cm_scacheLock as each cm_scache_t is being processed.

Change-Id: Ib9e45abc5a43ca550d4a2a7923e3b30017e9fbf9
Reviewed-on: http://gerrit.openafs.org/3773
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-31 06:54:06 -08:00
Simon Wilkinson
d8a2291c06 aklog: Use correct CFLAGS
The aklog Makefile was setting XCFLAGS, but then not actually using them
which meant that we never used the correct include path for the Kerberos
libraries, or defined ALLOW_REGISTER

Change-Id: Iae573bc216b42bdf9aa49e9f5f42a883e08b6265
Reviewed-on: http://gerrit.openafs.org/3766
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-28 22:00:41 -08:00
Rod Widdowson
299e942ae9 Do not compare an FD_t < 0
FD_t is an abstract type.  Invalid file decriptors are == INVALID_FD.
In most places this module does the right thing.  Fix the last
stragglers where it is testing as less than zero.

Change-Id: I9ae3db8775ce69da070a4ebef5a532e1db035977
Reviewed-on: http://gerrit.openafs.org/3768
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-28 12:27:14 -08:00
Marc Dionne
52556d5029 linux: 2.6.38: Make d_revalidate RCU-walk aware
Signal to the vfs that we don't support path RCU walk in
d_revalidate.  It will call back in non-RCU mode.

Change-Id: I15d0d30131b205a38577666122b067807282a7cd
Reviewed-on: http://gerrit.openafs.org/3759
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-27 08:02:51 -08:00
Marc Dionne
08bb83d950 linux: 2.6.38: New d_op handling
In 2.6.38, the super block structure has a new field to hold the
default dentry ops.  The vfs will automatically set it for new
dentries in most cases.

Set s_d_op to our set of operations, and omit setting the dentry
ops where the vfs will already do it (and where new locking rules
prohibit it).

Change-Id: I9d738bdd528577d0a7ccd307246b5e935379c84d
Reviewed-on: http://gerrit.openafs.org/3758
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-27 08:01:01 -08:00
Andrew Deason
54fb96d2b6 RX: Avoid retrying calls on busy channels
When we receive an RX_PACKET_TYPE_BUSY packet, we currently ignore it.
This is a problem when the server has a long-running call on that same
call channel that we don't know about, since we will then keep
retrying the call on the same channel and keep getting
RX_PACKET_TYPE_BUSY responses.

Try to avoid this by returning the RX_CALL_TIMEOUT error when we get a
BUSY packet and there are other free call channels available on the
conn. When the application gets the error and retries the call, we
avoid using the same call channel again where possible. When all of
the call channels appear busy, we revert to effectively the old
behavior of retrying the call on the same channel until we get an
RX_CALL_DEAD (or similar) error.

FIXES 128671

Change-Id: I29b84aa36dcc856528c30d26811e5d6c4b78a1ca
Reviewed-on: http://gerrit.openafs.org/3431
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-27 07:59:48 -08:00
Heimdal Developers
29ef47dfab Import of code from heimdal
This commit updates the code imported from heimdal to
8ce821c38744b30e226ff024f675668b991b984d (switch-from-svn-to-git-1998-g8ce821c)

Upstream changes are:

Asanka C. Herath (2):
      Revert use of backslash as an escape for double quote in config strings
      Condition roken's ssize_t definition for compatibility

Love Hornquist Astrand (1):
      don't undefined SLIST

Change-Id: I8855e060e88008f95eb2b24b029843081702fc04
Reviewed-on: http://gerrit.openafs.org/3761
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-27 05:29:16 -08:00
Jeffrey Altman
962a95c21c Windows: Correct cm_volume locking
cm_volume_t flags was used for two categories of flags.  The first
protected by the cm_volume_t->rw lock.  The second protected by
the global cm_volumeLock.  Separate the flags field into two
afs_uint16 fields and break the flag space into FLAG and QFLAG.

Add assertions to the volume LRU functions to ensure that they
are always called with cm_volumeLock write-locked.

Correct two locations where cm_AdjustVolumeLRU() was called
read-locked instead of write-locked.

Change-Id: I7991b995a3c981cd5d08d9cbba09badc81518a5a
Reviewed-on: http://gerrit.openafs.org/3760
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-26 19:04:34 -08:00
Andrew Deason
5817a13b84 vol-salvage: Only delete bad vnodes during !check
In SalvageIndex, if check is true, we're only supposed to check for
consistency and not actually change anything (this is enforced by an
assert later on). The check for vnode magic consistency breaks this
assumption, and just always fixes the vnode.

Change this so we just error out if check is set, and the vnode magic
is wrong.

Change-Id: I9e2d3bd5e9e340a9b2ac66d70d52aa110b512561
Reviewed-on: http://gerrit.openafs.org/3756
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-01-25 12:07:00 -08:00
Derrick Brashear
14f5466eee MacOS: fix SetFile call in growlagent makefile
somehow this got corrupted earlier. fix it to use the right arg.

Change-Id: Ic597412819a9186d7b4b0b0c7e93e7c75b9a979a
Reviewed-on: http://gerrit.openafs.org/3755
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-25 11:46:55 -08:00
Jeffrey Altman
5fe04739e0 Windows: cm_GiveUpAllCallBacksAllServersMulti()
Implement a multi_RXAFS_GiveUpAllCallBacks version of
cm_GiveUpAllCallBacksAllServers() and use it in place of
the non-multi version.

Change-Id: I6d630ab7a5cf3a3434d088a9e8cde046b541cd3f
Reviewed-on: http://gerrit.openafs.org/3648
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-25 02:17:45 -08:00
Rod Widdowson
4f838b03bb Windows: fix parameters and return value from nt_seek
SetFilePointerEx takes specific values
(FILE_BEGIN/FILE_CURRENT/FILE_END) whilse fseek requires SEEK_SET,
SEK_END, SEEK_CUR.  It turns out that these overlap, but we should
not let that pass unchallenged.

SetFilePointerEx returns nonzero for success zero for failure. fseek
returns the other way around.

Neither of these changes currently matter, but we should fix them.

Change-Id: Ib31cf6265fa1e714232ff0d2e099c657e41f17e9
Reviewed-on: http://gerrit.openafs.org/3746
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-25 01:56:10 -08:00
Rod Widdowson
6d2636b886 Windows: read and write take void* buffers, open takes a const char*
nt_read and nt_write were defined to take a char* buffer which was
then cast to a void *.  Meantime every call of OS_READ and
OS_WRITE were casting to a char*.

Equally every call of OS_OPEN was passing down a const char*,
causing warnings.

This checkin fixes this:
 nt_read : char* to void*
 nt_write: char* to const void*
 nt_open char*  to const char*

Change-Id: Id4e138b9d347e1a9f35241e162a105d5f462b168
Reviewed-on: http://gerrit.openafs.org/3744
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-25 01:46:22 -08:00
Antoine Verheijen
42c5806599 OpenBSD: Eliminate complaint about built-in malloc.
With OpenBSD 4.8, OpenBSD now uses gcc 4. With its new
defaults, the OpenAFS compile of the kernel module now
complains incessantly about the conflict between the
built-in malloc versus the kernel version (which has
extra parameters). Therefore, set -fno-builtin-malloc
when compiling the kernel module to remove the noise
since the differences can't be reconciled otherwise.

Change-Id: I7e28e6275ca90f73a8d1f65d82f1ccf2cc3a0ead
Reviewed-on: http://gerrit.openafs.org/3751
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-24 09:39:34 -08:00
Antoine Verheijen
e1b0a95352 OpenBSD: Remove user.h from dir.c for OpenBSD 4.8
OpenBSD 4.8 no longer needs to include h/user.h in dir.c
and it's presence now gets in the way of the compile so
remove it.

Change-Id: Ie270f94db69f344c5c1a3942db395dbe3a47d5e9
Reviewed-on: http://gerrit.openafs.org/3750
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-24 09:39:22 -08:00
Antoine Verheijen
e4660dd8cf OpenBSD: curproc has moved in OpenBSD 4.8
With OpenBSD 4.8, curproc has moved from h/proc.h to
h/systm.h. Fix rx_event.c to reflect this change.

Change-Id: I38d4676d445bfafa47f2ae973d789d0b9f6a687a
Reviewed-on: http://gerrit.openafs.org/3749
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-24 09:27:39 -08:00
Antoine Verheijen
be0e9fb703 OpenBSD: Add support for OpenBSD 4.8
Add param headers and other config info for OpenBSD 4.8
support.

Change-Id: I3af37dd79260d29bb7f3793c9a965bb84faab31f
Reviewed-on: http://gerrit.openafs.org/3748
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-01-24 09:07:57 -08:00
Rod Widdowson
40497fa667 Windows: remove unused label in ntops.c
The label 'retry' in nt_open is not used and was causing a warning.  Remove it.

Change-Id: I964d954e4f9cdb672c689a6e757a5f62bea8f65c
Reviewed-on: http://gerrit.openafs.org/3747
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-01-24 05:56:24 -08:00
Rod Widdowson
ffb0cdcc91 Windows: remove faulty assumptions about device names in vol-salvage
The implementation has an assumption that all disk volumes have an
object name of \Device\HarddiskXXX (where XXX is a number).  This is
wrong since the name is purely a convention and since about WXP they
have been called \Device\HarddiskVolumeXXX.

Either way it is spurious to assume the format and then try to compare
the XXX.  This change just compares the strings.  This is done in a
case insenstive manner which is the safer option.  It is quite
feasible, but very unlikely that someone will uses 'case sensitively
different' object names.

Change-Id: Ifa91c88f2b17f747f30541b8833b722cf5993e48
Reviewed-on: http://gerrit.openafs.org/3745
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-01-23 21:10:57 -08:00