- markus@cvs.openbsd.org 2001/06/07 22:25:02
[session.c] don't overwrite errno delay deletion of the xauth cookie
This commit is contained in:
parent
664408d2a7
commit
4d3f227699
|
@ -70,6 +70,10 @@
|
||||||
[authfd.c authfile.c channels.c kexdh.c kexgex.c packet.c ssh.c
|
[authfd.c authfile.c channels.c kexdh.c kexgex.c packet.c ssh.c
|
||||||
sshconnect.c sshconnect1.c]
|
sshconnect.c sshconnect1.c]
|
||||||
use xxx_put_cstring()
|
use xxx_put_cstring()
|
||||||
|
- markus@cvs.openbsd.org 2001/06/07 22:25:02
|
||||||
|
[session.c]
|
||||||
|
don't overwrite errno
|
||||||
|
delay deletion of the xauth cookie
|
||||||
20010606
|
20010606
|
||||||
- OpenBSD CVS Sync
|
- OpenBSD CVS Sync
|
||||||
- markus@cvs.openbsd.org 2001/05/17 21:34:15
|
- markus@cvs.openbsd.org 2001/05/17 21:34:15
|
||||||
|
@ -5580,4 +5584,4 @@
|
||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1267 2001/06/09 01:42:01 mouring Exp $
|
$Id: ChangeLog,v 1.1268 2001/06/09 01:44:07 mouring Exp $
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: session.c,v 1.82 2001/06/05 16:46:19 markus Exp $");
|
RCSID("$OpenBSD: session.c,v 1.83 2001/06/07 22:25:02 markus Exp $");
|
||||||
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "ssh1.h"
|
#include "ssh1.h"
|
||||||
|
@ -1950,10 +1950,6 @@ session_free(Session *s)
|
||||||
void
|
void
|
||||||
session_close(Session *s)
|
session_close(Session *s)
|
||||||
{
|
{
|
||||||
if (s->display) {
|
|
||||||
xauthfile_cleanup_proc(s->pw);
|
|
||||||
fatal_remove_cleanup(xauthfile_cleanup_proc, s->pw);
|
|
||||||
}
|
|
||||||
session_pty_cleanup(s);
|
session_pty_cleanup(s);
|
||||||
session_free(s);
|
session_free(s);
|
||||||
session_proctitle(s);
|
session_proctitle(s);
|
||||||
|
@ -2055,9 +2051,9 @@ session_setup_x11fwd(Session *s)
|
||||||
strlcpy(xauthfile, "/tmp/ssh-XXXXXXXX", MAXPATHLEN);
|
strlcpy(xauthfile, "/tmp/ssh-XXXXXXXX", MAXPATHLEN);
|
||||||
temporarily_use_uid(s->pw);
|
temporarily_use_uid(s->pw);
|
||||||
if (mkdtemp(xauthfile) == NULL) {
|
if (mkdtemp(xauthfile) == NULL) {
|
||||||
restore_uid();
|
|
||||||
error("private X11 dir: mkdtemp %s failed: %s",
|
error("private X11 dir: mkdtemp %s failed: %s",
|
||||||
xauthfile, strerror(errno));
|
xauthfile, strerror(errno));
|
||||||
|
restore_uid();
|
||||||
xfree(xauthfile);
|
xfree(xauthfile);
|
||||||
xauthfile = NULL;
|
xauthfile = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue