You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Cliff Skolnick <cl...@organic.com> on 1996/05/09 22:09:28 UTC

WWW Form Bug Report: "no way to specify non-absolute AuthUserFile " on Solaris 2.x (fwd)

no ack sent

--
Cliff Skolnick                                      cliff@organic.com

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759

---------- Forwarded message ----------
Date: Thu May 9 12:31:36 1996
From: appro@fy.chalmers.se
To: cliff@organic.com
Subject: WWW Form Bug Report: "no way to specify non-absolute AuthUserFile " on Solaris 2.x

Submitter: appro@fy.chalmers.se
Operating system: Solaris 2.x, version: 
Version of Apache Used: 1.1b2
Extra Modules used: mod_auth_dbm
URL exhibiting problem: 

Symptoms:
--
Hi!

I keep AuthUserFiles used in Basic authentication
scheme in the same directory as documents:-)
It's not however possible to retrieve them
(AuthUserFiles) over HTTP, because I declared
them being of CGI type:-) Well, back to the point!
I found that it's not possible just to name a
"passwd" file from the same directory, one has to
specify full pathname! Not neat:-( Below is a
patch for mod_auth.c. Patch for mod_auth_dbm.c
is very similar.

Cheers. Andy.

*** mod_auth.c.orig     Thu May  9 19:25:59 1996
--- mod_auth.c  Thu May  9 20:29:16 1996
***************
*** 69,85 ****
  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));
  }
  
  command_rec auth_cmds[] = {
! { "AuthUserFile", set_string_slot,
      (void*)XtOffsetOf(auth_config_rec,auth_pwfile), OR_AUTHCFG, TAKE1, NULL },
! { "AuthGroupFile", set_string_slot,
      (void*)XtOffsetOf(auth_config_rec,auth_grpfile), OR_AUTHCFG, TAKE1, NULL },
  { NULL }
  };
--- 69,108 ----
  typedef struct auth_config_struct {
      char *auth_pwfile;
      char *auth_grpfile;
+     char *auth_dir;
  } auth_config_rec;
  
  void *create_auth_dir_config (pool *p, char *d)
  {
!     auth_config_rec *ret;
! 
!     if (ret = (auth_config_rec *)pcalloc (p, sizeof(auth_config_rec)))
!         ret->auth_dir = d ? pstrdup(p,d) : NULL;
!     return (void *)ret;
  }
  
+ static char *set_auth_pwfile (cmd_parms *cmd, auth_config_rec *ptr, char *arg)
+ {
+     if (*arg != '/' && ptr->auth_dir)
+         ptr->auth_pwfile = pstrcat (cmd->pool, ptr->auth_dir, arg, NULL);
+     else
+         ptr->auth_pwfile = pstrdup (cmd->pool, arg);
+     return NULL;
+ }
+ 
+ static char *set_auth_grpfile (cmd_parms *cmd, auth_config_rec *ptr, char *arg)
+ {
+     if (*arg != '/' && ptr->auth_dir)
+         ptr->auth_grpfile = pstrcat (cmd->pool, ptr->auth_dir, arg, NULL);
+     else
+         ptr->auth_grpfile = pstrdup (cmd->pool, arg);
+     return NULL;
+ }
+ 
  command_rec auth_cmds[] = {
! { "AuthUserFile", set_auth_pwfile,
      (void*)XtOffsetOf(auth_config_rec,auth_pwfile), OR_AUTHCFG, TAKE1, NULL },
! { "AuthGroupFile", set_auth_grpfile,
      (void*)XtOffsetOf(auth_config_rec,auth_grpfile), OR_AUTHCFG, TAKE1, NULL },
  { NULL }
  };



--

Backtrace:
--

--


Re: WWW Form Bug Report: "no way to specify non-absolute AuthUserFile " on Solaris 2.x (fwd)

Posted by "James H. Cloos Jr." <cl...@jhcloos.com>.
Rob> Maybe a

Rob> AddHandler ignore .htaccess

Rob> type option is needed. there's probably some equivalent of
Rob> "ignore" already in existence.

Just played around a bit with this.  Try a

Action ignore /error/document.cgi

in addition to the AddHandler directive.  Make /error/document.cgi be
an ErrorDocument script.

This of course assumes you have mod_actions compiled in.

-JimC
-- 
James H. Cloos, Jr.	<URL:http://www.jhcloos.com/~cloos/>
cloos@jhcloos.com	Work: cloos@io.com
LPF,Usenix,SAGE,ISOC,ACLU