summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ac/ac.c
diff options
context:
space:
mode:
authorjon <jon@FreeBSD.org>2001-08-05 09:41:20 +0000
committerjon <jon@FreeBSD.org>2001-08-05 09:41:20 +0000
commit08485c20e9ad152cb6a605ab6d3a331bfd9a2f86 (patch)
treeded1e532f7fe2792bbc192b5cc0f9cd4be26fed0 /usr.sbin/ac/ac.c
parent306e18018e9e8ac86a95c5209d26007d6b69e956 (diff)
downloadFreeBSD-src-08485c20e9ad152cb6a605ab6d3a331bfd9a2f86.zip
FreeBSD-src-08485c20e9ad152cb6a605ab6d3a331bfd9a2f86.tar.gz
Fix logic error resulting in incorrect calculation of login time
PR: bin/4204 Submitted by: Anatoly A. Orehovsky <tolik@www.tomsk.su> MFC after: 4 weeks
Diffstat (limited to 'usr.sbin/ac/ac.c')
-rw-r--r--usr.sbin/ac/ac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ac/ac.c b/usr.sbin/ac/ac.c
index 1b3ef8c..b82a7e7 100644
--- a/usr.sbin/ac/ac.c
+++ b/usr.sbin/ac/ac.c
@@ -509,8 +509,8 @@ ac(fp)
* a login session if the ut_host field is non-empty
*/
if (*usr.ut_name) {
- if (strncmp(usr.ut_line, "tty", 3) != 0 ||
- strchr("pqrsPQRS", usr.ut_line[3]) == 0 ||
+ if (strncmp(usr.ut_line, "tty", 3) == 0 ||
+ strchr("pqrsPQRS", usr.ut_line[3]) != 0 ||
*usr.ut_host != '\0')
head = log_in(head, &usr);
} else
OpenPOWER on IntegriCloud