Commit Graph

277 Commits

Author SHA1 Message Date
christos
df7031b876 Add missing semicolon. 2006-05-25 02:53:10 +00:00
christos
ddd7ee439d Coverity CID 830: Avoid NULL deref. 2006-05-25 00:21:52 +00:00
christos
ede17ba69d Coverity CID 3322: Fix memory leak. 2006-05-25 00:19:27 +00:00
mrg
4bc6feceb6 end the argument list to exec*(3) with a NULL instead of a bare '0', as
the latter isn't a pointer context in these varargs functions.
2006-05-11 00:22:52 +00:00
christos
db1dbe6ce9 Coverity CID 1225: Don't close negative fd. While here fix fd leak. 2006-03-21 22:49:43 +00:00
christos
4a6e5a625c Coverity CID 1750: Add a function to free a queue and use it. 2006-03-21 22:47:26 +00:00
christos
1f548f352a Coverity CID 1752: getq() always allocates a queue if nitems >= 0, so always
free it.
2006-03-21 22:37:34 +00:00
christos
fca770b32a Appease Coverity CID 2580 [not a bug] 2006-03-17 17:06:30 +00:00
christos
227e68b656 free memory on allocation failure. 2006-03-17 17:04:22 +00:00
christos
f49dbe00ee - use sizeof() instead of the buffer size.
- check write return.
- use MAXPATHLEN instead of BUFSIZ for a path buffer.
2006-01-29 18:55:46 +00:00
wiz
ec5cd4a9b7 New sentence, new line. Bump date for previous. Properly case PostScript. 2006-01-22 21:31:17 +00:00
wiz
2d00c446d6 Bump date for previous. 2006-01-21 23:34:45 +00:00
christos
c681304808 Instead of dealing with port@host in many places, do it where it is needed.
It reduces code and complexity and at the same time allows as to use symbolic
ports instead of just numeric everywhere.
2006-01-20 17:30:00 +00:00
garbled
79363b714f Add control file documentation for 'o' handling, and fix the
documentation on the DVI handling, the correct letter is 'd' not 'r'.
2006-01-20 08:51:40 +00:00
garbled
bd7bcee846 Add a simple filter that encapsulates ascii text into HP PJL format.
Script written by Ross Harvey.
2006-01-20 08:37:26 +00:00
garbled
fad94e160d Fix PR bin/30272 Lpd would create the tempfile "remotexxxxx" and send
that, but then fill out the control file with the "df" filename.  Fix by
sending the remote file with the "df" filename, as suggested by Robert
Vargason on tech-userlevel.  lpd -r now works properly with an if (input
filter)
2006-01-19 19:17:59 +00:00
garbled
2d58d3d4c7 If we set SIGCHLD to SIG_IGN then any wait()'s on the child processes will
return -1.  This causes filters to fail because we get a value for
child_pid we weren't expecting.  Set SIGCHLD to SIG_DFL instead to clear
the reapchild setting when forking the child lpd.
2006-01-18 23:17:38 +00:00
garbled
9ca158e136 change return(0) to return(rv). We went to all the trouble to calculate the
return value, we might as well return it. (fixes lpq -a, and probably lpd)
2006-01-18 19:11:25 +00:00
garbled
d1a9ef55c4 per PR bin/12958 change buf[MAXPATHLEN] to buf[BUFSIZ] to avoid potential
future problems if either should change.
2006-01-17 19:41:49 +00:00
garbled
517b1ba160 Update a comment regarding control file WRT "o" 2006-01-17 19:12:17 +00:00
garbled
fae257a066 Fix PR bin/14247
This PR claims that MacOSX 10.1 cannot print postscript files to a NetBSD
lpd because the mac will tag the file with an "o" for postscript, which
we do not handle.  Rather than simply mapping o -> f as was done in the
PR, or mapping o -> l as was done in FreeBSD, I have implemented full
support for the "o" option.  If a postscript filter does not exist in the
printcap file however, it will default to "l" handling.

With this change, you can now specify a "pf" or postscript filter in your
printcap, and have it handle postscript files sent to it with "lpr -o".

The "o" format in lpd is specified in RFC1179 as being a valid format flag.
2006-01-17 19:11:12 +00:00
garbled
e76be65112 in ckqueue() if "sd" is not an existing capability, than sd will be
uninitialized, causing the free() in out: to explode.  Initialize sd to NULL.
2006-01-17 18:38:12 +00:00
is
def92bcab5 Fix obvious error, hopefully correctly. 2006-01-15 13:17:15 +00:00
wiz
dd0ea511f5 New sentence, new line. 2006-01-12 21:15:59 +00:00
garbled
606b04818e sizeof(char) is unneccesary. 2006-01-12 18:06:25 +00:00
garbled
53df3fea02 Add libedit command line history capability to lpc(8). 2006-01-12 17:53:03 +00:00
garbled
97f8851cc8 Address PR bin/12112
Lpd has the ability to start on a port other than "printer" but has no
way to connect to a remote lpd on that port.  This change adds the
ability to specify port@host in the rm element of printcap(5).  Tested to
work with both a standard lpd setup and one running on special ports.
2006-01-04 15:32:50 +00:00
yamt
ebd9a381a8 constify. 2005-12-02 11:33:39 +00:00
christos
04723c3ffc - WARNS = 4
- factor out commonly used code.
- constify
- use warn/warnx instead of printf
2005-11-28 03:26:06 +00:00
jdolecek
a53e9b6a94 the mktemp() use here is not OK, adjust comment 2005-11-27 12:52:30 +00:00
christos
c4ee9f6d2e 64 bit inode changes 2005-08-19 02:07:18 +00:00
lukem
9b668c37e7 Ensure s is initialized before testing (none of the sockets may be ready
so it might not be setup).
Detected with gcc -Wuninitialized.
2005-06-02 05:57:03 +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
itojun
bb4eb5b8cd NI_WITHSCOPEID was not picked up by IETF standardization 2004-11-16 06:00:37 +00:00
dsl
75ba9fc767 Add (unsigned char) cast to ctype functions
Some of this code could usefully be converted to use strtoul() and/or
some small helper functions.
2004-10-30 08:44:25 +00:00
wiz
9029210e32 Avoid printing a useless \0. From SHIMIZU Ryo in PR 26766. 2004-08-26 13:05:14 +00:00
tron
f4ae533fa6 Really set "MKPRIVATELIB" and not "INTERNALLIB". 2004-05-23 14:05:39 +00:00
lukem
b817247988 Use MKPRIVATELIB=yes instead of providing an empty libinstall:: target and
setting NOLINT, NOPIC, NOPROFILE (etc)
2004-05-23 02:24:50 +00:00
christos
70229c52ba constify printcapdb 2004-04-24 02:59:19 +00:00
christos
6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
lukem
eae82b3d06 #define _PATH_BIN_RCMD in common_source/pathnames.h rather than using
wacky Makefile rules to compile rcmd.c
2003-10-19 05:51:44 +00:00
itojun
686afb7f65 safer use of realloc 2003-10-16 06:22:09 +00:00
itojun
94a111ae53 safer realloc.
sizeof() for malloc was mistaken in socksetup().
2003-10-16 03:03:04 +00:00
itojun
67ad87844e plug memory leak. oenbsd-pr-3425 2003-09-01 00:21:08 +00:00
agc
326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
itojun
2a470e2847 use bounded string op 2003-07-13 14:06:06 +00:00
lukem
001c68bd94 Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
2003-07-10 10:33:58 +00:00
itojun
85da88227f use strlcpy/strlcat.
[fix off-by-one in displayq.c]
2003-05-17 20:46:42 +00:00
itojun
658519705e sscanf possible overrun 2003-05-17 14:56:40 +00:00
wiz
d0e6ae84ee p before q in options/usage. 2003-04-16 11:56:11 +00:00