/[pdpsoft]/trunk/grid-mw-security/ees-plugins-one/src/ImageMapFile.c
ViewVC logotype

Diff of /trunk/grid-mw-security/ees-plugins-one/src/ImageMapFile.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1648 by ndijk, Tue Apr 20 08:18:05 2010 UTC revision 1691 by ndijk, Tue May 18 08:45:06 2010 UTC
# Line 1  Line 1 
1    #define _GNU_SOURCE
2    
3  #include <stdlib.h>  #include <stdlib.h>
4  #include <string.h>  #include <string.h>
5  #include <ctype.h>  #include <ctype.h>
6    #include <unistd.h>
7    #include <sys/types.h>
8    #include <fnmatch.h>
9    
10    #include "fileutil.h"
11  #include "ImageMapFile.h"  #include "ImageMapFile.h"
12    
13  #define WHITESPACE_CHARS        " \t\n"  #define WHITESPACE_CHARS        " \t\n"
# Line 92  int parseImageMapFile(const char * image Line 98  int parseImageMapFile(const char * image
98          char *            linestart  = NULL;          char *            linestart  = NULL;
99          char *            lineend    = NULL;          char *            lineend    = NULL;
100          int               eof        = 0;          int               eof        = 0;
101          int               read;          int               size;
102    
103          read = cgul_read_config(image_map_file, &contents, getuid(), getgid());          size = cgul_read_config(image_map_file, &contents, getuid(), getgid());
104          if (read != 0){          if (size != 0){
105          //      EEF_log(LOG_ERR,"Unable to safely open the image map file '%s', reason: %d (for an explenation of the reason look in cgul/fileutil/fileutil.h)",image_map_file,read);                  /*EEF_log(LOG_ERR,"Unable to safely open the image map file '%s', reason: %d (for an explenation of the reason look in cgul/fileutil/fileutil.h)",image_map_file,size);*/
106                  goto failure;                  goto failure;
107          }          }
108    
# Line 112  int parseImageMapFile(const char * image Line 118  int parseImageMapFile(const char * image
118                  }                  }
119                  *lineend = '\0';                  *lineend = '\0';
120    
121                  read = gridmap_parse_line(linestart, &gline);                  size = gridmap_parse_line(linestart, &gline);
122                  linestart = lineend+1;                  linestart = lineend+1;
123    
124                  /* error which is unrecoverable only will result in a non 0 value */                  /* error which is unrecoverable only will result in a non 0 value */
125                  if (read != 0) {                  if (size != 0) {
126                          goto failure;                          goto failure;
127                  }                  }
128    

Legend:
Removed from v.1648  
changed lines
  Added in v.1691

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28