Summary: | yppasswdd cannot update passwd (rename of /var/yp to /var/yp/master. passwd.hold failed) | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Bernard Marshall <Bernard.Marshall> | ||||
Component: | bin | Assignee: | Mark Johnston <markj> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | edward.fuhr, markj, u.drolshagen | ||||
Priority: | --- | Keywords: | patch, regression | ||||
Version: | 12.0-RELEASE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Bernard Marshall
2019-01-15 12:27:27 UTC
Created attachment 201374 [details]
Fixes issue when rpc.yppasswdd fails to copy master.passwd
As of FreeBSD 12.0 rpc.yppasswdd was failing to copy the master.passwd file due to call pw_init truncating the filename value stored in passfile
This fix copies the value of passfile to a temporary variable, passdir. This prevents passfile from being truncated while also allowing the necessary directory name to be passed.
(In reply to Edward Fuhr from comment #1) I wish it to be known that this is my own amateur-hour patch, and in no way should this be considered an official patch. I thought the description was for the file and not to replace the blurb previously written up specifying this is NOT an official patch, but my own doing. (In reply to Edward Fuhr from comment #2) Thanks for looking into this Edward. A quick comment on your patch. I think you have forgotten to initialise "passdir_buf" in "yppasswdproc_update_master_1_svc". I suspect you need to add: /* Hold a copy of the passfile in passdir */ snprintf(passdir_buf, sizeof(passdir_buf), "%s", passfile); passdir = (char *)&passdir_buf; around line 831 in the current file, otherwise passdir_buf will not be initialised with passfile. I am running into the same problem on a recently installed box running 12.0-stable. I'd like to know if it's to be expected that this bug gets fixed offically any time soon. Thank you A commit references this bug: Author: markj Date: Mon Jun 3 16:51:07 UTC 2019 New revision: 348547 URL: https://svnweb.freebsd.org/changeset/base/348547 Log: rpc.yppasswdd: Fix dirname(3) usage after r305952. PR: 234972 Submitted by: Edward Fuhr <edward.fuhr@us.fujitsu.com> (original) MFC after: 3 days Changes: head/usr.sbin/rpc.yppasswdd/yppasswdd_server.c It works. Thanks a lot A commit references this bug: Author: markj Date: Thu Jun 6 03:01:06 UTC 2019 New revision: 348716 URL: https://svnweb.freebsd.org/changeset/base/348716 Log: MFC r348547: rpc.yppasswdd: Fix dirname(3) usage after r305952. PR: 234972 Changes: _U stable/12/ stable/12/usr.sbin/rpc.yppasswdd/yppasswdd_server.c Thanks for the report and analysis. |