Use context to set attributes, not the global vars
authorDaniel Kouřil <kouril@ics.muni.cz>
Fri, 17 Mar 2006 14:16:37 +0000 (14:16 +0000)
committerDaniel Kouřil <kouril@ics.muni.cz>
Fri, 17 Mar 2006 14:16:37 +0000 (14:16 +0000)
org.glite.security.proxyrenewal/examples/renew_core.c
org.glite.security.proxyrenewal/src/renew.c
org.glite.security.proxyrenewal/src/voms.c

index 530a81c..4d9c967 100644 (file)
@@ -20,7 +20,7 @@ main(int argc, char *argv[])
    char *new_proxy = NULL;
    extern int optind;
    char arg;
-   glite_renewal_core_context_data ctx;
+   glite_renewal_core_context ctx = NULL;
    int ret;
 
    while ((arg = getopt_long(argc, argv, short_options, long_options, NULL)) != EOF) {
@@ -46,7 +46,7 @@ main(int argc, char *argv[])
       exit(1);
    }
 
-   ret = glite_renewal_core_renew(&ctx, server, 0, proxy, &new_proxy);
+   ret = glite_renewal_core_renew(ctx, server, 0, proxy, &new_proxy);
    if (ret) {
       fprintf(stderr, "glite_renewal_core_renew() failed: %d\n", ret);
       exit(1);
index b3ee226..30c8e15 100644 (file)
@@ -11,8 +11,6 @@ extern char *repository;
 extern char *cadir;
 extern char *vomsdir;
 extern int voms_enabled;
-extern char *vomsconf;
-
 static int received_signal = -1, die = 0;
 
 static void
index 88cb95b..f92778b 100644 (file)
@@ -11,8 +11,6 @@
 char * Decode(const char *, int, int *);
 char **listadd(char **, char *, int);
 
-extern char *vomsconf;
-
 static int
 generate_proxy(glite_renewal_core_context ctx, globus_gsi_cred_handle_t cur_proxy,
                X509_EXTENSION *voms_extension, const char *new_file)
@@ -153,7 +151,7 @@ renew_voms_cert(glite_renewal_core_context ctx, struct vomsdata *vd, struct voms
    struct contactdata **voms_contacts = NULL;
    char *command = NULL;
 
-   voms_contacts = VOMS_FindByVO(vd, (*voms_cert)->voname, vomsconf, NULL, &voms_error);
+   voms_contacts = VOMS_FindByVO(vd, (*voms_cert)->voname, ctx->voms_conf, NULL, &voms_error);
 
    if (voms_contacts == NULL) {
       edg_wlpr_Log(ctx, LOG_ERR, "VOMS_FindByVO() failed\n");