Commit Graph

8037 Commits

Author SHA1 Message Date
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
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