diff options
author | brueffer <brueffer@FreeBSD.org> | 2014-02-21 09:19:16 +0000 |
---|---|---|
committer | brueffer <brueffer@FreeBSD.org> | 2014-02-21 09:19:16 +0000 |
commit | ffebb434a5fd0fbb478c332a7a89aeeeba174336 (patch) | |
tree | 6d0e54bee029480d020459719330d619ef4cab59 /libexec/ftpd/ftpd.c | |
parent | 7a394d25ecae035c6def6d233684e3410edf8ca7 (diff) | |
download | FreeBSD-src-ffebb434a5fd0fbb478c332a7a89aeeeba174336.zip FreeBSD-src-ffebb434a5fd0fbb478c332a7a89aeeeba174336.tar.gz |
MFC: r261885
In sgetpwnam(), save and free pw_class like all other char members
of struct passwd. This fixes spurious "login_getclass: unknown class"
errors.
PR: 186439
Submitted by: UEMURA Tetsuya <t_uemura at macome.co.jp>
Diffstat (limited to 'libexec/ftpd/ftpd.c')
-rw-r--r-- | libexec/ftpd/ftpd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 00570d6..afc046f 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -965,6 +965,7 @@ sgetpwnam(char *name) if (save.pw_name) { free(save.pw_name); free(save.pw_passwd); + free(save.pw_class); free(save.pw_gecos); free(save.pw_dir); free(save.pw_shell); @@ -972,6 +973,7 @@ sgetpwnam(char *name) save = *p; save.pw_name = sgetsave(p->pw_name); save.pw_passwd = sgetsave(p->pw_passwd); + save.pw_class = sgetsave(p->pw_class); save.pw_gecos = sgetsave(p->pw_gecos); save.pw_dir = sgetsave(p->pw_dir); save.pw_shell = sgetsave(p->pw_shell); |