diff options
author | 2021-01-11 02:12:57 +0000 | |
---|---|---|
committer | 2021-01-11 02:12:57 +0000 | |
commit | ca5450d695d8f9e6bd3120068d652f29e732ef3e (patch) | |
tree | 3bbadd671317eede6508e830572f03f9c11ee3fb /usr.bin/ssh/ssh-add.c | |
parent | Merge handshake_loop() into handshake(). There's no benefit in having (diff) | |
download | wireguard-openbsd-ca5450d695d8f9e6bd3120068d652f29e732ef3e.tar.xz wireguard-openbsd-ca5450d695d8f9e6bd3120068d652f29e732ef3e.zip |
Change convtime() from returning long to returning int. On platforms
where sizeof(int) != sizeof(long), convtime could accept values
>MAX_INT which subsequently truncate when stored in an int during
config parsing. bz#3250, ok djm@
Diffstat (limited to 'usr.bin/ssh/ssh-add.c')
-rw-r--r-- | usr.bin/ssh/ssh-add.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c index e317396d2aa..ade339fe1b4 100644 --- a/usr.bin/ssh/ssh-add.c +++ b/usr.bin/ssh/ssh-add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-add.c,v 1.158 2020/10/18 11:32:02 djm Exp $ */ +/* $OpenBSD: ssh-add.c,v 1.159 2021/01/11 02:12:58 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -84,7 +84,7 @@ static char *default_files[] = { static int fingerprint_hash = SSH_FP_HASH_DEFAULT; /* Default lifetime (0 == forever) */ -static long lifetime = 0; +static int lifetime = 0; /* User has to confirm key use */ static int confirm = 0; @@ -365,7 +365,7 @@ add_file(int agent_fd, const char *filename, int key_only, int qflag, filename, comment); if (lifetime != 0) { fprintf(stderr, - "Lifetime set to %ld seconds\n", lifetime); + "Lifetime set to %d seconds\n", lifetime); } if (confirm != 0) { fprintf(stderr, "The user must confirm " @@ -420,7 +420,7 @@ add_file(int agent_fd, const char *filename, int key_only, int qflag, fprintf(stderr, "Certificate added: %s (%s)\n", certpath, private->cert->key_id); if (lifetime != 0) { - fprintf(stderr, "Lifetime set to %ld seconds\n", + fprintf(stderr, "Lifetime set to %d seconds\n", lifetime); } if (confirm != 0) { @@ -603,7 +603,7 @@ load_resident_keys(int agent_fd, const char *skprovider, int qflag) sshkey_type(keys[i]), fp); if (lifetime != 0) { fprintf(stderr, - "Lifetime set to %ld seconds\n", lifetime); + "Lifetime set to %d seconds\n", lifetime); } if (confirm != 0) { fprintf(stderr, "The user must confirm " |