CVS commit: src/usr.sbin/ac
Module Name:src Committed By: mrg Date: Mon Apr 12 09:29:53 UTC 2021 Modified Files: src/usr.sbin/ac: ac.c Log Message: use strlcpy() to ensure desired nul termination. trailing nul bytes are not needed here. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/ac/ac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ac/ac.c diff -u src/usr.sbin/ac/ac.c:1.25 src/usr.sbin/ac/ac.c:1.26 --- src/usr.sbin/ac/ac.c:1.25 Fri Aug 31 19:55:23 2012 +++ src/usr.sbin/ac/ac.c Mon Apr 12 09:29:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ac.c,v 1.25 2012/08/31 19:55:23 wiz Exp $ */ +/* $NetBSD: ac.c,v 1.26 2021/04/12 09:29:53 mrg Exp $ */ /*- * Copyright (c) 1994 Christopher G. Demetriou @@ -29,7 +29,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ac.c,v 1.25 2012/08/31 19:55:23 wiz Exp $"); +__RCSID("$NetBSD: ac.c,v 1.26 2021/04/12 09:29:53 mrg Exp $"); #endif #include @@ -214,7 +214,7 @@ find_login_ttys(void) Con = nCon; Maxcon += 10; } - (void)strncpy(Con[Ncon++], tty->ty_name, UT_LINESIZE); + strlcpy(Con[Ncon++], tty->ty_name, UT_LINESIZE); } endttyent(); qsort(Con, Ncon, sizeof(Con[0]), compare);
CVS commit: src/usr.sbin/ac
Module Name:src Committed By: wiz Date: Wed Dec 21 22:49:15 UTC 2016 Modified Files: src/usr.sbin/ac: ac.8 Log Message: New sentence, new line. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/ac/ac.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ac/ac.8 diff -u src/usr.sbin/ac/ac.8:1.17 src/usr.sbin/ac/ac.8:1.18 --- src/usr.sbin/ac/ac.8:1.17 Wed Dec 21 17:45:07 2016 +++ src/usr.sbin/ac/ac.8 Wed Dec 21 22:49:14 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: ac.8,v 1.17 2016/12/21 17:45:07 abhinav Exp $ +.\" $NetBSD: ac.8,v 1.18 2016/12/21 22:49:14 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -72,7 +72,8 @@ Display the connect times in 24 hour chu .It Fl p Display individual user totals. .It Fl t Ar tty -Only do accounting logins on certain ttys. The +Only do accounting logins on certain ttys. +The .Ar tty specification can start with .Ql \&! @@ -102,8 +103,8 @@ system. The default .Pa wtmp file is an infinitely increasing file -unless frequently truncated. This is normally -done by the daily daemon scripts scheduled by +unless frequently truncated. +This is normally done by the daily daemon scripts scheduled by .Xr cron 8 , which rename and rotate the .Pa wtmp
CVS commit: src/usr.sbin/ac
Module Name:src Committed By: abhinav Date: Wed Dec 21 17:45:07 UTC 2016 Modified Files: src/usr.sbin/ac: ac.8 Log Message: Move information about exit status to its own section. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/ac/ac.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ac/ac.8 diff -u src/usr.sbin/ac/ac.8:1.16 src/usr.sbin/ac/ac.8:1.17 --- src/usr.sbin/ac/ac.8:1.16 Wed Apr 8 14:37:29 2009 +++ src/usr.sbin/ac/ac.8 Wed Dec 21 17:45:07 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: ac.8,v 1.16 2009/04/08 14:37:29 joerg Exp $ +.\" $NetBSD: ac.8,v 1.17 2016/12/21 17:45:07 abhinav Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -120,10 +120,6 @@ allows times recorded in .Pa modems to be charged out at a different rate than .Pa other . -.Pp -The -.Nm -utility exits 0 on success, and \*[Gt]0 if a fatal error occurs. .Sh FILES .Bl -tag -width /var/log/wtmp.[0-7] -compact .It Pa /var/log/wtmp @@ -131,6 +127,8 @@ connect time accounting file .It Pa /var/log/wtmp.[0-7] rotated files .El +.Sh EXIT STATUS +.Ex -std ac .Sh SEE ALSO .Xr login 1 , .Xr utmp 5 ,
CVS commit: src/usr.sbin/ac
Module Name:src Committed By: wiz Date: Fri Aug 31 19:55:23 UTC 2012 Modified Files: src/usr.sbin/ac: ac.c Log Message: cgd and sjg relicensed this under 2-clause-BSD. Reported by Ed Schouten e...@freebsd.org to tech-userlevel. Adapt license to match FreeBSD's version, leaving Ed out since according to CVS logs, he didn't touch NetBSD's version. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/ac/ac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ac/ac.c diff -u src/usr.sbin/ac/ac.c:1.24 src/usr.sbin/ac/ac.c:1.25 --- src/usr.sbin/ac/ac.c:1.24 Mon Aug 29 20:38:53 2011 +++ src/usr.sbin/ac/ac.c Fri Aug 31 19:55:23 2012 @@ -1,9 +1,10 @@ -/* $NetBSD: ac.c,v 1.24 2011/08/29 20:38:53 joerg Exp $ */ +/* $NetBSD: ac.c,v 1.25 2012/08/31 19:55:23 wiz Exp $ */ -/* +/*- * Copyright (c) 1994 Christopher G. Demetriou + * Copyright (c) 1994 Simon J. Gerraty * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -12,44 +13,23 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - *must display the following acknowledgement: - * This product includes software developed for the - * NetBSD Project. See http://www.NetBSD.org/ for - * information about NetBSD. - * 4. The name of the author may not be used to endorse or promote products - *derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp - * * - * @(#)Copyright (c) 1994, Simon J. Gerraty. - * - * This is free software. It comes with NO WARRANTY. - * Permission to use, modify and distribute this source code - * is granted subject to the following conditions. - * 1/ that the above copyright notice and this notice - * are preserved in all copies and that due credit be given - * to the author. - * 2/ that any changes to this code are clearly commented - * as such so that the author does not get blamed for bugs - * other than his own. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: ac.c,v 1.24 2011/08/29 20:38:53 joerg Exp $); +__RCSID($NetBSD: ac.c,v 1.25 2012/08/31 19:55:23 wiz Exp $); #endif #include sys/types.h
CVS commit: src/usr.sbin/ac
Module Name:src Committed By: joerg Date: Wed Apr 8 14:37:29 UTC 2009 Modified Files: src/usr.sbin/ac: ac.8 Log Message: Fix markup. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/ac/ac.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ac/ac.8 diff -u src/usr.sbin/ac/ac.8:1.15 src/usr.sbin/ac/ac.8:1.16 --- src/usr.sbin/ac/ac.8:1.15 Fri Jun 27 22:53:52 2003 +++ src/usr.sbin/ac/ac.8 Wed Apr 8 14:37:29 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: ac.8,v 1.15 2003/06/27 22:53:52 wiz Exp $ +.\ $NetBSD: ac.8,v 1.16 2009/04/08 14:37:29 joerg Exp $ .\ .\ Copyright (c) 1980, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -111,7 +111,7 @@ No login times are collected, however, if the file does not exist. .Pp For example, -.Bd -literal -offset +.Bd -literal -offset indent ac -p -t ttyd* \*[Gt] modems ac -p -t !ttyd* \*[Gt] other .Ed