From owner-freebsd-ports Sat Oct 25 13:40:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id NAA21654 for ports-outgoing; Sat, 25 Oct 1997 13:40:03 -0700 (PDT) (envelope-from owner-freebsd-ports) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id NAA21636; Sat, 25 Oct 1997 13:40:01 -0700 (PDT) (envelope-from gnats) Resent-Date: Sat, 25 Oct 1997 13:40:01 -0700 (PDT) Resent-Message-Id: <199710252040.NAA21636@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-ports Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, bmc@WillsCreek.COM Received: from BIGFUN.vwcom.com (BIGFUN.vwcom.com [151.197.101.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id NAA21028 for ; Sat, 25 Oct 1997 13:32:51 -0700 (PDT) (envelope-from bmc@WillsCreek.COM) Received: from WillsCreek.COM (gw.willscreek.com [151.197.101.46]) by BIGFUN.vwcom.com (8.8.6/8.8.6) with ESMTP id QAA24583 for ; Sat, 25 Oct 1997 16:28:05 -0400 (EDT) Received: from current.willscreek.com (current.willscreek.com [172.16.87.1]) by WillsCreek.COM (8.8.5/8.8.5) with ESMTP id QAA29307; Sat, 25 Oct 1997 16:32:47 -0400 (EDT) Received: (from bmc@localhost) by current.willscreek.com (8.8.5/8.8.5) id QAA20575; Sat, 25 Oct 1997 16:32:47 -0400 (EDT) Message-Id: <199710252032.QAA20575@current.willscreek.com> Date: Sat, 25 Oct 1997 16:32:47 -0400 (EDT) From: Brian Clapper Reply-To: bmc@WillsCreek.COM To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: bmc@WillsCreek.COM X-Send-Pr-Version: 3.2 Subject: ports/4853: update to gnuls port Sender: owner-freebsd-ports@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 4853 >Category: ports >Synopsis: Update to gnuls port >Confidential: yes >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Oct 25 13:40:00 PDT 1997 >Last-Modified: >Originator: Brian Clapper >Organization: >Release: FreeBSD 2.2.2-RELEASE i386 >Environment: >Description: Enclosed `diff -uNr' rolls in suggested changes from Keith Mitchell and Scott Gasch to permit colorizing of setuid and setgid programs as well as other-writable dirs and other-writable-sticky dirs. Tested locally on FreeBSD 2.2.2-RELEASE. >How-To-Repeat: >Fix: diff -uNr gnuls/patches/patch-ac gnuls.new/patches/patch-ac --- gnuls/patches/patch-ac Thu Sep 18 13:41:29 1997 +++ gnuls.new/patches/patch-ac Sat Oct 25 16:02:30 1997 @@ -48,3 +48,147 @@ $(LINK) $(ls_LDFLAGS) $(ls_OBJECTS) $(ls_LDADD) $(LIBS) $(mkdir_OBJECTS): ../config.h +*** src/dircolors.c.orig Sun Jan 26 00:54:17 1997 +--- src/dircolors.c Sat Oct 25 16:00:40 1997 +*************** +*** 72,84 **** + "NORMAL", "NORM", "FILE", "DIR", "LNK", "LINK", + "SYMLINK", "ORPHAN", "MISSING", "FIFO", "PIPE", "SOCK", "BLK", "BLOCK", + "CHR", "CHAR", "EXEC", "LEFT", "LEFTCODE", "RIGHT", "RIGHTCODE", "END", +! "ENDCODE", NULL + }; + + static const char *const ls_codes[] = + { + "no", "no", "fi", "di", "ln", "ln", "ln", "or", "mi", "pi", "pi", + "so", "bd", "bd", "cd", "cd", "ex", "lc", "lc", "rc", "rc", "ec", "ec" + }; + + static struct option const long_options[] = +--- 72,86 ---- + "NORMAL", "NORM", "FILE", "DIR", "LNK", "LINK", + "SYMLINK", "ORPHAN", "MISSING", "FIFO", "PIPE", "SOCK", "BLK", "BLOCK", + "CHR", "CHAR", "EXEC", "LEFT", "LEFTCODE", "RIGHT", "RIGHTCODE", "END", +! "ENDCODE", "SUID", "SETUID", "SGID", "SETGID", "WRO", "WRITEOTHERS", +! "WT", "WROT", "WRITEOTHERSSTICKY", NULL + }; + + static const char *const ls_codes[] = + { + "no", "no", "fi", "di", "ln", "ln", "ln", "or", "mi", "pi", "pi", + "so", "bd", "bd", "cd", "cd", "ex", "lc", "lc", "rc", "rc", "ec", "ec" ++ "su", "su", "sg", "sg", "wo", "wo", "wo", "wt", "wt", "wt", NULL + }; + + static struct option const long_options[] = +*** src/ls.c.orig Sun Jan 26 00:56:10 1997 +--- src/ls.c Sat Oct 25 16:00:30 1997 +*************** +*** 359,371 **** + enum indicator_no + { + C_LEFT, C_RIGHT, C_END, C_NORM, C_FILE, C_DIR, C_LINK, C_FIFO, C_SOCK, +! C_BLK, C_CHR, C_MISSING, C_ORPHAN, C_EXEC + }; + + static const char *const indicator_name[]= + { + "lc", "rc", "ec", "no", "fi", "di", "ln", "pi", "so", +! "bd", "cd", "mi", "or", "ex", NULL + }; + + struct col_ext_type +--- 359,371 ---- + enum indicator_no + { + C_LEFT, C_RIGHT, C_END, C_NORM, C_FILE, C_DIR, C_LINK, C_FIFO, C_SOCK, +! C_BLK, C_CHR, C_MISSING, C_ORPHAN, C_EXEC, C_UID, C_GID, C_WRO, C_WT + }; + + static const char *const indicator_name[]= + { + "lc", "rc", "ec", "no", "fi", "di", "ln", "pi", "so", +! "bd", "cd", "mi", "or", "ex", "su", "sg", "wo", "wt", NULL + }; + + struct col_ext_type +*************** +*** 390,396 **** + { LEN_STR_PAIR ("01;33") }, /* cd: Char device: bright yellow */ + { 0, NULL }, /* mi: Missing file: undefined */ + { 0, NULL }, /* or: Orphanned symlink: undefined */ +! { LEN_STR_PAIR ("01;32") } /* ex: Executable: bright green */ + }; + + /* FIXME: comment */ +--- 390,400 ---- + { LEN_STR_PAIR ("01;33") }, /* cd: Char device: bright yellow */ + { 0, NULL }, /* mi: Missing file: undefined */ + { 0, NULL }, /* or: Orphanned symlink: undefined */ +! { LEN_STR_PAIR ("01;32") }, /* ex: Executable: bright green */ +! { LEN_STR_PAIR ("37;41") }, /* su: setuid: white on red */ +! { LEN_STR_PAIR ("30;43") }, /* sg: setgid: black on yellow */ +! { LEN_STR_PAIR ("37;44") }, /* wo: writeable-other:white on blue */ +! { LEN_STR_PAIR ("37;42") }, /* wt: wo w/ sticky: white on green */ + }; + + /* FIXME: comment */ +*************** +*** 2407,2413 **** + else + { + if (S_ISDIR (mode)) +! type = C_DIR; + + #ifdef S_ISLNK + else if (S_ISLNK (mode)) +--- 2411,2424 ---- + else + { + if (S_ISDIR (mode)) +! { +! if ((mode && MODE_WT) == MODE_WT) +! type = C_WT; +! else if ((mode && MODE_WRO) == MODE_WRO) +! type = C_WRO; +! else +! type = C_DIR; +! } + + #ifdef S_ISLNK + else if (S_ISLNK (mode)) +*************** +*** 2435,2441 **** + type = C_CHR; + #endif + +! if (type == C_FILE && (mode & S_IXUGO) != 0) + type = C_EXEC; + + /* Check the file's suffix only if still classified as C_FILE. */ +--- 2446,2458 ---- + type = C_CHR; + #endif + +! if ((type == C_FILE) && ((mode & S_ISUID) != 0)) +! type = C_UID; +! +! else if ((type == C_FILE) && ((mode & S_ISGID) != 0)) +! type = C_GID; +! +! else if (type == C_FILE && (mode & S_IXUGO) != 0) + type = C_EXEC; + + /* Check the file's suffix only if still classified as C_FILE. */ +*** src/ls.h.orig Wed Jun 16 11:24:58 1993 +--- src/ls.h Sat Oct 25 16:00:35 1997 +*************** +*** 7,10 **** +--- 7,13 ---- + /* This is for the `vdir' program. */ + #define LS_LONG_FORMAT 3 + ++ #define MODE_WT 01002 ++ #define MODE_WRO 02 ++ + extern int ls_mode; >Audit-Trail: >Unformatted: