diff options
author | djm@openbsd.org <djm@openbsd.org> | 2018-01-23 05:01:15 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-01-23 16:40:28 +1100 |
commit | d6364f6fb1a3d753d7ca9bf15b2adce961324513 (patch) | |
tree | 6c2f1fa71e8dd508509885c21e92b5b4329cef38 | |
parent | a69bbb07cd6fb4dfb9bdcacd370ab26d0a2b4215 (diff) |
upstream commit
avoid modifying pw->pw_passwd; let endpwent() clean up
for us, but keep a scrubbed copy; bz2777, ok dtucker@
OpenBSD-Commit-ID: 715afc0f59c6b82c4929a73279199ed241ce0752
-rw-r--r-- | sshd.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.499 2017/11/14 00:45:29 djm Exp $ */ +/* $OpenBSD: sshd.c,v 1.500 2018/01/23 05:01:15 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1695,10 +1695,8 @@ main(int ac, char **av) fatal("Privilege separation user %s does not exist", SSH_PRIVSEP_USER); } else { - explicit_bzero(privsep_pw->pw_passwd, - strlen(privsep_pw->pw_passwd)); privsep_pw = pwcopy(privsep_pw); - free(privsep_pw->pw_passwd); + freezero(privsep_pw->pw_passwd, strlen(privsep_pw->pw_passwd)); privsep_pw->pw_passwd = xstrdup("*"); } endpwent(); |