From apwww@hyperreal.org Thu Sep 11 10:28:51 1997 Received: (from apwww@localhost) by hyperreal.org (8.8.5/8.8.5) id KAA18958; Thu, 11 Sep 1997 10:28:51 -0700 (PDT) Message-Id: <199709111728.KAA18958@hyperreal.org> Date: Thu, 11 Sep 1997 10:28:51 -0700 (PDT) From: Chris Tengi Reply-To: tengi@CS.Princeton.EDU To: apbugs@hyperreal.org Subject: Using NIS passwd.byname dbm files with AuthDBMUserFile X-Send-Pr-Version: 3.2 >Number: 1117 >Category: mod_auth-any >Synopsis: Using NIS passwd.byname dbm files with AuthDBMUserFile >Confidential: no >Severity: non-critical >Priority: medium >Responsible: contrib@apache.org >State: suspended >Class: change-request >Submitter-Id: apache >Arrival-Date: Thu Sep 11 10:30:01 1997 >Last-Modified: Mon Feb 23 04:02:15 PST 1998 >Originator: tengi@CS.Princeton.EDU >Organization: >Release: 1.2.4 >Environment: SunOS cs 5.5.1 Generic_103640-06 sun4u sparc SUNW,Ultra-1 gcc version 2.7.2 >Description: I have a situation where it is convenient to use the NIS passwd.byname DBM as the AuthDBMUserFIle. As the first field in the data returned from the DBM is the username, this needed to be stripped, and the password extracted from the 2nd field. A patch is included below. >How-To-Repeat: >Fix: *** mod_auth_dbm.c 1997/09/11 14:56:22 1.1 --- mod_auth_dbm.c 1997/09/11 16:58:42 *************** *** 197,202 **** --- 197,208 ---- /* Password is up to first : if exists */ colon_pw = strchr(real_pw,':'); if (colon_pw) *colon_pw='\0'; + if (strcmp(real_pw,c->user) == 0) { /* If DBM file is NIS passwd map, first token is username */ + colon_pw++; + real_pw = colon_pw; + colon_pw = strchr(real_pw,':'); + if (colon_pw) *colon_pw='\0'; + } /* anyone know where the prototype for crypt is? */ if(strcmp(real_pw,(char *)crypt(sent_pw,real_pw))) { ap_snprintf(errstr, sizeof(errstr), %0 >Audit-Trail: State-Changed-From-To: open-suspended State-Changed-By: dgaudet State-Changed-When: Tue Dec 16 00:16:58 PST 1997 State-Changed-Why: We're in feature freeze ... hopefully this will be solved in a general way soon. Dean Responsible-Changed-From-To: apache-contrib@apache.org Responsible-Changed-By: dgaudet Responsible-Changed-When: Mon Feb 23 04:02:14 PST 1998 Responsible-Changed-Why: mark for contrib %0 >Unformatted: