OSDN Git Service

Ver1.5.30 Added code to remove cookie at deny.
authorwatanaby <>
Mon, 1 Apr 2013 01:13:58 +0000 (01:13 +0000)
committerwatanaby <>
Mon, 1 Apr 2013 01:13:58 +0000 (01:13 +0000)
opengate/conf/opengatesrv.conf.sample
opengate/doc/Changes.html
opengate/opengatesrv/comm-auth.c
opengate/opengatesrv/comm-cgi.c
opengate/opengatesrv/get-param.c
opengate/opengatesrv/opengatesrv.h

index e0da257..3fed7d5 100644 (file)
        entered as [userID@extraID] in userID field on auth page.
        
        Each <ExtraSet> has conditions such as <.. ExtraId="aaa"> or 
-       <.. UserIdPattern="bbb">.
+       <.. UserIdPattern="bbb">, or etc.
        The conditions is compared with the string entered in 
        userID field.
 
        When you set the condition as <.. ExtraId="aaa">, 
-       the string [any_user@aaa] is matched and the ExtraSet is used.
+        [extraId] equal to [aaa] is matched (eg, xx@aaa).
                
        When you set the condition as <.. UserIdPattern="bbb">,
-       the string [any_bbb_any] is matched.
-       UserIdPattern has the form of "POSIX Extended Regular Expression".
+        [userId] including [bbb] is matched (eg, xbbbx@xx).
+
+       When you set the condition as <.. UserExtraPattern="bbb">,
+        [userId@extraId] including [bbb] is matched (eg, xbbbx@xx, aa@xbbbx).
+
+       When you set the condition as <.. UserExtraPatternNot="bbb">,
+        string NOT including [bbb] is matched.
+
+       Pattern has the form of "POSIX Extended Regular Expression".
        Matching is insensitive to upper/lower case.
        
-       The <ExtraSet> having both conditions is used when both are true.
+       The <ExtraSet> having multi-conditions is used when both are true.
        Omitted condition matched to every string. 
 
        The first matched <ExtraSet> is used, at existing many matched set.
index a85b2f8..dbc51dc 100644 (file)
@@ -737,752 +737,6 @@ Opengate History</H3>
        Ver.1.5.25 at 2012.12.14
        </DT><DD>
        Fixed small bugs in http header and parameter[contributed by M.Tagawa]. 
-       </DD>
-
-       Ver.1.5.26 at 2012.12.19
-       </DT><DD>
-       Added sqlite3_busy_timeout to reduce db-lock error. Added
-       error checks.
-       </DD>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-<HEAD>
-       <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
-       <TITLE></TITLE>
-</HEAD>
-<BODY LANG="en-US" BGCOLOR="#fafff0" DIR="LTR">
-
-<H3>
-Opengate History</H3>
-<DL>
-       <DT>Ver.0.10 at 1999.8.30 
-       </DT><DD>
-       Initial Version. In this version, the Java applet is sent first and
-       the applet accepts the password. 
-       </DD><DT>
-       Ver.0.11 at 1999.9.19 
-       </DT><DD>
-       Stable Version. Reformed program. 
-       </DD><DT>
-       Ver.0.12 at 1999.11.2 
-       </DT><DD>
-       Support firewalls IPF and IPFW. 
-       </DD><DT>
-       Ver.0.20 at 1999.9.16 
-       </DT><DD>
-       Abandoned version. 
-       </DD><DT>
-       Ver.0.30 at 1999.10.16 
-       </DT><DD>
-       Changed to accept password with CGI. IPF support is discarded. 
-       </DD><DT>
-       Ver.0.31 at 1999.10.26 
-       </DT><DD>
-       Reformed User Interface. Java applet shows own window. 
-       </DD><DT>
-       Ver.0.32 at 1999.11.1 
-       </DT><DD>
-       Support for IPF. 
-       </DD><DT>
-       Ver.0.33 at 2000.6.17 
-       </DT><DD>
-       Support for IP forwarding. Discarded IPF support. 
-       </DD><DT>
-       Ver.0.40 at 2000.6.19 
-       </DT><DD>
-       Support for multiple authentication servers. 
-       </DD><DT>
-       Ver.0.41 at 2000.6.23 
-       </DT><DD>
-       Added function to close firewall when no packets were passed for a
-       set timespan. 
-       </DD><DT>
-       Ver.0.42 at 2000.6.28 
-       </DT><DD>
-       Added function to close firewall on abnormal server termination. 
-       </DD><DT>
-       Ver.0.50 at 2000.12.11 
-       </DT><DD>
-       Added function to exchange hello message with terminal. Firewall is
-       closed, when the client does not reply. Java output is included in
-       html window. 
-       </DD><DT>
-       Ver.0.51 at 2000.12.22 
-       </DT><DD>
-       Support for POP3 authentication. 
-       </DD><DT>
-       Ver.0.52a at 2001.1.19 
-       </DT><DD>
-       Exclusive execution of ipfw command. Deny multiple authentication
-       requests from a terminal. Change the method to get Java connection
-       address. Modified string sizes in the program. Many small
-       modifications. 
-       </DD><DT>
-       Ver.0.52b at 2001.1.24 
-       </DT><DD>
-       Reformed UNP library. 
-       </DD><DT>
-       Ver.0.52c at 2001.1.26 
-       </DT><DD>
-       Added DEBUG flag. Modified Directory setting. 
-       </DD><DT>
-       Ver.0.52d at 2001.1.30 
-       </DT><DD>
-       Modified no packet time setting. 
-       </DD><DT>
-       Ver.0.52e at 2001.2.5 
-       </DT><DD>
-       Corrected wrong comment. 
-       </DD><DT>
-       Ver.0.53a at 2001.2.7 
-       </DT><DD>
-       Directory setting integrated in Makefile. Support for logging MAC
-       address. 
-       </DD><DT>
-       Ver.0.53b at 2001.2.8 
-       </DT><DD>
-       Added check for empty userID or password. 
-       </DD><DT>
-       Ver.0.53c at 2001.2.10 
-       </DT><DD>
-       Replaced one accept window to two overlapping windows. 
-       </DD><DT>
-       Ver.0.53d at 2001.2.13 
-       </DT><DD>
-       Small modification on MAC address acquisition. 
-       </DD><DT>
-       Ver.0.54a at 2001.2.15 
-       </DT><DD>
-       Serious error (Ports destroyed during long execution) found and
-       fixed. 
-       </DD><DT>
-       Ver.0.55a at 2001.3.19 
-       </DT><DD>
-       Show messages in JavaApplet field. 
-       </DD><DT>
-       Ver.0.56a at 2001.3.29 
-       </DT><DD>
-       Detached UNP library (Many modifications to source) 
-       </DD><DT>
-       Ver.0.56b at 2001.4.14 
-       </DT><DD>
-       Modified document. (No modification to source) 
-       </DD><DT>
-       Ver.0.56c at 2001.4.24 
-       </DT><DD>
-       Reformed HTML to improve authentication response time. (Modification
-       to accept.html) 
-       </DD><DT>
-       Ver.0.56d at 2001.4.29 
-       </DT><DD>
-       Declaration of GPL. Added English documentation. (No modification to
-       source) 
-       </DD><DT>
-       Ver.0.57a at 2001.5.10 
-       </DT><DD>
-       Removed loop in ipfw-delete. (Modification to comm-ipfw.c) 
-       </DD><DT>
-       Ver.0.57b at 2001.5.11 
-       </DT><DD>
-       Changed Lockout time for ipfw exec. (Modification to opengatesrv.h) 
-       </DD><DT>
-       Ver.0.57c at 2001.5.25 
-       </DT><DD>
-       Display message when Java/JavaScript is disabled. (Modification to
-       accept.html) 
-       </DD><DT>
-       Ver.0.57d at 2001.11.21 
-       </DT><DD>
-       Changed timeout values (Modification to opengatesrv.h) 
-       </DD><DT>
-       Ver.0.57e at 2002.2.13 
-       </DT><DD>
-       Fixed redirect error in IE (Modification to topindex.html) 
-       </DD><DT>
-       Ver.0.60a at 2002.6.17 
-       </DT><DD>
-       Added authentication protocols: RADIUS, PAM, POP3S (Modifications:
-       Makefile, comm-auth.c, utilities.c, opengatesrv.h, opengatesrv.conf.
-       Additions: auth-pam.c, auth-pop3s.c, auth-rad.c) 
-       </DD><DT>
-       Ver.0.60b at 2002.6.18 
-       </DT><DD>
-       Added comments. 
-       </DD><DT>
-       Ver.0.70a at 2002.6.19 
-       </DT><DD>
-       Modified to control multi-language environment (Modifications:
-       Makefile, comm-cgi.c *.html Opengate.java) 
-       </DD><DT>
-       Ver.0.71a at 2002.6.24 
-       </DT><DD>
-       Refined installation procedure (Modifications: Makefile, comm-cgi.c
-       *.html) 
-       </DD><DT>
-       Ver.0.72a at 2002.7.1 
-       </DT><DD>
-       Messages are terminated with CR and LF (Modifications: comm-cgi.c
-       Opengate.java) 
-       </DD><DT>
-       Ver.0.73a at 2002.7.4 
-       </DT><DD>
-       Added jar (java archive) file, modified some documents
-       (Modifications: comm-cgi.c Makefile Add: Opengate.jar) 
-       </DD><DT>
-       Ver.0.73b at 2002.7.10 
-       </DT><DD>
-       Recovery of error messages added in Ver.0.57c but forgotten in
-       Ver.0.70a (Modifications: accept.html) 
-       </DD><DT>
-       Ver.0.73c at 2002.7.12 
-       </DT><DD>
-       Changed some documents 
-       </DD><DT>
-       Ver.0.73d at 2002.7.15 
-       </DT><DD>
-       More careful detaching from web server. (Modifications: main.c
-       comm-cgi.c) 
-       </DD><DT>
-       Ver.0.73e at 2002.8.7 
-       </DT><DD>
-       Fixed a serious bug in java applet introduced in Ver.0.70a. The
-       applet did not return hello to hello request in English message
-       mode.(Modifications: Opengate.java) Save index.html created during
-       web server installation. (Modifications: Makefile) 
-       </DD><DT>
-       Ver.0.80a at 2002.8.19 
-       </DT><DD>
-       Added Perl script for more flexible firewall control (Modifications:
-       main.c comm-ipfw.c opengatesrv.h Makefile, Additions:
-       conf/opengatefw.pl) Fixed a small mistake in debug mode
-       (Modifications: auth-pam.c) Modified installation procedure.
-       Opengate directory can be set in Makefile (Modifications: Makefile,
-       *.html). Added document to describe the system flow (Additions:
-       doc/progflow.html). 
-       </DD><DT>
-       Ver.0.80b at 2002.8.26 
-       </DT><DD>
-       Fixed a bug for checking overlapping requests (Modifications:
-       comm-ipfw.c) 
-       </DD><DT>
-       Ver.0.81a at 2002.8.26 
-       </DT><DD>
-       Added link to close network in No-java mode (Modifications:
-       accept.html, Makefile, comm-cgi.c, comm-java.c, main.c
-       ,opengatesrv.h) 
-       </DD><DT>
-       Ver.0.81b at 2002.8.27 
-       </DT><DD>
-       Removed userid from terminate link string (Modifications:
-       comm-cgi.c, comm-java.c), Modified accept page design
-       (Modifications: accept.html) 
-       </DD><DT>
-       Ver.0.81c at 2002.9.5 
-       </DT><DD>
-       Faulted Version. Removed. 
-       </DD><DT>
-       Ver.0.81d at 2002.9.9 
-       </DT><DD>
-       Fixed a mistake in URL string in HTML file. (Modifications:
-       ja/accept.html) Removed reference HTML document from archive. Added
-       description for maxuser=0 in installation document. 
-       </DD><DT>
-       Ver.0.81e at 2002.9.10 
-       </DT><DD>
-       Added checking for execl failure (Modifications: comm-ipfw.c,
-       comm-arp.c, main.c) 
-       </DD><DT>
-       Ver.0.82a at 2002.9.25 
-       </DT><DD>
-       Added skeleton routine to get user properties (Modifications:
-       opengatesrv.h, Makefile, main.c, comm-ipfw.c, opengatefw.pl,
-       Additions: comm-userdb.c) 
-       </DD><DT>
-       Ver.0.83a at 2002.10.7 
-       </DT><DD>
-       Do not permit reply to hello more than once (Modifications:
-       comm-java.c, opengatesrv.h) 
-       </DD><DT>
-       Ver.0.83b at 2003.1.6 
-       </DT><DD>
-       Add documentation about maximum number of TCP connections
-       (Modifications: install.html, install-e.html) 
-       </DD><DT>
-       Ver.0.90a at 2003.5.6 
-       </DT><DD>
-       Added duration input field in auth page, allowing prolonged usage
-       without java. To cope with hijacking and notting, mac-address and
-       packet-count are checked periodically. (Modifications: index.html,
-       index-ssl.html, accept.html, comm-cgi.c comm-java.c, comm-arp.c,
-       main.c, opengatesrv.h) 
-       </DD><DT>
-       Ver.0.90b at 2003.5.7 
-       </DT><DD>
-       Reset the DEBUG option. It was left out in the previous
-       version.(Modification: opengatesrv.h) 
-       </DD><DT>
-       Ver.0.90c at 2003.5.15 
-       </DT><DD>
-       Simplified the logic. (Modification: comm-java.c) 
-       </DD><DT>
-       Ver.0.90d at 2003.8.27 
-       </DT><DD>
-       Changed message in auth page. (Modification: index.html,
-       index-ssl.html) 
-       </DD><DT>
-       Ver.0.90e at 2003.9.24 
-       </DT><DD>
-       Display (firewall-rule-Number,userID,IPaddress) in process
-       title.(Modification: main.c) 
-       </DD><DT>
-       Ver.0.90f at 2003.9.25 
-       </DT><DD>
-       Added documentation (Modification: errcheck.html,errcheck-e.html) 
-       </DD><DT>
-       Ver.0.90g at 2003.11.28 
-       </DT><DD>
-       Fixed PAM-include error occurred on FreeBSD 5 (Modification:
-       auth-pam.c) 
-       </DD><DT>
-       Ver.0.90h at 2003.12.8 
-       </DT><DD>
-       Fixed Applet-NoReply error occurring in some browsers when removing
-       applet page. Modified install document (Modification: Opengate.java
-       and the compiled files, install.html,install-e.html) 
-       </DD><DT>
-       Ver.0.90i at 2003.12.16 
-       </DT><DD>
-       Modified parameters and documentation (Modification: opengatesrv.h,
-       makefile, index.html, index-ssl.html, accept.html, accept2.html,
-       install.html, install-e.html, qa.html, qa-e.html, errcheck.html,
-       errcheck-e.html) 
-       </DD><DT>
-       Ver.0.90j at 2004.9.21 
-       </DT><DD>
-       Fixed communication error occurring on some pop3/pop3s servers
-       (Modification: comm-auth.c, auth-pop3s.c) 
-       </DD><DT>
-       Ver.0.90k at 2005.2.3 
-       </DT><DD>
-       Added links to accept.html to cope with pop-up-blocked and
-       java-optional browser (Modification: accept.html) 
-       </DD><DT>
-       Ver.0.90l at 2005.2.4 
-       </DT><DD>
-       Fixed communication error with ftpserver sending back multi-line
-       greeting. Added error reporting code for fork/exec
-       (Modification:comm-auth.c, comm-ipfw.c) 
-       </DD><DT>
-       Ver.0.90m at 2005.2.7 
-       </DT><DD>
-       Added error check code for ipfw response (Modification:comm-ipfw.c) 
-       </DD><DT>
-       Ver.0.90n at 2005.3.21 
-       </DT><DD>
-       Added no-cache option to authentication pages
-       (Modification:index.html, index-ssl.html) 
-       </DD><DT>
-       Ver.1.0.0 at 2005.5.21 
-       </DT><DD>
-       Stable version is released (Modification: README) 
-       </DD><DT>
-       Ver.1.1.0 at 2005.5.27 
-       </DT><DD>
-       Added many parameters in conf file. Added test-programs. (Addition:
-       get-param.c,test-get-param.c,test-comm-auth.c,test-comm-ipfw.c,test-comm-java.c,test-console.sh
-       Modification:
-       README,main.c,comm-auth.c,comm-ipwf.c,comm-java.c,Makefile) 
-       </DD><DT>
-       Ver.1.1.1 and 1.0.1 at 2005.5.30 
-       </DT><DD>
-       Recompiled Java Applet with option '-target 1.1' to be compatible
-       with MicrosoftVM (Modification: Opengate.class,
-       OpengateClient.class, Opengate.jar) 
-       </DD><DT>
-       Ver.1.1.2 at 2005.7.13 
-       </DT><DD>
-       Commented out server parameter setting in config file
-       (modification:opengatesrv.conf) 
-       </DD><DT>
-       Ver.1.1.3 at 2005.12.1 
-       </DT><DD>
-       Fixed error when executing the child process. Thanks to K.Eguchi and
-       S.Uematsu (modification:comm-java.c, opengatefw.pl) 
-       </DD><DT>
-       Ver.1.2.0 at 2005.12.2 
-       </DT><DD>
-       Added IPv6 support [contributed by K.Eguchi] 
-       </DD><DT>
-       Ver.1.2.1 at 2005.12.15 
-       </DT><DD>
-       Changed NDP command option to be recognized by new NDP [contributed
-       by K.Eguchi] 
-       </DD><DT>
-       Ver.1.2.2 at 2006.1.6 
-       </DT><DD>
-       Fixed error occurring when a cgi has no argument. Added MRTG
-       function [contributed by K.Eguchi] 
-       </DD><DT>
-       Ver.1.1.4 and Ver.1.2.3 at 2006.2.2 
-       </DT><DD>
-       Added FTPS authentication. 
-       </DD><DT>
-       Ver.1.2.4 at 2006.3.14 
-       </DT><DD>
-       Modified documentation and comments. 
-       </DD><DT>
-       Ver.1.3.0 at 2006.3.22 
-       </DT><DD>
-       Changed address acquisition method for IPv4/IPv6 dual stack and
-       others. 
-       </DD><DT>
-       Ver.1.3.1 at 2006.3.27 
-       </DT><DD>
-       Simplified logic. Modified rulechk script. 
-       </DD><DT>
-       Ver.1.3.2 at 2006.4.3 
-       </DT><DD>
-       Changed Config file to XML form. Almost all parameters can now be
-       set in the file. 
-       </DD><DT>
-       Ver.1.3.3 at 2006.4.7 
-       </DT><DD>
-       Put back syslog setting to fixed value, and some bugs were fixed. 
-       </DD><DT>
-       Ver.1.3.4 at 2006.4.11 
-       </DT><DD>
-       Changed accept page description. 
-       </DD><DT>
-       Ver.1.3.5 at 2006.4.13 
-       </DT><DD>
-       Modified the errcheck and qa documentation. Added time information
-       in address encoding. Added retry information page. 
-       </DD><DT>
-       Ver.1.3.6 at 2006.4.14 
-       </DT><DD>
-       Changed syslog setting to config file, and some bugs were fixed. 
-       </DD><DT>
-       Ver.1.3.7 at 2006.4.20 
-       </DT><DD>
-       Added code and info to cope with abnormal actions, and some bugs
-       were fixed. 
-       </DD><DT>
-       Ver.1.3.8 at 2006.4.26 
-       </DT><DD>
-       Added code to remove overlapping rules and processes. 
-       </DD><DT>
-       Ver.1.3.9 at 2006.4.27 
-       </DT><DD>
-       Modified Java Applet to display long message. 
-       </DD><DT>
-       Ver.1.3.10 at 2006.5.1 
-       </DT><DD>
-       Added userID pattern-match function. Fixed bug when checking
-       parameters. 
-       </DD><DT>
-       Ver.1.3.11 at 2006.5.3 
-       </DT><DD>
-       Added code to match the duration max value in conf file with auth
-       page. 
-       </DD><DT>
-       Ver.1.3.12 at 2006.5.12 
-       </DT><DD>
-       Changed link in deny page from external site to auth page. 
-       </DD><DT>
-       Ver.1.3.13 at 2006.5.17 
-       </DT><DD>
-       Use FILE and LINE macro in error message. Fixed abnormal termination
-       bugs. 
-       </DD><DT>
-       Ver.1.3.14 at 2006.5.23 
-       </DT><DD>
-       Removed close-error message. Modified QA document. 
-       </DD><DT>
-       Ver.1.3.15 at 2006.10.14 
-       </DT><DD>
-       Fixed browser's long waiting after sending accept page and other
-       small bugs. 
-       </DD><DT>
-       Ver.1.4.0 at 2006.10.16 
-       </DT><DD>
-       Added client watch to http keep-alive, which is the alternative to
-       the watch with java applet. Use carefully, as this is a preliminary
-       release. 
-       </DD><DT>
-       Ver.1.4.1 at 2006.10.18 
-       </DT><DD>
-       Changed JavaScript to run on some systems. 
-       </DD><DT>
-       Ver.1.4.2 at 2006.10.19 
-       </DT><DD>
-       Ignore Http watch mode on HTTP/1.0 browser. 
-       </DD><DT>
-       Ver.1.4.3 at 2006.10.20 
-       </DT><DD>
-       Moved JavaScript from html-file to external js-file. Modified some
-       messages. 
-       </DD><DT>
-       Ver.1.4.4 at 2006.10.25 
-       </DT><DD>
-       Added automatic start of java applet on failing http keep-alive.
-       Modified http-get format. Added session-id. Fixed read bug. 
-       </DD><DT>
-       Ver.1.4.5 at 2006.10.28 
-       </DT><DD>
-       Added function to indicate disable clients for http/java watch. 
-       </DD><DT>
-       Ver.1.4.6 at 2006.11.11 
-       </DT><DD>
-       Changed dir mode to install properly. Added mac check. Fixed small
-       bugs. 
-       </DD><DT>
-       Ver.1.4.7 at 2006.11.18 
-       </DT><DD>
-       Fixed small bugs and modified pages. Added processing time
-       measurement for research. 
-       </DD><DT>
-       Ver.1.4.8 at 2006.11.19 
-       </DT><DD>
-       Fixed small bugs and modified pages and measurement items. 
-       </DD><DT>
-       Ver.1.4.9 at 2006.12.20 
-       </DT><DD>
-       Changed hello timing control from client side to server side. 
-       </DD><DT>
-       Ver.1.4.10 at 2006.12.26 
-       </DT><DD>
-       Changed parameter's name and value in config file. 
-       </DD><DT>
-       Ver.1.4.11 at 2007.2.2 
-       </DT><DD>
-       Added ldap/ldaps authentication. Fixed malfunction in exceptional
-       terminals. 
-       </DD><DT>
-       Ver.1.4.12 at 2007.2.4 
-       </DT><DD>
-       Removed watch-mode selection in authentication page. 
-       </DD><DT>
-       Ver.1.4.13 at 2007.2.17 
-       </DT><DD>
-       Added change to select time watch mode when the duration value is
-       entered. 
-       </DD><DT>
-       Ver.1.4.14 at 2007.3.2 
-       </DT><DD>
-       Fixed bug when IPv6 disabled. Shortened the default duration for
-       time watch mode. 
-       </DD><DT>
-       Ver.1.4.15 at 2007.3.22 
-       </DT><DD>
-       Fixed bug when dumping micro-second time information. 
-       </DD><DT>
-       Ver.1.4.16 at 2007.4.16 
-       </DT><DD>
-       Fixed bug for delayed favicon.ico request, occurring on IE7. 
-       </DD><DT>
-       Ver.1.4.17 at 2007.4.18 
-       </DT><DD>
-       Refined the bug fix of favicon.ico error. 
-       </DD><DT>
-       Ver.1.4.18 at 2007.4.23 
-       </DT><DD>
-       Added favicon.ico installation. 
-       </DD><DT>
-       Ver.1.4.19 at 2007.5.24 
-       </DT><DD>
-       Modified control of favicon.ico. 
-       </DD><DT>
-       Ver.1.4.20 at 2007.6.1 
-       </DT><DD>
-       Modified web pages to guide the users in the right direction. 
-       </DD><DT>
-       Ver.1.4.21 at 2007.6.14 
-       </DT><DD>
-       Modified Makefile and install document. Abort when unloading the
-       httpkeep page. 
-       </DD><DT>
-       Ver.1.4.22 at 2007.6.26 
-       </DT><DD>
-       Removed ipfw pass rule for established packets. 
-       </DD><DT>
-       Ver.1.4.23 at 2007.7.2 
-       </DT><DD>
-       Added config setting for multiple auth servers and auth server
-       timeout. 
-       </DD><DT>
-       Ver.1.4.24 at 2007.11.28 
-       </DT><DD>
-       Added seteuid control. Show auto time setting in auth page. 
-       </DD><DT>
-       Ver.1.4.25 at 2007.12.21 
-       </DT><DD>
-       Fixed typo in Makefile (change from Lockfile to LockFile). 
-       </DD><DT>
-       Ver.1.4.26 at 2008.2.29 
-       </DT><DD>
-       Fixed error on 64 bit machine. 
-       </DD><DT>
-       Ver.1.4.27 at 2008.3.3 
-       </DT><DD>
-       Fixed error when setting the default pam service name. Fixed
-       previous fix. 
-       </DD><DT>
-       Ver.1.4.28 at 2008.3.8 
-       </DT><DD>
-       Fixed error in pam authentication. 
-       </DD><DT>
-       Ver.1.4.29 at 2008.3.17 
-       </DT><DD>
-       Added code to perl script to prevent multiple logins. 
-       </DD><DT>
-       Ver.1.4.30 at 2008.3.18 
-       </DT><DD>
-       Fixed error in tools/mrtg. 
-       </DD><DT>
-       Ver.1.4.31 at 2008.4.10 
-       </DT><DD>
-       Modified ReconnectTimeout value in conf to fix disconnection issue
-       in some browsers. 
-       </DD><DT>
-       Ver.1.4.32 at 2008.5.22 
-       </DT><DD>
-       Fixed segmentation-fault in opengatefwd. 
-       </DD><DT>
-       Ver.1.4.33 at 2008.5.29 
-       </DT><DD>
-       Fixed install documentation. 
-       </DD><DT>
-       Ver.1.4.34 at 2008.6.27 
-       </DT><DD>
-       Removed ip6fw from default. 
-       </DD><DT>
-       Ver.1.4.35 at 2008.7.9 
-       </DT><DD>
-       Fixed browser's hangup on closing. 
-       </DD><DT>
-       Ver.1.4.36 at 2008.7.17 
-       </DT><DD>
-       Changed value of ActiveCheckInterval. Modified install.html. 
-       </DD><DT>
-       Ver.1.4.37 at 2009.8.18 
-       </DT><DD>
-       Fixed Radius error. 
-       </DD><DT>
-       Ver.1.4.38 at 2009.8.28
-       </DT><DD>
-       Modified english document.(No modification to source) [Contiributed by M. Hawk] 
-       </DD><DT>
-       Ver.1.5.0 at 2009.9.11
-       </DT><DD>
-       Removed JavaApplet mode. Removed ip6fw command.  
-       Added firewall tag rule. Added Sqlite3 database.
-       Added cookie authentication. 
-       Added function to return to requested url.
-       Use carefully, as this is a preliminary release. 
-       </DD><DT>
-       Ver.1.5.1 at 2009.9.15
-       </DT><DD>
-        Modified english document. Removed disabled item in conf file.
-       </DD><DT>
-       Ver.1.5.2 at 2009.10.4
-       </DT><DD>
-        Fixed malfunctions caused by remaining cookie and null http_host.
-       </DD><DT>
-       Ver.1.5.3 at 2009.10.19
-       </DT><DD>
-        Fixed mutex error in sqlite3.
-       </DD><DT>
-       Ver.1.5.4 at 2009.10.20
-       </DT><DD>
-        Fixed error in perl script parameter.
-       </DD><DT>
-       Ver.1.5.5 at 2010.4.1
-       </DT><DD>
-        Fixed error in ldap on AMD machine [contributed by K.Iwao]. 
-       Modified install.html.
-       </DD><DT>
-       Ver.1.5.6 at 2011.4.1
-       </DT><DD>
-        Fixed error in pop3s and ftps. 
-       Changed Japanese char-code from jis to utf-8.
-       </DD><DT>
-       Ver.1.5.7 at 2011.4.20
-       </DT><DD>
-        Fixed error in tools/rulechk [contributed by S.Horikawa]. 
-       </DD><DT>
-       Ver.1.5.8 at 2011.5.9
-       </DT><DD>
-        Fixed error on arp entry expiring [contributed by S.Horikawa]. 
-       </DD><DT>
-       Ver.1.5.9 at 2011.5.13
-       </DT><DD>
-        Fixed errors at including many cookies and in retry.html [contributed by S.Horikawa]. 
-       </DD><DT>
-       Ver.1.5.10 at 2011.5.25
-       </DT><DD>
-        Fixed error on needless connections [contributed by S.Horikawa]. 
-       </DD><DT>
-       Ver.1.5.11 at 2011.5.27
-       </DT><DD>
-        Fixed error on requesting favicon [contributed by S.Horikawa]. 
-       </DD><DT>
-       Ver.1.5.12 at 2011.6.16
-       </DT><DD>
-        Fixed error on reconnecting [contributed by S.Horikawa]. 
-       </DD><DT>
-       Ver.1.5.13 at 2011.9.29
-       </DT><DD>
-        Added Shibboleth/HttpBasic authentication.
-       </DD><DT>
-       Ver.1.5.14 at 2011.10.4
-       </DT><DD>
-       Added detection of NAT/Router using opengatemd
-       </DD><DT>
-       Ver.1.5.15 at 2011.12.23
-       </DT><DD>
-       Modified Shibboleth authentication to get IdP info.
-       </DD><DT>
-       Ver.1.5.16 at 2012.1.18
-       </DT><DD>
-       Added retry on accidental disconnection. 
-       Added userid as comment on ipfw rule
-       </DD><DT>
-       Ver.1.5.17 at 2012.2.13
-       </DT><DD>
-       Removed 2 error messages.
-       </DD><DT>
-       Ver.1.5.18 at 2012.2.28
-       </DT><DD>
-       Modified treatment of overlapped sessions. Fixed bugs.
-       </DD><DT>
-       Ver.1.5.19 at 2012.3.19
-       </DT><DD>
-       Added version display (at execution with -v in shell). Added client
-       address in INFO log.
-       </DD><DT>
-       Ver.1.5.20 at 2012.4.6
-       </DT><DD>
-       Added replacing the parameter redirectedurl in some html files. 
-       </DD><DT>
-       Ver.1.5.21 at 2012.4.11
-       </DT><DD>
-       Added message to avoid popup blocking in httpkeep page. 
-       </DD><DT>
-       Ver.1.5.22 at 2012.7.17
-       </DT><DD>
-       Modified a variable name to avoid misunderstanding. 
-       </DD><DT>
-       Ver.1.5.23 at 2012.11.21
-       </DT><DD>
-       Fixed error at loading httpkeep page.
-       </DD><DT>
-       Ver.1.5.24 at 2012.11.29
-       </DT><DD>
-       Modified string at address conversion error in opengatefwd.
-       </DD><DT>
-       Ver.1.5.25 at 2012.12.14
-       </DT><DD>
-       Fixed small bugs in http header and parameter[contributed by M.Tagawa]. 
        </DD><DT>
        Ver.1.5.27 at 2013.2.27
        </DT><DD>
@@ -1491,11 +745,22 @@ Opengate History</H3>
        Added udp sending to opengatemd(need to set udp port in conf
        file).
        Added dummy html for network connectivity check of iOS.
-       </DD><DT>
+       </DD>
+       <DT>
        Ver.1.5.28 at 2013.3.1
        </DT><DD>
        Modified shibboleth setting.
        </DD>
+       <DT>
+       Ver.1.5.29 at 2013.3.4
+       </DT><DD>
+       Added patterns matching to extra set in conf.
+       </DD>
+       <DT>
+       Ver.1.5.30 at 2013.4.1
+       </DT><DD>
+       Added code to remove cookie at deny [contributed by M.Tagawa]. 
+       </DD>
        </DL>
 <P>
 <B>Please see CVS on SourceForge.net to check the differences between
index 55a91e9..9e227f2 100644 (file)
@@ -329,6 +329,20 @@ int authPop3(char *userid, char *passwd)
   return authResult;
 }
 
+/*************************
+concatinate userid and extraid
+*************************/
+char* concatUserId(char* useridfull, char* userId, char* extraId){
+
+  /* set full userid */
+  strncpy(useridfull, userId,USERMAXLN);
+  if(!isNull(extraId)){
+    strncat(useridfull, GetConfValue("UserIdSeparator"), USERMAXLN);
+    strncat(useridfull, extraId, USERMAXLN);
+  }
+  return useridfull;
+}
+
 /***************************************/
 /* called at auth reply timeout        */
 /***************************************/
@@ -379,3 +393,12 @@ void SplitId(char* userid, char* useridshort, char* extraId)
   splitId(userid,useridshort,extraId);
   if(debug>1) err_msg("DEBUG:<=splitId(%s,%s,%s)",userid,useridshort,extraId);
 }
+
+char* ConcatUserId(char*  useridfull, char* userId, char* extraId)
+{
+  char* ret;
+  if(debug>1) err_msg("DEBUG:=>concatUserId(,%s,%s)",userId,extraId);
+  ret=concatUserId(useridfull, userId, extraId);
+  if(debug>1) err_msg("DEBUG:<=concatUserId(%s,,)",useridfull);
+  return ret;
+}
index 2fc16bb..2f43970 100644 (file)
@@ -374,13 +374,23 @@ void putClientDeny(char *clientAddr4, char *language)
            GetConfValue("OpengateDir"),language,GetConfValue("DenyDoc"));
 
   /* replace keyword and send out the file */
-  printf("Content-type: text/html\r\n\r\n");
+  printf("Content-type: text/html\r\n");
+
+  /* if cookie auth is enabled, delete the cookie */
+  if( (*GetConfValue("EnableCookieAuth")!='0') ){
+    printf("Set-Cookie: %s=;expires=Thu, 01-Jan-1970 00:00:00 GMT;path=/;\r\n", COOKIENAME);
+  }
+
+  /* end of html header */
+  printf("\r\n");
+
+  /* send denydoc content */
   HtmlTemplate(denydoc, keys);
 
   return;
 }
 /*********************************************/
-/* deny message to the client            */
+/* put retry message to the client            */
 /*********************************************/
 void putClientRetry(char *language)
 {
@@ -576,8 +586,9 @@ int isHttpWatchEnableClient(void)
   if(strcmp(getenv("SERVER_PROTOCOL"),"HTTP/1.0")==0) return FALSE;
 
   /* some user agent does not support long HTTP Keep-Alive */
+  /* last param 0 means case insensitive */
   if(RegExMatch(getenv("HTTP_USER_AGENT"),
-                GetConfValue("HttpWatch/SkipAgentPattern"))) return FALSE;
+                GetConfValue("HttpWatch/SkipAgentPattern"),0)) return FALSE;
 
   return TRUE;
 }
index 8779831..ae43d58 100644 (file)
@@ -135,6 +135,10 @@ void closeConfFile(void)
 void setupConfExtra(char * userId,char *extraId)
 {
   ezxml_t xml;
+  char useridfull[USERMAXLN]; /* userid@extraid */
+
+  /* setup long userid (userid@extraid) */
+  ConcatUserId(useridfull, userId, extraId);
 
   /* init as no ExtraSet */
   xmlExtraSet=NULL;
@@ -157,8 +161,30 @@ void setupConfExtra(char * userId,char *extraId)
     /* if userID pattern is exist, check it */
     if(!isNull(ezxml_attr(xml, "UserIdPattern"))){
 
-      /* if not matched, go to next ExtraSet */
-      if(RegExMatch(userId, ezxml_attr(xml, "UserIdPattern"))==FALSE) continue;
+      /* if not matched, go to next ExtraSet. last-arg 0 means ingore-case */
+      if(RegExMatch(userId,ezxml_attr(xml,"UserIdPattern"),0)==FALSE){
+       continue;
+      }
+    }
+
+    /* if UserExtraPattern is exist, check it */
+    /*  UserExtraPattern = REGEX pattern matching to "userid@extraid" */
+    if(!isNull(ezxml_attr(xml, "UserExtraPattern"))){
+
+      /* if not matched, go to next ExtraSet. last-arg 0 means ingore-case */
+      if(RegExMatch(useridfull,ezxml_attr(xml,"UserExtraPattern"),0)==FALSE){
+       continue;
+      }
+    }
+
+    /* if UserExtraPtternNot is exist, check it */
+    /*  UserExtraPatternNot = REGEX pattern NOT matching to "userid@extraid" */
+    if(!isNull(ezxml_attr(xml, "UserExtraPatternNot"))){
+
+      /* if matched, go to next ExtraSet. last-arg 0 means ingore-case */
+      if(RegExMatch(useridfull,ezxml_attr(xml,"UserExtraPatternNot"),0)==TRUE){
+       continue;
+      }
     }
 
     /* found matched ExtraSet */
@@ -180,8 +206,9 @@ void setupConfExtra(char * userId,char *extraId)
 /* regular expression matching                 */
 /*  inStr : string to match                    */
 /*  regEx : regular expression                 */
+/*  caseSensitive : 0=ignore case, 1=sensitive */
 /***********************************************/
-int regExMatch(const char *inStr, const char *regEx)
+int regExMatch(const char *inStr, const char *regEx, int caseSensitive)
 {
   regex_t reg;
   int errcode;
@@ -189,7 +216,14 @@ int regExMatch(const char *inStr, const char *regEx)
   char errbuff[WORDMAXLN];
 
   /* compile regex */
-  if((errcode=regcomp(&reg, regEx, REG_NOSUB|REG_EXTENDED|REG_ICASE))!=0){
+  if(caseSensitive){
+    errcode=regcomp(&reg, regEx, REG_NOSUB|REG_EXTENDED);
+  }else{
+    errcode=regcomp(&reg, regEx, REG_NOSUB|REG_EXTENDED|REG_ICASE);
+  }
+
+  /* if error, return false */
+  if(errcode!=0){
     regerror(errcode, &reg, errbuff, WORDMAXLN);
     err_msg("ERR at %s#%d: regex message=%s",__FILE__,__LINE__,errbuff);
     match=FALSE;
@@ -469,10 +503,10 @@ void InitConf(void){
   if(debug>1) err_msg("DEBUG:<=initConf( )");
 }
 
-int RegExMatch(const char *inStr, const char *regEx){
+int RegExMatch(const char *inStr, const char *regEx, int caseSensitive){
   int ret;
-  if(debug>1) err_msg("DEBUG:=>regExMatch(%s,%s)", inStr, regEx);
-  ret=regExMatch(inStr, regEx);
+  if(debug>1) err_msg("DEBUG:=>regExMatch(%s,%s)",inStr,regEx,caseSensitive);
+  ret=regExMatch(inStr, regEx,caseSensitive);
   if(debug>1) err_msg("DEBUG:(%d)<=regExMatch( )",ret);
   return ret;
 }
index 7b73b1a..4329099 100644 (file)
@@ -116,6 +116,7 @@ extern int debug;
 /**********prototypes***************************************/
 /* authentication */
 int AuthenticateUser(char *userid, char *password);
+char* ConcatUserId(char*  useridfull, char* userId, char* extraId);
 
 /* firewall control */
 int OpenClientGate4(char *clientAddr4, char *userid, char *macAddr4, char *userProperty);
@@ -237,7 +238,7 @@ void SetupConfExtra(char *userId, char *extraId);
 char *GetConfValue(char *name);
 int SelectNextAuthServer(void);
 void  InitConf();
-int RegExMatch(const char *inStr, const char *regEx);
+int RegExMatch(const char *inStr, const char *regEx, int caseSensitive);
 void ResetAuthServerPointer(void);
 
 /* ctrl-alarms.c */