[Mod-auth-commit] mod_authn_pop3/src mod_authn_pop3.c,1.4,1.5
Brought to you by:
firechipmunk,
honx
From: <fir...@us...> - 2004-03-02 09:01:21
|
Update of /cvsroot/mod-auth/mod_authn_pop3/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3457/src Modified Files: mod_authn_pop3.c Log Message: added changelog tool and ASL 2.0 for authn_pop3 Index: mod_authn_pop3.c =================================================================== RCS file: /cvsroot/mod-auth/mod_authn_pop3/src/mod_authn_pop3.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mod_authn_pop3.c 11 Nov 2003 06:16:48 -0000 1.4 +++ mod_authn_pop3.c 2 Mar 2004 08:41:51 -0000 1.5 @@ -1,75 +1,25 @@ /* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2003 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact ap...@ap.... + * Copyright 2003-2004 Paul Querna and Axel Grossklaus * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * <http://www.apache.org/>. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * - * Portions of this software are based upon public domain software - * originally written at the National Center for Supercomputing Applications, - * University of Illinois, Urbana-Champaign. */ -/* - * http_auth: authentication - * - * Rob McCool & Brian Behlendorf. - * - * Adapted to Apache by rst. +/** + * Apache 2.1 POP3 Authentication Module * - * dirkx - Added Authoritative control to allow passing on to lower - * modules if and only if the userid is not known to this - * module. A known user with a faulty or absent password still - * causes an AuthRequired. The default is 'Authoritative', i.e. - * no control is passed along. + * Special Thanks to Ian Holsman for giving the basis of this module. * - * ianh - modified to use pop for authentication */ #define APR_WANT_STRFUNC @@ -86,8 +36,8 @@ typedef struct { - char *serverhostname; - int port; + char *server_host; + int server_port; apr_interval_time_t timeout; } pop_auth_config_rec; @@ -95,8 +45,8 @@ { pop_auth_config_rec *conf = apr_palloc(p, sizeof(*conf)); - conf->serverhostname = NULL; - conf->port = 110; + conf->server_host = NULL; + conf->server_port = 110; conf->timeout = apr_time_from_sec(5); return conf; @@ -107,7 +57,7 @@ { pop_auth_config_rec *conf = dir_config; - conf->serverhostname = apr_pstrdup(cmd->pool, arg); + conf->server_host = apr_pstrdup(cmd->pool, arg); return NULL; } @@ -116,7 +66,7 @@ { pop_auth_config_rec *conf = dir_config; - conf->port = atoi(arg); + conf->server_port = atoi(arg); return NULL; } @@ -293,6 +243,7 @@ return AUTH_GRANTED; } + // XXXX: Should we return User Not Found? return AUTH_DENIED; } @@ -300,8 +251,9 @@ static authn_status get_pop3_realm_hash(request_rec * r, const char *user, const char *realm, char **rethash) { + //XXXX: Make this work :) ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "[mod_authn_pop3.c] - Digest Authentication with authn_pop3 is not possible"); + "[mod_authn_pop3.c] - Digest Authentication with authn_pop3 is not implmented"); return AUTH_DENIED; } |