]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux 4.7: Follow key_alloc API change
authorAnders Kaseorg <andersk@mit.edu>
Tue, 26 Jul 2016 01:04:59 +0000 (21:04 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 3 Aug 2016 14:35:45 +0000 (10:35 -0400)
Linux v4.7-rc1~124^2~2^2^2~9 adds an eighth optional argument
restrict_link.  The same commit adds a KEY_ALLOC_BYPASS_RESTRICTION
macro, which we test so we can avoid adding another configure test.

Reviewed-on: https://gerrit.openafs.org/12345
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 83a0f2a9ef88e63fbd300fbb436c17ca80c245b4)

Change-Id: I1ba16468888e160fdedf90ff1a9007d90dce9c3b
Reviewed-on: https://gerrit.openafs.org/12348
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Joe Gorse <jhgorse@gmail.com>
Tested-by: Joe Gorse <jhgorse@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/LINUX/osi_compat.h

index 059627395f347c327fffbc1b74a648f462a4456b..a25fd2ee4a80b488541199d865d3b6e95a0bbd78 100644 (file)
@@ -190,7 +190,9 @@ static inline struct key *
 afs_linux_key_alloc(struct key_type *type, const char *desc, afs_kuid_t uid,
                    afs_kgid_t gid, key_perm_t perm, unsigned long flags)
 {
-# if defined(KEY_ALLOC_NEEDS_STRUCT_TASK)
+# if defined(KEY_ALLOC_BYPASS_RESTRICTION)
+    return key_alloc(type, desc, uid, gid, current_cred(), perm, flags, NULL);
+# elif defined(KEY_ALLOC_NEEDS_STRUCT_TASK)
     return key_alloc(type, desc, uid, gid, current, perm, flags);
 # elif defined(KEY_ALLOC_NEEDS_CRED)
     return key_alloc(type, desc, uid, gid, current_cred(), perm, flags);