Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jan 2019 12:27:27 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 234972] yppasswdd cannot update passwd (rename of /var/yp to /var/yp/master. passwd.hold failed)
Message-ID:  <bug-234972-227@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 234972
           Summary: yppasswdd cannot update passwd (rename of /var/yp to
                    /var/yp/master. passwd.hold failed)
           Product: Base System
           Version: 12.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: Bernard.Marshall@axiell.com

After upgrading to 12.0 RELEASE the yppasswdd RPC no longer updates passwor=
ds
successfully. When trying to update a password the following is output:

$ passwd fred
Changing NIS password for fred
New Password:
Retype New Password:
passwd: pam_chauthtok(): Error in service module

A check of /var/log/messages shows one of the following errors depending on
whether the -t option was set for nis_yppasswdd_flags in /etc/rc.conf:

rename of / to /.hold failed
rename of /var to /var/yp.hold failed
rename of /var/yp to /var/yp/master.passwd.hold failed

The error is in /usr/src/usr.sbin/rpc.yppasswdd/yppasswdd_server.c where
dirname() is used twice (line 609 and 832). Both lines have the code:

if (pw_init(dirname(passfile), passfile)) {

It looks like the implementation of dirname in 12.0 RELEASE has changed to =
now
apply changes to the string passed into the function. The change is to make=
 the
call thread safe according to the updated manual entry. The problem here is
that the call to dirname() now truncates "passfile" meaning the variable no
longer holds the path to the master password file, rather just the directory
and hence the error.

In order to use dirname() now "passfile" will need to be copied before being
passed into dirname().

--=20
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-234972-227>