FreeBSD Bugzilla – Attachment 201374 Details for
Bug 234972
yppasswdd cannot update passwd (rename of /var/yp to /var/yp/master. passwd.hold failed)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixes issue when rpc.yppasswdd fails to copy master.passwd
yppasswd_server.c.diff (text/plain), 1.52 KB, created by
Edward Fuhr
on 2019-01-24 03:36:19 UTC
(
hide
)
Description:
Fixes issue when rpc.yppasswdd fails to copy master.passwd
Filename:
MIME Type:
Creator:
Edward Fuhr
Created:
2019-01-24 03:36:19 UTC
Size:
1.52 KB
patch
obsolete
>Index: yppasswdd_server.c >=================================================================== >--- yppasswdd_server.c (revision 343372) >+++ yppasswdd_server.c (working copy) >@@ -471,6 +471,8 @@ > char *passfile_hold; > char passfile_buf[MAXPATHLEN + 2]; > char passfile_hold_buf[MAXPATHLEN + 2]; >+ char *passdir; >+ char passdir_buf[MAXPATHLEN + 2]; > char *domain = yppasswd_domain; > static struct sockaddr_in clntaddr; > static struct timeval t_saved, t_test; >@@ -603,10 +605,13 @@ > "%s.hold", passfile); > passfile_hold = (char *)&passfile_hold_buf; > >+ /* Hold a copy of the passfile in passdir */ >+ snprintf(passdir_buf, sizeof(passdir_buf), "%s", passfile); >+ passdir = (char *)&passdir_buf; > > /* Step 5: make a new password file with the updated info. */ > >- if (pw_init(dirname(passfile), passfile)) { >+ if (pw_init(dirname(passdir), passfile)) { > yp_error("pw_init() failed"); > return &result; > } >@@ -729,6 +734,8 @@ > char *passfile_hold; > char passfile_buf[MAXPATHLEN + 2]; > char passfile_hold_buf[MAXPATHLEN + 2]; >+ char *passdir; >+ char passdir_buf[MAXPATHLEN + 2]; > struct sockaddr_in *rqhost; > SVCXPRT *transp; > struct passwd newpasswd; >@@ -829,7 +836,11 @@ > "%s.hold", passfile); > passfile_hold = (char *)&passfile_hold_buf; > >- if (pw_init(dirname(passfile), passfile)) { >+ /* Hold a copy of the passfile in passdir */ >+ snprintf(passdir_buf, sizeof(passdir_buf), "%s", passfile); >+ passdir = (char *)&passdir_buf; >+ >+ if (pw_init(dirname(passdir), passfile)) { > yp_error("pw_init() failed"); > return &result; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 234972
: 201374