Commit Graph

9203 Commits

Author SHA1 Message Date
Stephan Wiesand
0d61953e69 Make OpenAFS 1.6.5.2
Update configure version strings for 1.6.5.2. Note that macos kext
can be of form XXXX.YY[.ZZ[(d|a|b|fc)NNN]] where d dev, a alpha,
b beta, f final candidate so we have no way to represent 1.6.5.2.
Use 1.6.6 dev 2 for macos.

Change-Id: I4ab3fca89c95ad331db4b0a9823138e87f823c3b
Reviewed-on: http://gerrit.openafs.org/10586
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-12-20 07:32:19 -08:00
Stephan Wiesand
fc5fb7febf Update NEWS for 1.6.5.2
Release notes for 1.6.5.2

Change-Id: I59f5aa9a6887e3d23288672a08e67e0d676e239c
Reviewed-on: http://gerrit.openafs.org/10587
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-12-20 07:31:20 -08:00
Marc Dionne
05c45dc096 Linux: Remove extra "goto out" from tmpfs fix
Remove a stray "goto out" that should not have been applied in
this spot along with the tmpfs fix.

Thanks to Stephan Wiesand for pointing it out.

Reviewed-on: http://gerrit.openafs.org/9953
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit f393612d8f)

Reviewed-on: http://gerrit.openafs.org/10193
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
(cherry picked from commit 86ce4dcac9)

Change-Id: Ic81399e7ac9c2034f02e95b9cbc335d79d0f00fa
Reviewed-on: http://gerrit.openafs.org/10613
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-12-20 07:30:52 -08:00
Marc Dionne
823d182a5b Linux: Fix tmpfs cache support
As of kernel 3.1, tmpfs no longer has a readpage() operation in its
address space operations.  Some of the cache manager code relies on
this, causing an oops if tmpfs is used as backing store for the
cache.

As a minimal fix, detect that there is no readpage() and disable
the optimizations that depend on it.

Reviewed-on: http://gerrit.openafs.org/9949
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 3767cf8bf4)

Reviewed-on: http://gerrit.openafs.org/9950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
(cherry picked from commit 7a40c83337)

Change-Id: I063428ba5a177b57eccf883c2019dbc670a6c080
Reviewed-on: http://gerrit.openafs.org/10612
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-12-20 07:30:31 -08:00
Jeff Layton
512ef081c1 Linux: stop trying to use getname/putname
The current code has afs_putname defined as

    kmem_cache_free (names_cachep, (void *) name);

This is wrong and will cause a double -free when syscall auditing is
enabled. Fix it to call putname properly.

Instead of that, just create a new afs_getname function that doesn't
bother with struct filename at all, and use that unconditionally.

Signed-off-by:Jeff Layton <jlayton@redhat.com>

Reviewed-on: http://gerrit.openafs.org/10547
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeff Layton <jlayton@poochiereds.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit d40ed73916)

Reviewed-on: http://gerrit.openafs.org/10578
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit d68e6c24f5)

Change-Id: Ic8055a6ed7aa955266c0f3112817924ef8ba591b
Reviewed-on: http://gerrit.openafs.org/10604
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-12-20 07:23:42 -08:00
Ken Hornstein
6e97ac37ca Packaging support for MacOS X 10.9 "Mavericks".
Based on work originally done by Matt Haught <dmhaught@ncsu.edu>.

Reviewed-on: http://gerrit.openafs.org/10539
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit cb53d255a6)

Reviewed-on: http://gerrit.openafs.org/10542
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
(cherry picked from commit 77826dd3ee)

Change-Id: Ib609dfbaa337f0e5046e9a0d03aebbbfdf26873a
Reviewed-on: http://gerrit.openafs.org/10610
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-12-20 07:19:37 -08:00
Ken Hornstein
4ec5d78f41 Add support for configuration of MacOS 10.9 "Mavericks".
Based on work originally done by Matt Haught <dmhaught@ncsu.edu>

Reviewed-on: http://gerrit.openafs.org/10538
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit aac384b2ed)

Reviewed-on: http://gerrit.openafs.org/10541
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
(cherry picked from commit 33edca6227)

Change-Id: I452f743074c3e5635df45e815840273a2e2188bc
Reviewed-on: http://gerrit.openafs.org/10609
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-12-20 07:19:17 -08:00
Ben Kaduk
9d340e42db Fix DARWIN build with clang
In 1d8937b860 we added a function call to kauth_cred_unref in the
DARWIN100 case (replacing a macro), but added the inclusion of
sys/kauth.h only when using versions older than DARWIN80.
On DARWIN100 and above, clang detects that the now-implicit function
declaration is in conflict with the actual prototype, which is included
later through afs/sysincludes.h when compiling the kernel rx code.

Since including sys/kauth.h seems to have been harmless for old versions,
just include it always.

Reviewed-on: http://gerrit.openafs.org/9676
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 6ad2cc0275)

Reviewed-on: http://gerrit.openafs.org/10549
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
(cherry picked from commit e4b2242f3a)

Change-Id: I5e3b28bbf513d47792dbf7808d6d88db6457ed33
Reviewed-on: http://gerrit.openafs.org/10608
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-12-20 07:18:55 -08:00
Simon Wilkinson
59269b39b2 DARWIN: Make crfree() an inline function
On Darwin 100, we have
   #define crfree(X) kauth_cred_unref(&X)
which expands in one place to
   kauth_cred_unref(&(afs_ucred_t *)avc->linkData)

clang warns about this in -Werror mode, because arguments to the
address-of operator must be lvalues.

To fix this make crfree an inline function, which will then let us do
the indirection required.

Reviewed-on: http://gerrit.openafs.org/7073
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 1d8937b860)

Reviewed-on: http://gerrit.openafs.org/10548
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
(cherry picked from commit 931d1a8bea)

Change-Id: Iba1def8ae4004e918185109767bd8a0f0a263813
Reviewed-on: http://gerrit.openafs.org/10607
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-12-20 07:07:56 -08:00
Ken Hornstein
5f45d5b8eb Remove extra whitespace from macro invocations
On MacOS X 10.9, the compiler has switched to LLVM and as a consequence
generates an error if there is a space between a macro invocation and
the starting left parenthesis.

Based on code originally done by Matt Haught <dmhaught@ncsu.edu>.

Reviewed-on: http://gerrit.openafs.org/10540
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit ce96143d79)

Reviewed-on: http://gerrit.openafs.org/10543
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
(cherry picked from commit e54a0902fb)

Change-Id: I1dc8a50bb28f5656bc05b261870b6e01684034a5
Reviewed-on: http://gerrit.openafs.org/10606
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-12-20 07:07:36 -08:00
Ken Hornstein
5dd30fbf35 Support for changes to OS X Mavericks VNOP_SYMLINK() function.
Add support for an extra argument to afs_symlink() to return the
newly-created symlink vnode if requested (this is needed on OS X
Mavericks).  On OS X Mavericks return the newly-created symlink vnode in
the symlink vnops functions, on all other platforms ignore it.

It turns out that technically OS X has required the symlink to be
created for a while, but code inside of symlink() would call namei() on
the symlink name if the returned vnode point was NULL.  The difference
is that on Mavericks the Manditory Access Control Framework has been
enabled, and that turns on some extra code which unconditionally calls
vnode_mount() on the returned vnode pointer, which ends up causing a
panic

Reviewed-on: http://gerrit.openafs.org/10474
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 3f4c1099b7)

Reviewed-on: http://gerrit.openafs.org/10519
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
(cherry picked from commit 192536d62b)

Change-Id: I01b319c43ee74d220cccc6c0defbe1a8cd38b9c4
Reviewed-on: http://gerrit.openafs.org/10605
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-12-20 07:07:19 -08:00
Stephan Wiesand
331f439a25 Update NEWS for 1.6.5.1
Update the release notes for 1.6.5.1 with information about the change in
gerrit 10331.

Change-Id: I0bd8d7aa3fa7aeb9a1a44f0aed06f85d6dcdcc06
Reviewed-on: http://gerrit.openafs.org/10332
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-10-09 07:20:17 -07:00
Christof Hanke
52d720348f linux-kernel-module: move keyring-specific
function afs_set_session_keyring into
if defined(LINUX_KEYRING_SUPPORT)
block. Otherwise compilation fails.

Reviewed-on: http://gerrit.openafs.org/10324
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit b0d75d0687)

Reviewed-on: http://gerrit.openafs.org/10325
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Christof Hanke <christof.hanke@rzg.mpg.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
(cherry picked from commit 994da16692)

Change-Id: I266cb65d60c814bdb333f8193f95b5b61955b544
Reviewed-on: http://gerrit.openafs.org/10331
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-10-09 07:18:10 -07:00
Stephan Wiesand
bf8c714465 Make OpenAFS 1.6.5.1
Update configure version strings for 1.6.5.1. Note that macos kext
can be of form XXXX.YY[.ZZ[(d|a|b|fc)NNN]] where d dev, a alpha,
b beta, f final candidate so we have no way to represent 1.6.5.1.
Switch to 1.6.6 dev 1 for macos.

Change-Id: I44a34f5c8ac3f3518da51e179db05723d3ad754a
Reviewed-on: http://gerrit.openafs.org/10317
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-10-04 02:36:54 -07:00
Stephan Wiesand
750bbeae7f Update NEWS for 1.6.5.1
Release notes for 1.6.5.1 .

Change-Id: I06ae7a885f59b1b38fc21b27b57b3d843c203a73
Reviewed-on: http://gerrit.openafs.org/10316
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-10-04 02:36:26 -07:00
Andrew Deason
f6c11fdb35 rx: Always call rxi_StartListener
Commit c10f5296 made rx_Init only call rxi_StartListener in the kernel
if we have RXK_LISTENER_ENV. But this doesn't make any sense, since
rxi_StartListener only does anything if RXK_LISTENER_ENV is _not_
defined. As a result, for any non-rxk-listener non-rx-upcall platform,
we never receives rx packets in the kernel, since we never set up our
rx packet callback. The only such platform appears to be AIX, since
while other platforms (HPUX, FBSD, IRIX) have a non-rxk-listener mode,
they also implement an rxk-listener mode that we always turn on.

So, just always call rxi_StartListener, and let the ifdef guards for
the various implementations of rxi_StartListener do the right thing.

FIXES 131725

Reviewed-on: http://gerrit.openafs.org/10263
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 2aa26fcb4e)

Reviewed-on: http://gerrit.openafs.org/10272
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
(cherry picked from commit ccc7a46b41)

Change-Id: I4589ac14e8039c7201d169652ca2f16650522f57
Reviewed-on: http://gerrit.openafs.org/10280
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-10-04 02:35:38 -07:00
Derrick Brashear
2cbbd1b8ef linux: core dump requires write fop
turns out not just writev is unhappy with aio_write (only); core dumping
wants a write file op. always provide it.

FIXES 131729

Reviewed-on: http://gerrit.openafs.org/10251
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 13165c0583)

Reviewed-on: http://gerrit.openafs.org/10254
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
(cherry picked from commit 8cef9359cd)

Change-Id: Id0f0e3f56d29d8739b875f794a3204f551aac7a4
Reviewed-on: http://gerrit.openafs.org/10279
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-10-04 02:35:21 -07:00
Christof Hanke
87e5fd01f3 LINUX: Keyring deal with suse-specific key_type op
instantiate_prep used for checking for
STRUCT_KEY_TYPE_HAS_PREPARSE

Reviewed-on: http://gerrit.openafs.org/10194
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 9db8b123e4)

Reviewed-on: http://gerrit.openafs.org/10252
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
(cherry picked from commit 51af11f297)

Change-Id: I0b29b8b57fe1f975663108bd295723d0916c73af
Reviewed-on: http://gerrit.openafs.org/10278
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-10-04 02:34:52 -07:00
Derrick Brashear
35a2299ecb linux: provide read and write ops even when we have aio
read/write will fall back to aio ops but e.g. writev will
fail if there is not either a write or writev op explicitly.

force the fallback via do_sync_read/do_sync_write

required with 2.6.18-348.x rhel kernels but probably not newer ones

Reviewed-on: http://gerrit.openafs.org/10246
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit e6af2ffc86)

Reviewed-on: http://gerrit.openafs.org/10248
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit ae8c311e20)

Change-Id: I1062a768c5a4e48a054ce0b86cba893f77d5eaf1
Reviewed-on: http://gerrit.openafs.org/10277
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-10-04 02:34:30 -07:00
Marc Dionne
08d91e64f5 Linux 3.11: Adapt to d_count changes
In preparation for upcoming changes in the 3.12 cycle, d_lockref
was introduced late in the 3.11 cycle.  The dentry's d_lock and
d_count are moved to this new structure.  A new d_lock macro makes
the change transparent for locking, but direct users of d_count
must adapt.  A new d_count() helper function is provided and
should now be used.

Use the new d_count() helper function if available, and move
some of the ifdef logic into a helper compatibility function.

Reviewed-on: http://gerrit.openafs.org/10219
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 1f577e41b6)

Reviewed-on: http://gerrit.openafs.org/10241
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 8e14537c60)

Change-Id: Ia16740e45824971dc8016971429c7926e1378f6c
Reviewed-on: http://gerrit.openafs.org/10276
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-10-04 02:34:04 -07:00
Marc Dionne
0c5afaca54 Linux 3.11: Convert from readdir to iterate file operation
Convert the readdir function so that it can be used as the new
"iterate" file operation.  This new operation is passed a context
that contains a pointer to the filldir function and the offset.
The context is passed into the new dir_emit function that will
call the function specified by the context.

The new dir_emit function returns true on success, so we must be
careful about how we check for failure since this is different
behaviour from what filldir currently does.

Reviewed-on: http://gerrit.openafs.org/10051
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 902b8809f0)

Change-Id: I12dc2517af66b66b2de6b2cb01d39e3a0cbc5fe2
Reviewed-on: http://gerrit.openafs.org/10118
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-08-14 07:39:52 -07:00
Derrick Brashear
984ff6cb2b dirpath: update keytab strings in windows
this was missed in the pullup from 33eecea7db

Change-Id: Iee734bf06af4152ead5cfcf33bbbcafc39812c5a
Reviewed-on: http://gerrit.openafs.org/10109
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-07-25 06:11:01 -07:00
Simon Wilkinson
2f411f4f8c Merge branch 'rxkad-kdf-1.6' into origin/openafs-stable-1_6_x
Merge the changes necessary for OpenAFS-SA-2013-003 and
OpenAFS-SA-2013-004 back into the stable branch.
2013-07-24 16:10:28 +01:00
Michael Meffie
5f5b02a571 ubik: Fix encryption selection in ugen
Make sure that we encrypt when requested to by the application

Change-Id: If4c2ba2257bf060d3e9169ccdbcae54f54dfe5d7
2013-07-17 23:10:42 +01:00
Simon Wilkinson
0e41558190 Make OpenAFS 1.6.5
Change-Id: I693297ef6e20358966930cb29116d45b9151811f
2013-07-17 13:14:16 +01:00
Ben Kaduk
9e1c24a583 Add support for deriving DES keys to klog.krb5
(cherry picked from commit e79102e791)

Change-Id: Ia7ebfdd10dcfd6cd164b10275016147630748bac
2013-07-17 13:14:16 +01:00
Andrew Deason
4b7553600a Reload rxkad.keytab on CellServDB modification
Make the reloading of rxkad.keytab keys occur in the same way that
KeyFile keys are reloaded. That is, we only try to reload them if the
CellServDB mtime has changed. This is intended to have exactly the
same reloading behavior as KeyFile reloads.

I would have triggered this from afsconf_Check, but that approach
has annoyances. (Calling ticket5_keytab functions directly from
cellconfig pulls in libkrb5 dependencies for everything that uses
cellconfig, and we'd have to trigger an afsconf_Check call by calling
some other cellconfig function.)

9102f49a3bdc67ed74e254349eb55b529472f45c
2013-07-17 13:14:16 +01:00
Andrew Deason
d2024c158e Avoid calling afsconf_GetLatestKey directly
Don't call afsconf_GetLatestKey to determine whether we can print our
own local tokens, since we may have keytab 'local' keys, but no DES
keys. Just try to construct them and see if it fails, using
afsconf_PickClientSecObj or afsconf_ClientAuth{,Secure} as
appropriate.
2013-07-17 13:14:16 +01:00
Andrew Deason
d4788f6e28 auth: Do not always fallback to noauth
Make afsconf_PickClientSecObj error out if we can't construct
localauth tokens (unless the caller explicitly requested rxnull
fallback). afsconf_ClientAuth{,Secure} still falls back, as always.
2013-07-17 13:14:16 +01:00
Ben Kaduk
95d57c7447 Clean up akimpersonate and use for server-to-server
Since a6d7cacfd, aklog has been able to print a krb5 ticket to
itself for an arbitrary client principal, allowing a user with
access to the cell's krb5 key to get tokens as an arbitrary user.

Now that it is possible to use native krb5 tickets with non-DES
enctypes for authentication, and akimpersonate is available from libauth,
use printed native krb5 tickets for server-to-server communication (as well
as the -localauth versions of the client utilities).

Remove the early call to afsconf_GetLatestKey() in
afsconf_PickClientSecObj() so that we do not end up picking an old DES
key before we try to find a better key to use.

Before doing so, refactor the akimpersonate code to be more usable
and readable, and eliminate some dead code.  For example, we always printed
addressless tickets, so that code could be removed.  Other code had excessive
stack usage for a library routine, which is eliminated.  Use a start time
of 0 instead of 300 so that the printed ticket will always be
detected as infinite-lifetime.

In order to ensure usability on all platforms (in particular Solaris),
provide a couple more compat shims to implement routines which are not
always available from the krb5 library, in particular encode_krb5_ticket
and encode_krb5_enc_tkt_part.  Thanks to Andrew Deason for implementing
these compatability routines.

UKERNEL doesn't need this stuff.
2013-07-17 13:14:15 +01:00
Alexander Chernyakhovsky
15b77552b2 Move akimpersonate to libauth
Give it its own source file and header, install the header at
depinstall time, and have aklog get the akimpersonate functionality
from libauth.

Keep the linux box copyright from aklog_main.c (but strip the trailing
whitespace), as that block was added with the akimpersonate code.

Remove all calls to afs_com_err() as is fitting for library code,
to let it build.  Do not bother removing curly braces which are
no longer needed; a future cleanup commit will catch that.
2013-07-16 20:37:56 +01:00
Chaskiel Grundman
1c7fa14059 Derive DES/fcrypt session key from other key types
If a kerberos 5 ticket has a session key with a non-DES enctype,
use the NIST SP800-108 KDF in counter mode with HMAC_MD5 as the PRF to
construct a DES key to be used by rxkad.

To satisfy the requirements of the KDF, DES3 keys are first compressed into a
168 bit form by reversing the RFC3961 random-to-key algorithm

Change-Id: I4dc8e83a641f9892b31c109fb9025251de3dcb27
2013-07-16 20:37:56 +01:00
Chaskiel Grundman
33eecea7db Integrate keytab-based decryption into afsconf_BuildServerSecurityObjects
Now all servers can have it.

authcon.o grows a krb5 dependency and needs to get KRB5_CPPFLAGS.

Change-Id: I95fecb3f88c19b3d5193ea8200fa20c86ec08ad7
2013-07-16 20:37:55 +01:00
Chaskiel Grundman
14db1a40e5 New optional rxkad functionality for decypting krb5 tokens
An additional, optional mechanism for decrypting krb5-format tokens
is provided that uses the krb5 api with a key from a keytab
instead of using libdes and the AFS KeyFile.

The AIX compat stub for krb5_c_decrypt is contributed by Andrew Deason.

Change-Id: I97c08122c60482b84d602d6fa6482f1d5deef142
2013-07-13 11:45:16 +01:00
Chaskiel Grundman
5e0cbc9305 Add rxkad server hook function to decrypt more types of tokens
Allow tokens to be encrypted with algorithms other than DES.
The security object owner must provide an implementation
by calling rxkad_SetAltDecryptProc.

Make sure plainsiz is initialized before calling the alternate decrypt
proc.
2013-07-13 11:40:01 +01:00
Andrew Deason
772a378bc4 viced: Rename fs_rxstat_userok
The fs_rxstat_userok function can be used for other purposes; give it
a more general name.

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

Change-Id: I44301904cc8e7145ba13276a32b7cea475bc0574
Reviewed-on: http://gerrit.openafs.org/9484
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-07-12 08:12:35 -07:00
Stephan Wiesand
dc8b3d0c3c make openafs 1.6.4
The wrong commit was tagged for the 1.6.3 release by accident.
Update the version strings to 1.6.4, and adapt the release notes.

Change-Id: I0c4f8e796a1017aebaaf6c219fd12e1547ad9319
Reviewed-on: http://gerrit.openafs.org/9983
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-06-18 07:38:49 -07:00
Stephan Wiesand
74bd4b6e9f make openafs 1.6.3
update version strings for 1.6.3, finalize release notes

Change-Id: I2f3e3dee0b1ea9e2fce522ad72e9018825b4103b
Reviewed-on: http://gerrit.openafs.org/9976
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-06-17 09:24:50 -07:00
Stephan Wiesand
f1702d57bc Update release notes for 1.6.3
As of pre3, we'll support Linux 3.10 clients (at least up to rc3).

Change-Id: I81b783ad563e4a7735638bde2aa77d11ea1ec83c
Reviewed-on: http://gerrit.openafs.org/9959
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-06-02 10:55:36 -07:00
Stephan Wiesand
6e92b66271 make 1.6.3pre3
prerelease for OpenAFS 1.6.3

Change-Id: I92e3df57e9c8d55759c317cc8d7743c23c349399
Reviewed-on: http://gerrit.openafs.org/9958
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-05-31 05:53:26 -07:00
Marc Dionne
d5fcb35aea Linux 3.10: Replace create_proc_entry() with proc_create()
Add an afs_proc_create() compat function that uses the
appropriate kernel function based on a configure test.

Reviewed-on: http://gerrit.openafs.org/9854
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 9b24013426)

Change-Id: I976ef345b1638434026e852e577e1f4474171e3d
Reviewed-on: http://gerrit.openafs.org/9948
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-05-30 07:44:56 -07:00
Marc Dionne
2bbd762c57 Linux 3.10: Include linux/aio.h directly
This file needs bits from linux/aio.h, but gets them indirectly
from the inclusion of aio.h by sched.h.  That gets removed for
Linux 3.10.

Since this header is not of general interest elsewhere, just include
it directly here.

Reviewed-on: http://gerrit.openafs.org/9912
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit fca4252621)

Change-Id: I7da471ee033087592b9ec3f10331baf0135cc201
Reviewed-on: http://gerrit.openafs.org/9947
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-05-30 07:44:28 -07:00
Stephan Wiesand
b9984671c5 make 1.6.3pre2
prerelease for OpenAFS 1.6.3

Change-Id: Ie6148239feae53bdaca9409c6b75714a25968c00
Reviewed-on: http://gerrit.openafs.org/9909
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-05-15 11:31:59 -07:00
Stephan Wiesand
4d59d59dc0 Update release notes for 1.6.3
We merged another change, helping Linux 3.6+ clients. Mention it.

Change-Id: I71d2ee7f2b6fc591d767f37436d0e154809e0786
Reviewed-on: http://gerrit.openafs.org/9910
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-05-15 11:31:16 -07:00
Antoine Verheijen
af2dda555a OpenBSD 5.3: Replace use of copyinstr for setting mount point name.
As a result of a realignment of kernel memory in OpenBSD 5.3,
the copyinstr() routine no longer works for copying the mount
point name into the internal mount table structure. It also
fails silently, so it's not noticed until someone looks at
the mount table and discovers that the mount point name for
AFS is missing.

This patch replaces the use of copyinstr() with strlcpy() for
copying the mount point name in OpenBSD 5.3.

Note that this is consistent with how other similar device
support has addressed the same issue in OpenBSD 5.3.

Reviewed-on: http://gerrit.openafs.org/9752
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit b39461fc67)

Change-Id: I5e9a3d0871360e0e3b19cdb2b4a609baeed050f8
Reviewed-on: http://gerrit.openafs.org/9908
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-05-15 10:31:55 -07:00
Anders Kaseorg
a71cc5511c Linux: osi_TryEvictVCache: Don’t skip the first dentry if D_ALIAS_IS_HLIST
An hlist doesn’t begin with a sentinel like a list does, so the old
code would skip the first dentry or crash with a NULL dereference if
there wasn’t one.  Use the kernel’s list_for_each_entry or
hlist_for_each_entry macros instead of trying to do it manually.

Should fix a crash observed by Alex Chernyakhovsky on kernel 3.6 and
newer.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/9857
Reviewed-by: Alex Chernyakhovsky <achernya@mit.edu>
Tested-by: Alex Chernyakhovsky <achernya@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit ad6e31d5fe)

Change-Id: Id8b31246067b5a718af91c8c206d5abd5210c558
Reviewed-on: http://gerrit.openafs.org/9898
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-05-15 10:31:04 -07:00
Stephan Wiesand
3afe8cd715 make openafs 1.6.3pre1
prerelease for 1.6.3

Change-Id: I8eb600cdc0ed55d15e928a9f165f68d3ff924f82
Reviewed-on: http://gerrit.openafs.org/9858
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-05-08 08:51:25 -07:00
Stephan Wiesand
c0457a046d Preliminary release notes for 1.6.3
Change-Id: Ie4a6a984cfd9b819b0a3170acce7817998307157
Reviewed-on: http://gerrit.openafs.org/9859
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-05-08 08:01:28 -07:00
chas williams - CONTRACTOR
b8a7861ed0 ppc64_linux26: build binaries as 64-bit by default
lwp doesnt work since ucontext/setjmp are incomplete when running 32-bit
binaries with the 64-bit kernel.

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

Change-Id: Ic4fd5c1a861db8e96dd58a79d7fb2ea73ab4f0d6
Reviewed-on: http://gerrit.openafs.org/9605
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-05-08 07:28:44 -07:00
Andrew Deason
9be556d2c1 afsio: Pass KRB5_LDFLAGS along with KRB5_LIBS
We need this in case e.g. the krb5 library we're using is in an
alternate location, so we can pass -L. aklog already does this, so do
it for afsio, too.

This is a 1.6-only change. On master, this problem went away when the
krb5 ldflags/cflags/etc were standardized in commit
6f9443e702.

Thanks to Måns Nilsson for reporting this.

Change-Id: I79aeb1f4de123b7550b64c1890a2773a44ff8d1e
Reviewed-on: http://gerrit.openafs.org/9692
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2013-05-08 07:22:49 -07:00