[OpenAFS-devel] 1.4.2rc1 fails on RHEL4 2.6.9 kernel: missing keyring defines?

chas williams - CONTRACTOR chas@cmf.nrl.navy.mil
Thu, 24 Aug 2006 10:06:07 -0400


In message <sjmlkpemfge.fsf@cliodev.pgp.com>,Derek Atkins writes:
>Indeed, KEY_POS_* isn't defined ANYWHERE in the kernel headers, so
>I think the configure test didn't work properly when it detected
>keyring support.
>
>Any suggestions for what I should look for or how to correct this?

you could change the configure test and stick a KEY_POS_VIEW in the
key_alloc() instead of just a 0.

rhel4 is a common enough case though that i guess i would like this
to work.  i am not familiar with the 2.6.9-RHEL keyring version so
i dont know if the behavior will be right, but you could try:

Index: src/afs/LINUX/osi_groups.c
===================================================================
--- src/afs/LINUX/osi_groups.c	(revision 45)
+++ src/afs/LINUX/osi_groups.c	(working copy)
@@ -263,7 +263,11 @@
 	    struct key *key;
 	    key_perm_t perm;
 
+#ifdef KEY_POS_VIEW
 	    perm = KEY_POS_VIEW | KEY_POS_SEARCH;
+#else
+	    perm = 0;
+#endif
 	    perm |= KEY_USR_VIEW | KEY_USR_SEARCH;
 
 #ifdef KEY_ALLOC_NEEDS_STRUCT_TASK