Commit Graph

4768 Commits

Author SHA1 Message Date
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
yamt d75115bcb0 fix typo that prevents to select best version of package. 2001-10-04 05:32:50 +00:00
lukem 3f1c463ef7 - skip F_OPT entries (recently added diagnostic detected this)
- put F_TAG parsing in the correct alphabetical position
2001-10-04 05:03:42 +00:00
lukem 7c30045cef features:
- add a new keyword - "tags" - which is a comma separated list of tags
  associated with that file.
- add "-E tags"; exclude files in -D output with matching tags
- add "-I tags"; only include files in -D output with matching tags
  (default is to list all)

fixes:
- move all extern variable references from individual files into extern.h
- `quote' some more user-specified strings in error messages
- man page: list an options arguments in the description, and sort xrefs.
2001-10-04 04:51:27 +00:00
lukem a251d86b79 add F_TYPE to KEYDEFAULT.
whilst -c always prints the type (even if removed with -R),
-D wasn't printing it in the default config
2001-10-03 14:33:49 +00:00
tv 47ab6193ba Make this a little more portable to other NetBSD versions without
MAKE_BOOTSTRAP -- use our hand-rolled [gs]etprogname() at all times (er,
actually, the single time we need it...).
2001-10-02 21:31:01 +00:00
cgd 0fcb9b7701 Remove the advertising clause from my license notice FOR THIS PROGRAM ONLY.
The purpose of that modification is to make the license on these files
"GPL-compatible," so that mdsetimage may be combined with BFD.  (The
resulting license is word-for-word identicial to one of the licenses
described as being GPL compatible on
http://www.gnu.org/licenses/license-list.html.)
2001-10-01 23:32:34 +00:00
simonb c6d44b5eb4 ANSIfy the output of config(8). 2001-10-01 04:22:00 +00:00
lukem 0c2c66fb9a - implement -D - dump the specfile out in a manner that's parseable
by various tools
- implement -R key  - remove the given key(s) from the list of keys to print
  (now it's possible with "-k type -R type" to remove all keys :)
- rename ftype() to nodetype(), and make it public
- use pwcache(3) functions instead of get{gr,pw}{nam,uid}(3)
- add dump_nodes(), which provides the guts for -D.
2001-10-01 02:30:40 +00:00
jdolecek 4bf4fb5731 Fix obvious mistake in way the disk tailq is walked.
Fixes bin/14086 by Ben Harris.
2001-09-29 17:04:10 +00:00
hubertf 384aae98cc use full pathname of tar consistentlc
Patch provided in PR 14072 by Stoned Elipot <seb@script.jussieu.fr>
2001-09-26 13:48:27 +00:00
lukem 6b4ee83154 <sys/stat.h> is unnecessary 2001-09-26 07:05:39 +00:00
agc ead534127e Print out the name of the detached signature file which is being used to
verify the binary package. Idea from Hubert Feyrer.
2001-09-25 11:42:56 +00:00
agc 03663b89ae Add a "-s verification-type" argument to pkg_add, which adds a callout
to a verification program for a binary package. The following callouts
are defined: "none", "gpg" and "pgp5".

This feature allows you to verify a binary package against a detached
signature file, and to proceed with the installation or not, depending
upon the level of trust you place in the signatory of the binary
package.

Digital signatures will be checked in a recursive manner (i.e. if
pkg_add is called with a verification type which is not "none", the
verification type will be passed to subsequent invocations of pkg_add
for the dependent packages).

At the current time, digital signatures cannot be used with the URL
form of pkg_add(1) - the detached signature file must be in the same
directory as the binary package, either locally or mounted by NFS.

If no -s argument is given, pkg_add(1) retains its current behaviour -
the package will not be verified before installation takes place.
2001-09-25 10:28:16 +00:00
tv 6042281606 Don't override the definition of LEX. 2001-09-25 01:40:09 +00:00
wiz 4c99916337 va_{start,end} audit:
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).

Improved by comments from enami and christos -- thanks!

Heimdal/krb4/KAME changes already fed back, rest to follow.

Inspired by, but not not based on, OpenBSD.
2001-09-24 13:22:25 +00:00
perry 9864f0aae8 Add a -l flag which does "loose" permissions checks, i.e. a mode 444
matches a check for mode 644 (though obviously not the reverse). This
can be used by the nightly security run, making the output1 more useful
by having it contain fewer spurious permissions violations.

Note that I did not make -l work if you have a sgid/suid/sticky bit
set. I don't know how you could cause security trouble with more
stringent settings and a suid file, but I don't want to find out the
hard way.
2001-09-22 03:56:29 +00:00
thorpej f189453cbc Pull in fbio.h from <dev/sun/fbio.h> 2001-09-19 16:16:03 +00:00
itojun 9a881fc0f7 typo in IPv6 support. listen to wildcard address correctly. 2001-09-18 04:36:28 +00:00
assar 2a2aa85a8d update infrastructure for krb4 1.1 and heimdal 0.4e 2001-09-17 12:34:40 +00:00
joda f51bc9e68b use strtol instead of atoi to catch non numeric values 2001-09-17 10:05:57 +00:00
hubertf 5653bfc431 if creategid() fails, don't try to print system error message (use errx()
instead of err()), as all error cases in creategid() are already commented
properly from inside creategid().

This prevents funny errors like:

	miyu# groupadd test2
	miyu# groupadd test2
	groupadd: group `test2' already exists
	groupadd: can't add group: problems with /etc/group file: Inappropriate ioctl for device
2001-09-16 18:08:37 +00:00
wiz 456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
manu 171c550e3a Removed the HAVE_CLOCKCTL for now (it should not be enabled until all
ports use clockctl. Silly me!)
2001-09-16 09:12:50 +00:00
manu 98b40d754d Enable use of the clockctl device for ntpd (this feature has not yet been
commited to the ntp CVS)
2001-09-16 07:53:12 +00:00
thorpej 8b531ac998 By poppular demand, don't wildcard "bus" on the "list" command
by default.
2001-09-15 18:35:00 +00:00
enami a88b4adee6 Zero clear the apm_power_info structure being passed to ioctl. 2001-09-15 02:42:26 +00:00
thorpej 477798fcac Fix missing : in a getopt() string. 2001-09-14 17:28:36 +00:00
thorpej 9ed4e90471 Build pcictl. 2001-09-13 23:51:39 +00:00
thorpej 0c91ac689b pcictl(8) -- a program for frobbing the PCI bus, and also an example
of how to use libpci.

Currently has "list" (list devices within a PCI domain) and "dump" (dump
PCI configuration header for a device) sub-commands.
2001-09-13 23:51:04 +00:00
itojun de3a065dcc CPPFLAGS, not CFLAGS, for -D. 2001-09-13 13:02:20 +00:00
enami 69af775e86 - Bail out when failed to ioctl.
- Clear args to APM_IOC_GETPOWER.
2001-09-13 11:05:58 +00:00
enami 453bf8d640 KNF and other misc. stylistic changes. 2001-09-13 11:01:49 +00:00
thorpej dd5462b93f Update for TCP timer changes. 2001-09-11 15:45:01 +00:00
thorpej 85f032ca45 Fix printf format. 2001-09-11 15:10:45 +00:00
enami 54d0f0cc4b Fix off-by-one error; root on sd0i shoule be rejected if maxpartition is 8. 2001-09-11 05:11:59 +00:00
itojun 55e8bc4e8b make sup/supfilesrv IPv6 ready. supfilesrv listens to single socket,
therefore, you will need two instances running for dual stack support
(one with -4 and one with -6).
2001-09-11 03:33:52 +00:00
itojun c976c20dc0 correct 1st arg to select(). 2001-09-11 03:32:55 +00:00
simonb 2db48f4c88 Add "Remember to update distrib/sets..." lines (and NetBSD RCS IDs in
some cases).
2001-09-10 11:18:41 +00:00
lukem 617a65b6f7 replace home-grown parser with fparseln() 2001-09-10 03:22:24 +00:00
lukem 5c2ee5861d Incorporate the enhanced ffs_dirpref() by Grigoriy Orlov, as found in
FreeBSD (three commits; the initial work, man page updates, and a fix
to ffs_reload()), with the following differences:
- Be consistent between newfs(8) and tunefs(8) as to the options which
  set and control the tuning parameters for this work (avgfilesize & avgfpdir)
- Use u_int16_t instead of u_int8_t to keep track of the number of
  contiguous directories (suggested by Chuck Silvers)
- Work within our FFS_EI framework
- Ensure that fs->fs_maxclusters and fs->fs_contigdirs don't point to
  the same area of memory

The new algorithm has a marked performance increase, especially when
performing tasks such as untarring pkgsrc.tar.gz, etc.

The original FreeBSD commit messages are attached:

=====
mckusick    2001/04/10 01:39:00 PDT
  Directory layout preference improvements from Grigoriy Orlov <gluk@ptci.ru>.
  His description of the problem and solution follow. My own tests show
  speedups on typical filesystem intensive workloads of 5% to 12% which
  is very impressive considering the small amount of code change involved.

  ------

    One day I noticed that some file operations run much faster on
  small file systems then on big ones. I've looked at the ffs
  algorithms, thought about them, and redesigned the dirpref algorithm.

    First I want to describe the results of my tests. These results are old
  and I have improved the algorithm after these tests were done. Nevertheless
  they show how big the perfomance speedup may be. I have done two file/directory
  intensive tests on a two OpenBSD systems with old and new dirpref algorithm.
  The first test is "tar -xzf ports.tar.gz", the second is "rm -rf ports".
  The ports.tar.gz file is the ports collection from the OpenBSD 2.8 release.
  It contains 6596 directories and 13868 files. The test systems are:

  1. Celeron-450, 128Mb, two IDE drives, the system at wd0, file system for
     test is at wd1. Size of test file system is 8 Gb, number of cg=991,
     size of cg is 8m, block size = 8k, fragment size = 1k OpenBSD-current
     from Dec 2000 with BUFCACHEPERCENT=35

  2. PIII-600, 128Mb, two IBM DTLA-307045 IDE drives at i815e, the system
     at wd0, file system for test is at wd1. Size of test file system is 40 Gb,
     number of cg=5324, size of cg is 8m, block size = 8k, fragment size = 1k
     OpenBSD-current from Dec 2000 with BUFCACHEPERCENT=50

  You can get more info about the test systems and methods at:
  http://www.ptci.ru/gluk/dirpref/old/dirpref.html

                                Test Results

               tar -xzf ports.tar.gz               rm -rf ports
    mode  old dirpref new dirpref speedup old dirprefnew dirpref speedup
                               First system
   normal     667         472      1.41       477        331       1.44
   async      285         144      1.98       130         14       9.29
   sync       768         616      1.25       477        334       1.43
   softdep    413         252      1.64       241         38       6.34
                               Second system
   normal     329         81       4.06       263.5       93.5     2.81
   async      302         25.7    11.75       112          2.26   49.56
   sync       281         57.0     4.93       263         90.5     2.9
   softdep    341         40.6     8.4        284          4.76   59.66

  "old dirpref" and "new dirpref" columns give a test time in seconds.
  speedup - speed increasement in times, ie. old dirpref / new dirpref.

  ------

  Algorithm description

  The old dirpref algorithm is described in comments:

  /*
   * Find a cylinder to place a directory.
   *
   * The policy implemented by this algorithm is to select from
   * among those cylinder groups with above the average number of
   * free inodes, the one with the smallest number of directories.
   */

  A new directory is allocated in a different cylinder groups than its
  parent directory resulting in a directory tree that is spreaded across
  all the cylinder groups. This spreading out results in a non-optimal
  access to the directories and files. When we have a small filesystem
  it is not a problem but when the filesystem is big then perfomance
  degradation becomes very apparent.

  What I mean by a big file system ?

    1. A big filesystem is a filesystem which occupy 20-30 or more percent
       of total drive space, i.e. first and last cylinder are physically
       located relatively far from each other.
    2. It has a relatively large number of cylinder groups, for example
       more cylinder groups than 50% of the buffers in the buffer cache.

  The first results in long access times, while the second results in
  many buffers being used by metadata operations. Such operations use
  cylinder group blocks and on-disk inode blocks. The cylinder group
  block (fs->fs_cblkno) contains struct cg, inode and block bit maps.
  It is 2k in size for the default filesystem parameters. If new and
  parent directories are located in different cylinder groups then the
  system performs more input/output operations and uses more buffers.
  On filesystems with many cylinder groups, lots of cache buffers are
  used for metadata operations.

  My solution for this problem is very simple. I allocate many directories
  in one cylinder group. I also do some things, so that the new allocation
  method does not cause excessive fragmentation and all directory inodes
  will not be located at a location far from its file's inodes and data.
  The algorithm is:
  /*
   * Find a cylinder group to place a directory.
   *
   * The policy implemented by this algorithm is to allocate a
   * directory inode in the same cylinder group as its parent
   * directory, but also to reserve space for its files inodes
   * and data. Restrict the number of directories which may be
   * allocated one after another in the same cylinder group
   * without intervening allocation of files.
   *
   * If we allocate a first level directory then force allocation
   * in another cylinder group.
   */

    My early versions of dirpref give me a good results for a wide range of
  file operations and different filesystem capacities except one case:
  those applications that create their entire directory structure first
  and only later fill this structure with files.

    My solution for such and similar cases is to limit a number of
  directories which may be created one after another in the same cylinder
  group without intervening file creations. For this purpose, I allocate
  an array of counters at mount time. This array is linked to the superblock
  fs->fs_contigdirs[cg]. Each time a directory is created the counter
  increases and each time a file is created the counter decreases. A 60Gb
  filesystem with 8mb/cg requires 10kb of memory for the counters array.

    The maxcontigdirs is a maximum number of directories which may be created
  without an intervening file creation. I found in my tests that the best
  performance occurs when I restrict the number of directories in one cylinder
  group such that all its files may be located in the same cylinder group.
  There may be some deterioration in performance if all the file inodes
  are in the same cylinder group as its containing directory, but their
  data partially resides in a different cylinder group. The maxcontigdirs
  value is calculated to try to prevent this condition. Since there is
  no way to know how many files and directories will be allocated later
  I added two optimization parameters in superblock/tunefs. They are:

          int32_t  fs_avgfilesize;   /* expected average file size */
          int32_t  fs_avgfpdir;      /* expected # of files per directory */

  These parameters have reasonable defaults but may be tweeked for special
  uses of a filesystem. They are only necessary in rare cases like better
  tuning a filesystem being used to store a squid cache.

  I have been using this algorithm for about 3 months. I have done
  a lot of testing on filesystems with different capacities, average
  filesize, average number of files per directory, and so on. I think
  this algorithm has no negative impact on filesystem perfomance. It
  works better than the default one in all cases. The new dirpref
  will greatly improve untarring/removing/coping of big directories,
  decrease load on cvs servers and much more. The new dirpref doesn't
  speedup a compilation process, but also doesn't slow it down.

  Obtained from:	Grigoriy Orlov <gluk@ptci.ru>
=====

=====
iedowse     2001/04/23 17:37:17 PDT
  Pre-dirpref versions of fsck may zero out the new superblock fields
  fs_contigdirs, fs_avgfilesize and fs_avgfpdir. This could cause
  panics if these fields were zeroed while a filesystem was mounted
  read-only, and then remounted read-write.

  Add code to ffs_reload() which copies the fs_contigdirs pointer
  from the previous superblock, and reinitialises fs_avgf* if necessary.

  Reviewed by:	mckusick
=====

=====
nik         2001/04/10 03:36:44 PDT
  Add information about the new options to newfs and tunefs which set the
  expected average file size and number of files per directory.  Could do
  with some fleshing out.
=====
2001-09-06 02:16:00 +00:00
christos 9a9926ee57 PR/13874: Hubert Feyrer: Add -L class to useradd 2001-09-05 21:37:32 +00:00
itojun bc0d6cdd22 sync with the latest kame.
- select() with the right maxfd.
- don't write() with len <= 0.
- no wacky macro ERRSTR.
2001-09-05 01:22:24 +00:00
itojun a12c72c978 sync with the latest KAME tree.
- don't use FD_SETSIZE on select
- "sin" conflicts with math library, so use sin6
- other minor updates
2001-09-05 01:17:31 +00:00
drochner e569277f0d -fix uninitialized "verbose" flag
-add iso2, iso7 encodings
2001-09-04 17:59:04 +00:00
wiz c1434a021e Don't mention /usr/local/lib/isdn, since it's not used (anymore?). 2001-09-03 01:22:54 +00:00
lukem e3ba61f9f3 Incorporate fix by iedowse @ FreeBSD to allow disks with large numbers of
cylinder groups to work correctly, with minor modifications by me to work
with our FFS_EI code.  From the FreeBSD commit message:

	The ffs superblock includes a 128-byte region for use by temporary
	in-core pointers to summary information. An array in this region
	(fs_csp) could overflow on filesystems with a very large number of
	cylinder groups (~16000 on i386 with 8k blocks). When this happens,
	other fields in the superblock get corrupted, and fsck refuses to
	check the filesystem.

	Solve this problem by replacing the fs_csp array in 'struct fs'
	with a single pointer, and add padding to keep the length of the
	128-byte region fixed. Update the kernel and userland utilities
	to use just this single pointer.

	With this change, the kernel no longer makes use of the superblock
	fields 'fs_csshift' and 'fs_csmask'. Add a comment to newfs/mkfs.c
	to indicate that these fields must be calculated for compatibility
	with older kernels.

	Reviewed by:    mckusick
2001-09-02 01:58:30 +00:00
reinoud ec98fbc0db Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
2001-09-02 00:13:05 +00:00
itojun ee42f09d5b upgrade to KAME 2001/8/31. 2001-08-31 10:36:08 +00:00
lukem c56418af73 some improvements from freebsd/openbsd
- replace the unused fs_headswitch and fs_trkseek with fs_id[2], bringing
  our struct fs closer to that in freebsd & openbsd (& solaris FWIW)
- dumpfs: improve warning message when cpc == 0
2001-08-30 14:37:25 +00:00
itojun 7cdedd5c84 use strlcpy. from openbsd 2001-08-30 00:53:53 +00:00
itojun c9e786ce9e security fix from openbsd:
Fix buffer oflow reading from queue file.  While we are at it, crank
the size of buffers that can hold filenames to MAXPATHLEN.
2001-08-30 00:51:50 +00:00
wiz 251b3464be heirarchy -> hierarchy 2001-08-24 10:24:45 +00:00
hubertf c5967dbc76 Fix typo: heirarchies 2001-08-24 00:48:48 +00:00
itojun d5e1f166e0 sync with latest kame tree. snprintf() return value audit, log() cleanup,
and such.
2001-08-22 08:52:35 +00:00
itojun 029bd4843d sync with kame better. snprintf return value audit. 2001-08-22 05:24:37 +00:00
yamt 7bc6654ad8 disable unnecessary warning when PKG_PATH isn't set. 2001-08-21 18:38:40 +00:00
wiz 1e378c4c12 precede, not preceed. 2001-08-20 12:00:46 +00:00
hubertf 194031e9be Don't do FTP stuff when operating on all pkgs
Adresses PR 13397 by Greg A. Woods <woods@weird.com>
2001-08-19 23:33:35 +00:00
ad e04fd20395 Clean up previous. 2001-08-19 09:01:47 +00:00
ad 1e8e78ed07 Update for pw_mkdb() change: restrict updates to one user's records and/or
the secure database where appropriate.
2001-08-18 19:35:32 +00:00
ad e13d145336 Speed things up a bit. Parts dredged from OpenBSD/FreeBSD.
- Add -u option, to update one user's records only.
- Add -s option, to update the secure database only.
- Give us roughly 1MB of cache per 50kB of password file, but keep within
  a 2MB minimum and 8MB maximum.
- Tidy a little.
2001-08-18 19:29:31 +00:00
ad e3af9d1d6b getopt() returns -1 on error, not EOF. 2001-08-18 17:10:04 +00:00
joda 3a2248a4e7 (usermod): ~F_MKDIR is usually much better than !F_MKDIR in bit masks 2001-08-17 08:29:00 +00:00
lukem 1b81d6353d remove third argument (`int ns') from ffs_sb_swap(), and let ffs_sb_swap()
determine the endianness of the `struct fs *o' superblock from o->fs_magic
and set needswap as necessary, rather than trusting the caller to get
it right.  invariably, almost every caller of ffs_sb_swap() was calling it
with ns set to the wrong value for ns anyway!
ansi KNF ffs_bswap.c declarations whilst here.

this fixes all sorts of problems when trying to use other-endian file systems,
notably the kernel trying to access memory *way* off, possibly corrupting or
panicing, and userland programs SEGVing and/or corrupting things (e.g,
"fsck_ffs -B"  to swap a file system endianness).

whilst the previous rev of ffs_bswap.c (1.10, 2000/12/23) made this problem
worse, i suspect that the problem was always there and previous versions
just happened not to trash things at the wrong time.

FFS_EI should now be a lot more stable.
2001-08-17 02:18:46 +00:00
tv c98eaba8e8 dhcpd no longer needs the OS_VERSION define. 2001-08-16 18:29:20 +00:00
tv 22207c0806 Add NetBSD rcsids. 2001-08-16 18:03:03 +00:00
itojun 62856425b4 $NetBSD$ 2001-08-16 07:48:08 +00:00
itojun 8b8734d26b string length audit (use strlcpy). sync with latest kame ALTQ. 2001-08-16 07:45:35 +00:00
lukem 69124d8ff2 call ffs_sb_swap() with ns=1, otherwise dumpfs core dumps on other endian fses 2001-08-15 05:52:28 +00:00
tv dba5d44670 Add hooks to allow toolchain bits to be reachover-built at the top level. 2001-08-14 10:18:26 +00:00
lukem e4ec9e7a11 - ansi KNF
- add -F flag to specify "argument is an fs image" (effectively a no-op,
  but here for consistency with other tools).
2001-08-14 01:02:02 +00:00
agc d069ffa789 Add a -n switch to show the packages "needed" by a package (i.e. the
packages which are depended upon).

Provided in PR 13071 by woods@planix.com (Greg A. Woods), the addition
to the synopsis by myself, pedant-in-chief.
2001-08-13 20:08:58 +00:00
yamt cb1ee3b752 make consistent escape sequence handling
between commandline and command input.

pointed by Christoph Badura <bad@netbsd.org>
2001-08-13 06:54:58 +00:00
uwe 242ff27a4b s/width/height/ in the description of -h option. 2001-08-12 23:51:15 +00:00
mjl 98e1bdc90d Add -W parameter to lpd to disable check for a reserved port,
this is needed to get Win2k print to a NetBSD box. Heavily
inspired by FreeBSD.
2001-08-11 01:04:57 +00:00
drochner 32af7c842a define HMAC_MD5
should fix PR security/13043 by Frank Kardel
2001-08-07 14:51:27 +00:00
christos 4e7d8e10f6 - Filter out the YP_ keys from mail.aliases. How did this ever work?
- Don't be verbose when creating the amd maps.
2001-08-06 18:28:19 +00:00
itojun 92b62a25f8 avoid inet_addr. use snprintf. recent changes from openbsd-current via kame 2001-08-06 07:00:59 +00:00
hubertf 86a406c1ce * Allow generating more than one amd map, by storing the maps to create
in a variable that can be added other maps than amd.home. Patch submitted
   in PR 11826 by Anthony Mallet <anthony.mallet@ficus.yi.org>
 * Slightly optimize calculation of DOMAIN
2001-08-05 12:40:15 +00:00
ad cc274c12b6 Better argument checking. 2001-08-04 16:55:46 +00:00
drochner 96914bd8e8 our dhclient-script diverged too much from the distributed one,
keep it separate
2001-08-03 14:30:19 +00:00
drochner ecd0a03ec8 switch to reachover build from src/dist/dhcp 2001-08-03 14:13:55 +00:00
itojun bb65ba4b13 fgetln() does not \0-terminate the result. 2001-08-03 09:18:58 +00:00
yamt 69ecbbeb80 Fix a bug that prevented %'s and \'s from being passed to the program
invoked.
from FreeBSD.
2001-08-03 04:10:51 +00:00
itojun 4acce1d060 include version number into binary to help diagnosis 2001-08-02 15:27:21 +00:00
itojun 366bd307b0 sync with 2001/8/2 KAME racoon/libipsec. 2001-08-02 12:15:00 +00:00
itojun de2695eefc copyright clarification. via openbsd 2001-08-02 03:41:42 +00:00
itojun 2b18b04c59 updated copyright notice from Xerox. via openbsd 2001-08-01 16:45:28 +00:00
garbled c63c221b86 Fix a bug in the multilist noted by Brett Lymn. When nothing was selected
from the popup, don't populate the field with a NULL buffer.

Edit the TODO list, removing a few fixed items from my bughunt tonight.
2001-08-01 09:08:55 +00:00
garbled 3815ce799a Add a -l argument to ypinit that allows adding servers in the format
server1,server2,server3 on the command line.  This allows the user to
optionally avoid the interactive mode of ypinit.  If the -l flag is not
supplied, the old behavior is retained.

This allows users to do things like rsh out creation of YP clients, and
sushi to generate yp clients/servers/slaves.
2001-08-01 07:01:03 +00:00
garbled 249cbcd0e5 add two more bugs 2001-08-01 01:02:55 +00:00
garbled 1092eb0c9d Add some known bugs for sushi.. lest I forget them. 2001-08-01 00:53:58 +00:00
chs 2df1fdaa53 remove spurious newline in an error message. 2001-07-29 21:24:57 +00:00
lukem 1c37a982fa enable WARNS=2 2001-07-29 09:59:12 +00:00
hubertf b352d63150 Document -f option in synopsis 2001-07-27 22:35:51 +00:00
wiz d2c504636c aquire -> acquire 2001-07-26 22:50:57 +00:00
lukem bdf152b906 fix time display bug introduced in previous commit [hi christos! ;]
because it was using an unitialised variable.  change:
	ctime(&t); foo.bar = t
into
	t = foo.bar; ctime(&t)
2001-07-26 05:49:00 +00:00
wiz 64662a0528 Fix `pkg_add -u' for packages without dependencies.
Patch by Hubert Feyrer.
Addresses pkg/13536.
2001-07-24 14:45:16 +00:00
itojun 2dde33d97b sync with latest kame code. ndp -i won't print info for yet-to-be-initialized
interface.
2001-07-23 14:47:43 +00:00
itojun 71aa31a75a support multiple batteries (currently only # of batteris is visible -
need to tweak ioctl API more).  PR 10545.
2001-07-22 16:05:17 +00:00
wiz a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
itojun 338143f0e5 follow kame p2p interface management rule. use /128 when we specify
both src and dst addr on p2p interface.  sync with kame
2001-07-21 02:28:06 +00:00
taca 6e662bb75d Put pidfile after daemonize. This would fix newsyslog(8) error. 2001-07-19 00:15:32 +00:00
lukem c0e6fdedfc - add parsetype() (a la parsekey()) to parse the "type=xxx" arg. this improves
the error detection for invalid types, as well as shrinking binary size
- implement inotype() using ftype(), rather than duplicating the switch
- change "char *" arguments to "const char *"
2001-07-18 04:51:54 +00:00
wiz e46d80027f Close some memory leaks.
Reported (incl. patch) by YAMAMOTO Takashi in pkg/12830.
2001-07-16 13:50:41 +00:00
manu 764096179a - No more lost error messages during syslogd startup, they now all appear on
stdout before syslogd becomes a daemon.
- Flags for setuid/setgid/chroot syslogd after initialization is completed
- Warning instead of silent ignoring for malformed lines (with spaces instead
of tags)
Approved by Christos
2001-07-16 05:04:47 +00:00
manu ba6302b854 Removed two debug messages commited by mistake. Sorry about this. 2001-07-15 17:27:32 +00:00
hubertf 861dbe4370 Interface change for strip_txz(): now stores suffix 2001-07-15 00:34:14 +00:00
hubertf f990f4a5a2 * Bugfix: if PLIST_SRC directly follows PLIST_CWD, ignore
the PLIST_CWD in creating the tar pipe.

   This takes care of pkg_create -p PREFIX -L FAKE
   where PREFIX does not exist at pkg creation time.

   From OpenBSD's rev. 1.9->1.10

 * Register PLIST_SRC before dependencies and conflicts so that the
   PLIST_CWD != PLIST_SRC hack works with dependencies present.

   From OpenBSD's rev. 1.10->1.11

 * improve error message to tell full path of exec() that failed
2001-07-15 00:23:14 +00:00
manu 6248c5cc45 strtol -> strtoul because we use an unsigned type (uid_t/gid_t)
isdigit with an unsigned char cast
2001-07-14 21:56:45 +00:00
manu 3ac4f70df5 errno is not tested any more if dbopen succeeds (to quote errno(2), "It
should only be examined after an error")
Added an additionnal chdir so that -o works with a file in the current
directory.
2001-07-14 14:50:44 +00:00
perseant 4e3fced95b Merge the short-lived perseant-lfsv2 branch into the trunk.
Kernels and tools understand both v1 and v2 filesystems; newfs_lfs
generates v2 by default.  Changes for the v2 layout include:

- Segments of non-PO2 size and arbitrary block offset, so these can be
  matched to convenient physical characteristics of the partition (e.g.,
  stripe or track size and offset).

- Address by fragment instead of by disk sector, paving the way for
  non-512-byte-sector devices.  In theory fragments can be as large
  as you like, though in reality they must be smaller than MAXBSIZE in size.

- Use serial number and filesystem identifier to ensure that roll-forward
  doesn't get old data and think it's new.  Roll-forward is enabled for
  v2 filesystems, though not for v1 filesystems by default.

- The inode free list is now a tailq, paving the way for undelete (undelete
  is not yet implemented, but can be without further non-backwards-compatible
  changes to disk structures).

- Inode atime information is kept in the Ifile, instead of on the inode;
  that is, the inode is never written *just* because atime was changed.
  Because of this the inodes remain near the file data on the disk, rather
  than wandering all over as the disk is read repeatedly.  This speeds up
  repeated reads by a small but noticeable amount.

Other changes of note include:

- The ifile written by newfs_lfs can now be of arbitrary length, it is no
  longer restricted to a single indirect block.

- Fixed an old bug where ctime was changed every time a vnode was created.
  I need to look more closely to make sure that the times are only updated
  during write(2) and friends, not after-the-fact during a segment write,
  and certainly not by the cleaner.
2001-07-13 20:30:18 +00:00
manu 2e20a48c80 Moved the errno=0 in the loop for opening the temp file. The problem was that
successful syscalls never set errno, and hence we could have had an inifinite
loop if the opening failed once and succeded on second attempt.
2001-07-13 15:54:22 +00:00
manu 7e7825ce44 FIxed a problem with string length (a leading / was appearing in w, who and others)
We were using rename() to create the target file from the temp file. Now the temp file is created in the same directory of the targer file so that rename() will always work (it needs to have the files in the same filesystem)
Using the -o file, the output file may be on a world writable directory, we hence open the temporary file using O_EXCL, and we loop trying different names until it works.
2001-07-12 20:46:39 +00:00
ad e1036d7e68 Couple of nits. 2001-07-09 17:46:39 +00:00
ad 773c9cf920 errx() prints the newline for you. 2001-07-09 17:30:37 +00:00
itojun 48375d983c copy necessary variables from sys/netinet/tcp_debug.c.
not sure if it is the right way to deal with this.
2001-07-09 07:54:59 +00:00
itojun 052c0d9a64 sync with kame.
KAME rtsold.c 1.28
watch routing socket, and check for pcmcia card removal.
if pcmcia card gets removed, bring the interface state into IFS_DOWN.

KAME rtsold.c 1.29
changed the timeout period after sending MAX_RTR_SOLICITATIONS solicitation
from RTR_SOLICITATION_INTERVAL to MAX_RTR_SOLICITATION_DELAY according to
the last paragraph of RFC 2461 Section 6.3.7.
in response to a comment from Pekka Savola <pekkas@netcore.fi>
2001-07-09 06:04:28 +00:00
manu 896577bca5 We use rename() to produce the dev.db file, and rename() is not able to move
files across filesystems. Hence we use /var/run for dev.tmp, since dev.db
will be in /var/run.
2001-07-08 20:01:43 +00:00
wiz dd75462fd1 Uppercase cpu. 2001-07-08 18:19:16 +00:00
simonb 79f5a137af Xref getbsize(3). 2001-07-08 15:34:13 +00:00
abs 46bc122c3c Do not try to reference dbm(3) 2001-07-06 18:07:15 +00:00
manu b971cc2b24 - Moved the temp file to /tmp instead of /var/tmp
- Added a O_EXCL flag so that we cannot open an existing file for temp file
2001-07-05 20:35:33 +00:00
manu 12cb15934b Added a missing .El 2001-07-05 20:33:56 +00:00
manu b70b2499b0 Added flags to choose the location of the input device directory and the
output device database. Goal is to be consistent with other *_mkdb
utilities such as pwd_mkdb or kvm_mkdb.
2001-07-04 20:42:02 +00:00
christos 26dfd4a9a0 Fix bogus awk + sed combination to handle continuations and empty lines.
It broke a sequence of:

	key1 \
		value1 \
		value2 \
		value3 \


	key2 \
		value4 \


	etc.

Handle both the netgroup rule and the amd.home rule using a .USEBEFORE
macro rule, since they contain the same code.
XXX: Needs new make(1)
2001-07-03 18:15:06 +00:00
itojun a42562635c sync .Fl with reality 2001-07-03 08:52:00 +00:00
itojun 338aa1c650 -DLIBWRAP will enable libwrap-based filtering on UDP socket messages.
PR 13348
2001-07-01 16:23:42 +00:00
gmcgarry 32fc55d6d2 Don't pack locators. Introduce a new commandline option to
restore the previous behaviour of packing locators.

Results in a 2.5KB increase in size for the current i386 GENERIC
kernel.  My custom kernel resulted in a 12-byte increase.
2001-07-01 02:46:47 +00:00