summaryrefslogtreecommitdiffstats
path: root/security/l0pht-watch
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2000-08-15 19:05:10 +0000
committergreen <green@FreeBSD.org>2000-08-15 19:05:10 +0000
commitde2bb2b9afd0f2b19e1382a53375497162f5bcfc (patch)
treed1b1f29db308787cd30139342dc4c6facc3fb8db /security/l0pht-watch
parent0e7baeac34ac6e77d58d4195e3dc30891a4009ac (diff)
downloadFreeBSD-ports-de2bb2b9afd0f2b19e1382a53375497162f5bcfc.zip
FreeBSD-ports-de2bb2b9afd0f2b19e1382a53375497162f5bcfc.tar.gz
l0pht-watch is much more useful if you can see more than 20 characters
of the pathname. Use the magic of TIOCGWINSZ to let it scale with the terminal.
Diffstat (limited to 'security/l0pht-watch')
-rw-r--r--security/l0pht-watch/files/patch-ac7
-rw-r--r--security/l0pht-watch/files/patch-ad37
2 files changed, 38 insertions, 6 deletions
diff --git a/security/l0pht-watch/files/patch-ac b/security/l0pht-watch/files/patch-ac
index 7a0d28d..0e7fff7 100644
--- a/security/l0pht-watch/files/patch-ac
+++ b/security/l0pht-watch/files/patch-ac
@@ -1,6 +1,6 @@
---- check_tmp.h.orig Thu Dec 24 07:40:13 1998
-+++ check_tmp.h Mon May 22 23:45:37 2000
-@@ -1,16 +1,22 @@
+--- check_tmp.h.orig Thu Dec 24 10:40:13 1998
++++ check_tmp.h Sun Aug 13 23:54:21 2000
+@@ -1,16 +1,23 @@
#ifndef __CHECK_TMP_H
#define __CHECK_TMP_H
@@ -10,6 +10,7 @@
+#include <sys/mman.h>
#include <sys/stat.h>
+#include <sys/param.h>
++#include <sys/ttycom.h>
#include <dirent.h>
-#include <pwd.h>
-#include <grp.h>
diff --git a/security/l0pht-watch/files/patch-ad b/security/l0pht-watch/files/patch-ad
index dde9441..53cb6c1 100644
--- a/security/l0pht-watch/files/patch-ad
+++ b/security/l0pht-watch/files/patch-ad
@@ -1,6 +1,37 @@
---- list_utils.c.orig Tue Apr 25 00:58:27 2000
-+++ list_utils.c Tue Apr 25 00:58:33 2000
-@@ -168,7 +168,7 @@
+--- list_utils.c.orig Thu Dec 24 00:00:44 1998
++++ list_utils.c Sun Aug 13 23:55:23 2000
+@@ -102,9 +102,11 @@
+ char filemodes[11];
+ char outputStr[(MAXNAMLEN * 2) + 256];
+ char linkbuf[MAXNAMLEN + 1];
++ struct winsize winsize;
+ struct passwd *pwent;
+ struct group *groupent;
+ int ret;
++ unsigned short width;
+
+ switch(action){
+ case ADDITION:
+@@ -143,11 +145,16 @@
+
+ getfilemodes(&list->statbuf, filemodes);
+
++ if (ioctl(1, TIOCGWINSZ, &winsize) == 0)
++ width = winsize.ws_col;
++ else
++ width = 80;
++
+ sprintf(outputStr,"%.2s %-11.20s %-2d %-8.20s %-8.20s %-6ld %-10.20s "
+- "%.20s",
++ "%.*s",
+ (action == ADDITION) ? "+ " : "- ", filemodes,
+ (int)list->statbuf.st_nlink, username, groupname,
+- (long)list->statbuf.st_size, timehold, list->filename);
++ (long)list->statbuf.st_size, timehold, width - 60, list->filename);
+
+ if (S_ISLNK(list->statbuf.st_mode) ){
+ ret = readlink(list->filename, linkbuf, sizeof(linkbuf));
+@@ -168,7 +175,7 @@
OpenPOWER on IntegriCloud