Changeset 445 for trunk/src/mappers/mapper.h
- Timestamp:
- 08/14/10 16:19:36 (22 months ago)
- File:
-
- 1 edited
-
trunk/src/mappers/mapper.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mappers/mapper.h
r358 r445 50 50 char **(*entries)(X509 *x509, void *context); 51 51 /** cert. login finder */ 52 char *(*finder)(X509 *x509, void *context );52 char *(*finder)(X509 *x509, void *context, int *match); 53 53 /** cert-to-login matcher*/ 54 54 int (*matcher)(X509 *x509, const char *login, void *context); … … 126 126 *@param key String to be mapped 127 127 *@param ignorecase Flag to indicate upper/lowercase ignore in string compare 128 *@param match Set to 1 for mapped string return, unmodified for key return 128 129 *@return key on no match, else a clone_str()'d of found mapping 129 130 */ 130 MAPPER_EXTERN char *mapfile_find(const char *file,char *key,int ignorecase );131 MAPPER_EXTERN char *mapfile_find(const char *file,char *key,int ignorecase,int *match); 131 132 132 133 /** … … 185 186 */ 186 187 #define _DEFAULT_MAPPER_FIND_USER \ 187 static char * mapper_find_user(X509 *x509,void *context ) { \188 static char * mapper_find_user(X509 *x509,void *context,int *match) { \ 188 189 if ( !x509 ) return NULL; \ 190 *match = 1; \ 189 191 return "nobody"; \ 190 192 } … … 202 204 #define _DEFAULT_MAPPER_MATCH_USER \ 203 205 static int mapper_match_user(X509 *x509, const char *login, void *context) { \ 204 char *username= mapper_find_user(x509,context); \ 206 int match = 0; \ 207 char *username= mapper_find_user(x509,context,&match); \ 205 208 if (!x509) return -1; \ 206 209 if (!login) return -1; \
Note: See TracChangeset
for help on using the changeset viewer.
