You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2007/03/22 04:06:24 UTC

DO NOT REPLY [Bug 41925] New: - trivial patch to add automatic crypting to 'dbmmanage import'

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41925>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41925

           Summary: trivial patch to add automatic crypting to 'dbmmanage
                    import'
           Product: Apache httpd-2
           Version: 2.2.3
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: support
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: cas+apache@taz.net.au


dbmmanage import expects username:password pairs to be already encrypted, when
it is a trivial patch to enable it to encrypt passwords itself if they are fed
in as plaintext.

see patch below.  it supports all the encryption types supported by the
manual/command-line input methods because it just calls the same crypting
function that was already in the script:

btw, if you have pre-crypted passwords to feed it, just use the "-p" (plaintext)
on the dbmmanage command line.  might make sense to have a synonym of "-n" for
"don't crypt" as well.



--- dbmmanage.orig	2007-02-12 16:52:43.000000000 +1100
+++ dbmmanage	2007-03-22 14:03:11.231980231 +1100
@@ -307,7 +307,9 @@
 
 sub dbmc::import {
     while(defined($_ = <STDIN>) and chomp) {
-	($key,$crypted_pwd,$groups,$comment) = split /:/, $_, 4;
+	my $plain_pwd;
+	($key,$plain_pwd,$groups,$comment) = split /:/, $_, 4;
+	$crypted_pwd = cryptpw($plain_pwd);
 	dbmc->add;
     }
 }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org