my brief inspection suggests that the osi_groups.c & osi_machdep.c
files are part of the kernel module, so you won't need to delete anything,
just install the right binary module for your running kernel.



On Mon, Jul 18, 2005 at 01:22:32PM -0500, Ron Croonenberg wrote:
> Hi Dan,
> 
> I think that install the "other" rpms and then copy the modules to the
> right place idea.
> 
> What modules and binaries need to be moved ?
> (and also, do I need to change any config files or anything else ?)
> 
> >It's not clear what you needed to change to get this to work with
> >openssi.was it just in the kernel module?
> 
> Somone from HP working on OpenSSI helped me making changes.
> I'll attach the changes to the bottom. While trying to get it to work we
> (well mainly she) came up with 2 patches to make OpenAFS at least
> compile.
> 
> >If so, the quick & dirty fix is to just install the existing
> >openafs-kernel rpm and then install your module manually - it should
> >correspond to a different kernel version than the openafs-kernel one 
> >so there will be no conflict.
> 
> As I mentioned, for now I like that idea.
> 
> >If you want to dive deep into the world of rpm, go to rpm.net and
> >look at maximum rpm.  also look at the 'hints and tricks' or 'tips
> >and tricks' section of that website.
> 
> I would like to, but lately I am doing a lot of deep diving on all kinds
> of OpenAFS and OpenSSI topics. (At times I wished my mind had unlimited
> recursive/parallel capabilities)
> 
> >the way i suggest doing things is pretty kludgy - the right way is to
> >roll your own binary rpm.  I don't know all that's necessary to do 
> >that.
> 
> right, I would like to do that...but I would like to see "the thing"
> going and then pretty it up.
> 
> below are the 2 patches.  when those are applied it will have one
> compile error saying something about an unknow "task_struct"
> that is because the "struct" keyword is missing in front of that line
> 
> thanks for you help,
> (i would appreciate it if you could tell me what to replace after the
> quick and dirty method)
> 
> Ron
> 
> here are the patches:
> 
> patch #1:  "OpenSSI.patch"
> *********  start of patch #1 **********
> rc/afs/LINUX/osi_groups.c.orig  2005-07-13 14:44:48.177746304 -0700
> +++ src/afs/LINUX/osi_groups.c  2005-07-13 14:46:17.692138048 -0700
> @@ -24,6 +24,9 @@ RCSID("$Header: /cvs/openafs/src/afs/LIN
>  #ifdef AFS_LINUX22_ENV
>  #include "../h/smp_lock.h"
>  #endif
> +#ifdef VPROC
> +#include <linux/vproc.h>
> +#endif
>  
>  static int afs_getgroups(cred_t *cr, gid_t *groups);
> @@ -33,20 +36,33 @@ static int afs_setgroups(cred_t **cr, in
>   */
>  int set_pag_in_parent(int pag, int g0, int g1)
>  {
> +#ifdef VPROC
> +    task_struct *parent = GET_PPID_TASK(current);
> +    gid_t *gp = (parent ? parent->groups : NULL);
> +#else
>  #ifdef STRUCT_TASK_STRUCT_HAS_PARENT
>      gid_t *gp = current->parent->groups;
>  #else
>      gid_t *gp = current->p_pptr->groups;
>  #endif
> +#endif
>      int ngroups;
>      int i;
>  
>  
> +#ifdef VPROC
> +    if (!parent) {
> +       printk(" Cant set pag in parent - parent is remote \n");
> +       return EINVAL;
> +    }
> +    ngroups = parent->ngroups;
> +#else
>  #ifdef STRUCT_TASK_STRUCT_HAS_PARENT
>      ngroups = current->parent->ngroups;
>  #else
>      ngroups = current->p_pptr->ngroups;
>  #endif
> +#endif
>  
>      if ((ngroups < 2) || (afs_get_pag_from_groups(gp[0], gp[1]) ==
> NOPAG)) {
>         /* We will have to shift grouplist to make room for pag */
> @@ -63,11 +79,15 @@ int set_pag_in_parent(int pag, int g0, i
>      if (ngroups < NGROUPS)
>         gp[ngroups] = NOGROUP;
>  
> +#ifdef VPROC
> +    parent->ngroups = ngroups;
> +#else
>  #ifdef STRUCT_TASK_STRUCT_HAS_PARENT
>      current->parent->ngroups = ngroups;
>  #else
>      current->p_pptr->ngroups = ngroups;
>  #endif
> +#endif
>      return 0;
>  }
>  
> 
> --- src/afs/LINUX/osi_machdep.h.orig    2005-07-13 16:18:16.736115832
> -0700
> +++ src/afs/LINUX/osi_machdep.h 2005-07-13 16:18:55.721189200 -0700
> @@ -24,11 +24,15 @@
>  #undef getuerror
>  
>  #define getpid() current->pid
> +#ifdef VPROC
> +#define getppid() GET_PPID(current)
> +#else
>  #ifdef STRUCT_TASK_STRUCT_HAS_REAL_PARENT
>  #define getppid() current->real_parent->pid
>  #else
>  #define getppid() current->p_opptr->pid
>  #endif
> +#endif
>  
>  #ifdef RECALC_SIGPENDING_TAKES_VOID
>  #define RECALC_SIGPENDING(X) recalc_sigpending()
> ************* end of path #1 *****************
> 
> 
> patch #2; osi_groups.patch :
> ***********  start of patch #2 *************** 
> --- src/afs/LINUX/osi_groups.c.lr       2005-07-13 17:00:31.124830184
> -0700
> +++ src/afs/LINUX/osi_groups.c  2005-07-13 17:00:35.310193912 -0700
> @@ -24,9 +24,10 @@ RCSID("$Header: /cvs/openafs/src/afs/LIN
>  #ifdef AFS_LINUX22_ENV
>  #include "../h/smp_lock.h"
>  #endif
> +
>  #ifdef VPROC
> -#include <linux/vproc.h>
> -#endif
> +extern struct task_struct *ssi_get_ppid_task(struct task_struct *t);
> +#endif
>  
>  static int afs_getgroups(cred_t *cr, gid_t *groups);
>  static int afs_setgroups(cred_t **cr, int ngroups, gid_t *gidset, int
> change_parent);
> @@ -37,7 +38,7 @@ static int afs_setgroups(cred_t **cr, in
>  int set_pag_in_parent(int pag, int g0, int g1)
>  {
>  #ifdef VPROC
> -    task_struct *parent = GET_PPID_TASK(current);
> +    task_struct *parent = ssi_get_ppid_task(current);
>      gid_t *gp = (parent ? parent->groups : NULL);
>  #else
>  #ifdef STRUCT_TASK_STRUCT_HAS_PARENT
> ***********  end of patch #2 ***************


danno
--
dan pritts - systems administrator - internet2
734/352-4953 office        734/834-7224 mobile
_______________________________________________
OpenAFS-info mailing list
OpenAFS-info@openafs.org
https://lists.openafs.org/mailman/listinfo/openafs-info

Reply via email to