Commit Graph

52 Commits

Author SHA1 Message Date
dholland 8aaae434e3 Remove useless cast, probably motivated by an older and stupider lint. 2010-05-29 23:12:30 +00:00
dholland 3ba8be7347 Update outdated comment (and docs) about which header lines are printed.
I appear to have been carrying this patch around since 2002.
2010-05-29 23:08:06 +00:00
dholland 5f666bd308 Don't launder const 2010-05-29 23:05:22 +00:00
lukem 500db00274 Default to WARNS=4
Exceptions that need a lower level are:
	getty ld.elf_so lfs_cleanerd makewhatis telnetd tftpd
	hpropd ipropd-master ipropd-slave kadmind kpasswdd
2009-03-16 02:24:55 +00:00
lukem 434441debd fix sign-compare issue 2009-03-14 11:43:24 +00:00
lukem 0c4ddb1599 Remove the \n and tabs from the __COPYRIGHT() strings. 2008-07-20 01:09:06 +00:00
dholland 16e3bec279 Clarify how one is supposed to use the pointers returned by getutentries()
(the utmpentry.c code), specifically with respect to who owns them and
when to free them. Now they're owned by utmpentry.c, only. Abolish the
freeutentries() function, which was the wrong abstraction; add instead
endutentries(), which flushes out the internally managed memory.

Update callers as necessary. Some (e.g. talkd) had been leaking memory;
others (e.g. syslogd) had been accidentally freeing and reloading utmp
more often than necessary. There are a couple untidy bits in users and
rwhod that someone should look after sometime, maybe.

Fixes PR bin/35131, which was about talkd's memory leak.
2008-07-13 20:07:48 +00:00
christos 8cb0a31f67 PR/36266: David A. Holland: Don't read and write sig_atomic_t variables in
signal handlers; only write them.
2007-05-03 15:09:41 +00:00
hubertf ee68ca46c0 Remove unnecessary ctype.h from libexec/comsat/comsat.c file
From: Slava Semushin <slava.semushin@gmail.com>
2007-02-21 21:06:26 +00:00
christos 70b85ad925 Don't do things you are not supposed to inside a signal handler. 2005-07-18 04:01:33 +00:00
christos a6bb85932c PR/30170: Markus W Kilbinger: src/libexec/comsat complains about: '/' in
"/dev/pts/1"
2005-05-07 23:37:59 +00:00
martin b2772db1b0 Fix off by one reported by David A. Holland in PR bin/26778. 2004-09-15 08:44:02 +00:00
enami 150b25198e Whitespace nits. 2004-07-10 07:11:38 +00:00
enami af9fc9cd10 Use strtoimax rather than strtol to parse a number which represents
an offset in a file.  long is insufficient on some architecture.
Problem noticed by Atsushi Onoe while ago.
2004-07-10 07:10:43 +00:00
christos f61a35eaaf stat the right file. 2004-07-10 04:00:09 +00:00
enami 66820706e0 No need to pretty print the errno with err() or warn(). 2004-07-10 00:00:58 +00:00
wiz 5e2319eed0 2004, not 1994. 2004-06-25 17:36:04 +00:00
christos fd55c85046 Forgot to include utmpx support for this one. 2004-06-25 17:34:38 +00:00
itojun 6e4e427990 realloc mistake. from openbsd 2003-09-19 05:33:15 +00:00
agc 8e6ab8837d Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22284, verified by myself.
2003-08-07 09:46:37 +00:00
kleink b3df6303a9 Rename `sigset' locals to avoid symbol shadowing warning. 2003-01-16 09:38:37 +00:00
wiz d6285bbf1d Begin new sentences on new lines.
Patch from Robert Elz (kre at munnari oz au).
2002-09-29 14:05:52 +00:00
mjl f60ca83e0c strncpy() -> strlcpy() 2002-03-18 23:34:21 +00:00
wiz f427fba7da Sort sections. 2002-01-15 02:19:36 +00:00
onoe 740970e20e ignore trailing newline which is included in the message from mail.local. 2001-04-02 14:57:37 +00:00
atatat 4c4a0e2830 Use strtol() instead of atoi() for reading the number out of the
datagram that we received, which leads to easier support for
(ignoring) the procmail messages that specify the folder to which
the message was delivered.

When reading the mailbox, if we encounter a "From " line, we should
exit().  This can occur if there are a lot of rapidly arriving, yet
short messages.
2001-03-16 21:39:08 +00:00
atatat 32af82236c Fix output to a tty that is missing ONLCR (eg emacs, vi, mutt,
etc.).  This became broken when strvis(3) started being used instead
of simply scanning for "bad" characters.
2001-03-14 04:39:42 +00:00
cgd 65a1026492 convert to use getprogname() 2001-02-19 22:43:42 +00:00
christos b42a153d41 fix nested extern 2001-02-04 21:59:52 +00:00
mjl 7627a9213f Un-__P and ANSIfy. 2000-10-04 18:52:50 +00:00
mjl e88c38cfda No \n in syslog messages.
_exit(-1) -> _exit(1).
2000-10-04 18:24:03 +00:00
mjl 8895a2f9a6 Use sockaddr_storage.
Use correct var for strncpy length.
2000-08-22 16:42:37 +00:00
msaitoh b0d71b5f83 remove extra period 2000-08-14 12:16:45 +00:00
garbled f124765044 More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:25:43 +00:00
mrg 2beab49a06 - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
1998-07-06 06:45:41 +00:00
mrg 90e4ac0203 add -l logging switch. 1998-07-04 19:38:39 +00:00
mrg 46b017828c - remove register
- KNF
- ensure hostname has trailling nul.
- use initgroups/setgid/setuid rather than just setuid, and do this earlier.
- find "from:" and "subject:" as well.
- use strvis(3) rather than some local crufty code.
1998-07-03 02:27:58 +00:00
kleink d1cd3dd49b Need <time.h> for time() prototype. 1998-04-01 14:29:08 +00:00
enami abc05455ed Fix .Nm usage. 1997-10-20 02:27:53 +00:00
mrg 16e14cfd8d WARNS?=1. RCS ids 1997-10-07 10:57:08 +00:00
kleink 66105c37fc Lseek(2) usage cleanup: the use of L_SET/L_INCR/L_XTND is deprecated,
use SEEK_SET/SEEK_CUR/SEEK_END instead.
1997-08-25 19:31:43 +00:00
mycroft 78cb5bbe77 Use POSIX tty semantics. 1995-05-02 02:05:47 +00:00
mycroft ebeae88da2 Use POSIX signals. 1995-03-21 21:47:04 +00:00
cgd ae9172d6cd specify man pages the new way. 1994-12-22 09:57:51 +00:00
jtc 9c98b1cffd Sync with 4.4 lite 1994-08-06 23:26:31 +00:00
jtc c3a4cec791 Include proper header files to bring prototypes into scope 1994-08-05 01:01:16 +00:00
cgd b65d6c0390 better fix for security problems, and minor cleanup 1994-02-01 00:32:22 +00:00
briggs 476d26c797 Change from bicknell@csugrad.cs.vt.edu and ceharris@csugrad.cs.vt.edu.
This closes an apparent security problem on systems where users have
write access to the mail spool.  Since root actually runs comsat, a
user could link their mail file to a system file that they normally
could not access, and use comsat to view said file.  This fix simply
makes sure that the mail file is a REGular file.
1994-01-30 18:32:39 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
mycroft dfb9caab49 Add RCS indentifiers. 1993-08-01 07:32:48 +00:00