From gregory@tahoe.acn.waw.pl  Thu Jul  7 15:34:07 2005
Return-Path: <gregory@tahoe.acn.waw.pl>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 47C4316A41C
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  7 Jul 2005 15:34:07 +0000 (GMT)
	(envelope-from gregory@tahoe.acn.waw.pl)
Received: from tahoe.acn.waw.pl (tahoe.acn.waw.pl [212.76.41.193])
	by mx1.FreeBSD.org (Postfix) with ESMTP id BB66243D4C
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  7 Jul 2005 15:34:06 +0000 (GMT)
	(envelope-from gregory@tahoe.acn.waw.pl)
Received: from tahoe.acn.waw.pl (localhost [127.0.0.1])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by tahoe.acn.waw.pl (Postfix) with ESMTP id 1B96C17097
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  7 Jul 2005 17:34:05 +0200 (CEST)
Received: (from gregory@localhost)
	by tahoe.acn.waw.pl (8.13.3/8.13.1/Submit) id j67FY43h003447;
	Thu, 7 Jul 2005 17:34:04 +0200 (CEST)
	(envelope-from gregory)
Message-Id: <200507071534.j67FY43h003447@tahoe.acn.waw.pl>
Date: Thu, 7 Jul 2005 17:34:04 +0200 (CEST)
From: Grzegorz Czaplinski <gregory@tahoe.acn.waw.pl>
Reply-To: Grzegorz Czaplinski <gregory@tahoe.acn.waw.pl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: cyrus-sasl-saslauthd-2.1.21 port not authenticating on 5.4
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         83099
>Category:       kern
>Synopsis:       [pam] pam_login_access change causes cyrus-sasl-saslauthd-2.1.21 port not authenticating on 5.4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    des
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 07 15:40:09 GMT 2005
>Closed-Date:    
>Last-Modified:  Mon Jul 18 23:02:20 GMT 2005
>Originator:     Grzegorz Czaplinski
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD zorn 5.4-STABLE FreeBSD 5.4-STABLE #1: Thu
Jul  7 11:52:53 CEST 2005 root@zorn:/usr/obj/usr/src/sys/ZORN  i386


>Description:
	cyrus-sasl-saslauthd-2.1.21 - broken port, authentication
	failed.
>How-To-Repeat:
	
	While trying to authenticate my postfix users using SASLAUTHD
	I get:

	 Jul  7 11:02:58 zorn postfix/smtpd[88688]: warning: SASL
	 authentication failure: size read failed
	 Jul  7 11:02:58 zorn postfix/smtpd[88688]: warning: SASL
	 authentication failure: Password verification failed
	 Jul  7 11:02:58 zorn postfix/smtpd[88688]: warning:
	 host[ip]: SASL PLAIN authentication failed

	Jul  7 17:09:11 zorn kernel: pid 35037 (saslauthd), uid 0:
	exited on signal 11 (core dumped)

	Running saslauthd in debug mode:
	zorn# /usr/local/sbin/saslauthd -a pam -d
	saslauthd[35144] :main            : num_procs  : 5
	saslauthd[35144] :main            : mech_option: NULL
	saslauthd[35144] :main            : run_path   :
	/var/state/saslauthd
	saslauthd[35144] :main            : auth_mech  : pam
	saslauthd[35144] :ipc_init        : using accept lock file:
	/var/state/saslauthd/mux.accept
	saslauthd[35144] :detach_tty      : master pid is: 0
	saslauthd[35144] :ipc_init        : listening on socket:
	/var/state/saslauthd/mux
	saslauthd[35144] :main            : using process model
	saslauthd[35144] :have_baby       : forked child: 35145
	saslauthd[35144] :have_baby       : forked child: 35146
	saslauthd[35144] :have_baby       : forked child: 35147
	saslauthd[35144] :have_baby       : forked child: 35148
	saslauthd[35145] :get_accept_lock : acquired accept lock

	saslauthd[35146] :get_accept_lock : acquired accept lock
	saslauthd[35145] :rel_accept_lock : released accept lock
	saslauthd[35144] :handle_sigchld  : child exited: 35145
	saslauthd[35144] :get_accept_lock : acquired accept lock
	saslauthd[35144] :rel_accept_lock : released accept lock
	Segmentation fault (core dumped)



	Testing with testsaslauthd:
	zorn# /usr/local/sbin/testsaslauthd -u gregtest -p gregpass
	size read failed

>Fix:
	Unknown, although cyrus-sasl-saslauthd-2.1.20 works fine.
>Release-Note:
>Audit-Trail:

From: Grzegorz Czaplinski <Grzegorz.Czaplinski@systemics.pl>
To: bug-followup@FreeBSD.org
Cc: gregory@tahoe.acn.waw.pl
Subject: Re: ports/83099: cyrus-sasl-saslauthd-2.1.21 port not authenticating on 5.4
Date: Fri, 8 Jul 2005 12:22:05 +0200

 Looks like cyrus-sasl-saslauthd-2.1.20_1
 is not working on 
 System: FreeBSD zorn 5.4-STABLE FreeBSD 5.4-STABLE #1: Thu
 Jul  7 11:52:53 CEST 2005 root@zorn:/usr/obj/usr/src/sys/ZORN  i386
 
 I have just cvsuped an old ports collection and the problem persists.
 
 cyrus-sasl-saslauthd-2.1.20_1 works OKay on 
 
 FreeBSD spear.mpumalanga.net 5.4-PRERELEASE FreeBSD 5.4-PRERELEASE #1:
 Mon Apr 11 21:38:59 CEST 2005
 root@spear.mpumalanga.net:/usr/obj/usr/src/sys/SPEAR  i386
 
 -greg

From: Grzegorz Czaplinski <gregory@czaplinski.net>
To: bug-followup@FreeBSD.org
Cc: gregory@czaplinski.net
Subject: Re: ports/83099: cyrus-sasl-saslauthd-2.1.21 port not authenticating on 5.4
Date: Fri, 8 Jul 2005 12:43:26 +0200

 Further investigation has shown, that on a system:
 
 FreeBSD spear.mpumalanga.net 5.4-PRERELEASE FreeBSD 5.4-PRERELEASE #1:
  Mon Apr 11 21:38:59 CEST 2005
  root@spear.mpumalanga.net:/usr/obj/usr/src/sys/SPEAR  i386
 
 cyrus-sasl-saslauthd-2.1.21 (today's cvsup) works without any problem.
 
 Any recent system change would cause my trouble?
 
  -g.
Responsible-Changed-From-To: freebsd-ports-bugs->des 
Responsible-Changed-By: pjd 
Responsible-Changed-When: Mon Jul 11 13:32:35 GMT 2005 
Responsible-Changed-Why:  
Dag-Erling, could you look at it? 

I diagnozed the problem. The core-dump happens in pam_login_access, 
because items 'rhost' and 'tty' are not set and pam_login_access(4) 
assumes, that when rhost != NULL, tty have to be valid (and in this 
case it is also NULL). 

I'm not sure what to do when both are NULL (should we allow or deny 
access)? 

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