diff --git a/usr.sbin/ac/ac.c b/usr.sbin/ac/ac.c index 1b3ef8c5accc..b82a7e72c9a2 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