Commit Graph

8230 Commits

Author SHA1 Message Date
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
wiz 3c0fa0f019 Some fixes from jmc@openbsd. 2005-04-04 13:34:40 +00:00
christos cc3c0f2c9c Don't report that we don't know the username. We don't want to give out
more information that we need to.
2005-04-03 06:56:39 +00:00
atatat bfff2fd626 charaters -> characters 2005-04-03 02:43:57 +00:00
he 65525e6df1 Put declaration of pwbuf[] back before any code, so this compiles with
older versions of gcc again.
2005-04-02 16:12:52 +00:00
xtraeme 5ca972d91b This needs <err.h> for err() and errx() (hi wiz) 2005-03-30 18:01:32 +00:00
wiz bd02b4a3e5 v1.14 from OpenBSD (jaredy):
- fix overflow when too many -a arguments are given
 - properly NUL-terminate -a arguments when copying
 - check strdup for error failure
2005-03-30 14:18:41 +00:00
christos 13f609d284 - use getpwnam_r
- KNF
2005-03-30 01:30:21 +00:00
christos bbb7e01ae0 - Use the getpw*_r methods.
- KNF.
2005-03-30 01:16:22 +00:00
jmmv f9774bdb30 Add a colon before %m in calls to syslog(3) for consistency with other
messages in this same file and in many other tools.
2005-03-29 17:00:21 +00:00
drochner 6ff7079afd plug buffer overflows, see
http://www.idefense.com/application/poi/display?id=220&type=vulnerabilities
http://www.idefense.com/application/poi/display?id=221&type=vulnerabilities
(CAN 2005-0468 and 2005-0469)

Patch taken from MIT/Kerberos (MITKRB5-SA-2005-001-telnet.txt)
2005-03-29 12:18:28 +00:00
christos 1d7be8c539 WARNS=3, ansi, knf 2005-03-28 23:33:22 +00:00
christos 3e8931ae19 PR/29819: Robert Elz: lastcomm mangles elapsed time calculation because
of incorrect rounding.
2005-03-28 22:10:06 +00:00
peter 272712e0e4 Sort options alphabetically. 2005-03-27 18:41:22 +00:00
christos 375c0a113d der_chop is gone. 2005-03-26 00:32:35 +00:00
wiz de60b309dc Sort options. Add -C to usage. 2005-03-25 23:55:02 +00:00
wiz eb0439126c Fix typo and drop trailing whitespace. 2005-03-25 23:49:28 +00:00
skd 4f9669ed8d add --dry-run like gnu patch. 2005-03-25 23:00:55 +00:00
christos 9b98663df7 add prime.c 2005-03-25 22:36:54 +00:00
christos 93bf0b6883 Deal with signals and process groups (from FreeBSD)
Fixes issues with kill -STOP $$ in the su'd shell, and setting up signals
for the child process properly.
2005-03-23 20:02:28 +00:00
dsl a2a01de947 Remember to consume input bytes when processing '\0nnn' for %b formats 2005-03-22 23:55:46 +00:00
yamt 656cf52a10 a fix from openbsd.
XXX is it better to output a newline?

> revision 1.7
> date: 2000/06/04 23:52:19;  author: aaron;  state: Exp;  lines: +30 -14
> Handle the case where the last line of input does not contain a newline; issue
> reported by marc@snafu.org. The main thing here is we use fgetln() instead of
> fgets(), also giving us the advantage of being able to handle lines of
> unlimited length. Some -Wall and other fixes from millert@ as well.
2005-03-22 21:56:28 +00:00
peter c36f9da926 Fix a typo. 2005-03-22 15:51:35 +00:00
tron f4d67200a3 Make S/Key prompt compliant with RFC 2289. Patch supplied by Dave Huang
in PR bin/23167.
2005-03-20 13:20:07 +00:00
wiz 7cd222b164 Bump date for -i. 2005-03-16 15:05:25 +00:00
sketch 8e587b4ca1 Add a -i option to ignore case in the process match. 2005-03-16 08:52:20 +00:00
christos 8f166961b9 Remove extra ; found by gcc-2.95 and reported in port-vax. 2005-03-14 13:34:57 +00:00
kim 077ff6605b One third of screen looks much better than half, for default maxhost. 2005-03-13 04:08:16 +00:00
reed be2370c0aa Sorted two entries that were out of order.
And used spaces (instead of tab) for one entry to be consistent with rest
of file.
2005-03-12 15:13:54 +00:00
reed e991dffff3 Add that NetBSD 2.0 was released on December 09, 2004 2005-03-12 15:07:56 +00:00
wiz 2c2533b641 Bump date for new -4, -6. 2005-03-11 13:14:34 +00:00
ginsbach 733e4b48e2 Add -4 and -6 to usage. 2005-03-11 03:20:23 +00:00
ginsbach d9a614deae Support -4 and -6. Approved by christos. 2005-03-11 03:19:31 +00:00
ginsbach 605994654d Support -4 and -6. Approved by christos. 2005-03-11 02:45:24 +00:00
wiz 416aba1dc6 Bump date for -t. 2005-03-10 16:29:04 +00:00
wiz 96b620b365 Add -t to usage. 2005-03-10 16:28:54 +00:00
he 5f8555bc7c Add a '-t' option to print the contents of the vmtotal structure,
possibly repeatedly.
2005-03-10 16:23:42 +00:00
atatat 1a773e1da4 Fix printing of AF_LOCAL names. 2005-03-10 05:39:54 +00:00
kleink fcbd09f9f1 Field width and precision specifier arguments to printf must be ints. 2005-03-09 19:09:05 +00:00
wiz 73eb81183c Make Dd date match import date more closely. 2005-03-09 17:16:54 +00:00
wiz 0f7047cb0b Grammar improvements. 2005-03-09 17:16:30 +00:00
atatat 900e40a9ae almost forgot about this.
Optimize getting process information by not getting it again if you're
looking for the same pid.
2005-03-09 05:53:47 +00:00
atatat 724bd01950 Add a sockstat(1) command that can list open sockets and the processes
that own them.  The implementation concept and man page came largely
from FreeBSD, but the program is fresh.
2005-03-09 05:20:05 +00:00
christos 192c2eccf6 Add -lcrypt where -lcrypto is specified. 2005-03-09 03:11:22 +00:00
christos 1c7109cbce - ansi
- better error detection
- avoid overflow
- WARNS=3
2005-03-09 02:02:07 +00:00
dsl 48a0480288 Initialise dfound outside loop so that 0 sized files compare correctly
and to that 'cmp -l' will exit with error is the last block matches.
Pointed out in a private mail bt someone who wishes to remain anonymous.
2005-03-07 07:51:42 +00:00
christos cbc2d45618 If we cannot retrieve lines from a recovery file, don't call ourselves
recursively until we run out of stack.
2005-03-06 03:39:49 +00:00
christos bf6d5c8643 A corrupt recovery file can have vs_scmap NULL now, since paint may return
early. Compensate.
2005-03-06 03:39:07 +00:00
wiz 35a9dd4fdd Remove trailing whitespace, and use .Sq instead of manual quoting. 2005-03-05 14:28:31 +00:00
he 5152518685 Add -lcrypt to link lines for applications using -lkrb5, so that they
link successfully when MKPIC=no, as is always the case for our ports
which do not support shared libraries.

Discussed with thorpej and christos.
2005-03-04 20:44:55 +00:00
he 8e8728c45c Introduce PAM_STATIC_LDADD and PAM_STATIC_DPADD. When compiling
with MKPIC=no, possibly because the target does not support shared
libraries, these include libraries required to resolve all symbols
which end up referenced from PAM-using applications.  The libraries
presently required are -lcrypt, -lrpcsvc and -lutil.

Add use of these variables which are currently set up to use PAM,
so that they compile when MKPIC=no.

Also, in the telnetd case, reorder the order of the libraries, so
that libtelnet.a comes before -ltermcap and -lutil, again to fix
link error when MKPIC=no.

Discussed with thorpej and christos.
2005-03-04 20:41:08 +00:00
christos 5c543845da PR/26934: Curt Sampson: Add -x flag to process wtmpx files that don't end
in `x'.
2005-03-04 17:16:13 +00:00
christos add06817f7 PR/23409: Geoff C. Wing: make sure we only print nul terminated strings. 2005-03-04 17:11:19 +00:00
atatat e698a148f7 For connected local domain sockets that don't have a "local" name,
print the "remote" name instead.
2005-03-04 03:59:07 +00:00
atatat 9244b3d60d Print the pcb address like the man page says, not the socket address. 2005-03-04 03:57:48 +00:00
christos 3f0344e8e8 1. Restore missing tty action.
2. Pass the nested user name to pam.
3. always try to fill in sockaddr.
2005-03-03 02:06:16 +00:00
abs 24cba1ac9a If a user or group is not known, report the problem user/group, rather than
the first user/group. Caused huge fun in error messages from large script.
Old:	pgrep -u root,NoSuchUser,daemon	-> pgrep: unknown user `root'
Now:	pgrep -u root,NoSuchUser,daemon	-> pgrep: unknown user `NoSuchUser'
2005-03-02 15:31:44 +00:00
christos 13481917e0 When parsing conditional tokens, make sure that the token is followed by
a non-alpha character, so that .elsefoo is not parsed as .else leading
to confusion later.
2005-03-01 04:34:55 +00:00
christos 10cd3dcdb4 - use F_CLOSEM instead of walking the fd list
- determine pty name properly for ptyfs ptys
- use setproctitle(NULL) to kill our args
2005-02-28 16:13:02 +00:00
christos 70a8501f05 - deal with ptyfs pty names.
- put back chown pty code.
- use setproctitle(NULL) to kill our argument display.
- don't wait for any pid, just the one we forked.
2005-02-28 16:11:36 +00:00
wiz a5924c4e9e YP password -> NIS password. Ok'd by thorpej. 2005-02-28 15:19:59 +00:00
wiz 8168d38f56 Remove COPTS+=-g. 2005-02-28 10:37:49 +00:00
wiz b34e537add infomration -> information. 2005-02-28 10:37:34 +00:00
christos c1fe2057f5 Fix unmatched .El warning. 2005-02-28 02:30:54 +00:00
thorpej feee050f0e user -> principal in the krb5 synopsis. 2005-02-28 02:02:43 +00:00
thorpej c80d0a6dc7 Fix a typo, and sort SEE ALSO correctly. 2005-02-28 02:01:35 +00:00
dsl f62ff76f8b Add an extra digit to the kBps column - now overflows at 100MB/s 2005-02-26 22:28:23 +00:00
dsl 019733f61e WARNS=3 2005-02-26 22:12:33 +00:00
dsl ff927e7098 Fix field widths for 'numbers' display, and allow it without 'secs'. 2005-02-26 22:11:06 +00:00
dsl 2229b6a79b WARNS=3 2005-02-26 21:19:18 +00:00
dsl 5af2964703 Always treat ^h and ^? as erase chars (as well as stty erase).
Make the ':' erasable.
Fix typo in unviewable help message.
No point in having 'else' after 'return'...
2005-02-26 19:01:09 +00:00
dsl 4583d5361a Refresh labels and display after changing displayed disks 2005-02-26 18:58:45 +00:00
wiz c3b040d5f4 Sort SEE ALSO. 2005-02-26 16:22:27 +00:00
wiz 4cc6eaf04c Sort SEE ALSO, remove superfluous quotes. 2005-02-26 16:21:44 +00:00
thorpej 63f6912b86 YP -> NIS 2005-02-26 16:21:26 +00:00
wiz b14dfa00d2 Sort SEE ALSO. 2005-02-26 16:20:36 +00:00
thorpej 1059994aca YP -> NIS 2005-02-26 16:19:55 +00:00
thorpej 6136ecaa8e YP -> NIS 2005-02-26 16:18:19 +00:00
thorpej 4e63fd43ef Magor rework of passwd(1) for the PAM case. Add "-d <database>" option,
similar to Solaris's "-r <repository" or Mac OS X's "-i <infosystem>",
to select the password database (files, nis, krb5).  Otherwise, we default
to using whatever PAM decides.
2005-02-26 07:19:25 +00:00
christos dc9dbb2ac7 Don't wait for any process, just our child. pam sessions can fork other
processes (such as the ssh pam agent handler) and the wrong process ends
up reaped, wreaking havoc.
2005-02-25 21:49:43 +00:00
thorpej 8c9dd4bba7 Add missing RCS ID. 2005-02-24 05:11:34 +00:00
dsl 8d3b64e3cb Exit with any failure code from the cmd or gzip.
Decode gzip -l output with strtoimax() (not sscanf()) so we don't use an
uninitialised variable if the output format isn't what we expect.
This might fix some installation PRs (no error being reported)
2005-02-23 22:32:31 +00:00
sjg 34180b9ccc In the case of :? modifier, variable can be an expression - say so. 2005-02-23 17:22:29 +00:00
yamt 751e975bfc handle partial reads. PR/29484. 2005-02-22 21:45:44 +00:00
christos b74b94a591 PR/29505: Nicolas Joly: Increase width of csw value in systat vmstat. 2005-02-22 15:13:57 +00:00
wiz 823387f1c8 Drop some whitespace
XXX: -p not described.
2005-02-22 01:49:20 +00:00
christos 11e49612c8 Add a PAM passwd module.
XXX: This avoids the issue of supporting separate -l -y -k, but is the behavior
correct? Should passwd -p disable all other passwd methods? Should it become
the default if compiled in?
2005-02-22 01:08:43 +00:00
simonb b6dcc6d5d8 Print a nice introductory line, per SUSv3 (and Posix?) 2005-02-21 04:32:55 +00:00
wiz 0d1974308b Sort SEE ALSO (hi hubert! First by section, then by name.) 2005-02-20 21:18:27 +00:00
wiz 320e63ae50 Drop trailing whitespace. 2005-02-20 21:16:38 +00:00
wiz aa3d6fa3ca If we mark up RFC, then avoid using "command modifier" for it. 2005-02-20 20:54:01 +00:00
christos 66e1a2c606 Make this compile if pam is present. XXX: this sucks, because we don't
really use PAM here, but libtelnet needs it.
2005-02-19 23:28:41 +00:00
matt f19d600803 Don't include the powerpc64 definitions in here. Since lint is a host
tool, the hosts definition of _LP64 will confuse things.
2005-02-19 17:15:56 +00:00
xtraeme ef1154956f Kill __P(), use ANSI function declarations; WARNS=3. 2005-02-17 17:41:34 +00:00
xtraeme 6dca62f25b Kill __P(), use ANSI function declarations, constify; WARNS=3. 2005-02-17 17:35:47 +00:00
xtraeme ee89c9ff79 Kill __P(), use ANSI function declarations. 2005-02-17 17:31:28 +00:00
xtraeme 1db2ef90e1 Kill __P(), use ANSI function declarations, constify; WARNS=3. 2005-02-17 17:29:58 +00:00
xtraeme abda23981e Kill __P(), use ANSI function declarations, constify; WARNS=3. 2005-02-17 17:17:25 +00:00
xtraeme 6dd2a8ed92 Kill __P(), use ANSI function declarations; WARNS=3. 2005-02-17 17:12:42 +00:00
xtraeme 971b39df9c Kill __P(), use ANSI function declarations. 2005-02-17 16:53:45 +00:00
christos 63fca13660 PR/29203, PR/29204: Max Okumoto: KNF changes to make [no functional changes] 2005-02-16 15:11:52 +00:00
hubertf 756c7041c0 Add "df" display to give information about filesystems, available diskspace
and used disk capacity, similar to df(1):

Filesystem        Avail   Capacity
                         /0%  /10% /20% /30% /40% /50% /60% /70% /80% /90% /100%
/                  359M |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
/tmp               180M |
/home              146G |XXXXXXXXXXXXXXXX
2005-02-16 03:45:41 +00:00
christos 0f037c7626 - Add depency ob ligssapi and the required c-file(s).
- Reorder libkafs so its possible to build w/o kerberos4
From Love.
2005-02-13 22:48:01 +00:00
christos 1b9aa59ad8 Add depency on libgssapi and add the required c-file(s)
From Love.
2005-02-13 22:44:07 +00:00
christos d578cd9dc7 Add a couple of HAVE_'s 2005-02-13 19:15:43 +00:00
christos 15b0d355be Only need the PAM hooks for sshd. Now it compiles, PAM portion untested. 2005-02-13 18:15:05 +00:00
snj 6bad99a279 Lincoln's birthday belongs (and already exists) in calendar.birthday. 2005-02-13 07:05:03 +00:00
christos cea75c91ac Add PAM glue [unused] 2005-02-13 06:07:54 +00:00
christos 573119d831 Update for OpenSSH-3.9 2005-02-13 06:07:21 +00:00
atatat 61ae0cbaf1 print the proper pointer for the pcb address. otherwise, all the udp6
pcb addresses are the same as unrelated udp pcb addresses.
2005-02-13 03:15:18 +00:00
aymeric a3c4465703 Fix the RCSID's to be $NetBSD$ instead of $NetBSD 2005-02-12 12:53:22 +00:00
jmc 51da0bca2c As dsl points out, sysinst uses the progress bar so put it back on SMALLPROG 2005-02-11 15:13:28 +00:00
simonb 3cebd9325e White space nit- don't put a space before/after increment/decrement
operators.
2005-02-11 06:21:21 +00:00
chs 467487d274 use vm_map_{min,max}() instead of dereferencing the vm_map pointer directly.
define and use vm_map_set{min,max}() for modifying these values.
remove the {min,max}_offset aliases for these vm_map fields to be more
namespace-friendly.  PR 26475.
2005-02-11 02:12:03 +00:00
jmc 1bd5227b67 Make dependency checking for the pull-over make's actually work.
The make depend needs to be it's own separate make so it's done before the
main make runs. This also fixes issues w. -j breaking on 'depend <target'.

In addition, force the sub cross-over make to always run or otherwise it'll
never check dependencies once a valid foo.cro has been created.

Bump to 20050208
2005-02-10 16:03:04 +00:00
jmc dc984029fd White space nit 2005-02-10 16:00:38 +00:00
jmc 5f0e6eb14f Fix compilation issues for NO_PROGRESS 2005-02-10 16:00:28 +00:00
jmc c55ede16a2 Add NO_PROGRESS for -DSMALL 2005-02-10 16:00:06 +00:00
christos 199b39279a Factor out common string processing code eliminating static buffers,
making functions that should be static be static, and cleaning up
const usage. Added a guard against buffer overflow, but the domap function
is a bit too complicated for me to tackle right now. I will leave it
to the author; hi luke!
2005-02-09 23:17:27 +00:00
jdolecek 98eec0d015 bump size of some arrays 2005-02-09 22:14:13 +00:00
dsl a7126d6435 Only pass -Wtraditional to cpp for lint -t ...
Stops warnings about pre-processor constructs like #elif - which there is
no point detecting now that we've changed much of the code to require an
ANSI C compiler.
2005-02-09 21:24:48 +00:00
dsl afc59ef61f mmap normal files in 1MB chunks.
Due to a bug in mmap() the address space isn't counted against ulimit
until the page is faulted in - so mmapping a large file suceeds, but
cmp SIGSEGVs when it runs out of address space.
Also I don't believe that the madvise( MAP_SEQUENTIAL) has the desired
effect, and mmaping a large file is probably very bad for the UBC.
2005-02-06 21:19:46 +00:00
dsl 6ffe77ddd2 Taking (out) the __P 2005-02-06 20:50:34 +00:00
dsl e77d2c6bcd Change first arg of printsub() for 'char' to 'int' so that it builds again.
This matches the binary interface from before if was de-__Peed (or at least
that of K&R C).
In any case having arguments (and return values) of char and short isn't
especially sensible.
2005-02-06 20:39:35 +00:00
tron de397c1aee Fix build errors caused by de-__P()--ing "libtelnet". 2005-02-06 17:51:40 +00:00
simonb 61064aebe6 De-register. 2005-02-05 00:13:34 +00:00
christos 29e8340e26 PR/29213: Nicolas Joly: sysstat(1) vmstat cannot display large memory values 2005-02-03 16:16:00 +00:00
wiz ec34356a9c Add .In to known commands. 2005-02-02 17:14:29 +00:00
christos 479c8052bb Add commented out notes on how we support the special compilation options
under pam.
2005-02-01 22:54:33 +00:00
christos c641ee7f72 Add setting of PAM_SOCKADDR. 2005-02-01 17:57:16 +00:00
groo 83d3e13964 A hogshead is defined in the U.S. to be 63 gallons, and otherwise refers
to a volume unit of varying capacity (betwen 63 and 140(!)) gallons.

Since the U.S. is the only place it is defined, and I can find little
evidence to support the "barrel" definition, make it 63 gallons.

Like everything, this was prompted by the Simpsons.

"The metric system is a tool of the devil!  My car gets 40 rods to the
 hogshead, and that's the way I likes it!"

		-- Abe Simpson
2005-02-01 01:08:10 +00:00
christos 36eef77064 Revert part of previous [remove cd to objdir] and bump the crunchdate.
Make has been fixed. The cd was in the wrong place anyway, it should
immediately follow ${MAKE}, so it did not work as expected.
2005-01-31 23:48:38 +00:00
christos 6e40c9e6fb PR/22559: Valeriy E. Ushakov: make -j can execute commands in wrong directory
(not in the obj dir).
Fixed by detecting when we cd, and cd'ing back.
2005-01-31 22:41:43 +00:00
enami 4cc9b2f8f4 Fix parsing of $GZIP so that not to overrun the end of string.
Addesses PR#28779.  Fix is slightly different that suggested in the PR
since it fails if $GZIP contains whitespace.
2005-01-31 09:11:49 +00:00
simonb f14df71842 Remove a blank line. 2005-01-30 23:38:17 +00:00
lukem ebb5895a82 Explicitly cd to the .OBJDIR in the ${PROG}.strip target.
This fixes the "make -j N dependall" build issues people were
seeing in src/rescue, that appears to have been introduced
in rev 1.62.

Use the MAKEVERBOSE macros (if present) to print the pretty message.

Set the CRUNCH_VERSION to 20050130.
2005-01-30 23:04:33 +00:00
simonb 82c8633b96 Fix the date of the Australia Day holiday. 2005-01-30 06:09:26 +00:00
wiz 15f1332a67 Sync with manpage (add -W, sort). 2005-01-26 13:42:07 +00:00
wiz 2ad86c0bf3 Sort options. Remove some unnecessary Bk/Ek. Add some commas. 2005-01-26 13:41:47 +00:00
simonb 048c86fdf0 Add a "wide" mode output (selected with -W) to show more information
about memory pools, including pool page size, flags and utilisation.
2005-01-26 13:07:32 +00:00
christos edf98457e5 sync with reality. 2005-01-26 09:04:49 +00:00
simonb c13bbf038d Make a comment line up nicely. 2005-01-24 10:38:47 +00:00
manu 3113fa979d Add PAM support to login(8) 2005-01-23 09:47:43 +00:00
wiz 3822da6877 Bump date for "rpc" support. 2005-01-21 10:32:33 +00:00
ginsbach 6c53b19fbf Implement "rpc" 2005-01-21 02:43:33 +00:00
xtraeme 691a36f2ea whitespace, remove main() prototype. 2005-01-20 15:44:59 +00:00
xtraeme a35b6d287f Kill __P(), ANSIfy, remove main() prototype, whitespace; WARNS=2 2005-01-20 15:41:14 +00:00
ginsbach cf8e68cb39 Add missing 'by' in license attribution -- Thanks, wiz! 2005-01-20 12:52:03 +00:00
wiz 704c845e60 Sync usage with man page. 2005-01-20 09:20:03 +00:00
wiz c6bb1f479a Add RCS Id; sort option(s) without arguments before options with,
in SYNOPSIS; add prompts in examples; sort format letters as option letters would be sorted.
2005-01-20 09:18:11 +00:00
wiz 99cb01f31a Drop trailing whitespace. 2005-01-20 09:13:16 +00:00
ginsbach 55049570a7 add seq(1) 2005-01-20 04:26:00 +00:00
ginsbach e8c2320896 seq(1) - print sequences of numbers 2005-01-20 04:13:42 +00:00
mycroft debe1484b9 Set FD_CLOEXEC on the recovery mail file. 2005-01-19 01:20:24 +00:00
mycroft c860ec870a Use FD_CLOEXEC (for -exec). 2005-01-19 01:03:16 +00:00
manu 0d884d9738 Remove unneeded \ at the end of line, style 2005-01-18 21:39:11 +00:00
lukem 44ad084298 preempt wizd; crank date 2005-01-15 21:28:16 +00:00
lukem 349815e5ed Expand description of http_proxy by suggesting the use of RFC 1738 '%xx'
encoding for "unsafe URL" characters in usernames and passwords.
2005-01-15 21:27:46 +00:00
jdolecek 04fa39a4be ectx_find() failed to lookup the emulation context unless it happened
to be the first entry, effectively resetting context of all processes to
default emulation on every EMUL trace record

rewrite ectx_find() to fix this, using <sys/queue.h> LIST for readability

this fix should once and for all remove need to ever use -e option,
and makes kdump work properly for traces with processes under different
emulations
2005-01-15 17:55:38 +00:00
ginsbach efcf0fc8a1 Whitespace fix-ups. 2005-01-13 23:02:28 +00:00
jmc 2afa8931db Now that tools/compat provides a check, make sure st_birthtimensec exists
before using it
2005-01-13 00:53:14 +00:00
thorpej c829edc516 Test USE_PAM, not MKPAM. 2005-01-13 00:13:33 +00:00
lukem f851795088 Fix ftp url reget when globs are being used.
Provided by Mathieu Arnold <mat@FreeBSD.org>.
2005-01-12 22:37:41 +00:00
xtraeme 80a3a0790b * Kill __P()
* ANSIfy
* Remove main() prototype
2005-01-12 17:19:23 +00:00
xtraeme ea13a7dd7d ANSIfy another function missed in previous. 2005-01-12 17:10:05 +00:00
xtraeme 5c1d419d06 * Kill __P()
* ANSIfy
* No parenthesis are needed around the return value
2005-01-12 17:04:35 +00:00
xtraeme b363f90b86 WARNS=3 2005-01-12 16:42:45 +00:00
xtraeme 4ed1105b0d WARNS=3 2005-01-12 14:45:26 +00:00
xtraeme 2abf3ae985 WARNS=3 2005-01-12 14:41:29 +00:00
xtraeme 1ac55ee68a Kill __P(), ANSIfy, WARNS=3 2005-01-12 14:35:56 +00:00
christos cef96160f5 more cleanups, WARNS=3 2005-01-12 05:45:23 +00:00
xtraeme 61ae8d8c7b Kill __P() and ANSIfy, ok christos. 2005-01-12 05:34:23 +00:00
christos 28e33dbb3b Use pw_gensalt() instead of using the cipher functions directly. Simplifies
the code a lot.
2005-01-12 03:35:34 +00:00
christos 5b5b914e5a adapt to pw_gensalt() changes. 2005-01-12 03:34:58 +00:00
christos b2f0c10f07 undo accidental commit with MKPAM=yes 2005-01-12 01:46:03 +00:00
christos f8b8ae274a Always print pam error in messages 2005-01-12 01:45:32 +00:00
christos 6c0f1bcc27 :x 2005-01-12 01:45:31 +00:00
christos 68e7a6e2e1 SRCS is not needed. 2005-01-12 01:21:14 +00:00
christos 59bf3abf20 gc unused file. 2005-01-12 00:38:17 +00:00
christos 911a82af6b - use the gensalt functions from libcrypt instead of rolling our own. 2005-01-11 22:56:19 +00:00
christos 19917e71c5 use pw_gensalt() and don't dig into libcrypt. 2005-01-11 22:42:30 +00:00
wiz 86eb0864bd We have 2005 now. 2005-01-11 09:46:17 +00:00
wiz 36cdbd4840 Bump date for recent changes. 2005-01-11 09:39:12 +00:00
christos 81b53d0cfa - make LOGIN_CAP mandatory
- eliminate global pamh
- use setusercontext() properly (ideas borrowed from FreeBSD)
- remove stray debugging.

This now works.
2005-01-10 23:33:53 +00:00
christos 6b47b9b52a LOGIN_CAP is mandatory for PAM. 2005-01-10 23:31:34 +00:00
christos 2ef14ae88a Restore su.c to version 1.58, plus minor prototyping. Split pam
into su_pam.c, and turn it off by default in the Makefile until it
is tested and actually works. The current pam version does not set ruid
properly anymore.
2005-01-10 03:11:50 +00:00
lukem 1e281ed227 Only #define HAVE_IPV6 if ${USE_INET6} != "no". 2005-01-10 03:11:17 +00:00
lukem 7157011597 Only compile in IPv6 support if ${USE_INET6} != "no"
MKINET6 is for providing IPv6 infrastructure.
USE_INET6 is for compiling IPv6 support into the programs (needs MKINET6).
2005-01-10 02:58:58 +00:00
manu d37a5aac85 Rewrite PAMification of su.
- don't try to fallback to plain old authentication. It could lead to unix
  authentication to be used while the administrator wanted to forbid it.
  Moreover, a broken PAM setup can be fixed by just rebooting in single user.
- In order to make the code more readable, make two main(), with and aithout
  PAM.
- Outstanding issues that seem impossible to fix:
  The -K flag die with PAM.
  -c cause PAM credentials to be ignored.
2005-01-09 21:32:38 +00:00
christos 089038b4a1 Allow -c argument now. 2005-01-09 17:47:45 +00:00
christos fcda42cd46 - remove left over debugging code.
- centralize pointer to the head of the list casts by introducing a new var.
2005-01-09 01:27:47 +00:00
manu 02a0830983 Don't fallback to plain old authentication on "normal" errors such as
authentication failure.
2005-01-08 22:16:23 +00:00
christos e52488f22f if we are using pam and it succeeded, don't re-initialize kerberos needlessly. 2005-01-08 18:12:35 +00:00
lukem ed83e0847a add DPADD 2005-01-08 09:54:36 +00:00
christos 68adb09d42 - avoid calling pam_end twice if pam failed in fatal
- make fatal proper macros
- fix typos in comments
- fix logical error initializing pam
XXX: Seems to work now, but the whole process is awkward.
Asking for an ssh passphrase and using this to do unix authentication is wrong.
Falling back to the old style auth is awkward. We should really provide a
pam_rootauth module if we want to support that.
2005-01-08 08:45:53 +00:00
kim 61f9450361 Make -w flag apply to the WHAT field also (command and args).
Use at most half of ttywidth for WHERE field (hostname) instead
of a hardcoded maximum width.  (XXX: this is still not a good
default for displays under 80 columns.  Should probably count
the width of all the other columns, using 8 for the WHAT field.)
2005-01-08 05:08:53 +00:00
kim 2bb4a74034 Line up "days" style output in the IDLE field. 2005-01-08 05:04:34 +00:00
kim ee64b0d712 The w command does not display a CPU time, so don't talk about it. 2005-01-08 04:58:08 +00:00
yamt 075d5146c6 correct examples. 2005-01-08 03:46:05 +00:00
ginsbach 02d2680603 getuid() returns a uid_t not int, so make uid uid_t. 2005-01-08 03:23:15 +00:00
manu e628e84aaa Add PAM support to su 2005-01-07 22:34:20 +00:00
lukem 9683394bbb fix copyright year 2005-01-04 23:59:11 +00:00
fredb 6eda52d041 Invoke "join" using POSIX syntax. Should fix a problem cross-building from
Linux reported to tech-toolchain by Jesse Off.
2005-01-04 18:09:33 +00:00
lukem b918fc0803 Forbid filenames returned from mget that aren't in (or below) the
current directory.
The previous behaviour (of trusting the remote server's response when
retrieving the list of files to mget with prompting disabled) has been
in ftp ~forever, and has been a "known issue" for a long time.
Recently an advisory was published by D.J. Bernstein on behalf of
Yosef Klein warning of the problems with the previous behaviour, so
to alleviate concern I've fixed this with a sledgehammer.

Remember the local cwd after any operation which may change it.
Use "remotecwd" instead of "remotepwd".
2005-01-03 09:50:09 +00:00
lukem 4d41fe6044 Style/consistency cleanup:
* libcrypto & libz are provided by ../Makefile.inc
* <bsd.own.mk> isn't required by most of these
* be consistent in the layout
2005-01-03 06:05:50 +00:00
lukem ecfeee924b Use the public libssh that's now available. 2005-01-03 06:04:08 +00:00
wiz 59461d12f9 Add RCS Id, bump date for when it appeared in NetBSD, mention
NetBSD appearance in HISTORY section, fmt a paragraph.
2005-01-02 18:41:23 +00:00
christos 5f325e6da0 Shift assignment operators were handled incorrectly. On 64 bit machines,
unsigned long x, y;
	x <<= y;
always produces a warning because y is casted to int. Handle them instead
the same way as regular shifts.
2005-01-02 17:59:47 +00:00
thorpej 7ec7b5b2f6 Add a getextattr(1)/setextattr(1)/rmextattr(1)/lsextattr(1) utility
that gets, sets, removes, and lists file system extended attributes.

From FreeBSD.
2005-01-02 17:55:48 +00:00
christos 2f2c6dc261 say from what type to what time we are converting. 2005-01-02 10:40:49 +00:00
yamt 712038f82a sync with kernel. (vm_map_entry::flags) 2005-01-01 21:17:47 +00:00
atatat fa01c2e835 Add "dirname"- and "basename"-like functionality to stat(1) by way of
the "high" and "low" selectors on the filename.
2004-12-31 03:24:31 +00:00
christos f3ff62b84d Add comments in the pmake style, and factor out a local variable.
No functional change.
2004-12-29 01:55:25 +00:00
christos 8415275dbd Dir_MTime did not search for a file using the correct parh; i.e. it was
ignoring suffix-specific path search. So if a node was marked .MADE,
then suffix rules would not be applied to it, and we would look for
the file only in the default path, not the suffix-specific path.

XXX: Now that we looked for the suffix, we can save it in the GNode,
but we don't do this yet.
2004-12-29 00:43:02 +00:00
atatat 4b9429a08d Attack of the whiteout police, including the "fix whitespace problems"
department followed by the "and fix the the ifdefs as well" brigade,
leading to a janitorial "just combine those two" strike team.
2004-12-28 05:11:07 +00:00
wiz 3c75d39ba0 New sentence, new line. Add a comma. 2004-12-23 01:55:30 +00:00
christos 25c67c975f Fix usage, and call setprogname()! 2004-12-22 17:20:30 +00:00
christos 5df4136a03 PR/28751: Ed Ravin: Limit host field output by default to 35 characters so
that things don't wrap. Add -w flag to enable full output. Delete mention
of the old and not supported flags. This was 11 years ago, and very few
people even remember what these flags did.
2004-12-22 17:16:07 +00:00
lha c2e518e56e Only include Kerberos 4 headers when compiling in a Kerberos enviroment
From Jukka Salmi in NetBSD PR misc/28727
2004-12-22 01:28:56 +00:00
lha a0dab7aa39 Move linking with libdes to the common kerberos section since
libtelnet depends on the old des functions.

From Jukka Salmi in NetBSD pr misc/28727
2004-12-22 01:25:05 +00:00
yamt 8676c37c10 scmp: don't discard const qualifiers needlessly. 2004-12-21 11:33:07 +00:00
ginsbach e736e1e0c5 Dead code clean up:
* The function speed(), imported from 4.4BSD-Lite2, has never been
  used by NetBSD.  Obtained from FreeBSD.
* Finish removing -L (litout) option.  This has not been supported
  since rev. 1.5 (NetBSD 1.0).  The option still appeared in the
  usage and man page.  Obtained from FreeBSD.
* In function doit(), dead code imported from 4.4BSD-Lite2, dealing
  with termios.  NetBSD cracked this nut differently long before this
  import.  Obtained from FreeBSD.
2004-12-21 02:39:00 +00:00
dsainty 555352630f Correct typo in an error message: allocatior -> allocator 2004-12-20 08:20:50 +00:00
atatat 63fae01c7d Slurp in the struct mount at vp->v_mount and the struct specinfo at
vp->v_specinfo to get the proper st_dev and st_rdev numbers.  We're
already picking over the kernel, so let's do it right.  That means
also asserting the file type for the /dev/pts directory (S_IFDIR) and
nodes therein (S_IFCHR).

Remove getptsmajor(), since we no longer need it.  Besides, it was
being used wrongly.
2004-12-14 03:10:23 +00:00
atatat a92869d7ef Cast fst.fileid to unsigned long and print it as such. Inode numbers
are never negative.
2004-12-14 03:09:24 +00:00
christos 09c258b188 Add ptyfs. 2004-12-12 22:41:03 +00:00
aymeric 8d1f13638c . wait only for 10 ms instead of 100 ms before updating the screen
. fix a variable reuse bug

It has been broken since the conversion from select() to poll().
2004-12-10 16:27:29 +00:00
lukem a76c6e6173 * Always decode %xx in a url's user & pass components.
* Only remember {WWW,Proxy}-Authenticate "Basic" challenges; no point
  in tracking any others since ftp doesn't support them.
* Improve the parsing of HTTP responses.
2004-12-10 06:44:15 +00:00
mycroft 33131ab95f Fix an array overrun in option parsing.
Fixes PR 26732, PR 26775, PR 28416 and PR 28589.
2004-12-09 18:06:10 +00:00
wiz b7ceeca8dd New sentence, new line. Bump date for **. 2004-12-08 15:44:21 +00:00
jmc 40c0737463 Fixed for PR#28581. If stdin is the input stream, fstat it and check if it's
file. If so, use it's mtime for the mtime in the header. Otherwise use
time(2)'s result instead. Lines up with GNU gzip and RFC 1952 now as well.
2004-12-08 06:38:40 +00:00