Linux: Get rid of !STRUCT_KEY_UID_IS_KUID_T case

On the few kernel versions before struct key.uid was converted to
kuid_t (v3.7-rc1~147^2~76), it was not possible to enable both
CONFIG_KEYS and CONFIG_UIDGID_STRICT_TYPE_CHECKS, so this case was
impossible.  That’s good, because it also had a typo in its
implementation (and was confusing to deal with correctly).

Change-Id: I4ecd164ed3604558ed4419bf6f9d531bd5d1a9ff
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/10443
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Anders Kaseorg 2013-11-07 15:37:25 -05:00 committed by Derrick Brashear
parent f5f53cb0a1
commit d0a13fe678
3 changed files with 0 additions and 21 deletions

View File

@ -1012,7 +1012,6 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
LINUX_LINUX_KEYRING_SUPPORT
LINUX_KEY_ALLOC_NEEDS_STRUCT_TASK
LINUX_KEY_ALLOC_NEEDS_CRED
LINUX_STRUCT_KEY_UID_IS_KUID_T
LINUX_INIT_WORK_HAS_DATA
LINUX_REGISTER_SYSCTL_TABLE_NOFLAG
LINUX_HAVE_DCACHE_LOCK

View File

@ -178,14 +178,6 @@ afs_linux_key_alloc(struct key_type *type, const char *desc, afs_kuid_t uid,
{
# if defined(KEY_ALLOC_NEEDS_STRUCT_TASK)
return key_alloc(type, desc, uid, gid, current, perm, flags);
# elif defined(KEY_ALLOC_NEEDS_CRED) && defined(HAVE_LINUX_KUID_T) && \
!defined(STRUCT_KEY_UID_IS_KUID_T)
/* In this case, uid and gid are specified relative to
* current_cred() */
return key_alloc(type, desc,
from_kuid(afs_current_user_ns(), uid),
from_guid(afs_current_user_ns(), gid),
current_cred(), perm, flags);
# elif defined(KEY_ALLOC_NEEDS_CRED)
return key_alloc(type, desc, uid, gid, current_cred(), perm, flags);
# else

View File

@ -375,18 +375,6 @@ AC_DEFUN([LINUX_KEY_ALLOC_NEEDS_CRED], [
])
AC_DEFUN([LINUX_STRUCT_KEY_UID_IS_KUID_T], [
AC_CHECK_LINUX_BUILD([if struct key.uid is kuid_t],
[ac_cv_struct_key_uid_is_kuid_t],
[#include <linux/rwsem.h>
#include <linux/key.h>],
[struct key k = {};
kuid_t *kuid = &k.uid;],
[STRUCT_KEY_UID_IS_KUID_T],
[define if struct key.uid is kuid_t])
])
AC_DEFUN([LINUX_INIT_WORK_HAS_DATA], [
AC_CHECK_LINUX_BUILD([whether INIT_WORK has a _data argument],
[ac_cv_linux_init_work_has_data],