Commit Graph

6904 Commits

Author SHA1 Message Date
stefanf
84a3515be8 Use a proper protoype to declare interp() and move it to tip.h. Fix an
invocation with a wrong number of arguments.

Approved by:	das (mentor)
2004-05-06 13:25:09 +00:00
kientzle
e1906beac0 Add --unlink and --unlink-first synonyms for -U
Make indentation of tar_longopts array more consistent.
2004-05-05 21:06:37 +00:00
stefanf
89c23a330d Add my birthday.
Approved by:	das (mentor)
2004-05-05 13:11:33 +00:00
kientzle
5065cf7b7e Contrariwise, Linux sys/stat.h doesn't define mode_t and friends,
even though POSIX requires it.  <sigh>
2004-05-04 21:40:09 +00:00
kientzle
c8273e2bc6 Include local copies of fts.c and fts.h to be used ONLY on non-FreeBSD
systems.  The fts.h here is an exact copy of include/fts.h (except for
an initial explanatory comment and the revision tags, of course).  The
fts.c here is slightly modified from lib/libc/gen/fts.c so it can
compile correctly on non-FreeBSD systems.
2004-05-04 17:21:01 +00:00
rwatson
5cd253e8ab Add "-M" argument to id(1), which permits the id command to be used
to print the MAC label of the current process.  "-M" selected as that's
what is used in Trusted IRIX.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, McAfee Research
2004-05-03 22:50:23 +00:00
kientzle
84e96d489d For portability, don't rely on libc's strmode(3). <sigh> 2004-05-03 21:05:59 +00:00
kientzle
4b4a571a3e Correct copy/paste error in Linux nodump support.
Thanks to: Juergen Lock for his continuing patience
while I botch his patches.
2004-05-03 16:56:42 +00:00
kientzle
97877ff6da Style: Use single tab after #define 2004-05-02 22:58:18 +00:00
kientzle
beb914d299 More of Juergen Lock's patches for Linux.
(fflags support on Linux, nanosecond timestamp portability, enable
64-bit file offsets)
2004-05-02 18:10:35 +00:00
kientzle
bce9e1e3e0 More style fixes, per bde. 2004-05-02 17:54:57 +00:00
smkelly
1633825ef2 - style(9) improvements courtesy of bde.
- Revise the former commit to behave nicer on filenames containing
  multiple '.' characters.
- Prevent the generation of macros starting with "__".
2004-05-02 07:07:54 +00:00
smkelly
adc995a9c6 Teach rpcgen to generate .h files properly when the input filename contains
characters that can't be used in preprocessor macros.

PR:		bin/66156
Submitted by:	K S Braunsdorf <rpc@ksb.npcguild.org>
2004-05-02 01:55:23 +00:00
kientzle
69b5efd65f A security issue: An archive containing a symlink to another
directory, then a file with that symlink as a prefix can drop a file
outside of the current directory, which can be a security hole.

Plug this hole by refusing to extract files if a prefix of the
pathname is a symlink.  The -P option disables this check.
2004-05-02 00:43:02 +00:00
kientzle
2032f2c1be Style fixes, most suggested by bde. 2004-05-01 21:47:31 +00:00
smkelly
d030feb94f Fix m4 to properly handle bitwise operators &, ^, and |. Fix operator
precedence. Add short-circuit evaluation.

PR:		bin/60914
Reviewed by:	petef
Discussed with:	jeff, petef
2004-05-01 03:59:43 +00:00
smkelly
bbaadaa92c m4 script to test the functionality of math operators in eval().
Submitted by:	K S Braunsdorf <sed@ksb.npcguild.org>
2004-05-01 03:27:05 +00:00
smkelly
4cfef6bc74 A new version that does exponents and lots of other neat things. Update
from the original author of math.sed.

Submitted by:	K S Braunsdorf <sed@ksb.npcguild.org>
2004-05-01 02:15:58 +00:00
kientzle
e168a7227a Speed up hardlink detection by using a self-sizing hash
table rather than the old linear list search.

On my "hardlink detection torture test", this reduced
user time from 4700 seconds down to 4.2 seconds
and wallclock time from 1:24:48 down to 1:08.
(Yes, that's over one THOUSAND times reduction in user time. ;-)
In the worst case, the new code doubles peak memory usage,
though it could actually reduce memory usage in many cases.

MFC after: 1 week
PR: misc/42167, bin/51151
2004-04-30 18:17:51 +00:00
kientzle
d97881b04d -U is now implemented. (It's been recognized by bsdtar for a while;
now libarchive actually supports the underlying request.)
2004-04-29 05:22:13 +00:00
kientzle
ec3c314996 Refuse to extract entries with '..' in pathname.
Pointed out by: David Schultz
2004-04-28 18:53:07 +00:00
kientzle
97952ffda5 Remove information about specific formats; replace with a
reference to libarchive-formats(5).
2004-04-28 04:43:57 +00:00
kientzle
2b16eb2b37 Update write.c to follow recent API changes to libarchive.
Also, bump up the default copy buffer from 8k to 64k
to improve performance.
2004-04-26 23:39:17 +00:00
silby
a43a673cbd Add the bad reset statistic (corresponds to tcp_input.c rev 1.235) 2004-04-26 02:57:33 +00:00
kientzle
376ec8c9e0 Fix username/groupname cache so it returns a name that
was just looked up by get{pw,gr}id().  Otherwise, it
returns a NULL name unless it's already in the cache.

Credit to Juergen Lock.
2004-04-23 16:33:51 +00:00
tjr
43ace98af1 Print fork statistics with %u as they are unsigned quantities.
PR:		65889
Submitted by:	Ken Stailey
2004-04-23 13:10:29 +00:00
kientzle
3b74d9991f Eliminate a redundant call to archive_entry_set_pathname() 2004-04-21 05:16:28 +00:00
des
68a3dec01b Clarify and correct some compatibility notes.
PR:		65822
2004-04-21 00:42:55 +00:00
green
54f9656804 Treat kevent(2) returning an error EINTR as the non-error it is. 2004-04-20 22:04:12 +00:00
kientzle
b04bbaade3 Allow brave souls to install bsdtar as the
default "tar" command by defining WITH_BSDTAR.

Note: "gtar" and "bsdtar" commands both exist regardless.
2004-04-19 22:09:04 +00:00
cognet
21fc4d63ca Handle window resizing better.
Submitted by:	Cyril Nguyen Huu
Obtained from:	OpenBSD
2004-04-19 21:37:29 +00:00
marius
3d8b6c3fbb Add my birthday.
Approved by:	marcel (mentor)
2004-04-18 01:05:55 +00:00
tjr
934bcb867a Restore old value of LESSKEYFILE_SYS. 2004-04-17 07:48:21 +00:00
tjr
9af8e98943 Regenerate with less 381 configure script. 2004-04-17 07:46:08 +00:00
kientzle
2e82e5328b --help is only supported if you have getopt_long().
This allows bsdtar to compile on FreeBSD 4.x.
2004-04-16 03:50:04 +00:00
kientzle
6f03b58e36 As suggested by Julian Elischer, use a self-sizing hash
table for the hardlink cache.  This dramatically improves
performance when archiving millions of hardlinked files.

While I'm here, clean up some style bugs (per Bruce Evans)
and clarify some comments.
2004-04-15 22:37:54 +00:00
bde
6ef2ea39fa Include <sys/proc.h> instead of depending on namespace pollution in
<sys/user.h> for the definition of TDF_SINTR.  Fixed anachronous
spelling of TDF_SINTR in a comment

Demangled VCS ids.  There were 2 misplaced copies of $FreeBSD$ and of
the include before it.  The vendor id infrastructure was edited.

Fixed the only other remaining style bug since rev.1.1 (expansion of
struct member names made a line too long).
2004-04-14 09:34:17 +00:00
bde
03f55d4286 Include <sys/proc.h> for the definition of PS_INMEM instead of
depending on namespace pollution in <sys/user.h>.

Reduced nearby include messes.
2004-04-14 09:01:56 +00:00
kientzle
c57065d23f A simple cache of uid->uname lookups and gid->gname lookups eliminates
almost 1/2 of the CPU time required to create an uncompressed archive
and makes a noticable reduction in wallclock time.
2004-04-14 00:40:54 +00:00
kientzle
dce91c3e9f When all the links to a file have been dumped, don't forget
to free() the memory used to store the filename.
2004-04-13 23:50:48 +00:00
kientzle
078965198a Eliminate a lot of malloc/free calls by using
a stack-allocated buffer for safe_fprintf formatting.
Only if the result is too large do we resort to malloc.
2004-04-13 23:49:02 +00:00
kientzle
6b1b47eafd Manpage changes suggested by Irina Liakh.
Also, add -h as a synonym for -H, for Linux Standards Base compliance.
2004-04-13 19:45:55 +00:00
luigi
666306ed63 Replace ROUNDUP/ADVANCE with SA_SIZE 2004-04-13 11:24:43 +00:00
ru
b41e7e012d The .DEFAULT target with no commands caused a null pointer dereference.
PR:		bin/63405
Obtained from:	NetBSD
2004-04-12 20:05:11 +00:00
kientzle
bc70569650 Style fixes
Pointed out by: bde
2004-04-12 18:06:07 +00:00
ru
f1d6050269 Document the new .warning directive. 2004-04-12 18:00:54 +00:00
ru
ddf74cce7e Added the new .warning directive.
Submitted by:	Cyrille Lefevre
2004-04-12 17:57:51 +00:00
ru
facfbf9315 Show link-level multicast packet counters with the -a option. 2004-04-12 15:00:48 +00:00
ru
a6853a90ea Fixed alignment of multicast addresses when printing that got
broken in previous revision.
2004-04-12 09:44:42 +00:00
kientzle
ba578aff1a Add DPADD to Makefile (thanks to Andrey for pointing this out).
Generally clean up Makefile, remove dmalloc references from source
(there are better ways to do this than pollute the FreeBSD src tree).
2004-04-12 00:13:23 +00:00
emax
dc17aab72b Use uint instead of u_int 2004-04-09 23:26:16 +00:00
emax
6f0f3b3fa7 Make sure Bluetooth stuff can be compiled on amd64
Submitted by:	ps
2004-04-09 23:01:42 +00:00
mux
f3b6ba0c17 Backout previous commit. It seems this comment applied to something
else than I thought, and thus really needs to go away.

Noticed by:	ru
2004-04-09 17:30:26 +00:00
mux
16d440290c Reintroduce a comment that was wrongly removed in revision 1.34. 2004-04-09 14:19:12 +00:00
tjr
170ba9af2f Improve robustness of multibyte character handling (-m option), and
simplify the read buffering now that we can feed partial multibyte
characters to mbrtowc().
2004-04-09 11:17:29 +00:00
kientzle
4eb00e0ad8 Allow arguments to appear in any order.
While I'm here, add a couple of extra sanity-checks to
the argument parsing (reject -j -z, for instance) and
update the docs a bit.

Requested by: most everyone ;-)
2004-04-08 19:37:01 +00:00
kientzle
f6193fa569 Document the newly-implemented -T option. 2004-04-08 06:21:03 +00:00
kientzle
cc91920b92 Add support for -T option on create.
(Required by pkg_create.)
2004-04-08 06:12:01 +00:00
kientzle
b9401a4a25 Correct signature in alternative stub implementation of setup_acls() 2004-04-07 17:43:48 +00:00
trhodes
bd330b75b7 Add -acl and a small blurb about it to the options list.
Update date.
2004-04-07 14:48:30 +00:00
kientzle
af68728588 Archive both access and default ACLs. 2004-04-06 23:08:31 +00:00
kientzle
ee128149fb Connect bsdtar to the build. 2004-04-06 17:04:38 +00:00
des
c81abf3f2f Workaround for servers that ignore byte ranges when using chunked
encoding.

MFC after:	3 days
2004-04-06 12:24:26 +00:00
kientzle
9b7e6b0200 Initial commit for bsdtar. 2004-04-05 21:32:18 +00:00
ru
2d1b1f8a22 Unbreak compilation on RELENG_4.
Submitted by:	des
2004-04-05 17:02:08 +00:00
des
623bb2430d Sort #includes, remove <sys/types.h> (made redundant by <sys/param.h>),
add <signal.h> (needed for sigaction())

Noticed by:	Stefan Farfeleder <stefan@fafoe.narf.at>
2004-04-05 06:16:48 +00:00
charnier
9358c19c3e Be consistant while reporting error conditions. 2004-04-04 19:17:38 +00:00
charnier
51e94ed0e4 Add FBSDID. Use %ld to printf(3) a long (even if the number is small). 2004-04-04 19:11:01 +00:00
charnier
36fd7f6aca Add FBSDID. Do not dot terminate errx(3) string. 2004-04-04 18:56:53 +00:00
jmg
85522e6c04 I can't believe that we had the Queen's birthday but not the King's...
Since my wife is Thai, she knows the proper date.
2004-04-04 07:31:35 +00:00
bmilekic
5834820b50 Give find(1) the option -acl to locate files with extended
ACLs.  This is similar to what ls(1) can do.  It is handy to
have it so that it can be used in conjunction with
"-exec setfacl {} \;" (to find(1)), among others.

This is the submitter's patch, but slightly modified.

PR: bin/65016
Submitted by: Christian S.J. Peron <maneo@bsdpro.com>
2004-04-03 17:10:04 +00:00
cperciva
c763b0d11d From the list of calendars, remove some duplicate entries which were added
as a result of mis-sorting.

PR Submitter wanted to see a sorted list of non-national holidays followed
by a sorted list of national holidays; I'm not going to do this, because I
don't think we want to get into the "what is a nation?" debate.

PR:		docs/64848
Submitted by:	Ulrich Spoerlein <q@uni.de> (approximately)
MFC after:	3 days
2004-03-30 18:28:36 +00:00
gad
6f424d0b91 Use KERN_PROC_PROC instead of KERN_PROC_ALL on the call to kvm_getprocs(),
so we get one line per process instead of one for each kernel-thread.

Noticed by:	ache & tjr
2004-03-30 15:10:50 +00:00
gad
dcc1665a9b Add a cross-reference to pkill(1), now that pkill is hooked up to the build. 2004-03-27 23:45:33 +00:00
gad
5d19c3b180 bde also tells me that he is confident that P_SYSTEM will not work
any better on 4.x than it does on 5.2. If that's true then there
is no point to the __FreeBSD_version check that I had added.
2004-03-27 06:49:57 +00:00
gad
d0a5378611 Hook pkill' (and thus pgrep') to the standard buildworld.
Reviewed by:	freebsd-arch
2004-03-27 05:44:55 +00:00
gad
d564fe6346 Some style(9)-ish improvements, courtesy of bde.
Noticed by:	bde
2004-03-27 05:40:31 +00:00
gad
669dbf9ff9 Remove the _PATH_DEVNULL setting for "swapf". From the kvm_open(3)
man page:  The swapfile argument is currently unused.

Noticed by:	ru
2004-03-26 19:29:57 +00:00
gad
ac36bb2109 Remove the NEED_KMEM support meant for FreeBSD 3.x. This base-system
version isn't going to be committed to that branch...

Noticed by:	des
2004-03-26 18:02:40 +00:00
gad
afefc17e17 Switch to checking P_KTHREAD instead of P_SYSTEM when deciding what
"system processes" to always ignore.  Based on my testing with `-D',
I am pretty sure this is what we want for 5.x-current.  If my thinking
is wrong, this also makes it easier to switch to a different check.
2004-03-26 17:51:49 +00:00
ru
d697d2bc64 Properly document the -M and -N options. 2004-03-26 11:01:45 +00:00
ru
e693cf55e8 Correct the description of the -N option. 2004-03-26 10:48:35 +00:00
ru
eed1a51f0f Avoid the manpage layering violation and low-level implementation
details of libkvm, and just tell what the getbootfile(3) function
will return, by using the text from netstat(1) and dmesg(8).
2004-03-26 08:54:27 +00:00
ru
0b22130fe1 Correct the description of options -N and -M to match reality. 2004-03-26 08:47:01 +00:00
ru
05f4cbd954 Apply style.Makefile(5). 2004-03-26 07:44:49 +00:00
gad
3b7669980b Send those -Debug messages to stderr, not stdout... 2004-03-26 02:20:52 +00:00
gad
36252af08e Add a debugging option, as I don't understand something that I'm seeing.
(this is a probably temporary option, and is not to be documented)
2004-03-26 01:43:19 +00:00
gad
ce61c5fbbd Remove a redundant check against mypid (the check is done later, in
the "Take the appropriate action" section).

Obtained from:	the sysutils/pkill port
2004-03-26 01:30:15 +00:00
gad
b03d7b4c6e Add a cast to get this to compile with WARNS=5 on sparc64. This is
needed because off_t == __int64_t, while size_t == __uint64_t.  This
also compiles with WARNS=5 on amd64, but I haven't tested the other
platforms yet.
2004-03-26 00:36:27 +00:00
gad
87bd605be6 Fixes so this will compile with WARNS=5 on i386. 2004-03-26 00:15:20 +00:00
gad
49c444c5d0 Fix two cosmetic style(9) issues. 2004-03-25 23:35:14 +00:00
gad
85ae0c1dea Add a comment for when these utilities were added to FreeBSD, and add
a cross-reference to killall(1).
2004-03-25 23:32:12 +00:00
gad
5d91038246 Add -M' and -N' options to pkill' and pgrep', similar to
what are supported in `ps':

  -M  Extract values associated with the name list from the
      specified core instead of the default /dev/kmem.
  -N  Extract the name list from the specified system instead
      of the default /kernel.

Written by:	Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
Obtained from:	the sysutils/pkill port
2004-03-25 23:19:16 +00:00
gad
be71d1971d Use the correct type for some casts, thus avoiding a few warning messages
when compiling with WARNS=3

Written by:	Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
Obtained from:	the sysutils/pkill port
2004-03-25 22:08:52 +00:00
gad
ae7c37ac90 Change some routine and variable names to match the FreeBSD system.
Written by:	Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
Obtained from:	the sysutils/pkill port
2004-03-25 21:58:56 +00:00
gad
b9e6507b5b Add the pkill' and pgrep' commands from NetBSD. This is the source
straight from NetBSD (except to add the RCS-ID lines for FreeBSD).
These will probably require a few updates before they are added to
the FreeBSD buildworld.  I might MFC these to 4.x-stable after 4.10.

Discussed on:	freebsd-arch
Obtained from:	NetBSD (and OpenBSD also has these)
2004-03-25 19:08:48 +00:00
phk
4d840fd809 Respect decimal flag when dumping USER type records. 2004-03-25 12:33:55 +00:00
bms
fb51e70b4a Sort SRCS in Makefile and document -g option additions.
Nudged by:	ru
2004-03-25 09:07:26 +00:00
bms
e8274f1752 Output style: Get rid of an unnecessary newline. 2004-03-25 08:51:14 +00:00
bms
3e526f6c8a Teach netstat(1) how to print the multicast group memberships present
within the running system.

Sponsored by:	Ralf the Wonder Llama
2004-03-25 08:43:59 +00:00
bmilekic
0c53c3f649 Add -u option to ipcs(1) and document it in ipcs.1
It allows you to list IPC facilities owned by username/uid.

Submitted by: Christian S.J. Peron <maneo@bsdpro.com>
PR: bin/63463
2004-03-24 04:01:43 +00:00
des
398809aa3c Remove doscmd from the base system now that it lives in the ports tree. 2004-03-23 22:27:24 +00:00
dwmalone
832ec85c1d Add support for decoding Timespec, Timeval, Itimerval, Pollfd,
Fd_set and Sigaction structures. Use these for printing the arguments
to sigaction(), nanosleep(), select(), poll(), gettimeofday(),
clock_gettime(), recvfrom(), getitimer() and setitimer().

This is based on Dan's patch from the PR but I've hacked it for
style and some other issues. While Dan has checked this patch, any
goofs are probably my fault.

(The PR also contains support for the dual return values of pipe().
These will follow once I've ported that support to platforms other
than i386.)

PR:		52190
Submitted by:	Dan Nelson <dnelson@allantgroup.com>
2004-03-23 12:37:02 +00:00
dwmalone
31f35b81b5 Use pread to implement pread, rather than taking a detour throug stdio.
PR:		52190
Submitted by:	Dan Nelson <dnelson@allantgroup.com>
2004-03-23 12:29:17 +00:00
alfred
719803db70 decode mprotect args while i'm here. 2004-03-23 09:16:18 +00:00
alfred
ac374df83e decode fcntl and mmap arguments. 2004-03-23 09:04:06 +00:00
tjr
cac27479e9 Use fseeko() to properly support large files. 2004-03-22 11:15:03 +00:00
tjr
832dd8e4dd Use errc(). 2004-03-22 09:33:10 +00:00
cperciva
ef4eca34dd 1. Use socklen_t instead of int
2. Compare socket(2) return code to -1, not <= 0.

Obtained from:	OpenBSD rev. 1.9
2004-03-21 08:14:39 +00:00
des
772d066c15 Support C-style comments in profile. 2004-03-21 04:47:54 +00:00
ru
a6f088208d More cleanups:
- 0 should have been -1 in previous commit (just to stay consistent),
- Spell null pointers as NULL, not 0,
- Fixed the comment about pr_usesysctl to not confuse it with boolean.

Pointed by:	bde
2004-03-18 07:21:31 +00:00
ru
5f8fcad2f0 NULL -> 0. 2004-03-17 20:19:45 +00:00
ru
acc148ae6b Improved incorrect usage diagnostics. 2004-03-17 11:06:40 +00:00
ru
45bb56a20f Trust bsd.prog.mk to set SRCS correctly. 2004-03-17 10:52:12 +00:00
ru
6756195e44 GC unnecessary include file. 2004-03-17 10:51:18 +00:00
thierry
e7e057bc9e Approved by: mat (mentor). 2004-03-16 19:39:11 +00:00
ru
39c80ef7e2 Catch up with the removal of the wt(4) driver. 2004-03-14 12:09:43 +00:00
jmallett
9d04af70d3 Add multiple inclusion guards. Mostly this is for extern.h, which was
included twice by lprint.c, which included both finger.h and extern.h.
finger.h, in turn, includes extern.h.  The redundant include of extern.h
was removed from lprint.c, as part of this change, but the include guards
were added anyway out of spite.
2004-03-14 06:43:34 +00:00
bde
3752aa3636 Fixed misspellings of 0 as NULL. Fixed some nearby style bugs. 2004-03-14 05:55:16 +00:00
bde
fe438ddeb6 Fixed a misspelling of 0 as NULL. 2004-03-14 05:51:20 +00:00
imp
e7404b43b5 With the passing of the asc driver, the sasc prograqm is no longer
necessary.
2004-03-14 04:59:17 +00:00
des
188c825a90 Do not print a warning about net.inet.pim.stats if errno is
ENOENT, because that means we do not have PIM in the kernel.

Submitted by:	hmp
MFC after:	1 week
2004-03-12 11:22:50 +00:00
bde
efaca1821b Fixed a misspelling of 0 as NULL.
Fixed a nearby bug.  The "play it safe" code in dosysctl() was unsafe
because it overran the buffer by 1 if sysctl() filled all of the buffer.

Fixed a nearby style bug in output.  Not just 1, but 2 extra newlines
were printed at the end by "vmstat -m" and "vmstat -z".  Don't print
any newlines explicitly.  This depends on 2 of the many formatting
bugs in the corresponding sysctls.  First, the sysctls return an extra
newline at the end of the strings.  This also messes up output from
sysctl(8).  Second, the sysctls return an extra newline at the beginning
of the strings.  This is good for separating the 2 tables output by
"vmstat -mz" and for starting the header on a new line in plain sysctl
output, but gives a bogus extra newline at the beginning for "vm -[m | z]"
and "sysctl -n [kern.malloc | vm.zone]".

Fixed some nearby style bugs in the source code:
- the same line that misspelled 0 as NULL also spelled NULL as 0.
- the size was doubled twice in the realloc loop.
- the "play it safe" comment was misleading.  Terminating the buffer
  is bogus because dosysctl() is only meant to work with sysctls that
  return strings and the terminator is part of a string.  However, the
  kern.malloc sysctl has more than style bugs.  It also doesn't return
  a string.  Termination is needed to work around this bug.
2004-03-11 11:30:57 +00:00
josef
148e2a55a9 Replace <iostream.h> with <iostream> to remove annoying warning
of using deprecated header.

Approved by:    dwhite, simon(mentor)
Reviewed by:    mlaier
Submitted by:   Stefan Farfeleder <stefan@fafoe.narf.at>
PR:             bin/63781
2004-03-11 10:43:35 +00:00
bde
ecf6a1536b Fixed a misspelling of '\0' as NULL. 2004-03-11 10:22:25 +00:00
bde
69593879eb Fixed misspellings of 0 as NULL. 2004-03-11 10:19:45 +00:00
bde
32a1f38197 Fixed misspellings of '\0' as NULL. 2004-03-11 10:12:05 +00:00
bde
2933f0dae0 Fixed a misspelling of 0 as NULL. 2004-03-11 10:09:01 +00:00
ru
908ed00205 Reworked the fix to print the useful line number on error in
the .for loop:

- Replaced four global variables in parse.c with one.
- Made Parse_FromString() accept the "lineno" as an argument.
- Fixed line numbering when there are escaped newlines in the
  body of the .for loop.

Adopted from:	NetBSD
2004-03-10 21:51:06 +00:00
peadar
7757a6a5a3 Another April Fool signs up. 2004-03-10 00:06:01 +00:00
ru
976a40000b Make it possible to ``.undef ${VAR}'' (expanding VAR to get
the variable name to undef).

Submitted by:	Cyrille Lefevre
2004-03-09 17:36:55 +00:00
dwmalone
6d5b2a1de9 Fix the easy warnings:
1) Avoid shadowing index.
2) Constness.
3) Missing prototype for ifcmd.
4) Missing include of string.h.
5) Avoid shadowing error function.
6) ANSI definition for main.
2004-03-09 11:57:28 +00:00
dwmalone
4783f85cf7 Misc fixes brought to light by WARNS=6:
1) Constness, unusedness and size_tness.
2) Don't clobber the value returned by hid_report_size in the daemon case.
3) Don't misspell "sizeof buf" as 100.
4) Don't run off the end of a buffer if the pid is about a google.
5) Avoid shadowing the usage function.
2004-03-09 11:35:43 +00:00
ru
21ee8bd7d2 Fixed line numbering inside the .for loops.
Submitted by:	Cyrille Lefevre
2004-03-09 08:09:33 +00:00
mikeh
5ce4bfd50f These aren't all binary options. 2004-03-09 01:20:24 +00:00
cperciva
e98009b092 Make it possible for the %[eEfgG] formats to not result in an error
being reported by /usr/bin/printf.

This bug has been around for 22 months... either nobody uses printf
with floating-point values, or people are forgetting to check their
return codes.

Approved by:	rwatson (mentor)
2004-03-07 22:22:13 +00:00
des
e4f559f5bb Fix markup.
Submitted by:	ru
2004-03-06 23:36:41 +00:00
des
1c46a2defb Hook logins(1) up to the build. 2004-03-06 21:57:47 +00:00
des
bbc3533e27 Add a logins(1) utility similar to that found in SVr4 derivatives. This
particular implementation is based on the Solaris logins(1) man page.
2004-03-06 21:57:29 +00:00
mikeh
f55c6f08db Assign checkmode boolean earlier to handle the goto jump.
Might fix PR bin/63769.
2004-03-06 13:27:59 +00:00
wes
9d8c709609 Use getopt instead of hand-rolled argument parsing. Usage remains
the same, no man page changes required.

PR:		bin/48313
Submitted by:	Stefan Farfeleder <stefan@fafoe.dyndns.org>
Reviewed by:	joe@
2004-03-05 01:52:09 +00:00
josef
5383191b8f Update URL of GCC status page to GCC 3.3
Approved by:    simon(mentor)
Submitted by:   Stefan Farfeleder <stefan@fafoe.narf.at>
PR:             docs/63370
2004-03-04 20:29:27 +00:00
blackend
0db4b4d634 Typo fix.
PR:		docs/63677
Submitted by:	Volker Stolz <stolz@i2.informatik.rwth-aachen.de>
MFC after:	1 week
2004-03-03 09:15:07 +00:00
jake
1a46be32a3 Elf_Phdr.p_type 7 is "PT_TLS". 2004-03-02 14:06:27 +00:00
mikeh
56541a75e8 Add the -e (mail presence test), -H (header summary mode), and -F
(message save as first recipient) options for standards
conformance.

Submitted by:	Wartan Hachaturow <wart@tepkom.ru> (with some changes)
PR:		standards/61934
2004-02-29 20:44:44 +00:00
schweikh
b3dea63503 Fix grammar bogon. 2004-02-29 12:52:21 +00:00
bde
f997ea0d91 Fixed style bugs in previous commit (.ifndef instead of .if defined(),
and tab lossage).

Garbage-collected NEED_LIBNAMES.
2004-02-29 06:39:11 +00:00
trhodes
163784f293 Update the find manual page:
1: Document -follow under COMPATIBILITY.
2: Update an example to be a little more 'safe'.
3: Use '/' in place of '.' for an example; similar to other manual pages.

PR:		40196 (1), 39532 (2, 3)
Submitted by:	Marc Silver <marcs@draenor.org> (2 and 3)
Discussed with:	des (1)
2004-02-27 20:04:38 +00:00
des
9570f36b18 I am a moron. 2004-02-27 19:00:41 +00:00
des
5f2b2a1410 Re-add the setuid bit, conditional on NO_SETUID_LOGIN being undefined. 2004-02-27 17:50:59 +00:00
des
be0a46dc0a Remove EXAMPLES section which duplicates text in fetch(3). 2004-02-27 10:27:01 +00:00
des
666780111a Cut through the bikeshed and remove login(1)'s setuid bit. It has no
business trying to impersonate su(1), and it does not need to be setuid
to function properly when invoked by getty(8) or telnetd(8).
2004-02-27 08:39:16 +00:00
des
96284df06e Use the -H option instead of the deprecated -follow predicate. 2004-02-25 21:45:41 +00:00
bde
aa55d02b54 Demangled vendor ids. Fixed misplaced FreeBSD id. 2004-02-25 13:26:53 +00:00
bde
086c9d6967 Backed out rev.1.6. A bogus include was added to work around breakage of
<netinet/tcp_var.h>'s prerequisites.  Prerequistes should not grow for
userland headers, and <netinet/tcp_var.h> is unfortunately still needed
in userland.
2004-02-25 13:11:48 +00:00
cperciva
329deaeea6 Send birthday presents to Wadham College, Oxford. :)
Approved by:	rwatson (mentor)
2004-02-24 01:44:47 +00:00
markus
5113bcdbeb Add my birthday.
Approved by:	arved (mentor)
2004-02-23 20:39:23 +00:00
johan
1a1602ce7d style.Makefile(5):
Use WARNS?= instead of WARNS=.
2004-02-23 20:25:27 +00:00
des
1b714b6bb1 Typo. 2004-02-23 09:08:27 +00:00
des
843647f3ca Use %zu for size_t, like God intended. 2004-02-18 21:51:02 +00:00
des
7e6b46ea09 Fix printf() format bug in previous commit (size_t != int).
Use %ju and an (uintmax_t) cast to print size_t values.
Use %jd and an (intmax_t) cast to print off_t values.
Use off_t variables to hold the difference between two off_t values.
Don't bother with unsigned char where char will do nicely.
2004-02-18 21:37:36 +00:00
des
ea05316785 Revamp the statistics code, and switch to a much more compact display
format.  The old code tried to produce the exact same output as the
pre-libfetch implementation, but I no longer see any value in this.
2004-02-18 15:12:00 +00:00
dwmalone
460ec1fed3 Fix some WARNS:
1) Remove some unused variables.
2) Mark some things aas static or __unused.
3) Cast to make sure we're comparing the same types.
2004-02-15 22:48:25 +00:00
dwmalone
cbe74a114c Remove an unused variable. 2004-02-15 22:12:32 +00:00
dwmalone
7fefaf56e7 Fix a few WARNS:
1) Include string.h for strcpy.
2) Don't make duplicate declaration of dump_file, we now include extern.h.
3) Help out with some constness.
4) Cast to slightly better types in some comparisons.
2004-02-15 22:01:23 +00:00
dwmalone
38996affd5 Include timeconv.h for _int_to_time and _time_to_int. 2004-02-15 21:52:59 +00:00
cperciva
c18f783c24 Attempt #2 to fix script(1) if the standard input is closed: If we
read EOF from STDIN_FILENO, write zero bytes into the pseudo-terminal;
this is interpreted as an EOF by the program being scripted.

I've tested this with two non-interactive scripts:
# echo 5 | script foo sh -c 'read x; sleep $x; echo bar'
# echo bar | xargs script foo echo
and one interactive program:
# script foo more /etc/passwd
and everything seems to work properly...

PR:		bin/56166, bin/57414, ports/57415, ports/60534
Approved by:	rwatson (mentor)
MFC after:	2 weeks
2004-02-15 17:30:13 +00:00
bde
6b3e10fb1f Only indent once for continuation lines when not lining up with
parentheses if the continuation indent is exactly half of the main
indent.  Indenting one contination indent for every level of
parentheses gives bad results in most cases and is not what is done
in about 90% of properly hand-formatted KNF code (sys/kern/*.c,
nvi/common/*.c).  The main advantage of the non-default KNF options
-nlp -ci4 is that continuation lines don't accidentally line up with
the next main indentation level or march to the right, and increasing
their indentation defeats this.

This behaviour change is limited to when the continuation indent is
exactly half of the main indent to avoid adding yet another option.
2004-02-12 16:25:12 +00:00
wes
da4183ca3d Add some presidential birthdays. 2004-02-10 18:41:52 +00:00
mlaier
d546129bf0 Add my birthday (for those interested)
Approved by: bms (mentor)
2004-02-10 16:23:17 +00:00
bde
e5d729d480 Added an option -ldi<N> to control indentation of local variable names.
The default is to be backwards compatible and non-KNF (use the same
indentation for locals as for globals; -ldi0 gives KNF indentation
for locals (none)).  The indentation for globals also applies to struct
member names in local declatations.  The indentation of variable names
in multi-line declarations is broken in various ways and this commit
gives some new variations.

indent.1:
Also clarified the description of -di<N>.
2004-02-09 21:48:51 +00:00
bde
fb9127179b Only use tabs to indent variable names if the declaration indent is
nonzero (so that the 1-char indentation given by -di0 is never rendered
by a tab).

Removed garbage commented out code for setting the indentation of variable
names.
2004-02-09 20:42:08 +00:00
bde
364614c0e7 Backed out a part of previous commit that wasn;t mentioned in the log
message and wasn't quite ready (it avoided indenting the names of local
variables).
2004-02-09 20:26:27 +00:00
bde
77c6f70e17 Fixed tab lossage in indented variable names. The -diN option was
worse than useless because it caused things like mangling of
"^int\tfoo" to "int     foo" (this for N = 8).  This quick fix breaks
the invariant that characters between s_code and e_code have width 1,
but nothing seems to depend on this.
2004-02-09 15:57:35 +00:00
bde
c39dd3228d Fixed misformatting of "struct foo *bar" in function parameter lists. It
was mangled to "struct foo * bar".  There should be an option to control
this, but no space is normal.  This finishes fixing the bugs in rev.1.4.

indent(1) still doesn't really understand types in parameter lists.  It
thinks keywords inside parentheses are for casts or sizeofs.  This works
accidentally for scalar types and this quick fix makes it work similarly
but not so accidentally for struct/union/enum types.
2004-02-09 15:27:02 +00:00
bde
73e0d07606 Expanded the size of the keyword table from 100 to 1000 entries so that
the number of typedef-names is not so limited.  Same as in rev.1.4.

Added the "const" and "volatile" to the keyword table.  Rev.1.4 added
these but they were misclassified so they were not formatted as types.
indent still doesn't really understand them.  E.g., it mangles
"char * const *foo" and "char *const *foo".  This change mainly stops
it mangling "char const foo" to "char<declaration-indent>const foo".
2004-02-09 13:13:03 +00:00
bde
b7c852ea74 Backed out rev.1.4 and 1.7 so they they can be implemented and committed
properly.  Of the 3 changes mentioned in the log message for rev.1.4,
the first (implementing -[n]fcb) was correct but didn't touch this
file, the second (no-space-after-sizeof) was not actually done (it is
the default and is controlled by the undcoumented -[n]bs options), and
the third (no-space-after 'struct foo *') was very buggy and was reduced
to wrong comments and other style bugs by backing out the main part
of it in rev.1.6.  Rev.1.4 had 2 changes which were not mentioned in
its commit log: expand specials[] so that more than -83 typedef-names
can be specified (this was the one working change in rev.1.4), and add
"const" and "volatile" to specials[] (this was buggy).
2004-02-09 12:52:15 +00:00
ru
8dfbe2df35 - Demangle usage().
- Require the "directory" argument with the -d option.
2004-02-07 07:22:11 +00:00
ru
4c72afa60b Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
ru
74133e2d19 Added missing DPADD. 2004-02-05 22:01:28 +00:00
ume
c13262dcf1 printed statistics about source address selection rules.
Obtained from:	KAME
2004-02-05 12:08:35 +00:00
ume
fcc30a957c stops program if kvm_read fails.
Obtained from:	KAME
2004-02-05 12:05:35 +00:00
ume
3fd8836dff - support hmac-ripemd160.
- support AES XCBC MAC/AES counter mode.

Obtained from:	KAME
2004-02-05 12:02:37 +00:00
ume
1331f1167c print stats on SPD cache lookups.
Obtained from:	KAME
2004-02-05 12:01:39 +00:00
ume
f43413fdab - %d is 12 chars, not 10. use NI_MAX* where appropriate.
- goodbye RC5.
- use %llu directly.
- KNF.

Obtained from:	KAME
2004-02-05 11:59:37 +00:00
ru
72b546fae5 Removed unnecessary dependencies on librpcsvc.
Prodded by:	des
2004-02-04 11:59:08 +00:00
ru
c96d02bc13 Put libdevstat before libkvm, because the former depends on the latter. 2004-02-04 10:20:43 +00:00
josef
678bc3382a Add myself.
Approved by:	simon(mentor)
2004-02-03 23:26:36 +00:00
le
99b1644418 Add my birthday.
Approved by: joerg (mentor)
2004-02-03 12:08:18 +00:00
ru
ca169c05b5 Fixed style of assignments. 2004-02-02 18:01:19 +00:00
ru
32038078cc GC (now unused here) -lcrypt. 2004-02-02 18:00:06 +00:00
ache
e39ba7ffdc Back out LANG printing changes. POSIX is unclear in this place, but
other systems do that in the old way.
2004-02-02 16:14:02 +00:00
ache
b536edf29a Fix printout case when LANG is overwritten by LC_ALL 2004-02-01 10:32:22 +00:00
wes
310e89456b Remove the inadvertant HTML additions to this man page.
These appear to have been inserted in the PR text by gnatsweb.

Noticed by:		des (maintainer)
2004-01-28 18:51:24 +00:00
emax
e67541b55a Add NO_BLUETOOTH knob to the build process
Requested by:	phk
Reviewed by:	imp (mentor), ru
2004-01-28 00:42:51 +00:00
cperciva
b6735e4f04 Back out part of 1.21, since it breaks script interactive-program. This
re-breaks non-interactive portupgrade (or at least old versions of
portupgrade); I'll see if I can put together a solution which avoids
breaking anything later.

Approved by:	rwatson (mentor)
Noticed by:	Stefan Farfeleder, Joshua Goodall
2004-01-27 17:50:47 +00:00
fjoe
73af929a18 Fix ~/.hushlogin handling.
PR:		61354
Submitted by:	Eugeny Grosbein <eugen (at) kuzbass.ru>
2004-01-26 20:04:47 +00:00
dds
bd896788d5 New -e flag, modifies the behavior of the -u uid flag to use the
effective user id, instead of the real user id.

MFC after:	2 weeks
2004-01-26 11:11:36 +00:00
wes
1f1e387c5a Revert changes of rev 1.55; replace with strong encouragement to
read fetch(3) as well.

Requested by:	des (maintainer)
2004-01-26 07:55:30 +00:00
des
4d31f9c663 Previous commit did the reverse of what the log message said (and of
what I intended to do).  Really remove my middle name.
2004-01-26 07:09:12 +00:00