--- sac-1.9b5.orig/Makefile +++ sac-1.9b5/Makefile @@ -14,12 +14,12 @@ # For Intel platforms (use -m386 w/ AMD CPU's for better speed): #CFLAGS=-Wall -O2 -fomit-frame-pointer -m486 # For everything else: -#CFLAGS=-Wall -O2 +CFLAGS=-Wall -O2 # For debugging -CFLAGS=-ggdb +#CFLAGS=-ggdb # Comment this if doing debugging. -#LDFLAGS=-s +LDFLAGS=-s # Define acording to your architechure. Only SOLARIS, BSD and LINUX are valid # thus far. Most OS's should work with one of them. --- sac-1.9b5.orig/sac.c +++ sac-1.9b5/sac.c @@ -1410,7 +1410,6 @@ if (!strncmp(t->line,l,UT_LINESIZE)) return t; return NULL; } - void addtty(char *s) { struct ttys *t; @@ -1913,7 +1912,10 @@ for(i=0;i<24;i++) sp->h[i] += s->h[i]; if (s->login == NULL) continue; if (sp->login == NULL) sp->login = s->login; - else sp->lastlogin->nxt = s->login; + else { + if (sp->lastlogin == NULL) sp->login = s->login; + else sp->lastlogin->nxt = s->login; + } sp->lastlogin = s->lastlogin; } } --- sac-1.9b5.orig/wcat.c +++ sac-1.9b5/wcat.c @@ -274,17 +274,17 @@ fprintf(stderr,"wcat: Invalid time. Format: hours[:minutes[:seconds]]\n"); break; case 4: - fprintf(stderr,"usage: wcat [-w wtmp|-] [-adX[3|4]] [-s start] [-e end] [-b H[:M[:S]]]\n [--help] [--version]\n"); - fprintf(stderr," -w wtmp|- Read alternate wtmp file.\n"); - fprintf(stderr," -X[3] Read tacacs 3.x wtmp format.\n"); - fprintf(stderr," -X4 Read tacacs 4.0 wtmp format.\n"); - fprintf(stderr," -d Output time in MMM DD HH:MM:SS date format.\n"); - fprintf(stderr," -a Print contents of ut_addr (if it exists) instead of ut_host.\n"); - fprintf(stderr," -s start Display accounting info from `start'.\n"); - fprintf(stderr," -e end Display accounting info up to `end'.\n"); - fprintf(stderr," -b H:M:S Show accounting info from the last few hours/minutes/seconds.\n"); - fprintf(stderr," --help Print this help message.\n"); - fprintf(stderr," --version Print the version of rawtmp.\n"); + fprintf(stdout,"usage: wcat [-w wtmp|-] [-adX[3|4]] [-s start] [-e end] [-b H[:M[:S]]]\n [--help] [--version]\n"); + fprintf(stdout," -w wtmp|- Read alternate wtmp file.\n"); + fprintf(stdout," -X[3] Read tacacs 3.x wtmp format.\n"); + fprintf(stdout," -X4 Read tacacs 4.0 wtmp format.\n"); + fprintf(stdout," -d Output time in MMM DD HH:MM:SS date format.\n"); + fprintf(stdout," -a Print contents of ut_addr (if it exists) instead of ut_host.\n"); + fprintf(stdout," -s start Display accounting info from `start'.\n"); + fprintf(stdout," -e end Display accounting info up to `end'.\n"); + fprintf(stdout," -b H:M:S Show accounting info from the last few hours/minutes/seconds.\n"); + fprintf(stdout," --help Print this help message.\n"); + fprintf(stdout," --version Print the version of rawtmp.\n"); break; case 5: { --- sac-1.9b5.orig/debian/dirs +++ sac-1.9b5/debian/dirs @@ -0,0 +1,2 @@ +usr/share/man/man1 +usr/share/man/man8 --- sac-1.9b5.orig/debian/README.Debian +++ sac-1.9b5/debian/README.Debian @@ -0,0 +1,13 @@ +Information on the Debian package changes: + +The previous maintainer Edward Brocklesby modified +it to compile and install cleanly on debian (see the changelog), I (Javier) +have made some slight changes to the latest upstream to get it to compile +and upload to Debian's woody the latest version available. + +TODO things: + +- A new package to provide the cgi scipts and install cleanly in /usr/lib/cgi-bin might be interesting, currently this is in the /usr/share/doc/sac/examples dir + + +-- Javier Fernández-Sanguino Peña --- sac-1.9b5.orig/debian/changelog +++ sac-1.9b5/debian/changelog @@ -0,0 +1,158 @@ +sac (1.9b5-1) unstable; urgency=low + + * New upstream release, already fixes the typo in manpage (Closes: #284548) + + -- Javier Fernandez-Sanguino Pen~a Tue, 7 Dec 2004 11:49:30 +0100 + +sac (1.9b3-3) unstable; urgency=low + + * Provided manpage for wcat. + * Changed wcat behaviour so it outputs usage to stdout instead of + stderr (for help2man to work) + * Compilation in sid fixes lintian errors. + * Changed ispat from char to int, preliminary fix which should remove + the warnings due to signedness until Steve Baker confirms this + issue (Closes: #176380) + + -- Javier Fernandez-Sanguino Pen~a Sat, 18 Jan 2003 10:57:29 +0100 + +sac (1.9b3-2) unstable; urgency=low + + * Applied a patch provided by Steve Baker (Closes: #139116) + + -- Javier Fernandez-Sanguino Pen~a Tue, 26 Nov 2002 22:52:33 +0100 + +sac (1.9b3-1) unstable; urgency=low + + * New upstream version. + * Applied a patch that seems to fix bug #139116, will not close it + until I get confirmation from the upstream maintainer. + + -- Javier Fernandez-Sanguino Pen~a Mon, 25 Nov 2002 22:09:14 +0100 + +sac (1.9b1-2) unstable; urgency=low + + * Added Build-Depends for debhelper + * Updated Standards-Version + + -- Javier Fernandez-Sanguino Pen~a Tue, 14 May 2002 10:10:13 +0200 + +sac (1.9b1-1) unstable; urgency=low + + * New upstream version. + * Now the Y2k bug is fixed (Closes: #64321) + * New maintainer (Closes: #68069) + * Moved to new standard and dh_ (now lintian clean) + + -- Javier Fernandez-Sanguino Pen~a Fri, 20 Oct 2000 10:07:21 +0200 + +sac (1.8b8-1) unstable; urgency=low + + * New upstream version. + * Makefile: Removed -m486 + * Makefile: /usr/man -> /usr/share/man + * debian/control: New standards-versoim 3.0.0.0 + + -- Edward Brocklesby Mon, 5 Jul 1999 12:08:13 -0700 + +sac (1.8b6-2) unstable; urgency=low + + * New maintainer. + + -- Edward Brocklesby Mon, 5 Jul 1999 11:21:17 -0700 + +sac (1.8b6-1) unstable; urgency=low + + * + * new upstream release; Fix: + #23069: Issuing 'sac -r' seg faults and dumps core. + #18537: sac: segfault with sac -c. + #17143: sac - return type of main in not int. + #18536: sac: minor formatting problem. + #15520: sac: Broken stats. + + -- Vincent Renardias Mon, 4 Jan 1999 18:39:26 +0100 + +sac (1.7-1) frozen unstable; urgency=low + + * new upstream release; Fix: + #15520: Broken stats. + #18526: minor formatting problem. + #18527: segfault with sac -c. + + -- Vincent Renardias Mon, 13 Apr 1998 23:09:38 +0200 + +sac (1.6-1) unstable; urgency=low + + * Renamed upstream changelog (Bug #9662). + * Updated .lsm file. + + -- Vincent Renardias Sun, 9 Nov 1997 17:35:00 +0100 + +sac (1.6-0) unstable; urgency=low + + * compiled for libc6 + * new upstream release + * non-maintainer release + + -- Craig Sanders Sun, 9 Nov 1997 12:17:34 +1100 + +sac (1.5-2) unstable; urgency=low + + * Correct bug wrt radiusd (Corrects bug #7466). + + -- Vincent Renardias Wed, 19 Feb 1997 01:25:11 +0100 + +sac (1.5-1) unstable; urgency=low + + * Upstream upgrade. + * Reworked 'debian/rules'. + + -- Vincent Renardias Tue, 18 Feb 1997 02:02:38 +0100 + +sac (1.4-2) unstable; urgency=low + + * Changed Makefile to allow compilation on non-intel machines. + (Fixes bug #7192) + + -- Vincent Renardias Sun, 9 Feb 1997 23:16:14 +0100 + +sac (1.4-1) unstable; urgency=low + + * Upstream upgrade. + * Changed default wtmp file from /etc/wtmp to /var/log/wtmp + + -- Vincent Renardias Tue, 12 Nov 1996 00:59:39 +0100 + +sac (1.3.1-4) unstable; urgency=low + + * Changed libraries dependencies. + * Changed compile options. + * Cosmetic debian/* file changes. + + -- Vincent Renardias Sat, 2 Nov 1996 01:35:17 +0100 + +sac (1.3.1-3) unstable; urgency=low + + * Maintainer changed + * Gzip'ed man pages / striped executables + * Changed libraries dependencies + + -- Vincent Renardias Sat, 19 Oct 1996 02:56:15 +0200 + +sac (1.3.1-2) unstable; urgency=low + + * Two machine dependencies cleared up + + -- Christoph Lameter Fri, 20 Sep 1996 14:51:46 +0800 + +sac (1.3.1-1) unstable; urgency=low + + * Initial Release + + -- Christoph Lameter Fri, 20 Sep 1996 14:51:46 +0800 + +Local variables: +mode: debian-changelog +End: + --- sac-1.9b5.orig/debian/control +++ sac-1.9b5/debian/control @@ -0,0 +1,14 @@ +Source: sac +Section: admin +Priority: optional +Maintainer: Javier Fernandez-Sanguino Pen~a +Build-Depends: debhelper +Standards-Version: 3.5.6.1 + +Package: sac +Architecture: any +Depends: ${shlibs:Depends} +Description: Login accounting + Performs login accounting, just like the ac program but with + totals, per day and per users. Also performs average usage + and hourly profiling. Tons of other options. --- sac-1.9b5.orig/debian/copyright +++ sac-1.9b5/debian/copyright @@ -0,0 +1,26 @@ +Downloaded from: +ftp://mama.indstate.edu/linux/sac/ + +Packaged for Debian by "Edward Brocklesby " + +This program is Copyrighted by Steve Baker + +The source contains the following copyright: +============================================ + + This is Sac, which stands for System ACcounting or maybe Steve's AC... =) + + It's absolutely free, use it, abuse it, talk dirty to it... _I don't care_. + + This program is freely distributable free-ware with no limitations on +copying or redistribution. If it breaks, well it's probably my fault, but +I won't admit to it! + + Feel free to improve it if you can... Wtmp documentation I have really is +lacking and so I am definitely not handling some certain cases, especially +with respect to time warps. A nice graphical front end for showing pretty +graphs of usage would be nice. Seems some people need pictures to +understand data... I blame TV! + + You can for the time being contact me via e-mail at ice@mama.indstate.edu. +I'll try and help you add in new features or whatever else you need. --- sac-1.9b5.orig/debian/notes +++ sac-1.9b5/debian/notes @@ -0,0 +1,13 @@ +I got this from sunsite.unc.edu:/pub/Linux/system/Admin/login. + +We use this tool for statistics of our modem pools: + +Example our command sac: + +sac $* -T ttyD1 ttyD2 ttyD3 ttyD4 ttyD5 ttyD6 ttyD7 ttyD8 ttyD9 ttyD10 \ +ttyD11 ttyD12 ttyD13 ttyD14 ttyD15 ttyD16 ttyS0 ttyS1 + +reports on all the usage on our digiboard pool ttyDx and our regular serial +ports. + +Edward Brocklesby --- sac-1.9b5.orig/debian/rules +++ sac-1.9b5/debian/rules @@ -0,0 +1,55 @@ +#!/usr/bin/make -f + +p=sac + +build: + dh_testdir + $(MAKE) "CFLAGS=-Wall -O2 -fomit-frame-pointer" + touch build + +clean: + $(checkdir) + -rm -f build + dh_clean + -$(MAKE) clean + +binary-indep: checkroot build + $(checkdir) +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: checkroot build + dh_testdir + -rm -rf debian/tmp + dh_installdirs + dh_installdebconf + make install BINDIR=debian/tmp/usr/bin MANDIR=debian/tmp/usr/share/man + dh_installdocs debian/README.Debian debian/*.lsm README THANKS TODO debian/notes + dh_installexamples scripts/* + dh_installchangelogs CHANGES + dh_installmanpages + strip --remove-section=.comment debian/tmp/usr/bin/* + strip --remove-section=.note debian/tmp/usr/bin/* + dh_strip + dh_fixperms + dh_compress + dpkg-shlibdeps $(p) rawtmp + dh_installdeb + dh_gencontrol + chown -R root.root debian/tmp + chmod -R g-ws debian/tmp + dpkg --build debian/tmp .. + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +checkroot: + dh_testdir + dh_testroot + +.PHONY: binary binary-arch binary-indep clean checkroot --- sac-1.9b5.orig/debian/sac-1.8b8.lsm +++ sac-1.9b5/debian/sac-1.8b8.lsm @@ -0,0 +1,18 @@ +Begin3 +Title: sac +Version: 1.8 beta 8 +Entered-date: 06/18/99 +Description: << THIS IS BETA SOFTWARE, USE AT YOUR OWN RISK >> + Performs login accounting, just like the ac program but with + total, per day, per user and per tty. Also performs average + usage, hourly profiling, login listing, login clipping and raw + wtmp reporting. Tons of other options. + Supports Tacacs 3.x - 4.x and most Radius accounting files. +Keywords: login accounting wtmp ac tacacs radius cistron +Author: ice@mama.indstate.edu (Steve Baker) +Maintained-by: ice@mama.indstate.edu (Steve Baker) +Primary-site: mama.indstate.edu /linux/sac + 73220 sac-1.8b8.tgz +Platforms: Linux +Copying-policy: Open Source +End --- sac-1.9b5.orig/debian/wcat.1 +++ sac-1.9b5/debian/wcat.1 @@ -0,0 +1,75 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.29. +.TH WCAT "1" "January 2003" "wcat v1.0 (c) 2001 by Steve Baker" "User Commands" +.SH NAME +wcat \- printout wtmp entries +.SH SYNOPSIS +wcat [-w wtmp|-] [-adX[3|4]] [-s start] [-e end] [-b H[:M[:S]]] +[--help] [--version] +.br +.SH SYNOPSIS +.P +.B Wcat +provides an easy way to recover trimmed information from wtmp binary +files. This tool can be useful for scripts that need only partial information +from them. +.P +Notice that +.B wcat +output is +.B binary +wtmp entries so if this information is printed out to a terminal or screen +it might mess it up. A better use of wcat would be: +.B wcat | rawtmp -w - +.br +.SH OPTIONS +.TP +\fB\-w\fR wtmp|- +Read alternate wtmp file. +.TP +\fB\-X[3]\fR +Read tacacs 3.x wtmp format. +.TP +\fB\-X4\fR +Read tacacs 4.0 wtmp format. +.TP +\fB\-d\fR +Output time in MMM DD HH:MM:SS date format. +.TP +\fB\-a\fR +Print contents of ut_addr (if it exists) instead of ut_host. +.TP +\fB\-s\fR start +Display accounting info from `start'. +.TP +\fB\-e\fR end +Display accounting info up to `end'. +.TP +\fB\-b\fR H:M:S +Show accounting info from the last few hours/minutes/seconds. +.TP +\fB\-\-help\fR +Print this help message. +.TP +\fB\-\-version\fR +Print the version of rawtmp. +.br +.SH "SEE ALSO" +.BR sac (8), +.BR ac (1), +.BR last (1), +.BR rawtmp (1), +.BR wtmp (5), +.BR netdate (8L) +.SH FILES +/var/log/wtmp login database +.br +/usr/adm/radacct/.../detail Radius accounting logs +.SH AUTHOR +.P +The upstream author of +.B wcat +is Steve Baker (ice@mama.indstate.edu) +.P +This manpage was written by Javier Fernandez-Sanguino based on +.B help2man +for the Debian GNU/Linux distribution (but can be used by others).