1 /*************************************************
3 module for Controling user DB
5 *** Edit this file to set user property ***
6 **************************************************/
7 #include "opengatesrv.h"
9 /********************************************************/
10 /* get user property from user db */
11 /********************************************************/
12 int getUserProperty(char userid[USERMAXLN], char userProperty[BUFFMAXLN])
14 /*****************************************************/
15 /* user database access routine */
16 /* userid[USERMAXLN]: input: user ID to search */
17 /* Caution: "userid" if default server,*/
18 /* "userid@serverid" if not. */
19 /* userProperty[BUFFMAXLN]: output: user property */
20 /* the value goes to opengatefw.pl */
21 /* to determine permitting grade. */
22 /* return value: DENY or ACCEPT */
23 /* If DENY is returned, the user is denyed. */
24 /* If ACCEPT, the value sent to firewall open. */
25 /*****************************************************/
27 /* REPLACE THE FOLLOWING WITH YOUR DATABASE ACCESS ROUTINE */
31 userProperty[0]='\0'; /* The User has No Property */
32 return ACCEPT; /* The User is Accepted */
39 /* debug write routine */
40 int GetUserProperty(char *userid, char *userProperty)
44 if(DEBUG) err_msg("DEBUG:=>getUserProperty(%s,)",userid);
45 ret=getUserProperty(userid,userProperty);
46 if(DEBUG) err_msg("DEBUG:(%d)<=getUserProperty(,%s)",ret, userProperty);