diff options
author | Brian Feldman <green@FreeBSD.org> | 2000-11-25 02:00:35 +0000 |
---|---|---|
committer | Brian Feldman <green@FreeBSD.org> | 2000-11-25 02:00:35 +0000 |
commit | ee510eab3f3647f113c801a5c439d3e1b2a30049 (patch) | |
tree | b4e1230c0a3d50eccad9f2acb4145c29e7736ab5 /crypto/openssh | |
parent | 2a644691bc3d09c544f1495891e73be42af6835e (diff) | |
download | src-ee510eab3f3647f113c801a5c439d3e1b2a30049.tar.gz src-ee510eab3f3647f113c801a5c439d3e1b2a30049.zip |
In env_destroy(), it is a bad idea to env_swap(self, 0) to switch
back to the original environ unconditionally. The setting of the
variable to save the previous environ is conditional; it happens when
ENV.e_committed is set. Therefore, don't try to swap the env back
unless the previous env has been initialized.
PR: bin/22670
Submitted by: Takanori Saneto <sanewo@ba2.so-net.ne.jp>
Notes
Notes:
svn path=/head/; revision=69130
Diffstat (limited to 'crypto/openssh')
-rw-r--r-- | crypto/openssh/pam_ssh/pam_ssh.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/openssh/pam_ssh/pam_ssh.c b/crypto/openssh/pam_ssh/pam_ssh.c index 13e5c4429b47..424496d4ced4 100644 --- a/crypto/openssh/pam_ssh/pam_ssh.c +++ b/crypto/openssh/pam_ssh/pam_ssh.c @@ -176,6 +176,8 @@ env_destroy(ENV *self) { struct env_entry *p; + if (self->e_committed) + env_swap(self, 0); env_swap(self, 0); SLIST_FOREACH(p, &self->e_head, ee_entries) { free(p->ee_env); |