Commit Graph

180 Commits

Author SHA1 Message Date
tjr
c26513521a pathconf() and acl_get_file() follow links so they cannot be used to
determine whether a symlink has an ACL. Instead, assume that symbolic
links don't have ACLs and don't bother checking. Avoids spurious
ENOENT warnings when listing directories containing broken symlinks
on filesystems with ACLs enabled.

Pointed out by:	rwatson, bde
2002-12-19 01:13:23 +00:00
rwatson
98da0e02a3 Improve handling of symlink targets when listing MAC labels: don't
do the wrong thing when the symlink doesn't have a target, by
considering !f_label in the construction of ch_options.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-12-18 21:05:15 +00:00
ru
7c122c963b mdoc(7) police: markup fixes.
Approved by:	re
2002-11-25 13:52:57 +00:00
tjr
4fe3b11a8c Use warn() instead of perror() or fprintf() where appropriate. 2002-11-06 01:18:12 +00:00
tjr
0117af9cbb Print a `+' character after the standard UNIX permission fields in long
listings if the file has an extended ACL (more than the required 3 entries).
This is what Solaris and IRIX do, and what the withdrawn POSIX.2c standard
required.

Reviewed by:	rwatson (an earlier version of the patch)
2002-11-03 07:29:08 +00:00
wollman
f8a79b86e6 Do not include <sys/syslimits.h> directly; it is not intended for general
consumption.
2002-10-27 17:44:33 +00:00
rwatson
9201f501ea Attempt improved use of fts results: use the correct path to the
object to retrieve label information on, rather than directly
consuming the fts-provided paths (none of which are quite right).
This is based on the similar readlink() code, and may contain
the same bugs.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-24 01:01:53 +00:00
rwatson
a20ce31a58 Teach "ls -Z" to use the policy-agnostic MAC label interfaces rather
than the LOMAC-specific interfaces for listing MAC labels.  This permits
ls to view MAC labels in a manner similar to getfmac, when ls is used
with the -l argument.  Next generation LOMAC will use the MAC Framework
so should "just" work with this and other policies.  Not the prettiest
code in the world, but then, neither is ls(1).

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-24 00:07:30 +00:00
markm
373ead374c Constify, staticify, rationalise types and fix other related warnings. 2002-10-23 10:20:01 +00:00
markm
eda1974761 Constify to squash some warnings. 2002-10-23 10:15:44 +00:00
tjr
55302b1f5d Print non-printing characters in directory names, as well as file names,
as `?' or `\ooo', depending on whether the -b or -B flags were used.

PR:		43995
MFC after:	1 month
2002-10-18 10:59:45 +00:00
dd
8b821f23e8 Output "human-readable" values with a non-0 precision where
appropriate.  Before this, a 2.9 GB file was misleadingly reported as
"2G".  This mostly brings unit_adjust() in line with what is in du(1).

Reviewed by:	jmallett
Approved by:	nik
2002-10-18 04:06:59 +00:00
wollman
aa09d8b564 Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the struct
hack, thereby allowing future extensions to the structure (e.g., for extended
attributes) without rebreaking the ABI.  FTSENT now contains a pointer to the
parent stream, which fts_compar() can then take advantage of, avoiding the
undefined behavior previously warned about.  As a consequence of this change,
the prototype of the comparison function passed to fts_open() has changed
to reflect the required amount of constness for its use.  All callers in the
tree are updated to use the correct prototype.

Comparison functions can now make use of the new parent pointer to access
the new stream-specific private data pointer, which is intended to assist
creation of reentrant library routines which use fts(3) internally.

Not objected to in spirit by: -arch
2002-09-21 01:28:41 +00:00
keramida
2da6cc1709 Fix a warning of "possibly used before initialisation".
Reviewed by:	tjr
2002-08-29 14:29:09 +00:00
charnier
c88222c6c0 Replace various spellings with FALLTHROUGH which is lint()able 2002-08-25 13:01:47 +00:00
trhodes
9618da3e35 s/filesystem/file system/ as discussed on -developers 2002-08-21 17:32:44 +00:00
ru
6c5df471b1 mdoc(7) police: fixed the document date.
Submitted by:	iedowse
2002-08-19 07:15:20 +00:00
schweikh
b2bb39b1eb Fix typos; each file has at least one s/seperat/separat/
(I skipped those in contrib/, gnu/ and crypto/)
While I was at it, fixed a lot more found by ispell that I
could identify with certainty to be errors. All of these
were in comments or text, not in actual code.

Suggested by:	bde
MFC after:	3 days
2002-08-11 13:05:30 +00:00
dillon
3adf63f81d err() is documented as allowing NULL for the format string but GCC isn't
happy about it any more so change the usage to make buildworld work again.
2002-07-10 20:44:55 +00:00
obrien
c84c569bd1 Consistently use __FBSDID 2002-06-30 05:13:54 +00:00
tjr
c6efb66343 Ignore empty COLUMNS environment variable. COLUMNS should take precedence
over TTY width found via ioctl() (SUSv3)
2002-06-04 10:11:29 +00:00
ru
8604f56312 mdoc(7) police: markup nits. 2002-05-29 15:09:49 +00:00
tjr
18037eb7ab Add missing options required by SUSv3:
-m	List files across the page, separated by commas.
-p	Print a slash after directory names
-x	Same as -C but sort across the columns rather than down

Submitted by:	Kyle Martin <mkm@ieee.org>
2002-05-19 02:51:36 +00:00
trhodes
56036d2623 Consistancy check s/file system/filesystem/
Reviewed by:	brian
2002-05-16 01:57:20 +00:00
billf
8ce7d93d62 restore missing default case removed in ls.c:r1.57
add break statements to default cases where missing.

Submitted by:	bde
2002-05-15 18:53:56 +00:00
jmallett
3de05bf289 Make 'user' and 'group' const as to not discard the qualifier from the
functions we use to assign them.  Doesn't seem to be anything else that
relies on these being non-const.
2002-05-15 09:49:59 +00:00
jmallett
c0b64a6d1b Remove an empty default case to make this syntactically correct. Not there
is as good as blaknk.
2002-05-15 09:43:52 +00:00
charnier
d219790077 ls(1) is utility not function 2002-04-16 20:03:54 +00:00
jwd
a3fe1a7096 Document option to option dependancy. Fix typo.
MFC after:	1 week
2002-04-15 02:21:12 +00:00
ru
f6da61bcc9 Install sys/security/lomac/*.h to /usr/include/security/lomac/.
Install sys/<arch>/include/pc/*.h to /usr/include/machine/pc/.

PR:		docs/29534

Install sys/netatm/*/*.h to /usr/include/netatm/*/.

Don't install compatibility symlinks for <machine/soundcard.h>
and <machine/joystick.h>.  Three years is enough to be aware of
the change, and these weren't visible in the SHARED=symlinks
case.

Back out include/Makefile,v 1.160 that was a null change anyway
due to the bug in the path, and we now don't want to install
these headers because they would otherwise be invisible in the
SHARED=symlinks case.

Don't install IPFILTER headers.  Userland utilities fetch them
directly, and they were not visible in the SHARED=symlinks case.

Resurrect SHARED=symlinks in Makefile.inc1.

PR:		bin/28002

Prodded by:	bde
MFC after:	2 weeks
2002-03-26 16:05:14 +00:00
rwatson
94342978a6 NAI DBA update. 2002-03-14 21:51:00 +00:00
ache
4ac9e16668 Add (unsigned char) cast lost in WARNS=4 fixes which break 8bit locales
PR:		35421
2002-02-28 18:52:47 +00:00
bde
cf8ef037c8 #include <time.h> for the definition of time functions instead of
depending on namespace pollution 2 layers deep in <sys/stat.h>.

Removed unused includes.
2002-02-25 01:36:59 +00:00
imp
60cc340d82 Fixed divots that I created when I moved prototypes of group_from_gid
and user_from_uid to grp.h and pwd.h.  Update the man pages.

Submitted by: David Malone
Pointy hat to: imp
2002-02-19 00:05:59 +00:00
kris
a1a10418c8 Correct inadvertent style botches in previous commit. 2002-02-04 03:06:51 +00:00
kris
bb3058824a Lock down with WFORMAT=1 except those directories with unfixed warnings.
Tested on i386 and alpha.
2002-02-04 02:49:19 +00:00
markm
2973d46886 Use __FBSDID() and clean up the vendor tags. 2002-02-03 20:55:54 +00:00
markm
1084c0a6b2 WARNS=4 fixes, plus a healthy dose of fixes inspired by lint. 2002-02-03 19:11:32 +00:00
imp
e2889aca77 Fix unused variable. 2002-02-02 07:10:02 +00:00
imp
50014e3541 o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
  they already are.
2002-02-02 06:48:10 +00:00
ru
108589a3f2 mdoc(7) police: tidy up. 2002-01-09 13:29:39 +00:00
bde
997e80f81f Fixed style bug (unsorting of SRCS) in rev.1.15. 2001-12-29 12:05:30 +00:00
bde
3df6b14036 Fixed style bugs in revs. 1.6, 1.10 and 1.12. 2001-12-29 11:59:26 +00:00
bde
412b81cedf Fixed missing DPADD and disordered LDADD in rev.1.17
Fixed setting of WARNS in rev.1.16.  Options should normally be set using
using "?=", not using "=", so that the setting is easy to override on the
command line, and setting WARNS to 0 should not be an exception.
2001-12-29 11:51:27 +00:00
joe
42e2c5321a LSCOLOURS should be spelt LSCOLORS.
Submitted by:	Jordan DeLong <fracture@allusion.net
2001-12-29 10:13:43 +00:00
ben
8bd06e165d Remove part of a diff committed at the end of the file. 2001-12-29 00:51:23 +00:00
joe
e16986212d Force raw printing of non-printable characters via the -w option.
PR:		bin/28007
2001-12-29 00:22:29 +00:00
joe
4771d61303 Restore these files to shiny KNF. 2001-12-29 00:18:16 +00:00
joe
e208ef8e1a Convert some spaces into tabs that I missed first time around. 2001-12-28 21:55:23 +00:00
joe
d2121ec1c3 Revert most of rev 1.42, to restore KNF style.
Requested by:	bde
2001-12-28 21:47:33 +00:00