00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00029 #ifndef LCMAPS_GSS_ASSIST_GRIDMAP_C
00030 #define LCMAPS_GSS_ASSIST_GRIDMAP_C
00031
00032 #include "lcmaps_config.h"
00033 #include <stdio.h>
00034 #include <stdlib.h>
00035 #include <string.h>
00036 #include <pwd.h>
00037
00038
00039 #include "lcmaps.h"
00040 #include "lcmaps_gss_assist_gridmap.h"
00041
00042 int
00043 globus_gss_assist_gridmap(
00044 char * globusidp,
00045 char ** useridp
00046 )
00047 {
00048 FILE * usrlog_fp=stderr;
00049 int retval;
00050
00051 fprintf(stderr,"Using globus_gss_assist_gridmap interface of LCMAPS\n");
00052 if (useridp == NULL)
00053 return 1;
00054
00055 *useridp = NULL;
00056
00057
00058 retval=lcmaps_init(usrlog_fp);
00059 if (retval)
00060 {
00061 fprintf(stderr,"LCMAPS initialization failure.\n");
00062 return 1;
00063 }
00064 retval = lcmaps_run_without_credentials_and_return_username(
00065 globusidp,
00066 NULL,
00067 useridp,
00068 0,
00069 NULL);
00070 if (retval)
00071 {
00072 fprintf(stderr,"LCMAPS failed to find a username\n");
00073 return 1;
00074 }
00075
00076 retval=lcmaps_term();
00077 if (retval)
00078 {
00079 fprintf(stderr,"LCMAPS termination failure\n");
00080 return 1;
00081 }
00082 fprintf(stderr,"globus_gss_assist_gridmap interface of LCMAPS done\n");
00083
00084 return 0;
00085 }
00086
00087 #endif
00088
00089
00090
00091
00092
00093
00094
00095