diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-09-04 18:19:48 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-09-04 18:19:48 +0000 |
commit | 9f7e712cd8726a3c36b8237925cdd29c8be164da (patch) | |
tree | bdd4734ac139d3fa7764636c7e2dd08934533052 /lib/libskey | |
parent | 6725607b2153f3d5af4d086a29d207348d4d9103 (diff) |
Don't unlock skeys file before closing it. The lock is released
when the file is closed anyway and explicately unlocking before
the file gets flushed defeats the purpose of locking in the first
place.
Diffstat (limited to 'lib/libskey')
-rw-r--r-- | lib/libskey/skeylogin.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libskey/skeylogin.c b/lib/libskey/skeylogin.c index f252fb24c9e..a99a25072dc 100644 --- a/lib/libskey/skeylogin.c +++ b/lib/libskey/skeylogin.c @@ -11,7 +11,7 @@ * * S/KEY verification check, lookups, and authentication. * - * $OpenBSD: skeylogin.c,v 1.20 1997/07/27 22:11:41 millert Exp $ + * $OpenBSD: skeylogin.c,v 1.21 1997/09/04 18:19:47 millert Exp $ */ #include <sys/param.h> @@ -300,7 +300,6 @@ skeyverify(mp, response) /* Reread the file record NOW */ (void)fseek(mp->keyfile, mp->recstart, SEEK_SET); if (fgets(mp->buf, sizeof(mp->buf), mp->keyfile) != mp->buf) { - (void)flock(fileno(mp->keyfile), LOCK_UN); (void)fclose(mp->keyfile); return(-1); } @@ -317,7 +316,6 @@ skeyverify(mp, response) /* Do actual comparison */ if (memcmp(filekey, fkey, SKEY_BINKEY_SIZE) != 0){ /* Wrong response */ - (void)flock(fileno(mp->keyfile), LOCK_UN); (void)fclose(mp->keyfile); return(1); } @@ -339,7 +337,6 @@ skeyverify(mp, response) mp->logname, skey_get_algorithm(), mp->n, mp->seed, mp->val, tbuf); - (void)flock(fileno(mp->keyfile), LOCK_UN); (void)fclose(mp->keyfile); return(0); |