From b2c297c30c01d3104b08999194ad366a69d60f19 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Fri, 11 Nov 2005 10:33:47 +0000 Subject: [PATCH] obstain jobOwner from local credentials --- org.glite.jp.index/examples/jpis-test.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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; -- 1.8.2.3