diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2018-07-27 07:34:42 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-07-31 04:20:13 +0200 |
commit | e655ee04a3cb7999dbf9641b25192353e2b69418 (patch) | |
tree | ec31b0a5b5011db7848a40f8ae9de8d5aa1a5334 /ssh-keysign.c | |
parent | upstream: Remove uid checks from low port binds. Now that ssh (diff) | |
download | openssh-e655ee04a3cb7999dbf9641b25192353e2b69418.tar.xz openssh-e655ee04a3cb7999dbf9641b25192353e2b69418.zip |
upstream: Now that ssh can't be setuid, remove the
original_real_uid and original_effective_uid globals and replace with calls
to plain getuid(). ok djm@
OpenBSD-Commit-ID: 92561c0cd418d34e6841e20ba09160583e27b68c
Diffstat (limited to 'ssh-keysign.c')
-rw-r--r-- | ssh-keysign.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ssh-keysign.c b/ssh-keysign.c index 78bb66b08..744ecb4f9 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keysign.c,v 1.54 2018/02/23 15:58:38 markus Exp $ */ +/* $OpenBSD: ssh-keysign.c,v 1.55 2018/07/27 05:34:42 dtucker Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -62,11 +62,6 @@ struct ssh *active_state = NULL; /* XXX needed for linking */ extern char *__progname; -/* XXX readconf.c needs these */ -uid_t original_real_uid; - -extern char *__progname; - static int valid_request(struct passwd *pw, char *host, struct sshkey **ret, u_char *data, size_t datalen) @@ -201,8 +196,7 @@ main(int argc, char **argv) key_fd[i++] = open(_PATH_HOST_XMSS_KEY_FILE, O_RDONLY); key_fd[i++] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY); - original_real_uid = getuid(); /* XXX readconf.c needs this */ - if ((pw = getpwuid(original_real_uid)) == NULL) + if ((pw = getpwuid(getuid())) == NULL) fatal("getpwuid failed"); pw = pwcopy(pw); |