Commit Graph

8660 Commits

Author SHA1 Message Date
reed 9695cc3899 Add -false switch. From man page:
-false  This primary always evaluates to false.  This can be used follow-
        ing a primary that caused the expression to be true to make the
	expression to be false.  This can be useful after using a -fprint
	primary so it can continue to the next expression (using an -or
	operator, for example).

This was brought up on the tech-userlevel list in October.

Using -fprint on findutils or new NetBSD find(1) does not do what
I wanted. For example, if saving results of all files that start
with a vowel or saving results of all files owned by group operator,
then the list of files owned by group operator would not include
the files starting with a vowel.

findutils's find has a workaround for this with -false and also a
"," comma opeator. (I made add this comma operator later; you can use
the comma to perform multiple independent tests.)
2005-11-09 00:47:16 +00:00
wiz 5cc6a637b8 Prefer mdoc markup to roff. 2005-11-08 18:54:15 +00:00
wiz 07006c8815 Remove trailing whitespace. 2005-11-08 17:59:45 +00:00
erh 570d41f826 The swap*.o files actually do need to be specified on the individual kernel
build lines instead of in ${OBJS}.  Partially revert previous change.
2005-11-07 18:45:34 +00:00
erh cd42936263 Remove special hack for swapnetbsd.c when generating the makefile.
Instead, just add it to the list of files.
Make "prefix foo" lines actually work right when foo is an absolute path,
 and make sure the length calculations correspond to the output.
Provide a way to specify a file that will always be included, and a way
 to omit the prologue ("$S/") on that file.
2005-11-07 03:26:20 +00:00
snj 5a7eec5112 Add NetBSD 2.1. 2005-11-06 20:14:36 +00:00
christos 4f38beeb43 Update documentation for pam, and don't accept flags that we don't support
anymore.
2005-11-01 15:47:43 +00:00
simonb 7dbaeb74a5 Sprinkle some KNF. 2005-10-27 01:43:48 +00:00
nonaka 0827467dac Don't forget original allocated memory address. 2005-10-22 15:32:48 +00:00
ross 2ea481dec5 Edit -s text. 2005-10-19 18:19:41 +00:00
elad 47ebf29d74 Revert, as requested by cube@. 2005-10-19 12:25:51 +00:00
elad 7f482dd3ce Strip trailing slashes before using the path.
PR/31869.
2005-10-19 12:17:22 +00:00
christos 64639a3896 Print symbolic signal names for killpg *sigaction* and *sigvec*. 2005-10-18 01:49:18 +00:00
aymeric 3b6dda9b52 the last revision introduced a bug in the handling of escape characters while
trying to correct a corner case. I will work on a final solution later.
Thanks to David Brownlee for noticing and notifying me.
2005-10-16 15:58:59 +00:00
wiz 34cace8bd1 Bump date for previous. 2005-10-12 20:10:45 +00:00
reed 4129c05469 This adds -fprint function. The primary name "-fprint" (but not the
code) comes from findutils; it behaves the same.

From my manpage addition:

 -fprint filename
	This primary always evaluates to true.  This creates filename or
	overwrites the file if it already exists.  The file is created at
	startup.  It writes the pathname of the current file to this
	file, followed by a newline character.  The file will be empty if
	no files are matched.

Here is an example usage:

find /etc \( -name "*pass*" -fprint file1 \) -o \( -group operator -fprint file2 \) -o -name "w*"

Note that this example will NOT include entry in file2 if it is
matched in first expression. (This also is same behaviour as
findutils, and I have implemented a -false primary to handle that.
I will commit it later.)

This creates the file as command line argument parsing time.
If there is an error somewhere on that line, such as missing values
or mismatched parenthesis, then a file may still be created.
(Even if a later -fprint filename is unwritable.) This is similar
behaviour to findutils. (It has been suggested that this find could
be code to create the files in an extra stage after the command-line
argument parsing and before the actual function processing.)

I will add -fprintx and -fprint0 soon.

This was discussed on tech-userlevel.
2005-10-12 20:03:59 +00:00
cube 437f8925a6 Introduce versioning to config(1). This will allow us to provide a way to
error out in a bit more friendly way when the user is trying to use
config(1) on a too old or too recent source tree.

To achieve that, introduce the "version NUMBER" statement which can be use
about anywhere in the config files.  Also, use two defines, CONFIG_VERSION
(which is the actual version of binary), and CONFIG_MINVERSION, which is
the minimum version the binary supports.

Allowing a range of versions serves several purposes:  first it allows me
to introduce the versioning without requiring it to be used right away in
the kernel tree, which means it will be possible to introduce new features
of config(1) rather progressively in the future.  E.g., using 'no pci' in
a config file could only require the new version in that config file, so
that the rest remains compatible.

In the end, an actual bump of the main config system (i.e., in conf/files)
will only be required when e.g., ioconf.c semantics change.

(Mostly-)silently accepted on tech-kern.  Error messages turned into
correct and meaningful English thanks to Tracy and Perry.
2005-10-12 01:17:43 +00:00
kleink 7031652201 Exit with 2 on usage errors as documented. Noted by Christian Biere in
PR bin/21933.
2005-10-10 22:13:20 +00:00
rpaulo b17222de0e Mention uptime display. 2005-10-10 10:09:17 +00:00
christos fbec9f21a4 - Exit with non-zero on errors (from Liam Foy)
- Pass lint.
2005-10-09 18:23:52 +00:00
aymeric e6da8880e8 bump for latest changes:
. reintroduce ^V as a valid quoting character
. don't swallow quoting characters which are not followed by anything
2005-10-08 13:02:32 +00:00
aymeric ca7788ba21 accept ^V again as a quoting character. At least one person uses it. (hi abs!)
While there, fix a bug that would swallow a quoting character if it were the
last one.
2005-10-08 12:41:48 +00:00
aymeric 7107bc131e remove the hack that changed backslaches to ^V's when the command is "set" (!).
Now backslashes are understood by argv_exp3().
2005-10-08 12:38:45 +00:00
kleink a050a27360 Downgrade failure to kill(2) (other than ESRCH) from fatal error to a
warning; otherwise processing aborts and possibly matching killees would
remain unsignalled.  This makes pkill match the Solaris behavior.
2005-10-08 12:05:55 +00:00
drochner de89d2ef8d s|expr|eval|g, to make the test portable 2005-10-06 17:38:09 +00:00
drochner a908ca7d51 merge in FreeBSD's rev.1.14:
Fix m4 to properly handle bitwise operators &, ^, and |. Fix operator
precedence. Add short-circuit evaluation.
2005-10-06 17:28:33 +00:00
drochner 04e008c8e1 import a test for arithmetic expressions from FreeBSD 2005-10-06 17:23:23 +00:00
christos c2bd98ebb5 From Liam Foy:
- Check for errno being set to ENOTDIR from execvp. This
  will stop an incorrect value being returned if a component
  of the new process image file's path is not a directory.
- Cleanup and KNF
2005-10-05 21:20:46 +00:00
hubertf 8457054037 Make it clear where this program can be found.
Requested by wiz.
2005-10-05 17:38:49 +00:00
hubertf e533c36a54 Add locate.updatedb(8).
Discovered missing while sorting things out for BSDcertification.org.
Ran through wizd(8).
2005-10-05 06:29:03 +00:00
cube b7505c1571 Stop walking the tree when two conditions are met: we've seen the device
already (one of its instances has been changed), and we have made no change
on any of the instances.

Previously, it stopped as soon as it detected the device had been seen.
While all the instances of the device at stake were eventually seen, the
same wasn't true for its children...

Fixes hpcmips's GENERIC.
2005-10-04 23:00:34 +00:00
cube a31ff6b408 - Make sure to try aliases of removed device instances when walking
deaddevitab.
- Record the position in the config file of device instances so it is
  possible to tell if a device instance was declared before or after its
  parent's removal.

  E.g.:

     child* at parent?
     no parent

   will have the child instance ignored as an explicit orphan, while

     no parent
     child* at parent?

   will error out because now the child instance is a real orphan.

  That let the POSTPONED_ORPHAN regression test pass.
2005-10-04 20:13:39 +00:00
cube 9ea755eb2f Remove extra new line. 2005-10-04 13:33:20 +00:00
cube 5ec393e9ef Add a flag to mark broken instances. That might happen when there is a
syntax error in the file, yet we want to somehow gracefully go on in order
to print out all the errors in the file, which means we have to take
special care with those structures.

Reported by Simon Burge in private mail.
2005-10-04 13:06:45 +00:00
cube 0dbd1c0e04 - Keep track of the file in which we find the device instance
- Introduce xwarn() for delayed warnings
- Use xerror() and xwarn() in fixdevis() to notify about orphans

That way the correct file is printed when listing orphaned devices.

Reported by Juergen Hannken-Illjes in private mail.
2005-10-04 12:35:00 +00:00
wiz 5219255abf getfsent(3) does not contain any information about the (nonexisting)
function getfstype(), so don't MLINK it. Remove getfstype from other
places that reference it too.

Noted by jmc@openbsd.
2005-10-03 14:56:32 +00:00
christos 180fd9f68f PR/31452: Zafer Aydogan: Show uptime in top display (written by Simon Burge) 2005-10-03 05:34:51 +00:00
cube 2fb411a123 Don't return immediately when detecting that a devbase has already been
seen:  aliases might have to be activated, too.  Fixes GENERIC of alpha
and amiga.
2005-10-02 21:22:56 +00:00
chs 9c47d944e4 optimize pool_caches similarly to how I optimized pools before:
split the single list of pool cache groups into three lists:
completely full, partially full, and completely empty.
use LIST instead of TAILQ where appropriate.
2005-10-02 17:29:31 +00:00
cube 895e5687a9 Allow 'maxusers' redefinition. 'maxusers 0' will cancel the existing
value and make config(1) use the machine-dependent default.
2005-10-02 00:18:09 +00:00
cube 7aa6070d4e o Keep track of negated devices in deaddevitab
o  Rework do_kill_orphans() to use that information and mark explicitely
   orphaned devices (i.e., the ones whose missing ancestor has been
   negated)
o  Make a distinction between erroneous orphans and explicit orphans.
   Error out on the former, ignore the later (but print a warning when -v
   is used)

Yes, now config(1) will actually stop if you comment out a parent.  That
should help people still hoping adjustkernel is relevant these days :)
2005-10-01 23:30:37 +00:00
christos c05266af8a fix setmode error handling. 2005-10-01 20:23:54 +00:00
he 92c0ed8788 The nusers variable is actually a size_t, so print with %zd, not %d. 2005-10-01 13:33:21 +00:00
wiz 57f7dd924d Sort option descriptions. Use more macros. New sentence, new line.
Add missing .El.
2005-10-01 00:03:47 +00:00
cube 7b7c582a4f Introduce two new statements:
no device at <attachment>

     <attachment> can take two forms:  either numbered/wildcarded, in which
     case only exactly matching instances will be removed, or plain (with
     no number or wildcard), in which case all matching instances will be
     removed.

     When <attachment> is a plain interface attribute, all instances using
     that attribute (either directly or through an explicit device) will be
     removed.

     E.g.:
             auich* at pci? dev ? function ?
             audio0 at audiobus?
             audio1 at auich?
             audio* at auich0

             no device at auich0     -> removes audio*
             no device at auich?     -> removes audio1
             no device at auich      -> removes audio1 _and_ audio*
             no device at audiobus?  -> removes audio0
             no device at audiobus   -> removes audio0, audio1 and audio*

  no <device>

     As in the previous case, <device> can either be numbered/starred, in
     which case all exactly matching instances are removed, or plain, in
     which case all instances of the device are removed.

    E.g.: (continuing previous example)

             no audio* -> removes 'audio* at auich0'
             no audio  -> removes all audio instances
2005-09-30 22:51:46 +00:00
cube c130d400ba Rework the way orphan device instances are handled. To achieve that, keep
track of instances attaching at root, and walk down the tree of active
device instances.  Then, all instances that are not marked active are
found as orphans.

Doing it that way allows us to simply ignore orphan devices, instead of
warning about them and still keep them in the configuration.  Now, orphaned
instances are considered as never having existed.

In the end, this allows 'no <device> at <attachment>' to be much more
efficient, as the user doesn't have to negate all descendents of the
instance s/he actually wants to negate.  Warnings are still emitted,
though.

While there, make official a side-effect of the previous lack of action
against orphaned instances:  config(1) used to warn about instances that
attach at a numbered device when no instance of that device with that
number existed, even though there was a starred instance of the device.

E.g. (provided by Alan Barrett):

    pciide* at pci? dev ? function ? flags 0x0000
    wdc0    at isa? port 0x1f0 irq 14 flags 0x00
    wdc1    at isa? port 0x170 irq 15 flags 0x00
    atabus* at ata?
    wd0     at atabus0 drive 0

With this commit, config(1) will no longer warn about 'wd0 at atabus0'.
2005-09-30 22:36:20 +00:00
christos ae3dca21e8 Patches from Liam Foy to:
- Use realloc instead of allocating 1000 structures.
- Remove NUSERS nonsense. If this is kept, shouldn't
  who(1) comply with it too?
- Be consistent with who(1). Add two identical options
  from who(1). These are -q and -H.
- General Cleans:
	- Move globals into local scope
	- Re-write a macro to remove an uneccessary
	  variable.
	- Use UT_NAMESIZE.
	- Remove unecessary header etc.

And from me, KNF, pass lint.
2005-09-30 17:58:24 +00:00
wiz 179b01d905 Fix typo reported by David A. Holland in PR 31422. 2005-09-30 13:46:56 +00:00
rpaulo b04eff3537 ANSIfy. de-P(). Syle nits. 2005-09-25 18:56:33 +00:00
rpaulo ff2bab1c59 tcp_callrpc(): bring in the FreeBSD version of this call. It uses the
"new" rpc functions and works with IPv6.
2005-09-25 18:50:28 +00:00
elad 851adad0b8 Use crypto/rmd160.h. 2005-09-25 14:34:54 +00:00
elad a375b7cdb7 Use crypto/rmd160.h. 2005-09-24 22:40:32 +00:00
christos c4445bc71c rename osockaddr to talkd_sockaddr and use that instead. 2005-09-24 16:40:01 +00:00
perry cb4a630e29 in several comments:
implizit -> implicit
  explizit -> explicit
2005-09-24 15:30:35 +00:00
christos c9f5645213 use getgrnam_r; from Jon Nemeth 2005-09-21 12:24:11 +00:00
he c8a9612d27 Initialize pw to placate -Wuninitialized for sh3. 2005-09-20 15:48:17 +00:00
mrg 1a05f328bc apply a patch from christian biere:
- if we have an open fd, use it instead and, eg, fstat(2), of the file name
and stat(2).
- signed/unsigned variable fixes
- misc. cleanup
2005-09-20 05:12:15 +00:00
wiz f38e8b27b1 Sync usage with man page. 2005-09-19 22:43:21 +00:00
elad f36ecf9e54 Document -k and -p.
Noted by wiz@, perry@.
2005-09-19 15:12:09 +00:00
elad f6deb21161 Add -k key and -p password.
Slightly modified diff from V. Hari.
PR/15736.
2005-09-18 21:50:20 +00:00
elad c8399f93d6 Fix buffer overflow. We don't really care about trimming the filename here.
PR/28739, from Michael Santos.
2005-09-17 19:18:31 +00:00
chs 7bdb7511a0 fix build problems with parallel make: always descend into the tools dir
and add some .WAITs to avoid deciding to build a tool again before
the previous instance finishes.
2005-09-17 16:52:02 +00:00
mrg 84cb5f3013 oops. fix previous by keeping the stat() inside #ifndef SMALL. pointed
out by dsl.
2005-09-15 18:51:33 +00:00
mrg bdc7967496 in file_compress() always stat() the input file. this patch avoids
reading from uninitialised space as provided by John Hein in PR#28995.
2005-09-15 09:30:21 +00:00
mrg 5c0ab9e0af fix signed/unsigned mismatch reported by Christian Biere in PR#31180
using his provided patch.
2005-09-15 09:11:30 +00:00
rpaulo caaefabc19 Don't print a warning about stale utmp{,x} entries if security.curtain
sysctl is equal to 1. We can still detect stale utmp entries if that
knob is off.
2005-09-15 00:58:49 +00:00
drochner 360dbbc86f make bpf stats #ifndef SMALL,
fixes build of x_netstat
2005-09-14 15:35:26 +00:00
wiz 2f0ee62bbb According to rwhod(8), file names are actually /var/rwho/whod.* 2005-09-12 18:35:32 +00:00
christos e64d9da627 Rewrite a macro in order to eliminate an unused global variable (Liam Foy) 2005-09-12 16:16:23 +00:00
wiz aa81fc094a Use better section header. From YOMURA Masanori in private mail. 2005-09-11 23:30:20 +00:00
wiz a56a69295c Remove unneeded macro default arguments. From YOMURA Masanori in private mail. 2005-09-11 23:29:44 +00:00
wiz 013b8f4ef7 Use .Nm instead of the verbose program name. From YOMURA Masanori in private mail. 2005-09-11 23:28:55 +00:00
wiz 17d58c1431 Argument is address_family, not "address family". From YOMURA Masanori in private mail. 2005-09-11 23:26:35 +00:00
wiz 2e504179eb Mark up authors with .An. From YOMURA Masanori in private mail. 2005-09-11 23:26:14 +00:00
wiz 30fa9d9a04 Mark up authors with .An. From YOMURA Masanori in private mail.
While here, replace Xrefs to itself with .Nm.
2005-09-11 23:25:32 +00:00
wiz 3c0c4bb078 Fix typos in file names. From YOMURA Masanori in private mail. 2005-09-11 23:23:56 +00:00
wiz 9a30a26518 We have spell again, xref it. From YOMURA Masanori in private mail. 2005-09-11 23:22:03 +00:00
wiz b5e0c3219f Punctuation fix. From YOMURA Masanori in private mail. 2005-09-11 23:20:12 +00:00
wiz ad44d18838 Argument is address_family, not "address family". From YOMURA Masanori in private mail. 2005-09-11 23:19:27 +00:00
wiz 60bf82edce Fix Xref. End sentence with a dot. From YOMURA Masanori in private mail. 2005-09-11 23:18:42 +00:00
wiz c825c1ecf5 When marking up "C", use .Tn consisntently. From YOMURA Masanori in private mail. 2005-09-11 23:17:34 +00:00
wiz 2ae4fd55cf It is "home_dir:shell", not "home_dir_shell". From YOMURA Masanori in private mail. 2005-09-11 23:16:15 +00:00
wiz 01d8cf4ba8 Use more markup. From YOMURA Masanori in private mail.
While here: new sentence, new line; |fmt; s/.br/.Pp/
2005-09-11 23:15:20 +00:00
wiz 3025498c62 Use correct macro. From YOMURA Masanori in private mail. 2005-09-11 23:11:48 +00:00
wiz 775247d100 Punctuation nits. 2005-09-10 22:14:52 +00:00
jmmv ec93365612 Initial addition of tmpfs, an efficient memory file-system. This project
was developed as part of Google's Summer of Code 2005 program.  This
change adds the kernel code, the mount_tmpfs utility, a regression test
suite and does all other related changes to integrate these.

The file-system is still *experimental*.  Therefore, it is disabled by
default in all kernels.  However, as typically done, a commented-out
entry is added in them to ease its setup.

Note that I haven't commited the required mountd(8) changes to be able
to export tmpfs file-systems because NFS support is still very unstable
and because, before enabling it, I'd like to do some other changes.

OK'ed by my project mentor, William Studenmund (wrstuden@).
2005-09-10 19:20:48 +00:00
martin 6fd5c01546 Move package/cinclude/include handling from the parser to the scanner,
where it belongs. This has the side effect of fixing PR toolchain/30903.
2005-09-10 15:38:46 +00:00
blymn 9e306bafdf Remove message when no tape drives found 2005-09-10 11:10:21 +00:00
rpaulo d900564544 PR misc/31280: man 8 modstat is referencing itself. By Stefan Schumacher. 2005-09-09 22:47:26 +00:00
wiz 685850e192 Grammar fix. 2005-09-09 20:27:26 +00:00
aymeric 377bb2d9d8 bump to nb15:
. we now handle ^C correctly in all cases
. blanks and alnum chars are ignored in the shellmeta option, as the code
  brokenly said it should
. \ can be used to escape any (special) character in file names
2005-09-06 21:54:10 +00:00
aymeric 44208cd8f1 In argv_exp3() where we cut a line into args, check for '\' as the escape
character instead of using the IS_ESCAPE() macro which tests for ^V because the
former is mandated by the standards, and the latter is insane.
This is a very small part in addressing PR bin/26046 by lukem@.
Before, in order to escape a special character, you had to use a literal ^V,
which is type ^V twice before the character; whereas now, you use \.
Because the fix will remain partial for a while, you have to remove \ from
your shellmeta option otherwise the \ is swallowed by the invoked shell that
handles arguments expansion.
Please complain if you want ^V^V to also work, but please don't call me a
heretic.
2005-09-06 21:50:51 +00:00
aymeric 3065f3379c From code inspection, nvi had the undocumented and non-working functionality
of ignoring alphanumerical and blank characters from the shellmeta option.
The former code was using a character pointed to by a pointer as a boolean
to check whether to enable this functionality, but in the meantime the pointer
was used for something else. Introduce a variable for this boolean so that
the functionality actually works.
2005-09-06 21:36:10 +00:00
aymeric 0eceae0438 Finally handle ^C the correct way. This indeed requires to separate the case
of text-recording input (usually text in insert mode) from the other cases
(e.g. ex command input). If recording, morph to escape key so that the input
is correctly finished for a potential replay; if not, simply bail out and
notify that something wrong occurs. Callers will cope.
The previous fix could make ^C sometimes produce a file completion
or a command edition, depending on the settings of the user.
I think this is the correct fix for since closed PR bin/11544 by pooka@. ;-)
2005-09-06 21:30:36 +00:00
aymeric 68d2948889 when reading an ex command within visual mode with v_tcmd(), check that
the termination value of v_tcmd() is alright. Abort the command otherwise.
Until the next commit in vi/v_txt.c, this is a noop.
2005-09-06 21:21:25 +00:00
hubertf 105b456cb7 Mention pwhash(1) in a few places,
suggested in PR 31125 by Stefan Schumacher.
2005-09-05 03:37:14 +00:00
elad cf3a38f563 Revert previous commit. I forgot we already do that. :) 2005-09-04 21:18:33 +00:00
elad e93911118f Use sysctl to fetch process information if reading live kernel. 2005-09-04 19:02:08 +00:00
elad 4c70438790 Use sysctl to fetch AF_LOCAL PCB lists if reading live kernel. 2005-09-04 18:59:57 +00:00
rpaulo f20c174719 Place the sysctl code under an if block and print an error message if the
user tries to fetch information via kvm.

Discussed with Elad Efrat.
2005-09-02 22:52:24 +00:00
rpaulo d65009381e Request process information using sysctl(3) and not kvm(3) since bpf(4)
statistics and peers are only available using the former.
2005-09-02 22:23:13 +00:00
elad 6383828527 Avoid defining max. hash length ugliness simply by passing NULL for the
buffer to the File routines.

Noted by pooka@.
2005-09-02 17:39:23 +00:00
elad 871155c6cf Forgot +1 for NUL termination. 2005-09-02 16:52:34 +00:00
elad 50b96d774b Use MAXHASHLEN to indicate largest possible hash.
Fixes buffer overflow found by xtraeme@.
2005-09-02 16:52:03 +00:00
rpaulo 95abecf761 We already pass WARNS=3. 2005-09-01 18:27:24 +00:00
drochner 9b39088e5c id(1) didn't check the return value of getgrouplist(3) and used memory
outside the group array in the case that a user is member of more than
_SC_NGROUPS_MAX groups.
(This is probably also the problem behind PR bin/31069 by Zafer Aydogan.)
So check the return value and retry with sufficiently allocated memory
in case the initial _SC_NGROUPS_MAX groups are not enough.
2005-08-30 16:47:47 +00:00
rpaulo c5a8fe81ae Use net.inet6.{ip6,udp6,pim6,raw6}.stats for live systems.
Reviewed by Elad Efrat.
2005-08-28 21:06:57 +00:00
rpaulo 51345e62d3 Use net.inet6.tcp6.pcblist, net.inet6.tcp6.stats (not implemented yet) and
net.inet6.icmp6.stats if we are gathering information from a live system.

Reviewed by Elad Efrat.
2005-08-28 16:12:35 +00:00
mrg cde2923d5b avoid an infinite loop while decompressing invalid gzip files.
some minor CSE.  compare stat return value consistently.

thanks to tron for testing the first change.
2005-08-28 10:17:50 +00:00
christos efc9df200f PR/31077: Wil L: /usr/bin/make can read off of end of buffer 2005-08-27 08:04:26 +00:00
rpaulo e606ac2d9a PR bin/31068: whatis doesn't find /bin/[ by Zafer Aydogan.
Patch provided by Jukka Salmi. I just added a comment.
2005-08-25 16:29:15 +00:00
drochner f46880afbf in locators.h, also emit definitions about the number of locators per
interface attribute
2005-08-25 15:02:18 +00:00
drochner 0d6cb6f10c Replace the "locnames", attached to cfdata, which was solely good for
userconf, by more complete information (including default values) about
interface attributes, attached to the drivers which provide them.
2005-08-25 15:01:07 +00:00
tron a73f6299d6 Fix host tool build which got broken when SHA2 support was added. 2005-08-25 09:51:23 +00:00
rpaulo fcf2b555d7 If the specificed MIB doesn't exist, then it's probably a kernel without
that socket type (AF_INET, AF_INET6, etc.). That's a normal condition, so
don't bail out.

Reviewed by Andrew Brown.
2005-08-24 21:33:57 +00:00
rpaulo f16cc5d95a Don't break each name in the AUTHORS section. 2005-08-24 21:31:45 +00:00
elad 3722a15dc3 Add support for SHA2 in cksum. 2005-08-24 19:59:08 +00:00
elad eee731374f Fix some lint warnings. 2005-08-24 19:44:45 +00:00
ginsbach 2ab55b55e7 Add description of service keys as these maybe in one of several forms. 2005-08-24 14:46:59 +00:00
ginsbach 21b9a99b7c Implement "ethers". 2005-08-24 14:31:02 +00:00
tron 4616c2367c Fix a one byte off error which causes "less" to crash if you view a
large file, jump to the end, scroll backwards with "b" and try to
search backwards afterwards.
2005-08-24 11:33:09 +00:00
elad d5f9e57cff Put back in information about the deprecated flags in the man-page. Be
explicit about them being removed, and suggest using the ``-a'' flag.
2005-08-23 15:29:48 +00:00
elad b4df0b712a Note about deprecated flags. 2005-08-22 14:47:55 +00:00
elad 7345c13cbb Add comments about intentionally not documenting the deprecated -1, -2, -4,
-5, -6, and -m flags so they are not mistakenly get documented again in the
future.
2005-08-21 19:33:10 +00:00
elad a7d7292dfa Some changes to cksum:
1. Deprecate the -1, -2, -4, -5, -6, and -m flags. For now, simply remove
   them from the documentation.

2. Add and document ``-a algorithm''.
2005-08-21 18:51:44 +00:00
lukem c114b2eb28 Don't clear the trailing character on the auth_url() username;
we now use getline() and that newline strips for us.
Problem found & fixed by Mark Davies.
2005-08-21 16:16:33 +00:00
christos c4ee9f6d2e 64 bit inode changes 2005-08-19 02:07:18 +00:00
rpaulo 70d95a4d7d /sys is no longer available, change it to /usr/src/sys. 2005-08-18 01:09:02 +00:00
christos d3b0b4d68a PR/30750: Mark Davies: ssh gives bogus complaint when gssapi authentication
fails. The problem was that different ssh programs were compiled with different
cpp flags. In particular, ssh-keysign was affected. Move all the CPPFLAGS
to Makefile.inc. Note that I am not moving the library portion of the defines
because we don't want to link everything with all the libraries.
2005-08-18 00:19:28 +00:00
uebayasi 976fee6969 `!' needs an escape sequence (`\&'). New sentence, new line.
Reviewed By:	wiz
2005-08-17 00:58:19 +00:00
elad bbf85a429b Use PRIxPTR when printing a pointer. 2005-08-12 14:08:16 +00:00
rpaulo cccbf666c8 Query the v6 sockets only if USE_INET6 != "no". Patch provided by Jukka Salmi
on PR#30963.

ok atatat@
2005-08-10 20:32:57 +00:00
rpaulo 0459285527 Fix a typo in the islistening() routine. Patch provided by Jukka Salmi
on PR#30963.
2005-08-10 20:21:14 +00:00
mrg 3a96c9add9 add a "file" to the arguments that isn't enclosed in square brackets
making it clear that at least one file/directory argument is required
in both the manual and usage.  "find" with no args currently barfs but
these documents implied it would do something useful.
2005-08-10 06:51:24 +00:00
christos 81c9862ba6 - Minor logical restructure. Make sure we can create the client before
even bothering to call makemsg(); (Liam Foy)
- Use MAXPATHLEN consistently (Liam Foy)
- WARNS=3, KNF and misc cleanups
2005-08-09 23:41:38 +00:00
christos 573f57f885 Say which daemon produces the data and correct the default of 3 minutes
(Liam Foy)
2005-08-09 23:28:59 +00:00
christos abefed98a7 Add typedefs for DuplicateProc and FreeProc from Max Okumoto. 2005-08-09 21:36:42 +00:00
christos 81b135acdf From Max Okumoto:
- Remove casts to NULL.
- Remove space between cast and object.
2005-08-08 16:42:54 +00:00
he 4577ef8d16 Replace usage of caddr_t with intptr_t, to allow this to build cleanly
on both 32- and 64-bit archs.
2005-08-08 12:11:52 +00:00
blymn 64e76e4ea0 Don't error when tape drives are not configured on a system. 2005-08-08 11:31:48 +00:00
christos a35a74cd06 Fix pasto: don't call the wrong function from the wrapper. Reported by perry. 2005-08-08 01:28:08 +00:00
elad dbc883fab2 Use sysctl to read live kernel PF_INET PCBs. 2005-08-07 17:10:36 +00:00
christos 9eb4baf479 From Liam Foy:
- Print uptime in secs if uptime is less than 1 minute
- If at least one call to onehost() fails, return one (allows for external error detection)
- Avoid leaks, use clnt_destroy (from OpenBSD)
- err(3) cleans
From me:
- lint cleanups
- more KNF
2005-08-07 16:01:45 +00:00
cube 3b40577510 - Make sure devitab is correctly handled, in case we're removing the entry
it contains,
- Properly update the d_ihead list:  if we have remaining aliases, use them
  to fill in the gap

Thanks to Bernd Ernesti for the test cases.
2005-08-07 15:11:12 +00:00
blymn 132bb1fe89 Add tape statistics. 2005-08-07 12:32:38 +00:00
blymn 71c77b437a Add support for tape statistics. 2005-08-07 12:23:20 +00:00
blymn 681d2bb37b Add support for gathering tape statistics. 2005-08-07 12:21:46 +00:00
elad c1494c99c6 Use sysctl to fetch IP, ICMP, TCP, and UDP statistics. 2005-08-06 17:58:13 +00:00
rpaulo ec70a5dc17 Explained how -B works and how it works in conjunction with -I or -s.
Reviewed by wiz@
2005-08-06 11:23:32 +00:00
elad 8920c39bb8 Fix printing formats. 2005-08-05 12:16:51 +00:00
christos 6240774069 More KNF cleanups from Max Okumoto 2005-08-05 00:53:18 +00:00
rpaulo 9ce7ce6bf0 Added #include <kvm.h> since netstat.h, which is included too, needs it. 2005-08-04 19:41:28 +00:00
rpaulo 22a0fcf290 Added bpf.c. 2005-08-04 19:40:00 +00:00
rpaulo 66daeed445 Implemented the userland part of the BPF statistics and BPF peers,
net.bpf.stats and net.bpf.peers sysctls respectively. netstat(1) now
has an additional syntax:
	netstat [-s] [-B] [-I Interface]

Only the super user can see a list of BPF peers with the following command:
# netstat -B
Active BPF peers
PID     Int     Recv     Drop     Capt     Flags  Bufsize  Comm
4941    lo0     0        0        0        I--S-  262144   tcpdump
252     ex0     19668    0        5        I-RS-  32768    dhclient

And every user can see the BPF statistics with:
$ netstat -s -B
bpf:
        19669 total packets received
        5 total packets captured
        0 total packets dropped

This idea came from FreeBSD (Christian S.J. Peron) but, currently, they
doen't have a userland utility in the base system to read the sysctls.

Reviewed by: christos@
2005-08-04 19:39:40 +00:00
christos 9f80093159 remove unnecessary casts to void * functions (Max Okumoto) 2005-08-04 00:20:12 +00:00
christos 62a6753895 from Max Okumoto: debug should be int, not boolean. 2005-08-03 20:55:01 +00:00
xtraeme 5057789f26 Don't show ptyfs in the display, it's useless. 2005-08-01 02:38:03 +00:00
christos 244d270d1b warns=3, delint. 2005-07-30 16:19:09 +00:00
christos d8213a2a2a - Check stdin, stdout, and stderr for a tty. From Liam Foy for SUSv3
compliance.
- While here, delint, prototypes, getsetprogname, warns=3
2005-07-30 16:14:39 +00:00
christos e8323719e6 Usage should exit with to according to posix (from Liam Foy).
While here, pass WARNS=3 and lint
2005-07-30 14:43:13 +00:00
yamt 19ff568b84 allow configuration without swap. 2005-07-30 06:40:30 +00:00
christos b3350d3e14 Remove unused files. From Max Okumoto. 2005-07-30 00:49:13 +00:00
christos 0d20a48365 remove -static. 2005-07-29 01:19:20 +00:00
christos 0a918ea74c Traditional flex uses int instead of yy_size_t for some api functions.
Unfortunately this mangles differently in c++, so we get undefined symbols.
So we define the old function prototype to keep things happy.
2005-07-28 04:14:30 +00:00
he 759fbc6504 The return type from getopt(3) is int, not char. Besides, char is
not guaranteed to be signed, so comparison with -1 will cause a
warning (turned error) for some of our ports (e.g. our arm ports).
Fix this by making the 'ch' variable an int instead of a char.
2005-07-27 09:29:02 +00:00
christos 3692d77541 Whitespace KNF cleanup from Max Okumoto 2005-07-25 22:55:58 +00:00
cube c3414672de The devi lists in struct devbase and struct deva really should use the
TAILQ set of macros from queue.h...  It's way too easy to make mistakes...

config(1) was segfaulting in deldev() in some situations...  Reported by
Brend Ernesti.
2005-07-25 22:31:07 +00:00
hubertf f81ddc5831 Add vndcompress 2005-07-25 18:10:09 +00:00
wiz a654b897c8 Sync usage with man page. 2005-07-25 12:25:54 +00:00
wiz 8107329829 Various improvements. 2005-07-25 12:24:40 +00:00
hubertf e98029593c Add vndcompress(1) and vnduncompress(1) to transform filesystem/disk
images from "normal" into cloop2-format compressed images and back.
Written by Florian Stoehr (netbsd@wolfnode.de) with some polishing
by me.

Compressed disk images can be used with the vnd(4) driver when compiled with
VND_COMPRESSION and "vnconfig -z".  Useful for creation of Live CDs/DVDs.
2005-07-25 12:17:59 +00:00
cube 878c29f51a Correct an if test. 2005-07-25 06:22:09 +00:00
cube e499d8b53e Implement the long overdue syntax "no <dev> at <attachment>". We can't
pretend anymore we don't have it.

This is the result of 7 hours of work on the train journey forth and
back to the family reunion for the birthday of my cousin Mickael, whom
I thank for living just far away enough.
2005-07-24 21:31:02 +00:00
christos 4023e9bbcb add more crap for denic. From OpenBSD. 2005-07-22 16:01:52 +00:00
peter 0d03348661 Implement the following two XSI extensions:
-q: quick mode, list only the names and the number of users currently
logged on.

-s: default mode, list only the name, line and time fields.
2005-07-22 14:23:05 +00:00
ross 6a10734347 Fix a couple of stack-smashing buffer overflows. 2005-07-20 17:22:45 +00:00
dsainty de09461393 Sprinkle const liberally 2005-07-20 12:54:30 +00:00
dsainty 0de40530b6 From discussion on tech-userlevel, change the comment formatting in the
changes applied in revision 1.10.  At the same time, expand the comments
a bit to make the code slightly clearer.  No code changes.
2005-07-20 12:40:27 +00:00
christos b89278a40d WARNS=3 2005-07-19 23:18:31 +00:00
christos ca28631014 Pass lint completely. 2005-07-19 23:07:10 +00:00
yamt fdeeeda1ac remove a wierd blank line in the case of -b. 2005-07-19 12:24:39 +00:00
christos ece0fd5c87 WARNS=3 2005-07-19 01:38:38 +00:00
lukem dccca90900 Revert back to using an int (instead of size_t) for holding a value that may
be negative.
Fixes progressbar display on terminals <43 columns wide.
Bug noted and solution suggested by Gavan Fantom.
2005-07-19 00:41:05 +00:00
christos ddee551034 Handle C99 array range initializers:
type a[] = { [lo ... hi] = c }:
2005-07-17 19:35:48 +00:00
christos 2d45339e97 Remove a const. 2005-07-17 17:08:25 +00:00
he a052596ae7 Make misc.h depend on makeerrnos.sh, to ease UPDATE builds after the
latest change to support WARNS=3.
2005-07-17 15:48:28 +00:00
he d36a483f83 Make this build with WARNS=3, and enable it.
Renames local variable syscall to syscall_ent to placate -Wshadow,
and adds const to struct field initialized to string literals.
2005-07-17 09:45:50 +00:00
he 7b9dcb30de Follow up the constification of ioctlname() in ktrace.h. 2005-07-17 08:44:08 +00:00
christos 553881914b WARNS=3, knf, ansi prototypes 2005-07-17 07:36:26 +00:00
christos 7fc92b0291 Explain why table is not const. 2005-07-16 22:32:36 +00:00
christos 58fc70c4d6 WARNS=3 2005-07-16 22:00:01 +00:00
christos fd2a8295bb - make input errors print the lint source line number they are called from.
- simplify a conditional.
2005-07-16 19:54:00 +00:00
christos 41d3ce981c Fix more lint problems. 2005-07-16 19:50:32 +00:00
christos 0aa8a97934 WARNS=3 and remove default values. 2005-07-16 16:21:05 +00:00
christos 140eaa6eeb - KNF
- better handling of errors and messages
- pass lint
2005-07-16 16:20:35 +00:00
christos 078c5c1a41 From David Sainty: If a process dissappears while we are signalling it, don't
count it as a match/error.
2005-07-16 15:53:56 +00:00
rpaulo 0024ded950 Remove the -L parameter from the first line of the SYNOPSIS
and bump the date.

ok Hubert Feyrer.
2005-07-16 12:35:59 +00:00
wiz bbd944217e Add missing break. From YOMURA Masanori in PR 30751. 2005-07-15 09:45:04 +00:00
reed 9887c735e4 Add NetBSD 2.0.2 was released on April 12, 2005. 2005-07-15 03:17:46 +00:00
wiz b6672bc279 Improve command description, from jmc, jaredy, and tom, all @openbsd. 2005-07-14 22:16:39 +00:00
mrg a3d57ef1bd play.c: allow empty files to exit gracefully rather than with an error
of "header seems really large".  reported by wiz.

record.c: don't use total_size in the header if is -1 (it's initial value)
2005-07-13 10:57:11 +00:00
sjg c3c1fc597e Expected results were not updated for comment testing. 2005-07-11 17:55:19 +00:00
wiz fdf8185afa In macdef, point to $ command (from jmc@openbsd), and split paragraph (it was getting a bit big). 2005-07-06 11:21:26 +00:00
wiz ee1fddfe1e Use more macros, and use them more consistently.
Fix a few typos.
2005-07-06 11:18:05 +00:00
wiz d3a0b4c8cd Sync usage with man page (from jmc@openbsd). 2005-07-06 07:57:19 +00:00
mrg 8ce77e5534 move some more processing before opening the audio device. don't
default the encoding to ulaw; default it to what ever the device
has.  the latter fixes PR#30612.
2005-07-05 22:01:42 +00:00
mrg 906f130f1a check that an output file is given before doing any other work.
avoids touching the audio device and then printing an error.
2005-07-05 21:05:50 +00:00
kleink 99dffcffea Set LOGNAME in the new environment (in addition to USER);
fixes PR bin/30670 from Pavel Cahyna.
2005-07-05 20:15:13 +00:00
wiz 223c2f668b Grammar fix from jmc@openbsd. 2005-07-05 15:28:44 +00:00
wiz b08598c658 Improve -ml description, wording from jmc@openbsd. 2005-07-05 15:28:16 +00:00
lukem 5f450b0c4b Improve the description of the macros.
Patch from David H. Gutteridge in PR 24296.
2005-07-05 09:29:54 +00:00
wiz 370088dd17 Sort options. Refer to deroff(1) for -m description.
pipe lines through fmt.
2005-07-02 10:39:13 +00:00
wiz d54d971520 Use more macros. Sort -m arguments and fix their descriptions.
Break some lines to fit 80 characters per line.
2005-07-02 10:29:44 +00:00
dsainty 432d19fe4b By setting close-on-exec on the USB HID device descriptor, prevent passing an
extraneous descriptor to the command defined as the action to take on a
particular HID event.

This also avoids an unfortunate side-effect: killing and restarting
usbhidaction would sometimes fail because of a lingering open descriptor for
the same device on a process executed by the previous run of usbhidaction.

[OK'd by Lennart]
2005-07-02 04:05:09 +00:00
christos 3d520edd5e PR/29985: Roland Illig: make(1) interprets backslash wrongly in for
loop expansions, when the expanded variable ends in backslash and
the backslash is the last character on the line. While this fix is
ugly (detect the condition and append a space), it is the least
intrusive for now.
2005-07-01 16:45:38 +00:00
christos 97ccbe263d WARNS=3 2005-06-30 16:23:29 +00:00
perry 2ed22179cd UCB copyrights are supposed to be three clause these days 2005-06-30 02:36:35 +00:00
perry 8f8d9c94bf add deroff and spell 2005-06-29 21:20:15 +00:00
perry fcc96823f6 spell(1), from OpenBSD.
This code came originally from v7/32v and thence from 4.4BSD. It was
freed by Caldera. Todd Miller cleaned up and ANSIfied the code, and
then changed it to use the mmap/binary search algorithm for looking up
words in the dictionary that look(1) uses, replacing the hash based
lookups which were faster but broken by the size of the current
dictionary.

I've done a teeny bit of additional cleanup and replaced Todd's ksh
spell(1) script with a /bin/sh script, and re-structured the code to
follow the bsd makefile way, with one executable per directory.

I also added a TODO list recommending a bunch of kinds of cleanup.

The code is, frankly, awful. It was fine in the 1970s, a time of much
more limited resources and tastes, but the world has moved on a bunch
since then. The reason for pulling this in at all is that it will make
it much easier to check in-tree documentation for spelling errors
automatically.
2005-06-29 21:06:12 +00:00
perry cd4e76b8f7 deroff, from OpenBSD. Needed for spell(1) which I'll be pulling in shortly.
The code came from 32v and then 4.4BSD.  After the code was freed by
Caldera, it was cleaned up and ANSIfied by Todd Miller for OpenBSD.

I've added a TODO with several items on it, basically code cleanup and
adding support for mdoc. As it stands, this won't yet pass WARNS=1.
2005-06-29 20:58:50 +00:00
wiz 895a553b28 Add setprogname call. 2005-06-29 20:35:48 +00:00
wiz 05da4551bd de-__P(), ansify, use {g,s}etprogname. 2005-06-29 20:34:48 +00:00
christos b775b6932a Don't apply .DEFAULT commands to special targets (.BEGIN, .END, .INTERRUPT). 2005-06-29 19:59:42 +00:00
christos b771909d19 forgot to remove the file pointer from the macro. 2005-06-29 05:00:30 +00:00
christos b232679f19 Add NO_USAGE and NO_DEBUG so that we can fit in the floppies again. 2005-06-29 02:31:19 +00:00
drochner fd816c4745 don't put the xxxcf_locnames[] into the global namespace 2005-06-28 20:21:05 +00:00
wiz 74eb0f653a Fix typo in macro name, from Yomura Masanori in PR 30616. 2005-06-28 07:55:12 +00:00
wiz 3051d76108 Consistency. Use Pp instead of br. 2005-06-27 09:51:09 +00:00
fvdl c14a80e11b Don't define the debug variable here; it is declared statically elsewhere. 2005-06-27 01:23:59 +00:00
lukem 2bf924f405 Restore the rework from rev 1.115 and expand the description of .OBJDIR
to document the behaviour that is currently in use (the "./obj" and
"/usr/obj/`pwd`" behaviour).
Hopefully the existing .OBJDIR behaviour is clearer now.
2005-06-27 00:17:08 +00:00
christos b2d91da0d4 WARNS=3 2005-06-26 17:10:28 +00:00
wiz 7cb5118cfd Sort SEE ALSO. Drop trailing space. 2005-06-26 10:16:46 +00:00
wiz 47fb7786c1 Since the obj dir handling changes in the code have been
reverted, revert them in the man page too (i.e., revert v1.115).
2005-06-26 10:14:43 +00:00
lukem 50e70cd0ee revert previous for now 2005-06-24 04:33:25 +00:00
lukem 62955ed1ec Revert rev 1.110 and restore the previous "automagic objdir" support;
at least until we clean up the objdir semantics in <bsd.obj.mk> for
NetBSD builds.
2005-06-24 02:53:27 +00:00
atatat 277396bd87 Bend the 'L', 'M', and 'H' modifiers to work on the size, whereby it
is rounded to the nearest kilobyte, megabyte, or gigabyte.
Implemented at lukem's request since some things can't deal with
overly large numbers when files are really large.

Have to do something like humanize_number(3), but that interface isn't
really what I'm looking for.  I think.  More examination required.
2005-06-23 03:13:24 +00:00
lukem a6a204d392 Deprecate support for automagically setting the .OBJDIR to
./obj.${MACHINE}
	./obj
	/usr/obj/${PWD}

The rules for the default .OBJDIR setting are now simplified to
(and documented as) trying the chdir to the following
(if the appropriate variable is defined):
	${MAKEOBJDIRPREFIX}${.CURDIR}
	${MAKEOBJDIR}
	${.CURDIR}

.OBJDIR can be overridden in the makefile.
<bsd.obj.mk> uses this to provide the "culled" .OBJDIR semantics
for NetBSD's /usr/src builds.

MAKEOBJDIRPREFIX & MAKEOBJDIR still can only be provided
in the environment or on make(1)'s command line.

Per discussion on tech-toolchain.
This should reduce a lot of lossage people have experienced over
the years with various .OBJDIR setups.
2005-06-23 02:31:31 +00:00
christos 8fa006901b Deal with nic.de stupidity. Idea from OpenBSD, but simplified. 2005-06-22 12:17:56 +00:00
lukem 50ec57658e Allow the input [file] field separator to be a string and not just a
single character.
Use argument-specific value names in the usage string & manual page
to simplify searching for the value's use.
2005-06-20 02:53:38 +00:00
wiz 76f0e20b24 Use groff macros instead of troff ones. 2005-06-19 17:34:03 +00:00
wiz 2e770dfdda Drop trailing whitespace. 2005-06-19 17:26:30 +00:00
wiz 19a870f516 Fix an article, and drop trailing whitespace. 2005-06-19 17:26:07 +00:00
rpaulo 9e77e5175e Change "non-escaped" to "unescaped".
Reviewed by hubertf.
2005-06-18 14:34:55 +00:00
rpaulo a0c960912d Add a new test case to reflect the problem found on PR toolchain/30536.
Reviewed by sjg and hubertf.
2005-06-18 14:33:15 +00:00
rpaulo f0f2f92389 PR standards/17732: make doesn't honour escaped comment lines. Now with
a real fix.
Ok'ed by sjg and hubertf.
2005-06-18 14:32:04 +00:00
wiz 7fba66045a Bump date for -jn, and add some formatting. 2005-06-17 19:30:49 +00:00
jmc 736ef19188 Add new debugging option '-dn' which will leave the scripts fed into make on
-j jobs in /tmp for debugging purposes. Add a note to the man page that
this could cause problems if run a lot (due to the number of files created)
2005-06-17 19:25:20 +00:00
jmc e72c744fe2 If the line being passed to the shell is a blank line and we're not in compat
mode, use the ignErr template for the command as shell doesn't like an empty
construct of the form { } || <something>. Fixes build breakage on cats
distrib where a command ends up expanding to nothing.
2005-06-16 18:07:45 +00:00
christos fa2b48914c Instead of printing the raw cpu_id, print the logical cpu number. The raw
cpuid values may not be contiguous, or come in ascending order, so this
makes the cpu value of each process display match the summary display on
top.
2005-06-16 14:58:51 +00:00
rpaulo a94394c1d9 Back it out while I'm working on a real fix without introducing new bugs. 2005-06-16 14:54:10 +00:00
rpaulo 9eb6f66b9a We now support comments until the end of a non-escaped line.
Ok'ed by hubertf.
2005-06-15 22:39:27 +00:00
rpaulo d0727c5f5b Add a unit-test for comments.
Addition to PR bin/17732.
Approved by sjg and christos.
2005-06-15 22:32:22 +00:00
rpaulo 72c3c708ca PR bin/17732: Allow make to understand escaped comments.
Approved by sjg, christos and hubertf.
2005-06-15 22:26:54 +00:00
skd 14834f0865 Deal with void * types. Approved by Christos. 2005-06-14 03:40:31 +00:00
christos f725dde259 PR/30511: Nicolas Joly: lex(1) generated files lint warnings 2005-06-12 20:04:22 +00:00
matt fe3f7b90ff Can't use _LP64 because xlint is a host tool. We need a new define for
when building as a host tool.
2005-06-12 16:56:59 +00:00
christos cc6e13ee6e mktemp() uses are ok here, so no more warnings. 2005-06-11 22:59:05 +00:00
jmc 3f5fc9a18d Need to #ifdef around declaration of ch with NO_EDITCOMPLETE so this compiles
on rescue/miniroot's
2005-06-10 18:24:15 +00:00
jmc e71965e518 Init some variables the compiler is complaining about and mark w. XXGCC as it
affects only m68k compilers.
2005-06-10 16:07:45 +00:00
lukem ddc3d4ca5a Implement:
int getline(FILE *stream, char *buf, size_t buflen, const char **errormsg)
	Read a line from the FILE stream into buf/buflen using fgets(), so up
	to buflen-1 chars will be read and the result will be NUL terminated.
	If the line has a trailing newline it will be removed.
	If the line is too long, excess characters will be read until
	newline/EOF/error.
	Various -ve return values indicate different errors, and errormsg
	will be changed to an error description if it's not NULL.

Convert to use getline() instead of fgets() whenever reading user input
to ensure that an overly long input line doesn't leave excess characters
for the next input operation to accidentally use as input.

Zero out the password & account after we've finished with it.

Consistently use getpass(3) (i.e, character echo suppressed) when
reading the account data.  For some reason, historically the "login"
code suppressed echo for Account: yet the "user" command did not!

Display the hostname in the "getaddrinfo failed" warning.

Appease some -Wcast-qual warnings.  Fixing all of these requires
significant code refactoring.  (mmm, legacy code).
2005-06-10 00:18:46 +00:00
lukem cc5aca9af5 copyright maintenance 2005-06-09 16:38:29 +00:00
he 95094319c5 Initialize a local variable to appease -Wuninitialized.
Marked with XXXGCC for dreamcast (found while compiling for it).

Reviewed by lukem.
2005-06-07 13:36:28 +00:00
he cabcbc12ed Initialize a local variable to appease -Wuninitialized.
Marked with XXXGCC for sun2 (found while compiling for it).

Reviewed by lukem.
2005-06-07 13:34:10 +00:00
he 136c962ff9 Initialize a local variable to appease -Wuninitialized.
Marked with XXXGCC for dreamcast (found while compiling for it).

Reviewed by lukem.
2005-06-07 13:26:26 +00:00
he 90d4762740 Initialize a local variable to appease -Wuninitialized.
Marked with XXXGCC for pmppc (found while compiling for it).

Reviewed by lukem.
2005-06-07 09:51:34 +00:00
he f104d7d50d Initialize a couple of local variables to appease -Wuninitialized.
Marked with XXXGCC for sun2 (found while compiling for it).

Reviewed by lukem.
2005-06-07 09:33:37 +00:00
he 07b1fe6a3e Initialize a local variable to appease -Wuninitialized.
Marked with XXXGCC for sun2 (found while compiling for it).

Reviewed by lukem.
2005-06-07 09:25:00 +00:00
thorpej dbe5d1e1f7 Remove bogus BINDIR assignment. 2005-06-06 06:12:09 +00:00
chs 7bbdd188e1 appease gcc -Wuninitialized on hp700. 2005-06-05 19:08:28 +00:00
wiz 88d9def466 genassym(1), not (8) 2005-06-05 19:00:02 +00:00
wiz d3918ffef7 config(1), not (8) 2005-06-05 18:59:35 +00:00
thorpej 5ecc953bdb config and genassym are not sysadmin tools, they are development tools.
As such, they don't belong in /usr/sbin, but rather /usr/bin.  Move them
there.
2005-06-05 18:19:52 +00:00
lukem 0f422228f9 appease gcc -Wuninitialized 2005-06-03 16:15:46 +00:00
lukem 366252f608 * Improve error handling with unrecognized chars after :t.
* Explicitly goto default_case for unknown chars encountered after
  various : modifiers, rather than multiple FALLTHRUs.
* Appease gcc -Wuninitialized for sv_name and v_ctxt.

Discussed with sjg.
2005-06-03 07:02:39 +00:00
lukem fb0f76d8e8 cosmetic comment tweak 2005-06-03 05:56:25 +00:00
lukem d687f4502c appease gcc -Wuninitialized 2005-06-02 04:59:17 +00:00
lukem 829384f829 appease gcc -Wuninitialized 2005-06-02 04:34:57 +00:00
lukem 8125c19da2 appease gcc -Wuninitialized.
Each is marked with XXXGCC, because in some cases it looks like gcc
isn't correctly detecting that
	for ( ; xxx ; yyy)
		foo = 0;
always sets foo ...
2005-06-02 04:25:16 +00:00
lukem f01455eaa9 Don't attempt to dereference an uninitialized 'ep' pointer if we can't
make a temporary file to mail to the user.
Detected with gcc -Wuninitialized.
2005-06-02 04:03:03 +00:00
lukem 00cf2c1ca4 Don't attempt to dereference an uninitialized pointer when an error
occurs in gtags parsing.   For that matter, remove the unused 'tftp'
and 'echk' variable, as they're set but not used afterwards.
Detected with gcc -Wuninitialized.
2005-06-02 03:51:14 +00:00
lukem 9aeda3fd63 appease gcc -Wuninitialized 2005-06-02 03:11:23 +00:00
lukem ef45472693 appease gcc -Wuninitialized 2005-06-02 03:00:19 +00:00
lukem 5c37c8a0a3 Cleanup use of 'host' when running 'rpcinfo -p'.
Appease other -Wuninitialized warnings.
2005-06-02 02:46:16 +00:00
lukem 4baf8a84ca appease gcc -Wuninitialized 2005-06-02 02:19:51 +00:00
lukem 458eb38666 Improve argument error checking.
Detected with -Wuninitialized.
2005-06-02 02:14:58 +00:00
lukem a3b235bbd2 appease gcc -Wuninitialized 2005-06-02 01:53:01 +00:00
lukem 6b5252b15f Fix numerous uninitalized variables.
Detected with gcc -Wuninitialized.
2005-06-02 01:51:58 +00:00
lukem 8573d5e23d appease gcc -Wuninitialized 2005-06-02 01:42:11 +00:00
lukem 903f12a55a Ensure yflag is initialized before trying to use it.
Detected with gcc -Wuninitialized.
2005-06-02 01:41:38 +00:00
lukem 658ed3362c appease gcc -Wuninitialized 2005-06-02 01:35:57 +00:00
wiz 7aee94451b New sentence, new line; grammar improvements. 2005-06-01 17:33:21 +00:00
sjg 5f60a7de65 Add :Ox for random ordering, based on patch from
Mike M. Volokhov <mishka@apk.od.ua>
2005-06-01 17:17:34 +00:00
lukem c7115c2b93 * Only print the "Trying <address>..." message if verbose and
there's more than one struct addrinfo in the getaddrinfo() result.
* Don't use non-standard "u_int".
2005-06-01 12:10:14 +00:00
chs 3f15e64c3c rename "kbucket" to "kmembuckets", for greater clarity.
don't forget to update vmstat this time.
2005-05-30 23:04:53 +00:00
lukem e2240cac60 * fetch_ftp(): preserve 'anonftp' across a disconnect() so that multiple
ftp auto-fetches on the same command line login automatically.
* auto_fetch(): use an initialized volatile int to appease IRIX cc.
2005-05-29 05:56:56 +00:00
lukem 4011dcc7ab formatbuf(): fix %m and %M to use the hostname, not the username. 2005-05-27 14:35:50 +00:00
lukem bed2c16589 Improve method used in fileindir() to determine if `file' is in or under `dir':
realpath(3) on non-NetBSD systems may fail if the target filename doesn't
exist, so instead use realpath(3) on the parent directory of `file'.
Per discussion with Todd Eigenschink.
2005-05-26 02:59:34 +00:00
wiz 077ec48387 Fix temp file paths. From Jeff Ito in PR 30316. 2005-05-24 11:21:40 +00:00
chs d5b80101e7 do not rely on the pre-evcnt interrupt counter kernel symbols being present.
if they do not exist, then interrupt stats are all in evcnts.
2005-05-22 14:00:59 +00:00
he d316ef3d77 Printf field widths and size_t don't always mix well, so cast to int.
Fixes build problem for alpha.
2005-05-20 07:26:01 +00:00
jdc 9c9b601a23 Make this compile on sparc64 (size_t != int). 2005-05-20 06:13:23 +00:00
lukem 943e24eb27 tab cleanup 2005-05-19 03:14:52 +00:00
lukem dc6635b518 Use size_t instead of int where appropriate. 2005-05-19 03:05:04 +00:00
lukem 947172fa2b Some const cleanups. 2005-05-19 02:55:37 +00:00
yamt 627b0d5099 remove anon related statistics which are no longer used. 2005-05-15 08:01:06 +00:00
dsl 4ed2a0cea6 Helps if the definition of xconnect() matches its declaration.... 2005-05-14 18:56:45 +00:00
lukem 7f321b8850 Fix some cast issues highlighted by Scott Reynolds using gcc 4 on OSX.4 2005-05-14 15:26:43 +00:00
lukem 8b69a0f5ac * Correct the "optlen" argument passed to getsockopt(3) and setsockopt(3)
in various places.  Fixes a problem noted by Allen Briggs.
* Improve warning printed when connect(2) for the data channel fails.
2005-05-13 05:03:49 +00:00
jmc 2c8974a914 Fix fallout from vm_anon changes 2005-05-11 17:41:52 +00:00
lukem 9ffae1bf46 Use socklen_t instead of int as the 5th argument to getsockopt().
Improve invocation of setsockopt() and associated failure messages.
2005-05-11 02:29:12 +00:00
lukem 9607ad079e Prevent an overly-long input line causing a core dump when editing is enabled.
Issue noted by Ryoji Kanai in FreeBSD Problem Report # 77158.
2005-05-10 22:59:52 +00:00
lukem 1282d958b8 When creating a relative symlink (-lr), use the originally provided `to_name'
to create and metalog, rather than using the realpath(3) modified version.
Fixes a problem with -lr when -ddestdir contains a symlink.

Add some XXX comments reminding us that the `from_name' in a symlink may
point outside of destdir in the metalog, even though our build process
doesn't trigger this.
2005-05-10 01:24:42 +00:00
lukem 980e24707e strvis(3) encode the link=... argument in the metalog.
(mtree(8) already requires this.)
2005-05-08 23:05:02 +00:00
matt 7ee69fc344 Avoid casting an lvalue. 2005-05-08 19:53:57 +00:00
lukem 19452aceea metadata_log(): remove leading -D destdir before strsvis(3) encoding
the path, not after.
2005-05-08 10:23:13 +00:00
christos ec9ba17179 Don't complain that we cannot make .END. 2005-05-08 04:19:12 +00:00
christos 733e0e6e72 Now that dependencies in .BEGIN, .END, and .INTERRUPT work, allow them. 2005-05-08 00:38:47 +00:00
lukem 1a090f24c2 correct a comment 2005-05-07 16:19:13 +00:00
christos c9da1629b6 Mark the interrupt job as special so that when we hit ^C with -j and we
have a .INTERRUPT target we don't print "token botch".
2005-05-03 22:58:14 +00:00
jwise c0b02c27ef Begin major reworking of calendar.history. Goals are:
* every day of the year should have at least one entry
  * all entries should have been fact-checked against reliable sources,
    particularly for dates
  * calendar should contain a fair balance of world history -- existing
    calendar, being based on that shipped in 4.2BSD, was very northern
    california-centric.

This commit meets these guidelines through March 13.  I will continue to
update this as time permits.
2005-05-02 15:20:43 +00:00
christos 592ba37fd4 Don't accept dependencies for .BEGIN, .END, and .INTERRUPT since they
don't make sense or work anyway.
2005-05-01 01:25:36 +00:00
christos 66b68ce36c PR/9566: Arne H. Juul: Document special targets that do not obey dependencies. 2005-05-01 00:37:10 +00:00
augustss 6fbdbcbb3e If running as a demon, make sure config file has an absolute path name.
Partly addresses PR 15769.
2005-04-29 17:18:30 +00:00
tshiozak 1cf148a9cc make the error message kindly if the last character is incompleted.
(bin/30051)
2005-04-25 13:57:34 +00:00
matt 0e46a38f38 Terminate variable argument list with NULL, not 0. 2005-04-25 01:33:03 +00:00
christos 557621f75a KNF, WARNS=3. 2005-04-24 17:46:06 +00:00
thorpej f190e3a631 Fix error message when input file does not exist. From James Lowden. 2005-04-24 17:08:42 +00:00
christos ab388e3703 sftp now uses libedit. 2005-04-23 16:54:09 +00:00
christos 76f53566bf PR/29806: Michael Van Elst: Off by one in code.
While I am there:
	- factor out the binary test to an inline function.
	- use size_t where appropriate.
	- check for <= 0 in gzread; it returns -1 on error.
2005-04-22 21:02:42 +00:00
christos 7e7ab613b8 trying to map a 4G file does not work nicely. Limit mmap to 64M. 2005-04-22 21:01:10 +00:00
atatat fab1a5fa39 Fix a trivial truncation case, and eliminate a corner case that might
print a nul character.
2005-04-22 03:36:48 +00:00
reed 3b5d4b35bd Reworded, because it previously made it sound like it only sent a
signal if path_to_pid_file field is present.

Also mention that /var/run/syslogd.pid is used as the default
path_to_pid_file.

This was brought up on netbsd-help and Richard Braun suggested
this should be documented.

Reviewed by grant and wiz.
2005-04-21 17:33:31 +00:00
reed 403f0facb1 Fix grammar: s/sent the/sent to the/ 2005-04-20 19:26:50 +00:00
lukem 9830ed3053 Safety boots: don't depend upon getpwnam_r() to set pwd to NULL on all
failures, especially as we're ignoring the return result.
2005-04-19 03:40:58 +00:00
christos 1246ae1e23 check for pwd != NULL 2005-04-19 03:17:35 +00:00
christos 30a161cf4d PR/21177: Christian Biere: ctype function issues. 2005-04-17 17:16:37 +00:00
christos 69637e8009 Write the database file into a temporary file first, because otherwise if
we don't specify an output filename, the database file we create will end
up being used during population as the database file to find entries quickly.
2005-04-13 04:50:22 +00:00
enami fa07a48b77 Don't put a space before function call operator. 2005-04-11 10:39:06 +00:00
enami e61e3e0913 byte offset and line count shouldn't be initialized inside the loop. 2005-04-11 09:41:02 +00:00
enami 168f415563 Fix indent and wrap long lines. 2005-04-11 09:40:15 +00:00
lukem b7856deff5 typo in previous 2005-04-11 05:47:56 +00:00
lukem a2fc7ddaf6 gratuitous whitespace cleanup (before someone else jumps the gun...) 2005-04-11 01:49:31 +00:00
lukem 50ff8d4548 Implement a timeout on the accept(2) in dataconn() and the
connect(2) in xconnect() by temporarily setting O_NONBLOCK
on the socket and using xpoll() to wait for the operation
to succeed.
The timeout used is the '-q quittime' argument (defaults to
60s for accept(2), and the system default for connect(2)).
Idea inspired by discussion with Chuck Cranor.
This may (indirectly) fix various problems with timeouts
in active mode through broken firewalls.

Implement xpoll() as a wrapper around poll(2), to make it
easier to replace on systems without a functional poll(2).
Unconditionally use xpoll() instead of conditionally using
select(2) or poll(2).
2005-04-11 01:43:31 +00:00
lukem ec95ee57f7 In fetch_url(), don't call freeaddrinfo(res0) too early, as we use pointers
to its contents later in the function.
Problem found by Onno van der Linden.
2005-04-10 03:13:23 +00:00
dsl 52375ca1f4 If the user removed the default string (after we had put it into the buffer
area - rather than in []), then don't reinstate it on exit
2005-04-09 13:12:31 +00:00
atatat 04274e4899 Don't allow the command length to mess up the formatting 2005-04-09 02:10:27 +00:00
christos 8b3f9b1455 Factor out tyname() so that it can be used both by lint1 and lint2.
Since type_t is different between lint1.h and lint2.h include the
appropriate file depending on the pass. Make the argument mismatch
error print the type names of the types involved. Now that we have
a tyname() function we can fix the rest of the pass2 warnings to be
more explanatory, but not now.
2005-04-07 16:28:40 +00:00
christos dac720be4f Update with pam descriptions.
XXX: needs more work.
1. code needs to be added in pam_group.so to handle indirect groups and
   documented.
2. the indirect group description outside before the customization section
   does not work with pam, but could be made to work once [1] is implemented.
2005-04-05 18:46:33 +00:00
peter e257b1a30b Clean up by using basename(3) from libc. 2005-04-04 16:47:54 +00:00
peter 72e415295c Clean up by using dirname(3) from libc.
Approved by christos.
2005-04-04 16:46:55 +00:00