OSDN Git Service

Ver.1.3.10: Add userid pattern-match function. Fix some bugs.
authorwatanaby <>
Mon, 1 May 2006 00:44:42 +0000 (00:44 +0000)
committerwatanaby <>
Mon, 1 May 2006 00:44:42 +0000 (00:44 +0000)
opengate/conf/opengatesrv.conf.sample
opengate/javahtml/en/deny.html
opengate/javahtml/ja/deny.html
opengate/opengatesrv/comm-auth.c
opengate/opengatesrv/get-param.c
opengate/opengatesrv/opengatesrv.h

index 00af150..e07d217 100644 (file)
        <!-- Lock file for exclusive exec to prevent overlapped rule number -->\r
        <LockFile>/tmp/opengate.lock</LockFile>\r
 \r
+       <!-- Separate char between userID and extraID [userID@extraID] -->\r
+       <UserIdSeparator>@</UserIdSeparator>\r
+\r
 <!-- ########################################################## \r
-     #### ExtraSet settings overlayed on previous settings ####\r
+     #### ExtraSet overwritten on default settings ####\r
 \r
        If you want to switch parameter values\r
        by userID and extraID entered as [userID@extraID],\r
 \r
        If entered as [userID], above default parameters are used.\r
        If entered as [iserID@extraID] and matched set exists,\r
-       the paremeters in the set is overlayed the above.\r
+       the paremeters in the set is overwriten on the above default.\r
+       The first matched extra set is used.\r
      \r
        Examples:\r
        First ExtraSet is used when user entered as [anyuser@guest],\r
        UserIdPattern is the "POSIX Extended Regular Expression".\r
        Matching is insensitive to upper/lower case.\r
 \r
-       Word "default" is set to extraID, when no extraID is entered.\r
+       Word "default" is set to extraID, when extraID is not entered.\r
      #######################################################  -->\r
 \r
 <!--\r
                        <Max>1200</Max>\r
                </Duration>\r
        </ExtraSet>\r
-\r
+-->\r
+<!--\r
        <ExtraSet ExtraId="admin">\r
                <AuthServer>\r
                        <Protocol>pam</Protocol>\r
                </AuthServer>\r
        </ExtraSet>\r
-\r
+-->\r
+<!--\r
        <ExtraSet ExtraId="default" UserIdPattern="^user1$|^user2$">    \r
                <Syslog>\r
                        <Enable>1</Enable>\r
index 52827c8..62a2eee 100644 (file)
@@ -7,6 +7,6 @@
 <P>
 Network authentication failed. Please retry again.
 </P>
-<A HREF=%%EXTERNALURL%%>BACK</A>
+<A HREF=%%EXTERNALURL%%><h3>Retry from external site</h3></A>
 </BODY>
 </HTML>
index 52ae09c..5ce1e55 100644 (file)
@@ -7,6 +7,6 @@
 <P>
 \e$B%M%C%H%o!<%/MxMQG'>Z$K<:GT$7$^$7$?!#$b$&0lEY$d$jD>$7$F2<$5$$!#\e(B
 </P>
-<A HREF=%%EXTERNALURL%%>\e$BLa$k\e(B</A>
+<A HREF=%%EXTERNALURL%%><H3>\e$B30It%5%$%H$+$i:F3+\e(B</H3></A>
 </BODY>
 </HTML>
index 4bcc4d3..74468d4 100644 (file)
@@ -111,7 +111,7 @@ void splitId(char* userid, char* useridshort, char* extraId)
   strncpy(useridSave, userid, USERMAXLN);
 
   /* separate extraId from userid */
-  markPnt=strchr(useridSave, ATMARK);
+  markPnt=strchr(useridSave, *GetConfValue("UserIdSeparator"));
   if(markPnt==NULL){  
     /* separator mark not found */
     strncpy(extraId,"default",USERMAXLN);
index 94bf76b..b8551fe 100644 (file)
@@ -122,7 +122,7 @@ void setupConfExtra(char * userId,char *extraId)
   /* init as no ExtraSet */
   xmlExtraSet=NULL;
 
-  if(extraId[0]=='\0') return;
+  if(isNull(extraId)) return;
 
   /* search the matching extra set (first match is employed) */
   for(xml=ezxml_child(xmlRoot, "ExtraSet"); xml; xml=xml->next){
index d5aaeb0..c7d0226 100644 (file)
@@ -70,8 +70,6 @@ typedef       void    Sigfunc(int);   /* for signal handlers */
 
 #define PAMSERVICENAME "opengate"    /* default service name used in PAM */
 #define RADIUSCONF  "/etc/radius.conf" /* default path to radius.conf */
-#define ATMARK '@'         /* separator between userID and extraID */
-                           /* in user entry [userID@extraID] */
 
 #define ADDRMAXLN 128      /* maximum address string length */
 #define PASSMAXLN 128      /* maximum password string length */