mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-27 15:54:22 +02:00
- dtucker@cvs.openbsd.org 2007/11/03 02:00:32
[ssh.c] Use xstrdup/xfree when saving pwname and pwdir; ok deraadt@
This commit is contained in:
parent
b4fbbc6850
commit
e143f062ba
@ -35,6 +35,9 @@
|
|||||||
bz #1377: getpwuid results were being clobbered by another getpw* call
|
bz #1377: getpwuid results were being clobbered by another getpw* call
|
||||||
inside tilde_expand_filename(); save the data we need carefully
|
inside tilde_expand_filename(); save the data we need carefully
|
||||||
ok djm
|
ok djm
|
||||||
|
- dtucker@cvs.openbsd.org 2007/11/03 02:00:32
|
||||||
|
[ssh.c]
|
||||||
|
Use xstrdup/xfree when saving pwname and pwdir; ok deraadt@
|
||||||
|
|
||||||
20071030
|
20071030
|
||||||
- (djm) OpenBSD CVS Sync
|
- (djm) OpenBSD CVS Sync
|
||||||
@ -3452,4 +3455,4 @@
|
|||||||
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
||||||
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.4804 2007/12/02 12:16:32 dtucker Exp $
|
$Id: ChangeLog,v 1.4805 2007/12/02 12:21:16 dtucker Exp $
|
||||||
|
10
ssh.c
10
ssh.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: ssh.c,v 1.306 2007/11/03 01:24:06 deraadt Exp $ */
|
/* $OpenBSD: ssh.c,v 1.307 2007/11/03 02:00:32 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -1260,8 +1260,8 @@ load_public_identity_files(void)
|
|||||||
#endif /* SMARTCARD */
|
#endif /* SMARTCARD */
|
||||||
if ((pw = getpwuid(original_real_uid)) == NULL)
|
if ((pw = getpwuid(original_real_uid)) == NULL)
|
||||||
fatal("load_public_identity_files: getpwuid failed");
|
fatal("load_public_identity_files: getpwuid failed");
|
||||||
pwname = strdup(pw->pw_name);
|
pwname = xstrdup(pw->pw_name);
|
||||||
pwdir = strdup(pw->pw_dir);
|
pwdir = xstrdup(pw->pw_dir);
|
||||||
if (gethostname(thishost, sizeof(thishost)) == -1)
|
if (gethostname(thishost, sizeof(thishost)) == -1)
|
||||||
fatal("load_public_identity_files: gethostname: %s",
|
fatal("load_public_identity_files: gethostname: %s",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
@ -1280,9 +1280,9 @@ load_public_identity_files(void)
|
|||||||
options.identity_keys[i] = public;
|
options.identity_keys[i] = public;
|
||||||
}
|
}
|
||||||
bzero(pwname, strlen(pwname));
|
bzero(pwname, strlen(pwname));
|
||||||
free(pwname);
|
xfree(pwname);
|
||||||
bzero(pwdir, strlen(pwdir));
|
bzero(pwdir, strlen(pwdir));
|
||||||
free(pwdir);
|
xfree(pwdir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user