[torqueusers] Problems compiling Torque GSSAPI branch

Mike Coyne Mike.Coyne at PACCAR.com
Tue Mar 9 07:54:15 MST 2010


This is what I have for that section of svr_chk_owner.c
I had to take a "swag" at closing the #ifdef as well. Also one of the strcmp's is a duplicate.. 


/* NOTE:  enable case insensitive host check (CRI) */

#ifdef GSSAPI
  snprintf(uh,uhlen,"%s@%s",user,host);
  if (!rootprinc) {
    rootprinc = pbsgss_get_host_princname();
  }
  if (!rootprinc) {return 0;}
  if (strcmp(uh,rootprinc) == 0) {
    is_root = 1;
#ifdef PBS_ROOT_ALWAYS_ADMIN
    return(priv|ATR_DFLAG_MGRD|ATR_DFLAG_MGWR|ATR_DFLAG_OPRD|ATR_DFLAG_OPWR);
#endif  /* PBS_ROOT_ALWAYS_ADMIN */
    }
#endif /* GSSAPI */
#ifdef __CYGWIN__
  if (IAmAdminByName(user) && !strcasecmp(host_no_port, server_host))
    {
    is_root = 1;
    return(priv | ATR_DFLAG_MGRD | ATR_DFLAG_MGWR | ATR_DFLAG_OPRD | ATR_DFLAG_OPWR);
    }
#else /* __CYGWIN__ */
  /* Run this even if we aren't doing GSSAPI.  This lets the scheduler run
     without tickets */
/*
  if ((strcmp(user,PBS_DEFAULT_ADMIN) == 0) &&
      !strcasecmp(host_no_port,server_host)) 
*/
  if ((strcmp(user, PBS_DEFAULT_ADMIN) == 0) &&
      !strcasecmp(host_no_port, server_host))
    {
    is_root = 1;

#ifdef PBS_ROOT_ALWAYS_ADMIN
    return(priv | ATR_DFLAG_MGRD | ATR_DFLAG_MGWR | ATR_DFLAG_OPRD | ATR_DFLAG_OPWR);
#endif
    }
#endif /* __CYGWIN__ guess */

  

-----Original Message-----
From: Peter Smith [mailto:peter.smith3882100 at gmail.com] 
Sent: Tuesday, March 09, 2010 8:38 AM
To: Mike Coyne
Cc: torqueusers at supercluster.org
Subject: Re: [torqueusers] Problems compiling Torque GSSAPI branch

Hi Mike

I tried both the solutions you provided, and both takes care of the
error message related to dis.h so this is great. I decided to edit out
A_(...) like in your dis.h, but both ways is tested.

I am definitely getting closer to the finish line, but it seems like i
still have some work to do before getting a succesful compile. After
compiling for quite some time, i get the following error messages:

svr_chk_owner.c:357:1: error: unterminated #else
make[3]: *** [svr_chk_owner.o] Error 1
make[3]: Leaving directory `/shared/source/gssapi/src/server'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/shared/source/gssapi/src/server'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/shared/source/gssapi/src'
make: *** [all-recursive] Error 1

This is the lines from svr_chk_owner.c starting with line 357:

#ifdef __CYGWIN__
  if (IAmAdminByName(user) && !strcasecmp(host_no_port, server_host))
    {
    is_root = 1;
    return(priv | ATR_DFLAG_MGRD | ATR_DFLAG_MGWR | ATR_DFLAG_OPRD |
ATR_DFLAG_OPWR);
    }
#else /* __CYGWIN__ */
  /* Run this even if we aren't doing GSSAPI.  This lets the scheduler run
     without tickets */
  if ((strcmp(user,PBS_DEFAULT_ADMIN) == 0) &&
      !strcasecmp(host_no_port,server_host))
  if ((strcmp(user, PBS_DEFAULT_ADMIN) == 0) &&
      !strcasecmp(host_no_port, server_host))
    {
    is_root = 1;

I tried to comment out the block shown above as i do not use Cygwin,
but then other error messages related to svr_chk_owner.c appears so i
think that some other problem not related to the block may be present.
Errors when above block is commented out:

svr_chk_owner.c:380: error: expected identifier or '(' before 'if'
svr_chk_owner.c:385: error: expected identifier or '(' before 'else'
svr_chk_owner.c:390: error: expected identifier or '(' before 'if'
svr_chk_owner.c:395: error: expected identifier or '(' before 'else'
svr_chk_owner.c:400: error: expected identifier or '(' before 'return'
svr_chk_owner.c:401: error: expected identifier or '(' before '}' token
make[3]: *** [svr_chk_owner.o] Error 1
make[3]: Leaving directory `/shared/source/gssapi/src/server'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/shared/source/gssapi/src/server'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/shared/source/gssapi/src'
make: *** [all-recursive] Error 1

This is the lines from svr_chk_owner.c starting with line 380:

if (!(server.sv_attr[(int)SRV_ATR_managers].at_flags & ATR_VFLAG_SET))
    {
    if (is_root)
      priv |= (ATR_DFLAG_MGRD | ATR_DFLAG_MGWR);
    }
  else if (acl_check(&server.sv_attr[SRV_ATR_managers], uh, ACL_User))
    {
    priv |= (ATR_DFLAG_MGRD | ATR_DFLAG_MGWR);
    }

  if (!(server.sv_attr[(int)SRV_ATR_operators].at_flags & ATR_VFLAG_SET))
    {
    if (is_root)
      priv |= (ATR_DFLAG_OPRD | ATR_DFLAG_OPWR);
    }
  else if (acl_check(&server.sv_attr[SRV_ATR_operators], uh, ACL_User))
    {
    priv |= (ATR_DFLAG_OPRD | ATR_DFLAG_OPWR);
    }

  return(priv);
  }  /* END svr_get_privilege() */

I just posted the error messages when the CYGWIN part is commented out
as i might help solving the problem, but i am not sure if i am on
right track..


On Tue, Mar 9, 2010 at 2:26 PM, Mike Coyne <Mike.Coyne at paccar.com> wrote:
> You might try to add a
> #define A_(x) x
> To get rid of it to your src/include/pbs_config.h and pbs_config.h.in
> Or just edit out the A_(...)  it's a  carry over from the original
> torque gssapi version that did not get fixed when it was updated to the
> 2.4 code level ...
> Mine looks more like this
>
>
> /* the following routines set/control DIS over tcp */
>
> extern void DIS_tcp_reset (int fd, int rw);
> extern void DIS_tcp_setup (int fd);
> extern int  DIS_tcp_wflush (int fd);
> extern void DIS_tcp_settimeout (long timeout);
> extern int  DIS_tcp_istimeout (int fd);
> extern void DIS_tcp_release (int fd);
> #ifdef GSSAPI
> extern void DIS_tcp_set_gss (int fd, gss_ctx_id_t ctx, OM_uint32 flags);
> #endif
>
>
> extern int  PConnTimeout(int);
>
> -----Original Message-----
> From: torqueusers-bounces at supercluster.org
> [mailto:torqueusers-bounces at supercluster.org] On Behalf Of Peter Smith
> Sent: Monday, March 08, 2010 6:54 PM
> To: torqueusers at supercluster.org
> Subject: [torqueusers] Problems compiling Torque GSSAPI branch
>
> Hi
>
> I am trying to compile the GSSAPI branch of Torque on a Debian Lenny
> system.
>
> I run configure with the following options:
>
> ./configure --with-default-server=cluster-master
> --with-server-home=/var/spool/pbs --with-rcp=scp --with-gssapi
> --disable-unixsockets
>
> No errors are returned and the last string is "Ready for 'make'"
>
> Then i run make and 2-3 seconds and the following error messages is
> shown:
>
> ../../../src/include/dis.h:250: error: expected '=', ',', ';', 'asm'
> or '__attribute__' before 'A_'
> make[3]: *** [dis.lo] Error 1
> make[3]: Leaving directory `/shared/source/gssapi/src/lib/Libpbs'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/shared/source/gssapi/src/lib'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/shared/source/gssapi/src'
> make: *** [all-recursive] Error 1
>
> If i run configure without the --with-gssapi and --disable-unixsockets
> options, exactly the same error message is shown so this makes no
> difference. On the same system if i try to download
> torque-2.4.6.tar.gz this package compile and installes fine without
> errors.
>
> This is a couple of lines from dis.h, the line numbers is added by me:
>
> 249: extern int  DIS_tcp_istimeout (int fd);
> 250: extern void DIS_tcp_release A_((int fd));
> 251: #ifdef GSSAPI
> 252: extern void DIS_tcp_set_gss A_((int fd, gss_ctx_id_t ctx,
> OM_uint32 flags));
> 253: #endif
>
> Does anybody have a suggestion on how i can solve this problem, i
> would really like to get this working.
> _______________________________________________
> torqueusers mailing list
> torqueusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torqueusers
>
>
>




More information about the torqueusers mailing list