httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk.vanGu...@jrc.it
Subject Authoritative, part 3
Date Mon, 23 Dec 1996 14:48:35 GMT

and the last one. Please note that a total fall through is
treated as a config-error by the core.

Dw.

http://ewse.ceo.org                         http://enrm.ceo.org
DWvGulik@Dialis.xs4all.nl                  Dirk.vanGulik@jrc.it
+39 332 78 0014                                 +39 332 78 9549
                                            fax +39 332 78 9185

ISEI/ESBA;                     The Center For Earth Observation
Joint Research Centre of the European Communities, Ispra, Italy

---------- Forwarded message ----------
Date: Mon, 23 Dec 1996 15:45:29 +0100 (MET)
From: Dirk.vanGulik <dirkx@twirke>
To: dirk.vangulik@jrc.it

Index: mod_auth.c
===================================================================
RCS file: /home/cvs/apache/src/mod_auth.c,v
retrieving revision 1.1.1.1
diff -c -3 -r1.1.1.1 mod_auth.c
*** mod_auth.c	1996/12/05 16:58:07	1.1.1.1
--- mod_auth.c	1996/12/22 17:19:37
***************
*** 56,61 ****
--- 56,67 ----
   * Rob McCool
   * 
   * Adapted to Apache by rst.
+  *
+  * dirkx - Added Authoratative control to allow passing on to lower
+  *	   modules if and only if the user-id is not known to this
+  *	   module. A known user with a faulty or absent password still
+  *	   causes an AuthRequired. The default is 'Authoratative', i.e.
+  *	   no control is passed along.
   */
  
  #include "httpd.h"
***************
*** 70,80 ****
  typedef struct auth_config_struct {
      char *auth_pwfile;
      char *auth_grpfile;
  } auth_config_rec;
  
  void *create_auth_dir_config (pool *p, char *d)
  {
!     return pcalloc (p, sizeof(auth_config_rec));
  }
  
  const char *set_auth_slot (cmd_parms *cmd, void *offset, char *f, char *t)
--- 76,92 ----
  typedef struct auth_config_struct {
      char *auth_pwfile;
      char *auth_grpfile;
+     int auth_authoritative;
  } auth_config_rec;
  
  void *create_auth_dir_config (pool *p, char *d)
  {
!     auth_config_rec *sec =
!     	(auth_config_rec *) pcalloc (p, sizeof(auth_config_rec));
!
!     sec->auth_pwfile = NULL; /* just to illustrate the default really */ 
!     sec->auth_grpfile = NULL; /* unless you have a broken HP cc */
!     sec->auth_authoritative = 1; /* keep the fortress secure by default */
!     return sec;
  }
  
  const char *set_auth_slot (cmd_parms *cmd, void *offset, char *f, char *t)
***************
*** 90,95 ****
--- 102,111 ----
    (void*)XtOffsetOf(auth_config_rec,auth_pwfile), OR_AUTHCFG, TAKE12, NULL },
  { "AuthGroupFile", set_auth_slot,
    (void*)XtOffsetOf(auth_config_rec,auth_grpfile), OR_AUTHCFG, TAKE12, NULL },
+ { "Auth_MSQL_Authoritative", set_flag_slot,
+   (void*)XtOffsetOf(auth_config_rec,auth_authoritative), 
+     OR_AUTHCFG, FLAG, 
+    "Set to 'no' to allow access control to be passed along to lower modules if the UserID
is not known to this module" },
  { NULL }
  };
  
***************
*** 180,185 ****
--- 196,203 ----
          return DECLINED;
  	
      if (!(real_pw = get_pw(r, c->user, sec->auth_pwfile))) {
+ 	if (!(sec->auth_authoritative))
+ 	    return DECLINED;
          sprintf(errstr,"user %s not found",c->user);
  	log_reason (errstr, r->uri, r);
  	note_basic_auth_failure (r);
***************
*** 252,257 ****
--- 270,278 ----
      
      if (!method_restricted)
        return OK;
+ 
+     if (!(sec -> auth_authoritative))
+       return DECLINED;
  
      note_basic_auth_failure (r);
      return AUTH_REQUIRED;


Mime
View raw message