Commit Graph

4286 Commits

Author SHA1 Message Date
aidan 919f6272de Modularize password changing mechanisms, as proposed in
<20000130122641.A8134@xanadu.kublai.com>:
Subject: PROPOSAL: making passwd pluggable (sort of)
Date: Sun, 30 Jan 2000 12:26:41 -0500
2000-02-14 04:36:20 +00:00
aidan d6bf7fdb89 Move include/kerberosIV/com_err.h to include/com_err.h. 2000-02-14 03:21:02 +00:00
aidan 0c25a9e4d1 Patch from assar@netbsd.org to make k5login.c work with both MIT and Heimdal
kerberos trees.
2000-02-14 03:17:43 +00:00
abs ddcdaa6b45 Set SU_FROM environment variable. This can be used to determine a 'su -'
shell from a real login shell (but only if you care).
2000-02-11 00:30:07 +00:00
tron baa67f49cc Rename send() to sendmessage() to avoid conflict with send(2) in "libc".
Patch supplied by Geoff Adams in PR bin/9385.
2000-02-10 12:34:42 +00:00
itojun 8b2de4271e use NI_WITHSCOPEID when printing multicast group with -inav. 2000-02-09 13:57:06 +00:00
briggs ec0bcc8e62 Add entry for birthday of John Towner Williams (08 Feb 1932). He's most
well-known for his movie scores, which include Star Wars, E.T., Close
Encounters of the Third Kind, Schindler's List, Indiana Jones (all
three), and many, many more.  He was also the 19th conductor of the
Boston Pops.
2000-02-09 13:05:55 +00:00
abs e7c902530e /appears/appeared/ 2000-02-08 23:48:54 +00:00
sjg 448f091254 Mention MAKEOBJDIRPREFIX and explain how it or MAKEOBJDIR are used.
Also fixed a typo in the .SUFFIXES bit.
2000-02-08 12:56:28 +00:00
sjg 49984c2f37 Make chdir_verify_path() do variable expansion on path in case
someone wants to do freaky stuff with $MAKEOBJDIR.
Initialize the Var system and set .CURDIR, MACHINE and MACHINE_ARCH
before chdir_verify_path() is called.
2000-02-08 12:43:25 +00:00
itojun e07bdd0262 use getnameinfo for "Trying ::1..." message, to enable printing of
IPv6 scopeid.
2000-02-05 17:44:11 +00:00
itojun 9fb53279e8 print IPv6 scopeid on -inv. with -in, scopeid is omitted due to insufficient
width.
2000-02-05 17:39:22 +00:00
jdolecek 1371d1b72d add support for msdosfs 2000-02-04 11:02:00 +00:00
jdolecek 0238a51cd0 use dprintf() instead of printf(), as other filesystem modules do 2000-02-04 10:43:34 +00:00
jdolecek 9200b8eabf move the mapping of vnode type to file type to separate function getftype()
and use it where appropriate
2000-02-04 10:35:46 +00:00
jdolecek 55fa2666be set mode accordingly to file type (similarily to what nfs_filestat() does)
file type is now viewed correctly for files on ntfs
2000-02-04 10:13:54 +00:00
jdolecek 5d9b6ac28b fix typo 2000-02-04 09:43:45 +00:00
mjl b3204d536b Add login_getpwclass to libutil as convenience function for
programs originally for FreeBSD.
Add parsing of "setenv" parameter which can be used to set
up an initial environment on login.
2000-02-04 02:17:14 +00:00
dmcmahill a0de3d7fa5 When no -e flag is used to specify the encoding, default to "ulaw". This
fixes PR bin/9329.  Thanks to Wolfgang Rupprecht (wolfgang@wsrcc.com)
for filing the PR and identifying the bug.  This change is slightly different
than the one provided in the PR.

Also, document the default encoding in the manpage.

This default is consistent with the default for audiorecord under solaris.
2000-02-02 05:02:25 +00:00
assar 0bb524cb22 (net_write): update prototype 2000-02-01 02:28:23 +00:00
assar a5499ad4dc (net_write): rename to telnet_net_write 2000-02-01 02:26:57 +00:00
lukem 0f9b481624 crank 2000-01-31 22:01:52 +00:00
lukem 7044ee274b define private type `sigfunc' as
typedef void (*sigfunc) __P((int));
and replace use of sig_t and void (*)(int).

certain other OSes define sig_t differently to that (they add extra arguments),
and it causes problems due to function mismatches, etc...
2000-01-31 22:01:03 +00:00
itojun a58fc4d3b8 sync with latest libipsec/kernel. 2000-01-31 14:25:42 +00:00
itojun 309d0c990b IPv6 support. (I thought I've committed these but was not yet) 2000-01-31 14:19:34 +00:00
sjg f618973b5f You cannot meaningfully test if a non-existent file has a correct
archive header, so don't try - just believe gn->type & OP_LIB.
2000-01-31 13:21:20 +00:00
itojun 741f9b63b2 clarify reverse lookup and -N.
getaddrinfo(AI_CANONNAME) does not imply reverse lookup.
2000-01-27 19:20:49 +00:00
sommerfeld 48e4d07088 Fix some obvious bogons; still doesn't seem to work quite right, though. 2000-01-26 14:23:41 +00:00
lukem be8fac301a crank version 2000-01-26 11:37:12 +00:00
lukem 0ac52b3131 roll back to using sscanf() instead of strptime() to parse `yyyymmddhhmmss'
strings, since the latter technically can't parse dates without non
alphanumerics between the elements (even though netbsd's strptime() copes).
2000-01-26 11:31:55 +00:00
lukem d2196602e3 put spaces between the % specifiers in the strptime format string 2000-01-26 10:15:40 +00:00
aidan b817536785 Separate kerberos5 implementation from kerberos4. 2000-01-26 01:18:48 +00:00
itojun 4978f056f6 better sync with #ifdef notdef part (in -i for AF_INET). 2000-01-25 16:07:13 +00:00
itojun 5fa65dbb58 don't truncate IPv4 entries on -i (with -v). it is mainly for
"Network" column (13 digits, it will be 18 digits in maximum).
2000-01-25 15:56:55 +00:00
lukem dfee5c0f62 crank version 2000-01-25 07:14:11 +00:00
lukem 61d86056a0 work around bug in apache 1.3.9 which incorrectly puts a trailing
space after the chunksize.
noted by Jun-ichiro itojun Hagino <itojun@itojun.org> in [bin/9096]
2000-01-25 07:13:45 +00:00
lukem ec9eefea83 be harsher about workaround 2000-01-25 06:45:18 +00:00
lukem 852392d00d work around lame ftpd's that don't return a correct post-Y2K date in
the output of `MDTM'.

obviously the programmer of aforementioned lame ftpd's did something like
	"19%02d", tm->tm_year
instead of
	"%04d", tm->tm_year + TM_YEAR_BASE

fixes [bin/9289] by jbernard@mines.edu
2000-01-25 06:11:00 +00:00
mjl 8cb2edab13 Removed code that would squash root's path when suing to root,
restores old behaviour of su.
2000-01-25 02:19:19 +00:00
mycroft 5086341bbf Don't try to use /tmp/Makefile... 2000-01-24 18:07:54 +00:00
mycroft c2c3950608 More .mk file fallout. *sigh* 2000-01-23 20:59:11 +00:00
mycroft 9561c66413 More .mk file fallout. 2000-01-23 18:26:14 +00:00
mycroft 5cc7cec6d9 More .mk file fallout. 2000-01-23 18:00:38 +00:00
mycroft 4e558e01fa Don't apply suffix rules for .PHONY targets. (gmake doesn't do this either.) 2000-01-22 19:28:11 +00:00
mjl 8e380b472c Removed some fallback cases since that is now done in libutil. 2000-01-22 09:48:52 +00:00
mycroft f5d7100e26 Nuke `extern int errno;' in code we compile with -Wstrict-prototypes. We get
the correct definition from errno.h.
2000-01-21 17:08:33 +00:00
lukem b5a4e862d8 complete_ambiguous(): be consistent about completing unambiguous matches; if
the word is already complete then return CC_REFRESH so that the higher layer
may append a suffix if necessary.  Fix from Launey Thomas <ljt@alum.mit.edu>.
2000-01-20 13:19:46 +00:00
enami 3ff6bc9f03 Default value for -s option is ARG_MAX - 4096, not - 2048. 2000-01-20 04:22:05 +00:00
christos 4cd25afac7 Create temporary files carefully, to avoid security problems. Idea borrowed
from the botched FreeBSD implementation...
2000-01-19 23:39:37 +00:00
itojun e30f445f00 print IPv6 multicast group on -ia (-iav will avoid truncation) 2000-01-17 18:24:37 +00:00
itojun 08de376ec3 fix default route determination for inet6. 2000-01-17 18:03:51 +00:00
itojun ccef23e54a mask addresses properly on netstat -inv.
From: Matt Thomas <matt@3am-software.com>
2000-01-17 17:54:56 +00:00
itojun 65d8ab7ea0 IPv6 support.
NetBSD PR: 9199 (with minor changes)
2000-01-17 16:14:39 +00:00
hubertf e27fbcf4a2 Properly print the "B"(lackhole) flag (as documented :).
Patch submitted in PR 9190 by URA Hiroshi <ura@hiru.aoba.yokohama.jp>
2000-01-15 01:39:54 +00:00
christos b41faac27c don't bitch if madvise returns EOPNOTSUPP 2000-01-15 01:10:12 +00:00
mjl ec1d133cd3 Eliminate hard coded buffer sizes in fgets() statements, use
strlcpy() to avoid buffer overflows, increase filename buffer
to MAXPATHLEN. (from OpenBSD)
2000-01-14 06:53:48 +00:00
mjl 9dff294326 Fix off by one error in string length calculation (from OpenBSD rev 1.6) 2000-01-14 06:21:25 +00:00
mjl e6ac440ed4 Implement login_cap capability lookup. 2000-01-14 02:39:14 +00:00
mjl eb1d660e28 Clean up changes a bit. 2000-01-13 12:43:19 +00:00
ad b7de5e4494 Two tiny formatting nits in each file. 2000-01-13 12:39:04 +00:00
mjl 07053cf7c1 Re-enable login_cap processing, now that a non-existing login.conf
won't make it crash. Also make it less noisy in that case.
2000-01-13 06:52:47 +00:00
mjl cfdb7e0720 Ack. Disable login caps, until problems are fixed. 2000-01-13 06:30:31 +00:00
mjl 4863ee6f07 Add login.conf capability setting. 2000-01-13 06:17:56 +00:00
mjl 4b9294447c Wrap login.conf database access in ifdef LOGIN_CAP. 2000-01-12 05:13:32 +00:00
mjl e8a1b04582 Changes to passwd(1) for login.conf. Supported capabilities are
minpasswordlen and passwordtime (expiry time).
2000-01-12 05:04:41 +00:00
is 05af6871fb new symbol names for former Elf_xxx 2000-01-11 20:33:21 +00:00
itojun f70b9a5724 don't choke on non-INET6 kernel, or non-IPSEC kernel.
cleanup error handling on mode change failure.

TODO: non-IPv4 kernel support should be improved.  "netstat" should be okay,
"inet.ip" and "inet.icmp" needs more trick.

NetBSD PR: 9157
2000-01-10 21:06:15 +00:00
sommerfeld dd51978a5a Make rules for finding object directory match those used by make:
obj.${MACHINE} takes precedence over obj.
the generated makefile should probably just use the print-objdir hack instead.
2000-01-09 16:37:28 +00:00
is ee9bf4dc7c Make this also work for PowerPC targets. 2000-01-09 11:26:01 +00:00
tsutsui 5cb06e6456 Use uname(3) to determine MACHINE type. 2000-01-09 04:54:53 +00:00
itojun 4bed540017 oops, avoid duplicate free(). 2000-01-08 23:34:17 +00:00
itojun d7b4ec9207 - implement layered help.
Suggested by: Andy Doran <ad@mr-magoo.sports.gov.uk>
- inet6.ip6 and ipsec menu
- u_quad_t printing fix
- #ifdefs to allow compilation on 1.4.x
2000-01-08 23:12:36 +00:00
msaitoh 049ad0d982 machine/exec_coff.h -> sys/exec_coff.h 2000-01-07 09:40:33 +00:00
sommerfeld c657ebbc95 Pay attention to the netmask of routes to 0.0.0.0;
e.g., a route to 0.0.0.0/1 is *not* a default route.

Inspired by a patch by Rodney Grimes sent to the zebra list.
2000-01-07 04:49:11 +00:00
itojun 96a8bc922e add command line -n flag, which is same as "netstat numbers".
without it, we can't disable name resolution before the resolution starts.
2000-01-07 04:47:23 +00:00
billc 7ad9ba975f copyright year change (thanks cgd) so we emit , 2000 now. 2000-01-07 00:00:37 +00:00
wrstuden f21e998aad Add a few little changes needed to get this to compile on IRIX 6.4. 2000-01-06 22:23:20 +00:00
tron ca8245133c Add timebase (1900 years) to system time before passing it to date time
parser. Fixes PR y2k/9122 by Lars-Johan Liman.
2000-01-06 00:44:09 +00:00
tron 4c5ce0e4da Unix system time starts in 1970 and not in 1969. 2000-01-06 00:34:38 +00:00
ad 26966d13f4 - ntohl() -> be32toh().
- Dispence with some of the idiocy in run().
- Couple of nits.
2000-01-05 18:15:20 +00:00
itojun 7b5dfc58ad support IPv6. commands under "netstat" are IPv6 ready.
IPv6 is supported by filters (":ignore ssh") as well.
TODO: do something about line truncation?
TODO: inet6.icmp6?  ":help" will not fit into single line...
2000-01-05 11:59:12 +00:00
itojun 88ac9b1712 remove dupplicated prototype defs for file static funcs. 2000-01-05 11:50:21 +00:00
itojun 5784d552dd avoid null pointer access on ":show". 2000-01-05 11:48:21 +00:00
msaitoh dad5b69f37 fix printf format for inet.ip
(because the entries in struct ipstat is u_quad_t)
2000-01-04 15:17:00 +00:00
itojun 0b66a621f9 bring in latter half of PR 9080 (host table allocation error check). 2000-01-04 15:12:42 +00:00
eeh 5fc5fe98a8 Add COMPAT_NETBSD32 support. 1999-12-31 22:27:59 +00:00
tron 3f173f204a Increase default size of magic entries array to 4096 because NetBSD's
magic(5) has more than 2048 entries already.
1999-12-31 13:09:20 +00:00
tron 6f563995b5 Do reallaction of magic entries array carefully to avoid possible memory
leak. Patch based on PR bin/9081 by Jun-ichiro itojun Hagino.
1999-12-31 13:07:59 +00:00
tron a3045c188e Add missing memory check in port table handling. Patch based on
PR bin/9080 by Jun-ichiro itojun Hagino
1999-12-31 12:58:12 +00:00
garbled faa0b30255 Add FILES and EVIRONMENT sections detailing what files these programs use,
where they live, and how to modify that behavior.
1999-12-31 04:03:18 +00:00
itojun e8834c8cd2 avoid memory leak on realloc() failure. 1999-12-30 09:52:03 +00:00
cgd 1fa77b6d55 Use:
.Sh SEE ALSO
rather than:
	.Sh "SEE ALSO"
The former is the correct form, and it makes a (barely persceptible)
difference in formatting for some output devices (e.g. 'ps').
1999-12-29 06:54:00 +00:00
aidan 1cda1876da Fixed 'login in free' warning in kdestroy(). 1999-12-26 17:47:18 +00:00
jwise 2a1f30e2df GC now-spurious prototype 1999-12-25 01:49:25 +00:00
mjl 4f10733450 Fix yppasswd part of passwd. This has never worked since the
password map was split and master.passwd.byname was introduced.

XXX This is a temporary fix until luke finds some time to add
the necessary support glue to libc for TRT.
1999-12-23 01:02:52 +00:00
kleink c23c312a55 * Fix a display buglet: if the process list is exhausted before the window's
bottom is reached, clear the remaining lines, lest there be stale process
  entries if the process list shrinks.
* Implement a top(1)-like `user' command in the ps display.
1999-12-22 14:46:14 +00:00
kleink 1a2a0445fa Implement XCU5 prompt mode (-p). 1999-12-22 14:41:00 +00:00
kleink 4ce1b28f8c Initialize locale on startup. 1999-12-22 14:39:18 +00:00
lukem 80b66e48af change references from draft-ietf-ipngwg-url-literal-01.txt to RFC 2732 1999-12-21 13:00:18 +00:00
fair 37d4a35950 A gencat(1) manual page, which satisfies PR 4749 1999-12-21 09:25:43 +00:00
jwise 850fb37f89 Fix error handling throughout. First off, it is not true as claimed in swap.c
that `systat doesn't handle errors'.  Second off, errx should not be used directly, since
the terminal should be cleaned up before bailing.  Third off, whatever we do we need
to be consistent.

There, I feel better now.
1999-12-20 23:11:50 +00:00
fair aff3242363 fix trivial nroff source bug, per PR 8724 1999-12-20 22:53:44 +00:00
jwise bc8f4e2f46 Be consistent about whether to block SIGALRM before calling command() -- don't
ever do so, as the first thing command() does is block SIGALRM.
1999-12-20 21:59:29 +00:00
lukem 00a4e0e7ce need <string.h> for strlen() 1999-12-20 21:49:11 +00:00
jwise 24b9ee353a Nuke assignment unneeded after last commit 1999-12-20 21:46:10 +00:00
jwise b037ddd3b7 More cleanup -- use strtok() rather than rolling our own not-quite-correct version. 1999-12-20 21:42:50 +00:00
jwise 5a69f1bd85 Block alarm signals while displaying -- there's no reason to allow recursive
display at all.
1999-12-20 21:04:41 +00:00
jwise d0e3cec262 1.) Clean up keystroke processing
2.)  Add the all-time most requested feature:  hitting space or CR while
     not in command mode now causes an instant refresh
1999-12-20 20:49:06 +00:00
jwise 299c3534d3 TNF copyright -- I will do the paperwork to give these over asap. 1999-12-20 19:31:47 +00:00
itojun 8471c4a69a fix "netstat numbers". 1999-12-20 17:26:50 +00:00
jwise 81ed25dba3 Knee-jerk snprintf()-ism. 1999-12-20 17:08:52 +00:00
kleink ece19a5225 Report disabled control characters as <undef> (like stty(1) does); fixes
PR bin/9019 from SAKAI Atsushi <a-sakai@echo.nuee.nagoya-u.ac.jp>.
1999-12-20 14:36:11 +00:00
jwise be9a446256 G/C function used in old command parsing 1999-12-20 04:06:25 +00:00
jwise 4c0fbd4c92 Two things:
1.) fix a bug which caused coredumps when starting with no mode arguments
  2.) move to table-lookup for mode-specific command parsing as well.
      all command matching is now table-driven.
1999-12-20 03:45:01 +00:00
bouyer 7616130d51 Explicitely cast to (u_quad_t) calls to btodb() and dbtob() to avoid
int overflow. It's now possible to add/display quotas of more than
4G.
XXX I'm sure there is a PR open on this but I couln't find it with the
usual search engines. If someone knows it's number ...
1999-12-16 17:29:52 +00:00
jwise 30af11dbd4 Sigh... this is the missing part of last night's final commit -- perform
the same simplification on mode parsing for the command line as for user
commands.

My apologies to anyone who tried to build systat this morning.
1999-12-16 17:15:48 +00:00
jwise 099afa1959 End special-casing of `start' and `interval' global commands.
Vastly simplify handling of mode switches, and short-syntax interval
changes.  Substring matching of mode names and commands will come
shortly, however the previous method of substring matching modes (it was
not available for commands) is currently not working.

TODO: implement table lookups for mode-specific commands.
1999-12-16 06:16:16 +00:00
jwise 420c21c43c Handle arguments to global commands. Note that the `interval' and
`start' global commands are still special cased, which will change
1999-12-16 04:49:32 +00:00
jwise b5f0c03b3a Backout unintended change 1999-12-16 04:41:49 +00:00
jwise 7fc29b6116 Add a file missed in last commit 1999-12-16 04:40:03 +00:00
jwise 06f376613f Rototill global command matching -- switch from ad-hoc tomfoolery to a
table lookup.  This will make prefix matching and so on easier.

Expect a similar change for mode-specific commands before too long.

While there, rename some structures with misleading names.

Watch this space for more changes soon.
1999-12-16 04:02:22 +00:00
thorpej 2b9d9a9499 Make this compile on the Alpha again. 1999-12-16 00:58:17 +00:00
bouyer 18e200396c Bump a static char array from 8 to 255. Avoids rpcgen core dumps on some
long struct name.
XXX There are a lot of static arrays in there, bounds should be checked
XXX more carrefuly. All of them seems big enouth (>100) for normal use, though.
1999-12-15 16:47:35 +00:00
itojun 033763d6c9 per-interface statistics.
bring in and enable KAME scopeid hack.
lots of cleanups.
(sync with latest KAME)
1999-12-13 15:22:55 +00:00
christos 51d639caed Enable hints processing so that we can see the mappings. 1999-12-13 09:10:16 +00:00
itojun 1e75e9ee55 remove setuid(getuid()). they are unnecessary as noone is going to
setuid telnet(1).

i'm not sure why it is here (maybe someone reused this code from
other setuid'ed program, or someone cut-and-pasted the code from
somewhere else?), it was from revision 1.1 (= 4.4BSD).

briefly discussed in: tech-net?
1999-12-13 04:52:20 +00:00
itojun 62b5e94d25 [host]:filename syntax for IPv6 case. 1999-12-13 04:44:55 +00:00
lukem f442e9dbbd add dependency on version.h 1999-12-12 02:14:53 +00:00
lukem eee70cc0f0 crank version 1999-12-12 02:12:29 +00:00
lukem d30bdcd79c separate out the main `data pump' loop into two: one that supports
rate limiting and one that doesn't. simplifies the code, and speeds
up the latter case a bit, at the expense of duplicating a few lines...
1999-12-11 02:02:21 +00:00
lukem 3851d504a7 Fix chunked support; probably broke after rate limiting was added.
Problem noticed/debugging assisted by giles lean <giles@nemeton.com.au>.

XXX: rate limiting with chunked xfers might not limit correctly (i.e,
the limit may be too high or too low); fixing this is non trivial,
and will probably occur if i ever rototill fetch_url()
1999-12-11 00:56:13 +00:00
ad 0ac257319d Create link to newsyslog.conf.5. 1999-12-07 11:28:13 +00:00
aidan 5375ac8703 Made login continue without kerberos when there is no krb5.conf present
(and KERBEROS5 is defined).
1999-12-05 23:39:11 +00:00
lukem ef03015b86 move version into separate file to reduce recompilation after version crank. 1999-12-05 22:54:35 +00:00
lukem bcd625e612 crank version 1999-12-05 22:50:06 +00:00
lukem e36391c2c9 * remove unnecessary freeaddrinfo(res), since res0 was changed to be
freed earlier in itojun's last commit. fixes [bin/8948].
* remove `const char *reason'; it was being assigned but not used.
1999-12-05 22:49:27 +00:00
fredb 2cfe71bc9a More fallout from CL* purge. 1999-12-05 18:54:34 +00:00
mason 02a7de3c63 Fixed wording error. 1999-12-03 15:09:24 +00:00
fair b426e15b59 The never-sufficiently-damned Network Solutions has whacked around
the WHOIS service, again. New target: whois.networksolutions.com

This program should be replaced with one that does WHOIS++ so that it
can hit all the registries for data.
1999-12-03 08:22:09 +00:00
itojun 6ceceb260b clarify getaddrinfo() loop. try to contact all possible addresses
unless we experience fatal error.
XXX changed location of setuid(getuid()), may need someone's review.
1999-12-03 06:52:13 +00:00
itojun 4b402f1483 clarify reverse address lookup (-N). AI_NUMERICHOST is for forward lookup.
XXX RFC2553 does not say that AI_CANONNAME means reverse lookup.
we need to check if getaddrinfo(3) implementation is correct.
1999-12-03 06:34:24 +00:00
itojun 05e574f6a9 fix memory leak in fetch_url (no freeaddrinfo was there).
sync with recent KAME.
1999-12-03 06:10:01 +00:00
tron b11e523694 Define "_KERNEL" not "KERNEL" before including "netinet6/ip6_mroute.h". 1999-12-02 14:31:22 +00:00
lukem 0826be2b88 cleanup formatting, improve example 1999-12-01 12:03:16 +00:00
ad 22ee5fa9d2 Shiny new manpage for newsyslog(8), based on that from FreeBSD. 1999-11-30 12:04:14 +00:00
ad 604db10508 - Add '-F' option which forces rotation of logs (from FreeBSD).
- Add 'sigtype' field specifying signal to be sent (from FreeBSD).
- Add 'N' flag which specifies that no signal should be sent.
- Fix some breakage.
1999-11-30 12:03:24 +00:00
pk 9c865e3e82 No need for <machine/cpu.h> here. 1999-11-29 11:15:13 +00:00
lukem d0090fb777 * implement xsl_init() and xsl_add(); error checking forms of sl_{init,add}()
* fix bug where the second press of <TAB> on an empty word (i.e, list
  all options) may have resulted in an strncmp() against NULL.  (detected
  by _DIAGASSERT())
1999-11-28 06:32:04 +00:00
mrg ef2d33cbd1 add some percentages in here. 1999-11-27 05:58:04 +00:00
soren 819a9c5fd3 Print Internet6 header properly without -f. 1999-11-27 02:19:34 +00:00
lukem 21da08ce70 in cleanuppeer(), reset username to NULL after free()ing it.
fixes [bin/8870] by Wolfgang Rupprecht <wolfgang@wsrcc.com>
1999-11-27 01:00:06 +00:00
lukem 7047fe4a36 bump version 1999-11-26 23:26:05 +00:00
lukem f25449279d * complete_remote(): use remglob("", ...) instead of remglob(".", ...),
for listings of the current working directory; some ftp servers don't
  like `NLST .'.
  [noted by Giles Lean <giles@nemeton.com.au>]
* recvrequest(): treat remote=="" as remote==NULL when calling command().
  (to support the above change)
* support `[user@]' in `[user@]host' and `[user@]host[:][path]'.
  [based on idea (and initial code) from David Maxwell <david@fundy.ca>]
* `idle' may be invoked without any args
* reformat some comments
* reformat usage string in program and man page
* call updateremotepwd() after successful login, not after successful connect
* always call setsockopt(, IPPROTO_IP, IP_TOS, ) (et al); using #if
  defined(IPPROTO_IP) doesn't work on certain foreign systems where
  enums instead of #defines are used...
  [noted by Matthias Pfaller <leo@dachau.marco.de>]
1999-11-26 21:41:55 +00:00
msaitoh 6f52aeb8d1 cdplay now uses libedit! 1999-11-26 18:34:58 +00:00
msaitoh 17b68982ad crunchide for coff (COFF executables not currently supported!) 1999-11-26 13:47:52 +00:00
msaitoh 44181778bd fix following sequence:
telnet localhost
	cat (no argument)
	control-C
	(not returned to the shell prompt)
	(push enter key)
	(returned to prompt)
1999-11-26 07:33:52 +00:00
mrg f22d12ed49 back out rev 1.23 (don't stat PHONY targets). it broken the libcrypto
build by causing everything to be remade everytime.  this fixes PR#8419.
1999-11-25 22:34:16 +00:00
itojun d8470360b1 more clarification to field width of netstat -rn -f inet6. 1999-11-24 08:45:43 +00:00
itojun 22758aaba3 use old WID_{DST,GW} value (field width for netstat -rn) for non-INET6
address families (see tech-net discussion).
1999-11-22 14:13:53 +00:00
chopps 13232a2f19 Don't restore the tag file name's trailing '/' until after the length
is taken.  This fixes relative paths in tags files.
1999-11-22 05:53:58 +00:00
kristerw e71aea426d Typos (from OpenBSD) 1999-11-19 22:29:24 +00:00
bouyer f7e8e4aebd Change printf formats for 64bit counters. 1999-11-19 10:44:33 +00:00
enami 82d7115cf2 Don't pass so many args to .Nd macro. It just overflows. 1999-11-19 01:12:39 +00:00
simonb 7f7397e603 Don't free "buf" in closebufcache() - initbufcache() only gets called
once per systat invocation, not each time we switch to the bufcache
display.

Fixes core dump noted by Andy Doran when switching back and forth to
bufcache display.
1999-11-15 23:39:33 +00:00
sommerfeld f25cd19a6a Improve summary line so jhawk can find this command using apropos 1999-11-15 14:48:32 +00:00
mrg 9042b087c4 avoid using CLBYTES (which is based on NBPG). 1999-11-15 10:54:40 +00:00
simonb b80f4eaf1d - Add `bufcache' display which shows buffer cache usage per filesystem,
ala the monitor(1) command for Ultrix.
- Allow `h' or `?' to show the command list (same as `:help').
- Sort commands in cmdtab.c and systat.1
1999-11-15 06:16:56 +00:00
lukem ecb8a0755a - implement `set rprompt'; right side version of `set prompt'. depends on
EL_RPROMPT support i added to editline(3).
- allow $FTPPROMPT and $FTPRPROMPT to override defaults for the relevant
  prompts
- move `%' formatting code from prompt() to expandbuf().
- implement `%.' and `%c', similar to the same % codes in tcsh(1)
  (functionality I added to tcsh nearly 6 years ago), except that `%.'
  always does `...trailing' and `%c' always does `/<x>trailing'.
- unknown `%foo' codes get printed as `%foo'
1999-11-12 02:50:38 +00:00
soren 6fc41af333 Sync usage() with man page. 1999-11-11 03:06:04 +00:00
lukem 14fbd5079e - implement updateremotepwd(); update the global variable `remotepwd'
to contain the remote working directory.
- add `set prompt', a user configurable prompt. (defaults to `ftp> ').
  the following escape characters a la tcsh(1) are supported: %/, %m,
  %M, and %n.
- add global var `username'; used by prompt code
- fix a couple of minor memory leaks
- bump version
1999-11-11 02:53:02 +00:00
lukem 2ef6c64e80 whitespace nits 1999-11-11 01:19:11 +00:00
lukem b2edff6b32 - implement restarting file:/// non-proxied http:// URLs (with -R).
- fix a semicolono which stopped file:/// from working
1999-11-10 07:34:41 +00:00
lukem f8a1dcf0d2 - split the version string into product and version
- be consistent about reporting the version between:
	+ status command
	+ about:version URL fetch
	+ User-agent sent in http requests
1999-11-09 22:03:49 +00:00
drochner 85cbf55d16 Since our gcc doesn't warn about NULL format strings anymore, we can
fix the incorrect err(1, "%s", "") et al.
Closes PR bin/7592 by cgd.
1999-11-09 15:06:30 +00:00
lukem 3889281dc1 when using http/1.1 for unproxied http requests, send the port as a number
(e.g, `:80') instead of a name (e.g, `:http'), because the former is the
supported method that actually works...  noted by hubertf@netbsd.org
1999-11-09 07:46:22 +00:00
lukem f8233fe3ba prevent minor memory leak (unnecessary strdup) 1999-11-09 07:26:50 +00:00
kleink c9954566b9 When we have to print usage instructions, don't indicate success in the exit
status.
1999-11-08 10:21:20 +00:00
mycroft 411b41e76c Update for ld.elf_so changes. 1999-11-07 00:30:18 +00:00
kleink 513b25c0e9 For temporary files' pathnames, check $TMPDIR before falling back to _PATH_TMP. 1999-11-06 15:11:46 +00:00
kleink 1447a4671d * Don't treat failure to open a file as fatal error; print a warning to
standard error, arrange for a non-zero exit status and continue with the
  next file.  Addresses PR bin/8748.
* GCC vs. ANSI: a cast doesn't yield an lvalue.
* Use MAP_FAILED.
1999-11-06 15:05:45 +00:00
lukem 3a2e129c54 add trailing "," to memory names (makes it easier to read) 1999-11-05 07:25:14 +00:00
mycroft ff488606e6 Nit: In the compatibility case, set the seconds to 0. 1999-11-05 04:54:10 +00:00
erh 6752f572d8 Remove ELFNAME defines since they are defined in sys/exec_elf.h 1999-11-04 02:00:17 +00:00
hwr 51515f302b Fix bogus section header. From PR 8735. 1999-11-03 21:45:57 +00:00
wennmach 8d67a1ce88 Fix a documentation bug in this man page: The Gregorian Reformation in Great
Britain and its colonies eliminated 11 days (not 10), following
September 2, 1752.

From "A.D. 1751. Anno vicesimo quarto GEORGII II. CAP. XXIII.
      An Act for Regulating the Commencement of the Year; and for
      Correcting the Calendar now in Use.":

"... and that the natural Day next immediately following the said 2nd Day of
 *September* [1752], shall be called, reckoned and accounted to be the 14th
 Day of *September*, omitting for that Time only the 11 intermediate nominal
 Days of the common Calendar;

 and that the several natural Days, which shall follow and succeed next after
 the said 14th Day of *September*, shall be respectively called, reckoned and
 numbered forwards in numerical Order from the said 14th Day of *September*,
 according to the Order and Succession of Days now used in the present
 Calendar; "

Added a caution note on using cal for very old dates.

Problem mentionned in PR 5215 by John Franklin (franklin@bev.net).

Thanks to Perry Metzger for his comments and for reviewing this man page.
1999-11-03 14:32:25 +00:00
lukem ed43430a7c support `about:version'. also display the version in the output of `status'. 1999-11-03 07:42:01 +00:00
lukem a5d1d869e7 hookup(): when using getservbyname() (when getaddrinfo() isn't available), if
the provided port is a valid number use that rather than trying to do
getservbyname() against it.
fixes a problem on foreign systems noted by Chuck Silvers <chuq@chuq.com>
1999-11-03 02:03:08 +00:00
jwise 768d7ab7a9 GC savestr() function. Makes this build again on i386 (this hadn't been used
for a while, but showed up due to recent static poisoning.)  Note that although
fmt.c builds against ../mail/head.c, this function never actually gets used.
1999-11-02 21:17:16 +00:00
drochner 1899563c96 make it compile after ELF definition changes 1999-11-02 21:13:17 +00:00
jwise d6907ab16b Use <inttypes.h> to get typedefs of integral types instead of local #defines
in "config.h".  Makes this compile again.
1999-11-02 21:05:20 +00:00
jdolecek 5f8283ea12 process correctly whole line even when it's longer than BUFSIZ characters -
previously, all characters of a line after the first BUFSIZ characters
	were just trimmed
while here, do some const & static poisoning
1999-11-02 12:50:04 +00:00
lukem 3f8c4dac86 revert previous 1999-11-02 10:55:47 +00:00
lukem 0895d2339e remove superfluous '-' in getopt string 1999-11-02 10:52:49 +00:00
soren 6df42c85a5 Make pool output fit in 80 columns on most machines. 1999-11-02 06:23:50 +00:00
jdolecek facd78dc9f adapt to last ntfs changes - struct ntnode doesn't contain i_mode
anymore, get the mode from appropriate ntfsmount structure
1999-11-01 19:56:20 +00:00
christos 7d48644528 Resolve corn flakes. 1999-11-01 17:39:26 +00:00
christos 39cf80bb8c new version of file(1) 1999-11-01 17:30:12 +00:00
thorpej 0bd35e4157 This program has to use KVM alrady, so use that to read uvmexp, rather
than sysctl.  This can now read VM stats from crash dumps.
1999-10-30 22:49:58 +00:00
explorer 7e9d7f75aa make change to the yacc output bits, not to the yacc binary bits 1999-10-29 16:41:51 +00:00
explorer 3cdbacc45a defined(__NetBSD__) && defined(__RCSID) 1999-10-29 16:35:46 +00:00
itohy 2f4c0d5e74 Make ktrace(1) not affect interactions between processes.
Following examples show the cases.

    % ktrace -f - false >/dev/null && echo wrong
    wrong
    % ktrace -f - -i /usr/sbin/update >/dev/null
    (does not return to command line)

That is, back out last change and restore the roles of parent/child for
ktrace(1).  The ktruss(1) stuff still remains.
Yes, ktruss(1) has the problems.  Better implementation is expected.
1999-10-29 09:11:49 +00:00
explorer 2e74cdd712 Only use __RCSID() if defined(__NetBSD__) so the yacc output files can
be used on non-NetBSD platforms, too.
1999-10-27 20:28:11 +00:00
kleink 522cbf0248 Update to match new SVR4-style definition names in <sys/exec_elf.h>. 1999-10-25 13:55:06 +00:00
lukem 4f2d3550d0 new features:
- add `usage'; displays the usage of a command.
  implemented by calling the c_handler() with argc = 0, argv = "funcname".
- add `passive auto'; does the same as $FTPMODE=auto.
- add `set [option value]'; display all options, or set an option to a value.
- add `unset option'; unset an option.
- add getoptionvalue() to retrieve an option's value, and replace a few
  global variables with calls to this.
- implement cleanuppeer(), which resets various bits of state back to
  `disconnected'. call in disconnect() and lostpeer().
- support completing on `options'.
- improve recovery after a SIGINT may have closed the connection.
  XXX: there's still a couple to fix

other stuff:
- various consistency fixes in the man page.
- ensure that the command usage strings in the code and man page match reality.
- mput/mget: check that the connection still exists before each xfer.
- minor cosmetic changes in confirm().
- set code correctly in sizecmd() and modtime()
- don't need \n in err() strings.
- change lostpeer to take an argument (rather than casting (sig_t)lostpeer
  in signal handlers)
- knf and whitespace police.
1999-10-24 12:31:36 +00:00
mrg 4b5ab45441 fix bug introduced in 1.12:
only return a header length of 0 if we are using -f (force), not
in the case when we know how long the header is.  this stops from
playing the audio header.
1999-10-23 04:20:14 +00:00
hannken b383db3e6c Undo last change. While these macros are defined in exec_elf.h, they are
enclosed by `#ifdef _KERNEL'.
1999-10-22 10:47:37 +00:00
erh e896ce55a0 Remove ELFNAME macros which are already defined in exec_elf.h 1999-10-21 21:16:07 +00:00
lukem f74df4b2ea * fix up confirm() (broke `a' and `p' in last commit)
* simplify main loop (don't need `top' variable any more)
* use a struct sockaddr_in6.sin6_addr for the result from inet_pton(),
  rather than u_char buf[16]
* add a few more comments
1999-10-13 02:47:54 +00:00
lukem 28f9cbb866 s/ARPANET/Internet/ ... 1999-10-12 08:11:59 +00:00
lukem da626f2307 a few user interface and cosmetic tweaks:
* confirm(): move from util.c to cmds.c. display mnemonic string in its prompt.
  add support for `q' (terminate current xfer), `?' (show help list)
* in various signal handlers, output a linefeed only if fromatty.
* if fgets(stdin) returned NULL (i.e, EOF), clearerr(stdin) because you don't
  want future fgets to fail. this is not done for the fgets() in the main
  command loop, since ftp will quit at that point.
* unless ftp is invoked with -a, don't retain the anonftp setting between
  hosts (`ftp somehost:' sets anonftp, but you don't want that to `stick'
  if you close that connection and open a new one).
1999-10-12 06:04:59 +00:00
augustss 551f9b0d0c Fix timer reset bug when playing multiple songs. 1999-10-11 12:52:10 +00:00
lukem d5b5f0e034 * in the SIGINFO/SIGQUIT handler, print a newline before displaying
the xfer stats
* crankrate() should have a K&R decl (for consistency)
1999-10-11 12:35:42 +00:00
lukem bd5207d5ac if editing is enabled when intr() is called, print a newline. (cosmetic fix) 1999-10-11 12:34:17 +00:00
mrg 45cd15f3ed recognise "dty" the same as we do "tty" 1999-10-11 11:55:27 +00:00
lukem 08ebd97c48 use sigjmp_buf for sigsetjmp(), instead of jmp_buf.
noted by Havard.Eidnes@runit.sintef.no.
1999-10-10 22:33:54 +00:00
mrg 345a3bce75 let "systat vmstat" say "1 user" not "1 users" 1999-10-10 01:07:03 +00:00
lukem afb965e778 allow a second SIGINT during the "xfer aborted. waiting for remote to finish abort."
stage. if this occurs, just call lostpeer() to close the connection.  whilst this
might be considered brutal, it's also extremely handy if you're impatient or there's
lossage at the remote end.
1999-10-09 12:48:12 +00:00
lukem a53d7d57a9 * use sigsetjmp()/siglongjump() instead of setjmp()/longjmp(); the latter
don't save the signal mask on some foreign systems.
* ensure signal handlers don't use stdio and do reset errno if they
  don't exit with siglongjmp()
* use a common SIGINT handler for {send,recv}request()
1999-10-09 03:00:55 +00:00
msaitoh 0fcbe067c6 s/ the the / the / 1999-10-08 20:13:42 +00:00
msaitoh 759d929514 s/ as as / are as / 1999-10-08 18:13:16 +00:00
simonb 7d7c6d9f66 Minor nit - don't append a '/' to tmpdir if it already ends in a '/'. 1999-10-07 02:05:22 +00:00
ad 37a134f54b Add a new optional parameter to the configuration file, specifying the
path to a file containing a PID to send SIGHUP to. If omitted, the default
is to signal syslogd. Idea from FreeBSD.
1999-10-06 13:26:28 +00:00
lukem ce2d63fcbf more propaganda :) 1999-10-06 08:57:46 +00:00
lukem 141ae91ed8 * fetch_url(): specifically set SIGQUIT to psummary before each xfer.
(work around editline's override)
* minor cleanup of signal handler (along the lines of similar work in
  recvrequest()). the handlers should now be reset everytime the cleanup
  handler was callled.
1999-10-05 22:12:34 +00:00
lukem c694a5290b * set SIGQUIT to psummary in each of the xfer routines. (editline seems to
override SIGQUIT when EL_SIGNAL = 1 (but we want the latter for all the
  other signal support it has).
* more fixes after previous rototill
1999-10-05 22:04:30 +00:00
lukem 781fce374d the prior change was a bit too aggressive in factoring out common code in
{send,recv}request(). completion and uploading now works again...
1999-10-05 13:44:39 +00:00
lukem 3f8b92b0b3 * factor out SIGINFO setting into a handler that is always active (but only
prints out info if bytes > 0). only set the handler if SIGINFO is defined
* hijack SIGQUIT to be the same as SIGINFO (foreign ports have this, and it's
  annoying to have SIGQUIT dump core on netbsd when it prints info on other
  systems)
* in {recv,send}request(), factor a lot of duplicated code out into a
  `cleanup' section at the end
* rework shell() a bit
1999-10-05 13:05:39 +00:00
ad b545302160 Allow use of use of ':' to separate user and group names, since elsewhere
'.' is a valid character in user and group names. '.' still works, but
':' takes priority.
1999-10-05 12:11:27 +00:00
matthias 6ecf374e0c make this actually display the flag descriptions and examples. 1999-10-05 11:56:15 +00:00
lukem f45505380a add TNFi copyright to all files i've done more than a minor amount of work to... 1999-10-05 01:16:11 +00:00
lukem 4309cfaab3 enhancments from Marc Horowitz <marc@mit.edu> to improve connection timeouts:
* implement xsignal_restart(), which only sets the SA_RESTART flag if
  specifically requested
* xsignal() is now a wrapper to xsignal_restart(). INFO, USR1, USR2 and WINCH
  are restartable, ALRM, INT, PIPE and QUIT are not.
* improve getreply()'s timeout code to take advantage of the above.

other changes:
* improve wording of how globbing works for `classic' URLs (host:path).
  suggested by John Refling <johnr@imageworks.com> in relation to PRs
  [bin/8519] and [bin/8520]
* always compile in the `edit' command even if NO_EDITCOMPLETE defined.
  it's just a no-op in the latter case, which is more consistent to
  the users.
* always compile in about: support (i.e, remove NO_ABOUT).
  i'm entitled to some vanity in this program...
* clean up some whitespace
1999-10-05 00:54:07 +00:00
lukem 88d3d7c59e update after change to return value of tputs() third argument 1999-10-04 23:26:59 +00:00
lukem 670c7ebebd restart_point is a global; no need for it here 1999-10-01 09:23:32 +00:00
lukem fcb1a22a1c If EPSV or EPRT fails, disable epsv4 for the rest of the current connection.
the disabled state can be overridden by toggling epsv4.

(I got sick of the errors about EPSV not being supported on almost
every server I connect to. This way we retain support for epsv4, but
it's not so whiny after the first failure...)
1999-10-01 08:01:12 +00:00
lukem 4c9f05c61f simple dependancy so addition of global vars to ftp_var.h is detected for main.c 1999-10-01 07:58:02 +00:00
lukem ad70c1982e prefix the global variables in ftp_var.h with GLOBAL, which defaults
to "extern" if it's not set. define GLOBAL to (empty) in main.c.
this effectively moves all the globals into main.c whilst retaining
namespace access to them in other source files.
(global vars in header files confuse foreign linkers)
1999-10-01 06:55:44 +00:00
lukem 46111773d1 * don't bother with "pathnames.h"; it contained just a single #define.
instead, include <paths.h> in the files that need it
* slightly reorg ftp_var.h
1999-10-01 06:18:32 +00:00
lukem 38100c05f4 * newer takes an optional second arg, so document this
* be a bit more explicit that the arguments to rate are in bytes
1999-10-01 05:08:31 +00:00
lukem 25790d921d * In the !NI_NUMERICHOST case (i.e, getaddrinfo() challenged systems), portnum
should be in host order. found/fixed by Matthias Pfaller <leo@dachau.marco.de>
* parse_url(): improve checking of portnum, and add an extra argument to pass
  back the parsed portnum to the caller (reduces a bit of code duplication)
* Move the KAME/WIDE copyrights after the BSD/TNFi ones. Since there was
  significantly less code added under the former, it's only fair on the latter.
1999-09-30 23:51:26 +00:00
soren 60b747deab Typo. 1999-09-30 13:47:57 +00:00
soren a87871bbec There's room in the systat-vmstat-iostat display, so allow four-letter
device names like e.g. ccd0 and print an extra digit of precision in
the 'sec' line like iostat(8) does.
1999-09-30 13:16:27 +00:00
soren 30d18a154c Remove extraneous colons and newlines from perror(3) arguments. 1999-09-30 12:35:52 +00:00
lukem 1b3e840242 * fix initialisation of home[]
* fetch_url(): if path would be NULL, return strdup("")
1999-09-30 12:18:03 +00:00
lukem c4a3ce23de in empty(), FD_ZERO(&rmask) not (&cin). (hi christos! :)
fixes abort_remote() when __USE_SELECT is defined.
thanks to simonb@netbsd.org for reporting this bug
1999-09-30 06:35:13 +00:00
lukem 5f7fe832b6 #define BUFLEFT is always used... 1999-09-30 05:38:19 +00:00
lukem 9f5bda2e21 * consistentnly use memset(a,0,c); there were some cases of memset(a,'\0',c)
* remove explicit extern int h_errno; it's in <netdb.h>
* add <termios.h> back to util.c; it contains struct winsize on some systems
1999-09-29 00:44:01 +00:00
ad a14ea316bd Typos. 1999-09-28 18:36:33 +00:00
lukem 6c997b7af6 revert snprintf() -> sprintf(). the original idea was that sprintf() would be
more portable, except that certain systems have char *sprintf() instead of
int sprintf(). (we'll provide snprintf() on those)
1999-09-28 09:12:06 +00:00
lukem f3f34df069 don't fudge out the stalltime when calculating the ETA. this means that the
ETA might be over and will appear to drop rapidly, rather than being under
and appear not to change. the original code makes sense when you're testing
by suspending & resuming the client. however, the unfudged number is probably
better in reality, especially for slow spurty networks.

requested by ITOH Yasufumi <itohy@netbsd.org> in [bin/7977]
1999-09-28 07:54:01 +00:00
lukem 8c29ac4ade remove debugging cruft 1999-09-28 07:51:05 +00:00