Better detection of empty roles in FQANs (still not ideal, perhaps), fixes #48025
authorDaniel Kouřil <kouril@ics.muni.cz>
Mon, 3 Aug 2009 14:06:25 +0000 (14:06 +0000)
committerDaniel Kouřil <kouril@ics.muni.cz>
Mon, 3 Aug 2009 14:06:25 +0000 (14:06 +0000)
org.glite.security.proxyrenewal/src/voms.c

index e85b9e8..36accef 100644 (file)
@@ -135,7 +135,8 @@ create_voms_command(glite_renewal_core_context ctx, struct vomsdata *vd, struct
 
    attribs = (*voms_cert)->std;
 
-   if (attribs[0]->role == NULL || strcmp (attribs[0]->role, "NULL") == 0 )
+   if (attribs[0]->role == NULL || strcmp (attribs[0]->role, "NULL") == 0 ||
+       strcmp(attribs[0]->role, "") == 0)
       ret = asprintf(command, "G%s", attribs[0]->group);
    else
       ret = asprintf(command, "B%s:%s", attribs[0]->group, attribs[0]->role);