summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2013-05-31 12:28:11 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2013-05-31 12:28:11 +0000
commit576428889fa9c4384378a28ecec24dd0f6626314 (patch)
treea8e7612cad99ef0013229ec62a7d462b15891c17
parent2e512bbb2825100f8e7b91c41e115d7de61cf6d4 (diff)
Use time_t where appropriate. ok djm
-rw-r--r--usr.bin/ssh/ssh-agent.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c
index af2e7c2aa6e..a23ae278990 100644
--- a/usr.bin/ssh/ssh-agent.c
+++ b/usr.bin/ssh/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.173 2013/05/17 00:13:14 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.174 2013/05/31 12:28:10 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -92,7 +92,7 @@ typedef struct identity {
Key *key;
char *comment;
char *provider;
- u_int death;
+ time_t death;
u_int confirm;
} Identity;
@@ -120,8 +120,8 @@ char *lock_passwd = NULL;
extern char *__progname;
-/* Default lifetime (0 == forever) */
-static int lifetime = 0;
+/* Default lifetime in seconds (0 == forever) */
+static long lifetime = 0;
static void
close_socket(SocketEntry *e)
@@ -414,10 +414,10 @@ process_remove_all_identities(SocketEntry *e, int version)
}
/* removes expired keys and returns number of seconds until the next expiry */
-static u_int
+static time_t
reaper(void)
{
- u_int deadline = 0, now = time(NULL);
+ time_t deadline = 0, now = time(NULL);
Identity *id, *nxt;
int version;
Idtab *tab;
@@ -449,8 +449,9 @@ process_add_identity(SocketEntry *e, int version)
{
Idtab *tab = idtab_lookup(version);
Identity *id;
- int type, success = 0, death = 0, confirm = 0;
+ int type, success = 0, confirm = 0;
char *type_name, *comment, *curve;
+ time_t death = 0;
Key *k = NULL;
BIGNUM *exponent;
EC_POINT *q;
@@ -680,7 +681,8 @@ static void
process_add_smartcard_key(SocketEntry *e)
{
char *provider = NULL, *pin;
- int i, type, version, count = 0, success = 0, death = 0, confirm = 0;
+ int i, type, version, count = 0, success = 0, confirm = 0;
+ time_t death = 0;
Key **keys = NULL, *k;
Identity *id;
Idtab *tab;
@@ -907,9 +909,10 @@ static int
prepare_select(fd_set **fdrp, fd_set **fdwp, int *fdl, u_int *nallocp,
struct timeval **tvpp)
{
- u_int i, sz, deadline;
+ u_int i, sz;
int n = 0;
static struct timeval tv;
+ time_t deadline;
for (i = 0; i < sockets_alloc; i++) {
switch (sockets[i].type) {