1 |
flameeyes 09/08/01 22:45:39 |
2 |
|
3 |
Added: pam_ssh-1.97-doublefree.patch |
4 |
Log: |
5 |
Add patch to avoid doublefree, thanks to TGL in bug #279538. |
6 |
(Portage version: 2.2_rc33/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 sys-auth/pam_ssh/files/pam_ssh-1.97-doublefree.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/pam_ssh/files/pam_ssh-1.97-doublefree.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/pam_ssh/files/pam_ssh-1.97-doublefree.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: pam_ssh-1.97-doublefree.patch |
15 |
=================================================================== |
16 |
--- pam_ssh-1.97/pam_ssh.c.orig 2009-08-01 20:11:00.000000000 +0200 |
17 |
+++ pam_ssh-1.97/pam_ssh.c 2009-08-01 20:11:16.000000000 +0200 |
18 |
@@ -627,7 +627,7 @@ |
19 |
* than the file creation time */ |
20 |
if (retval = stat(per_agent, &stat_buf)) { |
21 |
pam_ssh_log(LOG_ERR, "stat() failed on %s", per_agent); |
22 |
- free(per_agent); |
23 |
+ pam_set_data(pamh, "ssh_agent_env_agent", NULL, NULL); |
24 |
fclose(env_read); |
25 |
return retval; |
26 |
} |
27 |
@@ -646,7 +646,7 @@ |
28 |
if (start_agent) { |
29 |
if ((env_write = open(per_agent, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR)) < 0) { |
30 |
pam_ssh_log(LOG_ERR, "can't write to %s", per_agent); |
31 |
- free(per_agent); |
32 |
+ pam_set_data(pamh, "ssh_agent_env_agent", NULL, NULL); |
33 |
openpam_restore_cred(pamh); |
34 |
return PAM_SERVICE_ERR; |
35 |
} |