]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux 4.9: deal with demise of GROUP_AT
authorMark Vitale <mvitale@sinenomine.net>
Wed, 14 Sep 2016 22:01:22 +0000 (18:01 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 14 Dec 2016 17:21:08 +0000 (12:21 -0500)
Linux commit 81243eacfa40 "cred: simpler, 1D supplementary groups"
refactors the group_info struct, removing some members (which OpenAFS
references only through the GROUP_AT macro) and adding a gid member.
The GROUP_AT macro is also removed from the tree.

Add an autoconfigure test for the new group_info member gid and define a
replacement GROUP_AT macro to do the right thing under the new regime.

Reviewed-on: https://gerrit.openafs.org/12390
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 8e81b182e36cde28ec5708e5fcbe56e4900b1ea3)

Change-Id: I46b5cd4571452f9506647aada2caf3a68c4fa7d5
Reviewed-on: https://gerrit.openafs.org/12478
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
acinclude.m4
src/afs/LINUX/osi_machdep.h

index e69a191bb80747cf323fe8b66375c632d0c976cb..b3e86b07e4a07555e3d440e074109fe89a8ad1d1 100644 (file)
@@ -886,6 +886,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_STRUCT([ctl_table], [ctl_name], [sysctl.h])
                 AC_CHECK_LINUX_STRUCT([dentry], [d_u.d_alias], [dcache.h])
                 AC_CHECK_LINUX_STRUCT([dentry_operations], [d_automount], [dcache.h])
+                AC_CHECK_LINUX_STRUCT([group_info], [gid], [cred.h])
                 AC_CHECK_LINUX_STRUCT([inode], [i_alloc_sem], [fs.h])
                 AC_CHECK_LINUX_STRUCT([inode], [i_blkbits], [fs.h])
                 AC_CHECK_LINUX_STRUCT([inode], [i_blksize], [fs.h])
index 54efc99b627dc171a306aae2a06061918535428d..4448fdcfdb5205267de88fdd407bd0a637266898 100644 (file)
@@ -146,6 +146,11 @@ static inline long copyinstr(char *from, char *to, int count, int *length) {
 #define NGROUPS NGROUPS_SMALL
 #endif
 
+#ifdef STRUCT_GROUP_INFO_HAS_GID
+/* compat macro for Linux 4.9 */
+#define GROUP_AT(gi,x)  ((gi)->gid[x])
+#endif
+
 typedef struct task_struct afs_proc_t;
 
 #ifdef HAVE_LINUX_KUID_T