Grid Community Toolkit  6.2.1653033972 (tag: v6.2.20220524)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
accept_credmap.h
1 /*
2  * @file accept_credmap.h
3  * @author Terry Fleury ([email protected])
4  * @version 3.7 2006-09-15
5  *
6  * This function is called by myproxy_server.c. When one of
7  * accepted_credentials_mapfile or accepted_credentials_mapapp has been
8  * defined in the config file, we need to check if the userdn / username
9  * combination is valid. If the mapfile is used, then we check if there is
10  * a line containing the userdn and username. If the mapapp is used, then
11  * the call-out should accept the userdn and username as parameters and
12  * return a zero value if that combination is acceptable. Basically, we
13  * want to restrict a credential (which has a particular userdn) to be
14  * stored under a particular username. This function returns 0 upon success
15  * (either the userdn/username was successfully mapped by the mapfile or the
16  * mapapp, or there was no need to consult a mapfile or mapapp) and 1 upon
17  * failure.
18  *
19  * @param userdn The C-string credential user (subject)
20  * distinguished name.
21  * @param username The C-string username for storing the credential.
22  * @param server_context A pointer to the server context for the current
23  * request.
24  * @return 0 upon successful mapping of userdn/username (or if no accepted
25  * credentials map check was necessary), 1 upon failure.
26  */
27 
28 #ifndef __ACCEPT_CREDMAP_H
29 #define __ACCEPT_CREDMAP_H
30 
31 int accept_credmap( char * userdn, char * username,
32  myproxy_server_context_t * server_context );
33 
34 #endif /* __ACCEPT_CREDMAP_H */
35