Commit Graph

4797 Commits

Author SHA1 Message Date
martin c8b09ee080 New utility: ifwatchd.
Monitors the routing socket for address changes of autonomous (kernel only)
interfaces (like PPPoE) and runs up/down scripts similar to what pppd
does for its interfaces.
2001-11-19 09:43:03 +00:00
perry fcd452088f Remove a spurious slash and clean up formatting. 2001-11-19 04:11:18 +00:00
itojun 3e54083fa3 __ss_{len,family} hack is no longer necessary 2001-11-19 03:19:10 +00:00
itojun f559c09989 __ss_{len,family} #define hack is no longer necessary 2001-11-19 03:18:28 +00:00
augustss 2e3aacf23d Adapt to small ioctl(USB_DEVICEINFO) change. 2001-11-17 01:52:56 +00:00
itojun b0de371030 rcsid cleanup 2001-11-16 07:10:09 +00:00
itojun c12361e68c sync with latest kame. terminate only if ripng response is not received
for 5 seconds (or length specified by -w).
2001-11-16 07:09:36 +00:00
itojun 074a5eb23b remove LBL_ALIGN. the code leaks memory severely, and makes packet dump
incorrect.
2001-11-15 07:39:25 +00:00
enami 6737e7d6b2 Test absense of command differently to avoid null pointer deference
when only whitespaces are given.
2001-11-14 03:01:15 +00:00
itojun d67d6cd1bb initialize sockaddr_in6 correctly. sync with kame 2001-11-14 01:56:29 +00:00
itojun a6b4b2d5a5 use strncpy instead of strcpy, just in case. sync with kame 2001-11-14 01:55:38 +00:00
jmc adf8bd3435 Ugg...Turn LIST_FOREACH into a while loop around LIST_NEXT...
The *_FOREACH macros got added post 1.5 and were pulled up into 1.5.2. This
makes it impossible to compile mtree local on a 1.5-release box as a cross
toolchain bit for bootstrapping to -current. (and why I never saw this problem
on my 1.5.2 machine)

This whole thing is solved via a compat lib for the tools for all netbsd bits
and/or trimming down a version of mtree to just the bits needed for building
the snapshots.
2001-11-11 05:07:20 +00:00
lukem 7c6d79f87c provide the ability to remove support for generating or checking various
digests by #define-ing NO_MD5, NO_RMD160, or NO_SHA1.  the keywords are
still parsed.
2001-11-10 14:58:20 +00:00
lukem 9a07d795e3 need <stdio.h> and <time.h> for mtree.h 2001-11-10 07:13:07 +00:00
lukem 17d6712ceb replace <sys/time.h> with <time.h> (for consistency) 2001-11-10 07:11:14 +00:00
lukem 911a933fe1 with local crc.c, don't need usr.bin/cksum in .PATH any more 2001-11-10 07:10:11 +00:00
mycroft 23b6355049 Add a separate version of the CRC routine that listens to sflag. 2001-11-10 05:10:22 +00:00
lukem bae654cfa1 When used without -F, search for `special' in fstab and use the raw version
of the fs_spec. In any case, use opendisk(3) to open the device.

When used with -F just open `special' as-is.
2001-11-09 12:01:13 +00:00
lukem 704b08b696 Generally don't need the extra byte in MAXPATHLEN sized buffers, because
pathnames are guaranteed by POSIX to be MAXPATHLEN-1 bytes long.
Kindly pointed out by Warner Losh in private email.
2001-11-09 06:55:56 +00:00
christos 22002034fe Now that vnconfig uses opendisk(3) update it's usage encouraging use
of "vnd0" instead of "/dev/rvnd0{c,d}". Noted by tron.
2001-11-08 15:41:55 +00:00
simonb c71f9f2709 Include <limits.h> to get LLONG_{MIN,MAX}. 2001-11-08 12:24:12 +00:00
itojun e6ccd47666 use strncpy() to set ifname arg to ioctl. 2001-11-08 09:45:34 +00:00
tron 4c61cd90ba Don't abuse opendisk(3) to open PCI bus devices which are no disks. This
fixes PR bin/14468 by Valeriy E. Ushakov.
2001-11-08 08:05:05 +00:00
tron 316d7126f6 Try to open the file before configuring a vnode disk device to avoid silly
error messages when the file cannot be opened for some reason. This fixes
PR bin/12445 by <knotwell@ix.netcom.com>.
2001-11-08 07:44:32 +00:00
lukem 68b8babd26 sync with ufs/ufs/ufs_bmap.c rev 1.14:
- assert that ufs_getlbns() is only called for blocks which involve indirects
- use a shift instead of a multiply in one place
2001-11-08 06:10:13 +00:00
christos 271dd3ace8 Revert previous change that accepts non-raw devices as argument. The
distrib Makefiles have been adjusted appropriately. This change made
block devices and char devices look the same to the naive user, and
it is not appropriate.
2001-11-08 02:14:09 +00:00
tron 73ec93c7eb Invoke "opendisk" with "iscooked = 1" because existing makefiles and the
manual page used the block device.
2001-11-07 16:18:03 +00:00
lukem e8b2f3326f User interface changes from (or inspired by) FreeBSD:
- Add -L to walk the tree `logically', by following symbolic links in
  the heirarchy.
- Add -P to walk the tree `physically'. This is the current behaviour,
  and the default.
- Add "-X excludes-file" to give mtree the ability to exclude files and
  directories from its traversal.  excludes-file contains fnmatch(3)
  patterns to exclude from the walk.
- Add "md5digest" synonym for "md5".
- Add "rmd160" keyword for RMD-160 message digest, and "rmd160digest" synonym.
- Add "sha1" keyword for SHA-1 message digest, and "sha1digest" synonym.
- Don't try to compare() other attributes if the type doesn't match;
  it's nothing but trouble, and no use anyway.
- In -c, only emit "/set" records if something has changed since the
  previous one.

User interface changes by me:
- Check a device's parameters before checking uid/gid/mode.
- If updating (-u), modify the following to match the specification:
	- Device type (retaining existing ownership).
	- Symlink target.

Fixes from (or inspired by) FreeBSD:
- Use p->ftslevel instead of own code to keep track of the level ourself.
  The previous code got majorly confused if fts(3) couldn't descend
  into a subdir, resulting in leaf nodes getting attached to the wrong
  directory.
  XXX: This new method is much much more robust, even though it's not 100%
  perfect; it might result in a couple of following entries in the spec
  to be incorrectly tagged as missing.
- Pass a useful pathname to rlink(), so that logical (-L) traversal
  doesn't confuse symlink checking.
- Consistently use MAXPATHLEN+1 sized buffers for pathnames, so that
  there's room for the NUL.
- Use mtree_err() and strerror(p->fts_errno) to report errors during
  the fts(3) walk.

Fixes by me:
- Remove now-unused `const char *name' argument from compare().
- Change crc_total from an int to a u_int32_t, to match usr.bin/cksum/crc.c.
- Remove trailing whitespace.
- Remove unnecessary (void) casts on functions.
- Reorder entries in the getopt() switch.
- Replace strtoq() with strtoll(), and use strtoul() appropriately.
- Renumber F_ flags to be in alphabetical order.
2001-11-07 08:01:51 +00:00
lukem 272e588400 - KNF & whitespace cleanup
- use fparseln() instead of fgetln()
2001-11-07 01:36:50 +00:00
lukem e491f8950f Code from FreeBSD to give mtree the ability to exclude items from its traversal 2001-11-07 01:16:00 +00:00
augustss 5d206b8d31 Correct a comment. Pointed out by Michael.Eriksson@era-t.ericsson.se. 2001-11-06 22:56:02 +00:00
kim d561c70b4b None of the other calls to logerror() include a newline at the end of the
message, and it causes an unnecessary empty line in the syslog output.
2001-11-06 05:39:27 +00:00
atatat f5d592cf44 Add support for printing the AS number associated with the address at
each hop.
2001-11-04 23:14:35 +00:00
lukem c55aa0f9cb - move "Wflag" global from mtree.c to spec.c, and reinstate the functionality
of tv's previous code, which skips uname or gname parsing if -W is enabled.
- rename "lineno" to "mtree_lineno", to reduce possibility of name
  clashes in code that yanks in spec.c & misc.c (unlikely, but you never know)
2001-11-03 12:51:40 +00:00
lukem 1226af2bc4 tweak copyright 2001-11-02 03:12:48 +00:00
augustss 87faac94d7 Avoid opening /dev/ws{mouse,kbd}0; use stat() instead. 2001-11-01 19:06:08 +00:00
tv 70a4e4b481 Revert previous until it's fixed a more generic way ... I didn't realize
this was pulled in via reachover from elsewhere.
2001-11-01 02:15:41 +00:00
tv 8e97329393 Don't try to do uid or gid lookups from a supplied spec file if -W is given;
the numerical IDs won't be used anyway.
2001-10-31 20:41:17 +00:00
augustss 854fbc7c6b Oops, commit a version that actually works. :-) 2001-10-29 23:38:42 +00:00
wiz bc1878475f Standardise section headers, sort sections. 2001-10-29 23:27:14 +00:00
augustss cf866544bb Add moused, a daemon to take input from a serial mouse and feed it to
a wsmux.  This way serial mice can be accessed via /dev/wsmouse like all
other mice.
This program is heavily based on the FreeBSD moused program.
2001-10-29 23:23:41 +00:00
drochner 371be6ad2b update for loading into "wsfont" 2001-10-29 17:59:00 +00:00
drochner b03606ed0a change default device to "/dev/wsfont" - the vga driver likes it that
way now
2001-10-29 17:58:19 +00:00
lukem ae963680ea cast time_t values to long if printing as %ld to appease the sparc64 port 2001-10-29 07:30:07 +00:00
lukem d1270f6de8 - apply_specdir(): when adding a new symlink from the specfile, do the assert
check on the correct node
- apply_specentry(): if this node is a duplicate of another, apply the
  changes to the `master' entry instead of this one.
- fix inotype() to DTRT
- comment out some debugging info that is too verbose
2001-10-29 05:38:09 +00:00
lukem 751eb87e65 typographical cleanups 2001-10-29 05:18:25 +00:00
lukem cafb53fc3d add __RCSID() 2001-10-28 13:14:05 +00:00
lukem 1450efa805 a possible feature... 2001-10-28 13:12:50 +00:00
christos ffea4be4c7 - KNF
- use syslog after we become a daemon to write error messages.
- failure to open a device is not fatal.
- copy timeval, because select is allowed to change it.
- if we failed to blank all the devices we are monitoring, exit
2001-10-28 01:32:46 +00:00
lukem 16257ef5fc fix manual page building 2001-10-26 16:12:30 +00:00
lukem c431c1e4f0 add makefs(8) 2001-10-26 16:06:57 +00:00
lukem 8e9dab2d53 fix potential sparc compiler warning (if DEBUG was defined, that is...) 2001-10-26 16:01:46 +00:00
lukem de8b3ad2c7 makefs - create a file system image from a directory tree.
It doesn't need any special privileges or kernel devices.

Only ffs image creation is supported at this time, although makefs has been
designed to allow the addition of other file system formats by writing new
back-ends.

This program was designed & implemented by Luke Mewburn of Wasabi Systems.
2001-10-26 06:50:48 +00:00
lukem 6325773eff makefs - create a file system image from a directory tree.
It doesn't need any special privileges or kernel devices.

Only ffs image creation is supported at this time, although makefs has been
designed to allow the addition of other file system formats by writing new
back-ends.

This program was designed & implemented by Luke Mewburn of Wasabi Systems.
2001-10-26 06:16:19 +00:00
lukem 99147a7648 remove #include <ufs/ufs/quota.h> where it was just to appease
<ufs/ufs/inode.h>, since the latter now includes the former.  leave the former
in source that obviously uses specific bits of it (for completeness.)
2001-10-26 05:56:06 +00:00
lukem 009121cf2c makefs - create a file system image from a directory tree.
It doesn't need any special privileges or kernel devices.

Only ffs image creation is supported at this time, although makefs has been
designed to allow the addition of other file system formats by writing new
back-ends.

This program was designed & implemented by Luke Mewburn of Wasabi Systems.
2001-10-26 05:11:42 +00:00
lukem 1e617f29fb Add -W: don't attempt to change the perms/time/flags on existing entries, nor
set them when creating new directories. (AKA the ``don't whack'' option).
Concept suggested by Todd Vierling.
2001-10-25 14:47:39 +00:00
lukem 68a03bad5d - add lineno field to NODE
- move inotype() prototype into mtree.h from extern.h
2001-10-25 03:00:14 +00:00
thorpej a830755714 Don't descend into this mdsetimage -- we now use the BFD'ified
version in src/gnu/usr.sbin.
2001-10-24 23:59:40 +00:00
augustss 87c42c4d3f Improve language. 2001-10-24 18:33:52 +00:00
augustss 6a51bdd2f2 Update usage message. 2001-10-24 18:31:16 +00:00
augustss b97e37c9db Update for wsmux ioctl() name changes. 2001-10-24 14:14:03 +00:00
oster 4a785b3509 Fix a memory leak: when unlocking make sure we release the memory associated
with the lock begin removed!

Reviewed by thorpej.
2001-10-23 19:54:53 +00:00
thorpej b2cb6c26ef Don't set TARGET_MACHINE, set MACHINE, instead. MACHINE is consistent
with what other Makefiles use, and as a result, make cross-compiling
kernels a little easier.
2001-10-23 18:56:42 +00:00
agc cd27040c88 + add backwards compatibility hook for old pw_mkdb() calls with no args
+ remove some unused code in a comment.

+ add F_SHELL flag in userdel

+ use a separate local declaration for a temporary variable, rather
than overloading a variable that's used for something else.
2001-10-22 11:00:05 +00:00
itojun 9525a1af56 define LBL_ALIGN, to avoid unaligned access on align-picky arch.
suggested by Manuel Bouyer
2001-10-22 09:24:27 +00:00
lukem 273cdba6ea document requirement about first node being a directory called "." 2001-10-22 07:11:46 +00:00
lukem 57566f70f8 - enforce the top-most entry must be "." and must be a directory; avoids
various potential problems when intermixing full and relative paths
- changes to make it much easier to use spec() - the specfile parser - in
  other programs (via .PATHing spec.c and misc.c):
	- move excludetags, includetags and keys from mtree.c to misc.c
	- implement mtree_err() using vwarnx() instead of assuming name is
	  "mtree"
	- move inotype() and nodetype() from compare.c to misc.c
	- add nodetoinode(), to convert from an mtree F_* type to a
	  mode_t S_IF* type
	- clean up #include use; don't assume "mtree.h" pulls in some
	  standard includes
	- change spec() to take a FILE * arg (where the specfile is read from)
2001-10-22 07:07:46 +00:00
jmc a831891141 Pull in mdsetimage to the tools builds. (XXX - using libbfd here would
probably be preferrable long term).
2001-10-21 23:10:46 +00:00
tv 29fb1f6827 Unravel the include spaghetti here:
- make a copy of cfparse.y called "y.tab.y" because "cfparse.h" is not
  actually the yacc generated header file (duh?)
- include the tcpdump directory with -I *after* racoon's source, else
  tcpdump's headers will be picked up unexpectedly
- include . *before* racoon's source so as to make the generated files
  first on the list
2001-10-19 23:59:56 +00:00
tv f526c532b2 "YFLAGS=-d" causes inconsistent parallelism behavior. Instead, use the
NetBSD standard YHEADER and #include "rc_parse.h".
2001-10-19 22:57:53 +00:00
lukem dafcb3846f improve enumeration of the different specfile entry types 2001-10-19 02:57:34 +00:00
augustss 5869e8a41c Fix another typo. 2001-10-18 12:35:44 +00:00
wiz 4f72f67a5e Whitespace nit. 2001-10-18 12:28:50 +00:00
augustss aa8b76c40d Fix typo. 2001-10-18 12:28:06 +00:00
augustss 856c597a58 Add -L flag to list devices recursively. 2001-10-18 12:27:15 +00:00
lukem f644bd620b complete WARNS=2 cleanup (with a bit of ickiness for the fts_open argv issue) 2001-10-18 05:06:01 +00:00
lukem 0b41840fcb need semicolon between goto label and closing brace 2001-10-18 04:45:41 +00:00
lukem 98df36b3a5 make this mostly WARNS=2 safe 2001-10-18 04:37:56 +00:00
lukem 7f56f49762 convert from strtok() to strsep() 2001-10-17 01:19:17 +00:00
agc c94b91a672 Update documentation to reflect reality - "userdel -p" replaces the login
shell with /sbin/nologin, rather than /usr/bin/false.
2001-10-16 08:17:07 +00:00
itojun c878544aa7 s/IPV6_BINDV6ONLY/IPV6_V6ONLY/ to follow changes made yesterday. 2001-10-16 01:51:26 +00:00
augustss 4adb2fae92 Add copyright notice. 2001-10-14 20:13:31 +00:00
wiz 4be44c080f No .Pp before .Sh. 2001-10-14 19:56:22 +00:00
augustss 2c843484d5 Fix typo. 2001-10-13 20:11:00 +00:00
augustss 9f01baeb47 Add a simple program for listing, adding, and removing wsmux devices.
It's not a much used utility, but when you need it it's a pain to
be without.
2001-10-13 20:05:42 +00:00
yamt 76e9d7eb12 fix lsrr. 2001-10-09 12:43:37 +00:00
enami a28fcd776c Make mtree a host tool and use it when appropriate. 2001-10-09 05:19:03 +00:00
lukem bc1697fc70 Add "device" keyword, which allows the device number to be specified,
to be later checked and possibly created. Uses parsing and encoding
routines from mknod(8).
2001-10-09 04:50:00 +00:00
mjl c903850da8 Replace 1 and 2 with STDOUT_FILENO and STDERR_FILENO.
ANSIfy and constify.
2001-10-09 02:15:37 +00:00
lukem 09805a42a3 - use "full path" instead of "absolute path"; perry thinks it's less confusing
- clarify the `all' keyword support in -k, -K and -R. should solve [misc/14186]
- use ".sp" instead of ".Pp"  (from FreeBSD).
2001-10-08 00:53:30 +00:00
bjh21 d5a914aad0 Use getnameinfo() to format link-layer addresses rather than doing it
ourselves.
2001-10-06 19:39:23 +00:00
bjh21 587779435b Use getnameinfo() to format link-layer addresses, rather than doing it
ourselves.
2001-10-06 19:09:44 +00:00
veego 0a9ac47f7c CLEANFILES has to come before the include of <bsd.prog.mk>. 2001-10-05 23:42:11 +00:00
lukem 8b951d1f0d * Implement support for absolute paths in the specfile. An absolute path
is one that contains a `/' character that is not the first character.
  All parent directories referenced in the path must exist.
* Add copyright for all the work I've done.
* Document the history of various features added since 4.3-Reno.
2001-10-05 15:32:57 +00:00
lukem d8c78c600b - support "all" as a valid keyword for -k, -K and -R.
- parsekey(): support "all" as a keyword which returns a value with all bits
  set that pertain to a valid keyword.
- dump_nodes():
	- only print out a keyword if it's requested AND it's set in the node
	- UNAME falls back to UID if the user name can't be determined
	- GNAME falls back to GID if the group name can't be determined
- rework man page:
	- use Sy instead of Cm
	- use Pq, Dq, Ql, etc instead of ``...''
2001-10-05 13:14:56 +00:00
lukem acd40f8dd4 dump_nodes() fixes:
- in F_GID, print the gid not the uid
- support F_GNAME
2001-10-05 12:44:47 +00:00
lukem 4da22cb499 cleanup tags support;
- create a typedef struct slist_t to hold stuff in (avoid stringlist(3)
  because it's less portable)
- move the tag manipulate stuff into misc.c
- add matchtags(), which returns 0 if the node is explicitly excluded,
  or not included if an include list is given; or 1 otherwise
- in -D, change tags support from files-only to all-non-directories

(xxx; still considering implementing tags support for -c and !-D)
2001-10-05 01:03:24 +00:00
agc c7f73c3331 "it's" is short for "it is".
The possessive pronoun is "its".
2001-10-04 19:44:48 +00:00
wiz 2cf8bd020e Whitespace fixes, sort sections. 2001-10-04 11:24:05 +00:00