8099 Commits

Author SHA1 Message Date
Russ Allbery
9a5b168f75 Mention KRB5CCNAME in the aklog man page
AFS users not otherwise familiar with Kerberos may not realize that
one sets KRB5CCNAME to use an alternative ticket cache.  Mention the
variable in the aklog man page, although defer to the Kerberos
documentation for most details.

Reviewed-on: http://gerrit.openafs.org/2761
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
(cherry picked from commit 089cd2c1039315fe400f85eec1c9f2152ea090c7)

Change-Id: I0428c8c4dc7f6b1f667e69b571be944777bcb057
Reviewed-on: http://gerrit.openafs.org/4002
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-20 05:52:35 -08:00
Simon Wilkinson
c4a29776c2 Add additional dependencies for shlibafsrpc
fsint and rxstat need to be build before shlibafsrpc, so add them
to the dependencies list.

Reviewed-on: http://gerrit.openafs.org/2755
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit a4ec68691869deaf12a6fe405394bba2c9003fb9)

Change-Id: I5528390faf2c0ff9c85505673f4317b0c3900e0e
Reviewed-on: http://gerrit.openafs.org/4001
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-02-20 05:52:20 -08:00
Simon Wilkinson
32459e5c68 Add a few missing entries to our .gitignores
Add a couple of build products to the relevant .gitignore files

Reviewed-on: http://gerrit.openafs.org/2599
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 9da71758f194b98e1be3dee8d588b703874ea9a6)

Change-Id: I0d81739fbadad6a1787e17863df0ee6dcdd083bf
Reviewed-on: http://gerrit.openafs.org/4000
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-20 05:51:48 -08:00
Andrew Deason
bfaefe518b RX: Include netinet/ip6.h before inet/ip.h
Some older Solaris (at least some Solaris 8) requires netinet/ip6.h to
be included before inet/ip.h, or the compiler chokes on some
ipv6-related declarations in inet/ip.h. So, include it.

Reviewed-on: http://gerrit.openafs.org/3662
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 9cc9b0d618ba1c787a8a684077c1d2f205b8889c)

Change-Id: Ic342a8ff9dc4c52c8f7178f103db93ba9bef6712
Reviewed-on: http://gerrit.openafs.org/3990
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-18 20:04:41 -08:00
Derrick Brashear
98558995d6 check for error_message
IRIX apparently has enough krb5 to try building aklog, but no
error_message. ok. so let's cope

Reviewed-on: http://gerrit.openafs.org/3208
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 572f9baaeb626293f4db62a66db1ea9b9a373c03)

Change-Id: I44c71ffedcbe55db696db667d1941a7bdc781cff
Reviewed-on: http://gerrit.openafs.org/3987
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-18 06:15:13 -08:00
Simon Wilkinson
71082a661f aklog: Fix some format warnings
Fix some format warnings (size_t vs int) which only appear when we're
building with Heimdal.

Reviewed-on: http://gerrit.openafs.org/2740
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 5bc4b4956509256e8cf13bd04e4615ee2cb31c65)

Change-Id: Ifac99313d96dcd3d33733ffd75db752ab3854608
Reviewed-on: http://gerrit.openafs.org/3986
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-18 06:15:01 -08:00
Simon Wilkinson
7a3c6b7c5e aklog: Fix weak_crypto tests
The tests for the various ways of enabling weak cryptography fail
with current Heimdal master, because it defines krb5_allow_weak_crypto
but does not prototype it.

Fix this by testing for the Heimdal version (which MIT does not provide)
first, and only if that's not available, try to use allow_weak_crypto.

Reviewed-on: http://gerrit.openafs.org/2739
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 696e1c015eeef259451c101813b9e930e402cb49)

Change-Id: Ia69e1899f1e3d058271f147d33b58383ca35b4ec
Reviewed-on: http://gerrit.openafs.org/3985
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-18 06:14:49 -08:00
Derrick Brashear
bf0f3dbd06 aklog weak warning
make aklog guess when you need to enable weak crypto

Reviewed-on: http://gerrit.openafs.org/3209
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 93ab13cbf3cfee30524f63925a11a0ab0c55d600)

Change-Id: I48b0f6c40a2a6b989bfc859267b080e31a6ffc3c
Reviewed-on: http://gerrit.openafs.org/3988
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-18 06:14:33 -08:00
Simon Wilkinson
29d624a98c RedHat packaging: Use %{dist} not %{osver}
There's a standard mechanism for defining a RPMs target
distribution in the Fedora and RedHat worlds. This is to use the
%{dist} macro, and to insert it at the end (not the beginning) of
the release field.

Move over to using this standard mechanism, and modify the build
system to match. Note that this means that RPM names have now
changed slightly.

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

Change-Id: I764a91e787acb2d2e3d0595cb344bc5b44465bd9
Reviewed-on: http://gerrit.openafs.org/3984
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-18 06:14:17 -08:00
Andrew Deason
de1158431a afsd: Make mountdir check kernel-specific
Checking if the /afs directory exists only makes sense for the kernel
afsd. The libuafs afsd does not care if the mount directory actually
exists on the machine or not, since it may not interact with the mount
directory path on the local machine at all.

So, make the mountdir check code be a new afsd function
(afsd_check_mount), and have it stat() the mount directory only in the
kernels-specific afsd.

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

Change-Id: Ib4f4fe3a6072f9aea4683bb1ba531da8d965b156
Reviewed-on: http://gerrit.openafs.org/3983
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-17 22:08:29 -08:00
Jonathan Billings
a5bbc871ce 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.

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>
(cherry picked from commit da912adbf1512702a17b8e381af3d0225875e67c)

Change-Id: Ib00275f873987700312b402d6fe0513ce96e9cf8
Reviewed-on: http://gerrit.openafs.org/3982
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-17 22:08:20 -08:00
Ben Kaduk
b3ce627af1 Pull in 64BIT_ENV for FBSD
Support for some newer FreeBSD versions was added after we killed
AFS_64BIT_ENV, but the commit to kill it was not cherry-picked
to openafs-stable-1_6_x.  Cherry-picking the new version support
thus introduced a bug, as we still need to define AFS_64BIT_ENV
for these systems on this branch.

We attempted to fix this previously, but that fix was incomplete.
Apply the full fix now.

A direct commit to openafs-stable-1_6_x, as this change is not
relevant for master.

Change-Id: If83edd51552f4719ed80179f7d7423ab15bbb0cb
Reviewed-on: http://gerrit.openafs.org/3976
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-02-17 14:08:22 -08:00
Andrew Deason
e31e380d5d LINUX: Define zero_user_segment
When the kernel does not have the zero_user_segments function, we
define it ourselves. Also define the zero_user_segment function, since
we use it, and a kernel lacking zero_user_segments will also lack
zero_user_segment.

Reviewed-on: http://gerrit.openafs.org/3432
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit fb325c3c63d844eda1da23e2ab5facba14994a6f)

Change-Id: I076fcc2e194b2d23394742a1510fd3ccbb5d7a03
Reviewed-on: http://gerrit.openafs.org/3972
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-02-17 07:37:46 -08:00
Andrew Deason
d79f9306f5 vol: Restore inode OS_READ/WRITE
Commit 335ccb4082657b7d0e4e9af1076356cf115642d2 removed the OS_READ
and OS_WRITE definitions for non-namei code. We need those definitions
to build the pread/pwrite emulation functions, so put them back in.
This allows us to build the inode fileserver backend when we do not
have native positional I/O.

Reviewed-on: http://gerrit.openafs.org/3959
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0bb6170b222ee2e9a0a3d224dac890adaed945a9)

Change-Id: Ib025c1ddc9a8d09319941eefe32bd2ba1df6764b
Reviewed-on: http://gerrit.openafs.org/3965
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-16 13:47:59 -08:00
Andrew Deason
02cbe51710 HPUX: Disable positional I/O
Some versions of HP-UX have the pread() and pwrite() functions, but
they behave in odd ways; most notably, ignoring the offset argument
when _FILE_OFFSET_BITS is defined to 64.

This is noted in recent gnulib documentation
<http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/posix-functions/pwrite.texi>,
and slightly less clear references to pread() being broken can be
found on the development mailing list for git itself.

It is not completely clear what specific HP-UX versions are affected
by this. An autoconf run-time test may also be insufficient, because
the same binaries should be usable on machines with broken and
non-broken pread() implementations. So, to be safe, disable positional
I/O on HP-UX unconditionally.

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

Change-Id: Iaa27ae965482aafd0f981e70ce33df438af650e9
Reviewed-on: http://gerrit.openafs.org/3964
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-16 11:40:59 -08:00
Derrick Brashear
07c00c73a1 MacOS: don't allow krb5 at login when AD plugin authenticates
if AD is being used to verify authentication (e.g. via builtin)
don't allow get krb5 at login to succeed. since a helper does this we can't
grey the option, but we can decline to act on it.

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

Change-Id: I8a9fbfcfee92c333af437a925cf09cea9044adc6
Reviewed-on: http://gerrit.openafs.org/3941
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
openafs-stable-1_6_0pre2
2011-02-14 10:18:29 -08:00
Derrick Brashear
c17a2fd5d3 make 1.6.0pre2 version changes
version changes for unix

Change-Id: Iadaa2f74a643faa2646897100c7528de5477a5c1
Reviewed-on: http://gerrit.openafs.org/3938
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-02-14 10:18:19 -08:00
Jeffrey Altman
a0cd6d544c 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: I3d4c12ee98606fa34c31132b4b0ce0d0937471af
Reviewed-on: http://gerrit.openafs.org/3937
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-12 20:05:28 -08:00
Jeffrey Altman
4c1ee95e4a Windows: ChangeLog updates for 1.6.pre2
Change-Id: I19e0dda81df746b9545cb1b9c360af7d207cc665
Reviewed-on: http://gerrit.openafs.org/3926
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-on: http://gerrit.openafs.org/3934
2011-02-12 20:05:16 -08:00
Marc Dionne
9a91e1a9b1 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.

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

Change-Id: I45caa6aef451a7f93bfa43dfb1ebe9b0b856fbd0
Reviewed-on: http://gerrit.openafs.org/3935
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-12 20:04:01 -08:00
Jeffrey Altman
66a5faefc7 Windows: 1.5.78 Change Log summary
Change-Id: I6cdd2c5d2818fe69a5454c90fb6cdaeaefc2deb3
Reviewed-on: http://gerrit.openafs.org/3161
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-on: http://gerrit.openafs.org/3933
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-12 18:44:27 -08:00
Jeffrey Altman
96d0857082 Windows: Version 1.6pre2
1.5.9902.0

Change-Id: I5095d7241bcb9ce11455e09c17bda1dec1d9edf9
Reviewed-on: http://gerrit.openafs.org/3931
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-12 18:34:12 -08:00
Andrew Deason
205e790eeb doc: Do not process .in files for html
We do not want to process .pod.in files when generating HTML versions
of the man pages. Change the filename filtering logic to only accept
.pod files, so we'll also skip over all other stuff we don't want,
like CVS or fragments directories.

Change-Id: I246000a9323852d0aeefd7e7357eeece4daa3346
Reviewed-on: http://gerrit.openafs.org/3302
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-on: http://gerrit.openafs.org/3930
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-12 18:33:38 -08:00
Jeffrey Altman
a62fc32354 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: I691fde63adf295c380312772e7d320ff99e89d70
Reviewed-on: http://gerrit.openafs.org/3929
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-12 18:33:24 -08:00
Jeffrey Altman
d1e412b275 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: Idf5f934aaa22c71789ab7970a8e3cd48e1a79d44
Reviewed-on: http://gerrit.openafs.org/3928
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-02-12 18:33:11 -08:00
Antoine Verheijen
5545a57290 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.

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

Change-Id: Ie59100172daae48dea985749e07416daea88b8d2
Reviewed-on: http://gerrit.openafs.org/3923
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-11 05:15:24 -08:00
Antoine Verheijen
85eb528a68 OpenBSD: Add support for OpenBSD 4.8
Add param headers and other config info for OpenBSD 4.8
support.

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>
(cherry picked from commit be0e9fb703d9ca0ae17f1117cd53796f82d7fb30)

Change-Id: I03d4474d66d015126654d6d031a1870705733a41
Reviewed-on: http://gerrit.openafs.org/3922
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-11 05:15:13 -08:00
Antoine Verheijen
471ec3d1e2 OpenBSD: Make OpenBSD 4.7 param headers consistent
OpenBSD follows the policy of using a separate common
param file (post 1.4.x). However, when introducing support
for i386 OpenBSD 4.7, this was not done and a single param
config header file was created instead. This patch changes
the param files for OpenBSD 4.7 so that they are
consistent with the other OpenBSD versions by using a
separate common param header file.

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

Change-Id: I5845e68f3fd7fac905993a0ac7a371e058c9a618
Reviewed-on: http://gerrit.openafs.org/3920
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 20:09:23 -08:00
Derrick Brashear
e648f30a67 evalmountdata null pointer before use
volnamep can be used uninitialized. fix that.

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>
(cherry picked from commit bf72dbf3d5550857a8d41c910baaa722690c1eee)

Change-Id: I0d08aeed130882aeda12c0181d5b738d4c889491
Reviewed-on: http://gerrit.openafs.org/3919
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 20:09:04 -08:00
Marc Dionne
cc0382da34 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).

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

Change-Id: Ic6cff1884a55aeb2ab29518e8d160000c6254fc5
Reviewed-on: http://gerrit.openafs.org/3918
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 20:08:54 -08:00
Marc Dionne
af5e870f59 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

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

Change-Id: Ia47dfe390ea317925acfca709dbd637b68e94ca8
Reviewed-on: http://gerrit.openafs.org/3917
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 20:08:43 -08:00
Marc Dionne
5d370e4533 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.

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

Change-Id: I421c95f4f4f0b001ac1eab400dfbabfd2008e7a5
Reviewed-on: http://gerrit.openafs.org/3916
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 20:08:35 -08:00
Jeffrey Altman
968aa2042c 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.

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>
(cherry picked from commit ae11ef7898ecffe8eb2a38151602572c24e32a76)

Change-Id: I71092131183daa0627c21c328bd5e5bf182a0fc2
Reviewed-on: http://gerrit.openafs.org/3915
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 20:08:27 -08:00
Jeffrey Altman
006260b8b0 Windows: remove duplicate advapi32.lib references
advapi32.lib is included in the conlibsdll macro.
No need to include it in the link list twice.

Reviewed-on: http://gerrit.openafs.org/3882
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 15c497e90edc69312dba6843521ff08f0ac19248)

Change-Id: Ibcd82014ca28e8ba0bec6e184bc5ae276a0eea90
Reviewed-on: http://gerrit.openafs.org/3914
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 09:10:52 -08:00
Ken Dreyer
74296237ca spelling/grammar fixes for manpages
Several small fixes for spelling and grammar.

Reviewed-on: http://gerrit.openafs.org/3890
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit dca093a17097f7e24d43afe4544e4be896b86680)

Change-Id: Id7a937572a1806f0ef812b8d7089ed5d3c5dabd9
Reviewed-on: http://gerrit.openafs.org/3913
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 09:10:41 -08:00
Ken Dreyer
8d308a9552 spelling/grammar fixes for vos_clone manpage
Small spelling/grammar fixes for the vos_clone manpage.

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>
(cherry picked from commit ad05600d86d6737f55d7b785bc7c503c4a45be00)

Change-Id: I112899208f1b556a84d20d9ea2f2542f030cbfdc
Reviewed-on: http://gerrit.openafs.org/3912
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 09:10:32 -08:00
Jeffrey Altman
7f8744c331 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.

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

Change-Id: Ice4380550fec8c1ac2c2c5ec76e1b73f23cd4829
Reviewed-on: http://gerrit.openafs.org/3911
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 09:10:20 -08:00
Jeffrey Altman
e5c361ee5e Windows: cleanup preprocessor definition namespace
Do not use reserved preprocessor symbol names.  Instead
use OPENAFS_<PATH>_<HEADER>_H formatted names where <PATH>
is the subdirectory path from src/ in which the header
file originates in the repository.

Reviewed-on: http://gerrit.openafs.org/3599
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 8e9fff9ed8d773e4a22730d485c0617c456bb0e0)

Change-Id: Ic99253b74d3d88712b1959757d294b31ad590ba0
Reviewed-on: http://gerrit.openafs.org/3806
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-02-10 09:10:10 -08:00
Andrew Deason
e0753a6f56 namei: Limit traversal when removing data dirs
namei_RemoveDataDirectories currently calls delTree with 'tree'
pointing to the part of the path immediately following n_base (i.e.
starting at the beginning of n_voldir1). This causes delTree to
traverse all of n_voldir1, trying to delete every directory it finds.

Since we are typically only trying to remove a single volume when
calling namei_RemoveDataDirectories, instead call delTree with 'tree'
pointing to immediately after n_voldir1, and beginning at n_voldir2
and try to just rmdir n_voldir1 afterwards. This way, we do not
traverse a large fraction of the entire partition when just trying to
delete a single volume, and so can significantly speed up volume
removals.

(cherry picked from commit 1ca0a24775794ba2e645854a3bbaa656f2fc8086)
Reviewed-on: http://gerrit.openafs.org/2651
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

Change-Id: Iadae1e231b533695af615a231e42ad8204674fe4
Reviewed-on: http://gerrit.openafs.org/3908
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 13:55:17 -08:00
Andrew Deason
efd3fa3808 namei: Do not remove n_voldir1
When removing data directories in namei_RemoveDataDirectories, do not
remove the n_voldir1 directory (directory X in /vicepa/AFSIDat/X).
Removing this directory can race against the creation of an entirely
unrelated volume, causing the create op to fail (since it tries to
create a directory in a directory that no longer exists).

We don't currently have the necessary locking to make this safe, and
since the overhead of n_voldir1 existing is pretty negligible, just
leave it there. Also add some comments briefly justifying this.

Note that other similar races probably exist for directories under
n_voldir1, but they would only be between volumes in the same VG, and
so are much less likely to occur.

(cherry picked from commit f2df207274c65b4fa8c24419150e9084a4d17fca)
Reviewed-on: http://gerrit.openafs.org/2727
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

Change-Id: I2df4b73dd5125da0a2de52c3011ba167dc036a8b
Reviewed-on: http://gerrit.openafs.org/3907
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 13:55:01 -08:00
Andrew Deason
d3cdeb9e78 Remove unreached lines
Fix some macros to eliminate unreached trailing empty statements (such
as: "{code = foo; goto error;};"), and other oddities causing
"statement not reached" warnings. Also eliminate a couple of code
blocks that were never reached.

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

Change-Id: Ibe9a94c64d38fe102fdf4fb9c182a5eb3b2adaa5
Reviewed-on: http://gerrit.openafs.org/3906
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 13:01:10 -08:00
Jeffrey Altman
b682683bdd vol: Always use INVALID_FD to indicate an invalid fd
file descriptors on Windows are not ints and therefore
cannot be safely compared against -1.  Always use INVALID_FD
which is -1 on UNIX and INVALID_HANDLE_VALUE on Windows.

Reviewed-on: http://gerrit.openafs.org/3178
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit d21dd16789458c07e63abe021f93f656dba4e52c)

Change-Id: I99e0ef2f0c1ff23817ffb13b270bc0f04bcf12a4
Reviewed-on: http://gerrit.openafs.org/3905
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 12:27:10 -08:00
Andrew Deason
d69b877247 vol: Add VInit cond var and remove busywaits
In DAFS, FSYNC_sync was waiting for VInit to reach at least 2 by
looping around pthread_yield(). For a server with a large number of
volumes, it can take a while for volumes to preattach, and so we are
effectively busy-waiting for preattach to finish. This can slow
fileserver startup and peg the cpu.

So instead, add a condition variable for when VInit changes, and wait
on that. Also modify other checkers of VInit to use the cond var.

(cherry picked from commit 31bb2e5eb5feb9c8e84d17b49fe70268127cdd43)
Reviewed-on: http://gerrit.openafs.org/2648
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

Change-Id: I773ab01095bb0c101a34146ef9bf201946ebcf8b
Reviewed-on: http://gerrit.openafs.org/3887
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 06:56:51 -08:00
Andrew Deason
123c79c2b9 Avoid thread-unsafe PrintInode in threaded code
Some potentially-threaded callers were calling PrintInode with a NULL
first argument, which is not threadsafe. Alter them to use local
storage.

(cherry picked from commit 38cf31463e3f3c675de727c1e793e117a90e6d20)
Reviewed-on: http://gerrit.openafs.org/2593
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

Change-Id: I4b6e0f8c41180c017739dbfdb4f2ecbce96df8ec
Reviewed-on: http://gerrit.openafs.org/3886
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 06:56:37 -08:00
Jeffrey Altman
ab6f0b9630 vol: Use OSI_NULLSOCKET and not -1 to indicate invalid fssync fd
The FSync file descriptor is an osi_socket which has an invalid
value of OSI_NULLSOCKET which is not necessarily -1.  Be sure to
compare against OSI_NULLSOCKET and not -1 when checking an invalid
value.

Reviewed-on: http://gerrit.openafs.org/3179
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e8991ff8286f151d109bb4f98d885a583e198f83)

Change-Id: I1627ce0b78d10626b7d375546b400459ff1724ca
Reviewed-on: http://gerrit.openafs.org/3885
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 06:56:24 -08:00
Andrew Deason
1c8b1964f8 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 b1549f29a9515de09d4a64bfb28bf5afdfee2615, which
was intended to be part of a fix for RT 20727.

FIXES 128848

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>
(cherry picked from commit ba51b43e3558058b949ccc5de1d4559e4caf9d9b)

Change-Id: I9a2edb819ba052786ec9f4c9d15d11ea48905af3
Reviewed-on: http://gerrit.openafs.org/3878
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 06:56:10 -08:00
Jeffrey Altman
c26c4ad4ee 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.

Reviewed-on: http://gerrit.openafs.org/3773
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 67195401c915b23e092f98c89ab5f5580a9cf3f6)

Change-Id: I14e57ca1b6b2f86bee585bc6fa86bdf0b7d77d44
Reviewed-on: http://gerrit.openafs.org/3872
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 06:55:52 -08:00
Rod Widdowson
e4ff7ed4c2 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.

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>
(cherry picked from commit 299e942ae98dfea3a4804c724e5d440715974e0c)

Change-Id: I8f676c45794ecf53af65e9b3089c7b2d075089bb
Reviewed-on: http://gerrit.openafs.org/3871
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 06:55:38 -08:00
Marc Dionne
f709e62625 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.

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

Change-Id: I44d8577feba382a193d1f1735a05db74c3151df0
Reviewed-on: http://gerrit.openafs.org/3870
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 06:55:23 -08:00
Marc Dionne
06b8a3d52b 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).

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

Change-Id: Ia108e8c7c624521965bdbddd7a37ebf281eb7967
Reviewed-on: http://gerrit.openafs.org/3869
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-08 06:55:10 -08:00