Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Dec 2015 21:22:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 205173] mail/poppassd: change of password hangs and never returns
Message-ID:  <bug-205173-13-tbjTZG5HzN@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-205173-13@https.bugs.freebsd.org/bugzilla/>
References:  <bug-205173-13@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205173

--- Comment #1 from Russell <fbsdbug@xploit.com> ---
Have dug into this a bit more.  The problem seems to be related to the
character returned when passwd exits after the user account password has been
changed.  The code seems to be looking for the "\n" character to be returned
(which it does in previous FreeBSD versions).  However, in 10.2 this seems to
have been replaced with a "\0".  This same character is used to terminate the
match arrays, so there is no way to match against the returned \0 without a bit
of code changes.  We were able to make it work creating a placeholder value in
P4, and then matching on that when the returned string from passwd was \0:

Added into P4:
"Code0",

Added above the "if (*str == 0) return *pat == 0 ? 2 : 1;" line in the match
function:

   if (strcmp(pat,"Code0")==0){
     if (strcmp(str,"\0")==0){
       return 2;
     }
   }


I am not able to determine why passwd returns the \0 instead of \n.  The
passwd.c is the same between versions, which tells me something else has
changed, possibly in the functionality of termios?

Any assistance would be appreciated.

-Russell

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-205173-13-tbjTZG5HzN>