diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2021-01-11 03:12:57 +0100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2021-01-11 05:04:12 +0100 |
commit | 6d30673fedec2d251f4962c526fd0451f70c4d97 (patch) | |
tree | 171f633481c7aa816fae802df3d6f2507ccc4fc7 /ssh-add.c | |
parent | upstream: add a comma to previous; (diff) | |
download | openssh-6d30673fedec2d251f4962c526fd0451f70c4d97.tar.xz openssh-6d30673fedec2d251f4962c526fd0451f70c4d97.zip |
upstream: 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@
OpenBSD-Commit-ID: 8fc932683d6b4660d52f50911d62bd6639c5db31
Diffstat (limited to 'ssh-add.c')
-rw-r--r-- | ssh-add.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 @@ -91,7 +91,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; @@ -372,7 +372,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 " @@ -427,7 +427,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) { @@ -610,7 +610,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 " |