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

Derek Atkins warlord@MIT.EDU
Thu, 24 Aug 2006 10:11:24 -0400


"chas williams - CONTRACTOR" <chas@cmf.nrl.navy.mil> writes:

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

That's certainly one thing I can do, but...

> 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:

It's weird.  2.6.9-5 doesn't even have linux/key.h!  But the test works
anyways.  2.6.9-34 does have linux/key.h.  Go figure.  Ahh, I see,
the version that failed HERE, 2.6.9-22 DOES have key.h, but that
doesn't have KEY_POS_* defined..

> 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

I'll try this patch and get back to you shortly..

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available