From: Miloš Mulač Date: Fri, 11 Nov 2005 10:33:47 +0000 (+0000) Subject: obstain jobOwner from local credentials X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=b2c297c30c01d3104b08999194ad366a69d60f19;p=jra1mw.git obstain jobOwner from local credentials --- diff --git a/org.glite.jp.index/examples/jpis-test.c b/org.glite.jp.index/examples/jpis-test.c index da04d47..698522e 100644 --- a/org.glite.jp.index/examples/jpis-test.c +++ b/org.glite.jp.index/examples/jpis-test.c @@ -84,7 +84,18 @@ int main(int argc,char *argv[]) { rec = soap_malloc(soap, sizeof(*rec)); rec->jobid = soap_strdup(soap, "https://localhost:7846/pokus"); - rec->owner = soap_strdup(soap, "OwnerName"); + { + gss_cred_id_t cred = GSS_C_NO_CREDENTIAL; + edg_wll_GssStatus gss_code; + char *subject = NULL; + + if ( edg_wll_gss_acquire_cred_gsi(NULL, NULL, &cred, &subject, &gss_code) ) { + printf("Cannot obtain credentials - exiting.\n"); + return EINVAL; + } + rec->owner = soap_strdup(soap, subject); + free(subject); + } rec->__sizeprimaryStorage = 0; rec->primaryStorage = NULL; rec->__sizeattributes = 2;