cvs commit: qpsmtpd/plugins/auth auth_vpopmail_sql

[email protected]
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
cvsuser     05/01/30 09:24:49

  Modified:    plugins/auth auth_vpopmail_sql
  Log:
  Correct handling for vpopmail built without clear password option
  
  Revision  Changes    Path
  1.4       +5 -2      qpsmtpd/plugins/auth/auth_vpopmail_sql
  
  Index: auth_vpopmail_sql
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/plugins/auth/auth_vpopmail_sql,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- auth_vpopmail_sql	28 Jan 2005 03:30:50 -0000	1.3
  +++ auth_vpopmail_sql	30 Jan 2005 17:24:49 -0000	1.4
  @@ -82,18 +82,21 @@
   	"Authentication to vpopmail via mysql: $pw_name\@$pw_domain");
   
       my $sth = $dbh->prepare(<<SQL);
  -select pw_passwd, pw_clear_passwd
  +select *
   from vpopmail
   where pw_name = ? and pw_domain = ?
   SQL
   
       $sth->execute( $pw_name, $pw_domain );
   
  -    my ($pw_passwd, $pw_clear_passwd) = $sth->fetchrow_array;
  +    my $passwd_hash = $sth->fetchrow_hashref;
   
       $sth->finish;
       $dbh->disconnect;
   
  +    my $pw_clear_passwd = $passwd_hash->{'pw_clear_passwd'};
  +    my $pw_passwd = $passwd_hash->{'pw_passwd'};
  +
       if ( # clear_passwd isn't defined so we cannot support CRAM-MD5
            ( $method =~ /CRAM-MD5/i and not defined $pw_clear_passwd )
   	 or
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.