[xio-commit] CVS update: MODIFIED: src, globus_xio_driver.c, globus_xio_handle.c ...

John Bresnahan commit at globus.org
Fri Jan 18 18:02:22 CST 2008


  User: bresnaha
  Date: 08/01/18 18:02:22

  Modified:    src      globus_i_xio.h globus_xio_attr.c
                        globus_xio_driver.c globus_xio_driver.h
                        globus_xio_handle.c globus_xio_types.h
  Log:
  allowing more info to be set with the cred
  
  Revision  Changes    Path
  1.90      +15 -0     xio/src/globus_i_xio.h
  
  http://viewcvs.globus.org/viewcvs.cgi/xio/src/globus_i_xio.h.diff?r1=1.89&r2=1.90
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_i_xio.h
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/xio/src/globus_i_xio.h,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -b -r1.89 -r1.90
  --- globus_i_xio.h	25 Jul 2006 16:13:28 -0000	1.89
  +++ globus_i_xio.h	19 Jan 2008 00:02:21 -0000	1.90
  @@ -216,6 +216,9 @@
    *                 ---------------------------
    **************************************************************************/
   
  +/* forward declare for setting cred */
  +typedef struct gss_cred_id_desc_struct * gss_cred_id_t;
  +
   extern char * globus_i_xio_context_state_name_table[];
   
   typedef enum globus_i_xio_context_state_e
  @@ -323,6 +326,11 @@
       globus_bool_t                       no_cancel;
       void *                              timeout_arg;
   
  +    gss_cred_id_t                       user_open_cred;
  +    char *                              user_open_sbj;
  +    char *                              user_open_username;
  +    char *                              user_open_pw;
  +
       globus_callback_space_t             space;
   
       int                                 max;
  @@ -580,6 +588,13 @@
       globus_thread_t                     blocked_thread;
       globus_bool_t                       finished_delayed;
       
  +    /* just stash away the cred to open so that the driver can interigate
  +        it.  */
  +    gss_cred_id_t                       user_open_cred;
  +    char *                              user_open_sbj;
  +    char *                              user_open_username;
  +    char *                              user_open_pw;
  +    
       /* result code saved in op for kickouts */
       globus_object_t *                   cached_obj;
   
  
  
  
  1.58      +14 -1     xio/src/globus_xio_attr.c
  
  http://viewcvs.globus.org/viewcvs.cgi/xio/src/globus_xio_attr.c.diff?r1=1.57&r2=1.58
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_xio_attr.c
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/xio/src/globus_xio_attr.c,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -b -r1.57 -r1.58
  --- globus_xio_attr.c	9 Nov 2007 23:38:12 -0000	1.57
  +++ globus_xio_attr.c	19 Jan 2008 00:02:21 -0000	1.58
  @@ -489,6 +489,19 @@
       }
       globus_mutex_unlock(&globus_i_xio_mutex);
       
  +    if(attr->user_open_sbj)
  +    {
  +        globus_free(attr->user_open_sbj);
  +    }
  +    if(attr->user_open_username)
  +    {
  +        globus_free(attr->user_open_username);
  +    }
  +    if(attr->user_open_pw)
  +    {
  +        globus_free(attr->user_open_pw);
  +    }
  + 
       globus_callback_space_destroy(attr->space);
       globus_free(attr->entry);
       globus_free(attr);
  
  
  
  1.54      +82 -1     xio/src/globus_xio_driver.c
  
  http://viewcvs.globus.org/viewcvs.cgi/xio/src/globus_xio_driver.c.diff?r1=1.53&r2=1.54
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_xio_driver.c
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/xio/src/globus_xio_driver.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -b -r1.53 -r1.54
  --- globus_xio_driver.c	25 Jul 2006 16:30:34 -0000	1.53
  +++ globus_xio_driver.c	19 Jan 2008 00:02:21 -0000	1.54
  @@ -1119,6 +1119,7 @@
       int                                 cmd,
       va_list                             ap)
   {
  +    char *                              tmp_str;
       globus_result_t                     res = GLOBUS_SUCCESS;
       void *                              ds;
       globus_xio_attr_cmd_t               general_cmd;
  @@ -1285,6 +1286,16 @@
                   attr->no_cancel = va_arg(ap, globus_bool_t);
                   break;
                   
  +            case GLOBUS_XIO_ATTR_SET_CREDENTIAL:
  +                attr->user_open_cred = va_arg(ap, gss_cred_id_t);
  +                tmp_str = va_arg(ap, char *);
  +                attr->user_open_sbj = globus_libc_strdup(tmp_str);
  +                tmp_str = va_arg(ap, char *);
  +                attr->user_open_username = globus_libc_strdup(tmp_str);
  +                tmp_str = va_arg(ap, char *);
  +                attr->user_open_pw = globus_libc_strdup(tmp_str);
  +                break;
  +    
               default:
                   res = GlobusXIOErrorInvalidCommand(general_cmd);
                   goto err;
  @@ -2242,6 +2253,76 @@
       return &op->_op_context->entry[op->ndx - 1];
   }
   
  +globus_result_t
  +globus_xio_operation_attr_cntl(
  +    globus_xio_operation_t              op,
  +    globus_xio_attr_cmd_t               cmd,
  +    ...)
  +{
  +    char **                             tmp_ptr;
  +    globus_result_t                     result;
  +    gss_cred_id_t *                     out_cred;
  +    va_list                             ap;
  +    GlobusXIOName(globus_xio_operation_attr_cntl);
  + 
  +    if(op == NULL)
  +    {
  +        result = GlobusXIOErrorParameter("op");
  +        goto error_param;
  +    }
  +
  +#   ifdef HAVE_STDARG_H
  +    {
  +        va_start(ap, cmd);
  +    }
  +#   else
  +    {
  +        va_start(ap);
  +    }
  +#   endif
  +
  +    switch(cmd)
  +    {
  +        case GLOBUS_XIO_ATTR_GET_CREDENTIAL:
  +            out_cred = va_arg(ap, gss_cred_id_t *);
  +            if(out_cred != NULL)
  +            {
  +                *out_cred = globus_libc_strdup(op->user_open_cred);
  +            }
  +            tmp_ptr = va_arg(ap, char **);
  +            if(tmp_ptr != NULL)
  +            {
  +                *tmp_ptr = globus_libc_strdup(op->user_open_sbj);
  +            }
  +            tmp_ptr = va_arg(ap, char **);
  +            if(tmp_ptr != NULL)
  +            {
  +                *tmp_ptr = globus_libc_strdup(op->user_open_username);
  +            }
  +            tmp_ptr = va_arg(ap, char **);
  +            if(tmp_ptr != NULL)
  +            {
  +                *tmp_ptr = globus_libc_strdup(op->user_open_pw);
  +            }
  +            break;
  +
  +        default:
  +            result = GlobusXIOErrorParameter("cmd");
  +            goto error_cmd;
  +    }
  +    va_end(ap);
  +
  +
  +    return GLOBUS_SUCCESS;
  +
  +error_cmd:
  +error_param:
  +    va_end(ap);
  +
  +    return result;
  +}
  +
  +
   void *
   globus_xio_operation_get_data_descriptor(
       globus_xio_operation_t              op,
  
  
  
  1.53      +9 -0      xio/src/globus_xio_driver.h
  
  http://viewcvs.globus.org/viewcvs.cgi/xio/src/globus_xio_driver.h.diff?r1=1.52&r2=1.53
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_xio_driver.h
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/xio/src/globus_xio_driver.h,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -b -r1.52 -r1.53
  --- globus_xio_driver.h	8 Sep 2006 17:20:11 -0000	1.52
  +++ globus_xio_driver.h	19 Jan 2008 00:02:21 -0000	1.53
  @@ -1206,6 +1206,15 @@
    *  @ingroup driver_pgm
    */
   globus_result_t
  +globus_xio_operation_attr_cntl(
  +    globus_xio_operation_t              op,
  +    globus_xio_attr_cmd_t               cmd,
  +    ...);
  +
  +/**
  + *  @ingroup driver_pgm
  + */
  +globus_result_t
   globus_xio_driver_destroy(
       globus_xio_driver_t                 driver);
   
  
  
  
  1.99      +5 -0      xio/src/globus_xio_handle.c
  
  http://viewcvs.globus.org/viewcvs.cgi/xio/src/globus_xio_handle.c.diff?r1=1.98&r2=1.99
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_xio_handle.c
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/xio/src/globus_xio_handle.c,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -b -r1.98 -r1.99
  --- globus_xio_handle.c	23 Oct 2007 00:26:46 -0000	1.98
  +++ globus_xio_handle.c	19 Jan 2008 00:02:21 -0000	1.99
  @@ -2139,6 +2139,10 @@
   
       if(attr != NULL)
       {
  +        op->user_open_cred = attr->user_open_cred;
  +        op->user_open_sbj = globus_libc_strdup(attr->user_open_sbj);
  +        op->user_open_username = globus_libc_strdup(attr->user_open_username);
  +        op->user_open_pw = globus_libc_strdup(attr->user_open_pw);
           space =  attr->space;
           
           /* set entries in structures */
  @@ -2946,6 +2950,7 @@
   
       if(attr != NULL)
       {
  +        op->user_open_cred = attr->user_open_cred;
           space =  attr->space;
           
           /* set entries in structures */
  
  
  
  1.34      +3 -1      xio/src/globus_xio_types.h
  
  http://viewcvs.globus.org/viewcvs.cgi/xio/src/globus_xio_types.h.diff?r1=1.33&r2=1.34
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_xio_types.h
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/xio/src/globus_xio_types.h,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -b -r1.33 -r1.34
  --- globus_xio_types.h	9 Nov 2007 23:38:12 -0000	1.33
  +++ globus_xio_types.h	19 Jan 2008 00:02:21 -0000	1.34
  @@ -107,7 +107,9 @@
       GLOBUS_XIO_ATTR_SET_TIMEOUT_WRITE,
       GLOBUS_XIO_ATTR_SET_TIMEOUT_ACCEPT,
       GLOBUS_XIO_ATTR_SET_SPACE,
  -    GLOBUS_XIO_ATTR_CLOSE_NO_CANCEL
  +    GLOBUS_XIO_ATTR_CLOSE_NO_CANCEL,
  +    GLOBUS_XIO_ATTR_SET_CREDENTIAL,
  +    GLOBUS_XIO_ATTR_GET_CREDENTIAL
   } globus_xio_attr_cmd_t;
   
   /** doxygen varargs filter stuff
  
  
  




More information about the xio-commit mailing list