List Info

Thread: DO NOT REPLY New: - trivial patch to add automatic crypting to 'dbmmanage import'




DO NOT REPLY New: - trivial patch to add automatic crypting to 'dbmmanage import'
country flaguser name
United States
2007-03-21 22:06:24
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=41
925>.
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: bugshttpd.apache.org
        ReportedBy: cas+apachetaz.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=ema
il
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the
assignee.

------------------------------------------------------------
---------
To unsubscribe, e-mail: bugs-unsubscribehttpd.apache.org
For additional commands, e-mail: bugs-helphttpd.apache.org


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )