From nobody@FreeBSD.org  Thu May 15 16:35:14 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9BAEB106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 May 2008 16:35:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 899068FC22
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 May 2008 16:35:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m4FGY3JO004758
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 May 2008 16:34:03 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m4FGY2s4004757;
	Thu, 15 May 2008 16:34:02 GMT
	(envelope-from nobody)
Message-Id: <200805151634.m4FGY2s4004757@www.freebsd.org>
Date: Thu, 15 May 2008 16:34:02 GMT
From: "Eugene M. Zheganin" <emz@norma.perm.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: databases/db 1.14 broken
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: edwin@mavetju.org

>Number:         123707
>Category:       ports
>Synopsis:       databases/db 1.14 broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    edwin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 15 16:40:05 UTC 2008
>Closed-Date:    Mon Jul 28 11:54:14 UTC 2008
>Last-Modified:  Mon Jul 28 11:54:14 UTC 2008
>Originator:     Eugene M. Zheganin
>Release:        FreeBSD 7.0-RELEASE-p1
>Organization:
>Environment:
FreeBSD elf.hq.norma.perm.ru 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #1: Tue May 13 18:51:21 YEKST 2008     emz@ravenholm.hq.norma.perm.ru:/usr/obj/usr/src/sys/ELF  i386
>Description:
I'm using databases/db port to examine user passwords from the sasldb database of the security/sasl2 port. This database is in hash(3) format, consists of 2 fields, user and password.

From the version 1.14 this ports starts to "eat" last symbol (it does not display it when invoked) of the password, so I need now to manually downgrade and use the 1.11 version.

This problem is repeatable on multiple machines running freebsd versions 7.x/6.x where I am using cyrus-sasl and databases/db.

I wasn't sure which port this problem belongs to, but since the downgrading to 1.11 helps, and since I am using multiple releases on cyrus-sasl2 port and all of them are affected, and, in the same time, 1.11 works everywhere, I decided to post here.
>How-To-Repeat:
Install databases/db and security/cyrus-sasl2, create some users with `saslpasswd2` program and use `db hash /usr/local/etc/sasldb2` command to display created user/passwords pairs.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->edwin 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu May 15 16:40:12 UTC 2008 
Responsible-Changed-Why:  
edwin@mavetju.org => edwin@ (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123707 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Thu May 15 16:40:15 UTC 2008 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123707 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: edwin@mavetju.org
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/123707: databases/db 1.14 broken
Date: Thu, 15 May 2008 16:40:14 UT

 Maintainer of databases/db,
 
 Please note that PR ports/123707 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/123707
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
State-Changed-From-To: feedback->closed 
State-Changed-By: edwin 
State-Changed-When: Mon Jul 28 11:42:42 UTC 2008 
State-Changed-Why:  
I believe this is due to the fact that the sasldb doesn't use 
zero-terminated strings as the passwords: 

00001fe0  67 65 65 6e 74 65 73 74  00 6b 37 2e 6d 61 76 65  |geentest.k7.mave| 

This one gives: 

./work/db-1.16/db hash sasldb2.db 
test    gee 

./work/db-1.16/db -N hash sasldb2.db 
test    geen 

while another database gives: 

00002f70  00 00 00 00 12 34 56 78  90 12 3a 32 43 54 65 76  |....testin:autom| 
00002f80  87 98 09 12 23 34 35 00  6d 61 69 6c 35 61 75 74  |maticxx.mail5aut| 
00002f90  68 2e 62 61 72 6e 65 74  2e 63 6f 6d 2e 61 75 3a  |h.barnet.com.au:| 
00002fa0  32 35 32 35 00                                    |2525.           | 

and that one gives: 

./work/db-1.16/db -N hash /usr/local/etc/postfix/sasl_password.db  
mail5auth.barnet.com.au:2525    testin:automaticxx 

So with -N it works. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=123707 
>Unformatted:
