diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-07-05 19:47:17 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-07-05 19:47:17 +0000 |
commit | 42ca1e63e305a361287e274da05958a46cfa0788 (patch) | |
tree | e3876aa5f7b65ed7d801e64eb1a16346695939c0 /lib/libskey | |
parent | dcc761a0be9d230cfe94b82aa4aa3e1fb99b89cb (diff) |
replace open + fstat with stat
Diffstat (limited to 'lib/libskey')
-rw-r--r-- | lib/libskey/skeylogin.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libskey/skeylogin.c b/lib/libskey/skeylogin.c index cb20e6e8173..8b4c9cdc164 100644 --- a/lib/libskey/skeylogin.c +++ b/lib/libskey/skeylogin.c @@ -12,7 +12,7 @@ * * S/KEY verification check, lookups, and authentication. * - * $OpenBSD: skeylogin.c,v 1.29 1998/07/05 19:41:35 millert Exp $ + * $OpenBSD: skeylogin.c,v 1.30 1998/07/05 19:47:16 millert Exp $ */ #include <sys/param.h> @@ -484,10 +484,7 @@ skey_authenticate(username) secret = hseed; secretlen = SKEY_MAX_SEED_LEN; flg = 0; - } else if (((fd = open(_PATH_MEM, O_RDONLY)) != -1 || - (fd = open("/", O_RDONLY)) != -1) && - fstat(fd, &sb) == 0 ) { - close(fd); + } else if (!stat(_PATH_MEM, &sb) || !stat("/", &sb)) { t = sb.st_ctime; secret = ctime(&t); secretlen = strlen(secret); |