summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2000-11-25 02:00:35 +0000
committergreen <green@FreeBSD.org>2000-11-25 02:00:35 +0000
commit163406c6e5ec2a713bffd07f189837b6c444c773 (patch)
treed070a1610f02cea0697cb4ea85d15f9f0a0f52dc /crypto
parentde5ab7abc178ea26bb11eac870bcaa717aa4e673 (diff)
downloadFreeBSD-src-163406c6e5ec2a713bffd07f189837b6c444c773.zip
FreeBSD-src-163406c6e5ec2a713bffd07f189837b6c444c773.tar.gz
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>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/openssh/pam_ssh/pam_ssh.c2
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 13e5c44..424496d 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);
OpenPOWER on IntegriCloud