diff -u sac-1.8b8/sac.c sac-1.8b8-quozl/sac.c --- sac-1.8b8/sac.c Fri Jun 25 08:18:01 1999 +++ sac-1.8b8-quozl/sac.c Fri Dec 8 21:56:54 2000 @@ -26,6 +26,8 @@ #include #include +#define CLIP_BY_HOSTNAME + static char *version = "$Version: $ sac v1.8 (c) 1995 - 1999 by Steve Baker $"; static char *month[] = { @@ -1991,7 +1993,12 @@ */ if ((type & CLIP) == CLIP && (type & 0x000F) != SIMUSE) { for(q=usr;q;q=q->nxt) { +#ifndef CLIP_BY_HOSTNAME if (q != u && !strncmp(u->user,q->user,UT_NAMESIZE)) { +#else + if (q != u && !strncmp(u->user,q->user,UT_NAMESIZE) && + !strncmp(u->host,q->host,UT_HOSTSIZE) ) { +#endif /* throw it out if he's already logged in earlier */ if (q->in <= u->in) return; /* reduce the logout time to the lowest login time. */ @@ -2708,8 +2715,8 @@ out = localtime(&l->stop); tt = (l->stop - l->start) + 1; if (l->stop < days->start || l->start > end->stop) continue; - printf(" %s %2d %02d:%02d:%02d - %02d:%02d:%02d %-8.8s port %-6.12s %-16.16s %10s\n", - month[in.tm_mon], in.tm_mday, in.tm_hour, in.tm_min, in.tm_sec, + printf(" %2d %s %d %02d:%02d:%02d - %02d:%02d:%02d %-8.8s port %-6.12s %-16.16s %10s\n", + in.tm_mday, month[in.tm_mon], in.tm_year + 1900, in.tm_hour, in.tm_min, in.tm_sec, out->tm_hour, out->tm_min, out->tm_sec, l->name, l->tty, l->host, dtime(tt,0)); } } @@ -2833,8 +2840,8 @@ out = localtime(&l->stop); tt = (l->stop - l->start) + 1; if (l->stop < days->start || l->start > end->stop) continue; - printf(" %s %2d %02d:%02d:%02d - %02d:%02d:%02d port %-6.12s %-16.16s %10s\n", - month[in.tm_mon], in.tm_mday, in.tm_hour, in.tm_min, in.tm_sec, + printf(" %2d %s %d %02d:%02d:%02d - %02d:%02d:%02d port %-6.12s %-16.16s %10s\n", + in.tm_mday, month[in.tm_mon], in.tm_year + 1900, in.tm_hour, in.tm_min, in.tm_sec, out->tm_hour, out->tm_min, out->tm_sec, l->tty, l->host, dtime(tt,0)); } } @@ -2872,8 +2879,8 @@ out = localtime(&l->stop); tt = (l->stop - l->start) + 1; if (l->stop < days->start || l->start > end->stop) continue; - printf(" %s %2d %02d:%02d:%02d - %02d:%02d:%02d %-8.8s %-16.16s %10s\n", - month[in.tm_mon], in.tm_mday, in.tm_hour, in.tm_min, in.tm_sec, + printf(" %2d %s %d %02d:%02d:%02d - %02d:%02d:%02d %-8.8s %-16.16s %10s\n", + in.tm_mday, month[in.tm_mon], in.tm_year + 1900, in.tm_hour, in.tm_min, in.tm_sec, out->tm_hour, out->tm_min, out->tm_sec, l->name, l->host, dtime(tt,0)); } }