Commit Graph

46 Commits

Author SHA1 Message Date
Ed Schouten
d69ce4ec7a Remove unneeded use of struct timezone.
We can safely call gettimeofday() without passing a struct timezone.
We're not using it at all.
2010-08-08 02:45:48 +00:00
Ed Schouten
006ab5b3e7 Port all apps in libexec/ from libulog to utmpx. 2010-01-13 18:28:58 +00:00
Ed Schouten
1100c00131 Make WARNS=6 the default for libexec/.
Just like bin/ and sbin/, I think setting WARNS to the highest value
possible will make it more attractive for people to fix warnings.

- The WARNS variable is set in the Makefile in the directory of the
  application itself, making it more likely that it will be removed out
  of curiosity to see what happens.
- New applications will most likely build with WARNS=6 out of the box,
  because the author would more likely fix the warnings during
  development than lower WARNS.

Unfortunately almost all apps in libexec require a lowered value of
WARNS.
2010-01-02 09:50:19 +00:00
Ed Schouten
af5bd8feb3 Modify the sources to make WARNS=6 work. 2009-12-26 14:33:55 +00:00
Ed Schouten
3af5aa46eb Unbreak the build.
I increased the WARNS, but it looks like it breaks certain architectures
with more strict alignment requirements (mips, sparc64, ia64).

Pointy hat to:	me
2009-12-26 11:00:18 +00:00
Ed Schouten
3eb56f7eff Let talkd use utmpx instead of utmp.
Because strings are null terminated now, there is no need to copy
ut_line into a separate buffer first. Also enable WARNS.
2009-12-25 11:12:05 +00:00
Christian Brueffer
662cac9f23 Fix some "in in" typos in comments.
PR:		121490
Submitted by:	Anatoly Borodin <anatoly.borodin@gmail.com>
Approved by:	rwatson (mentor), jkoshy
MFC after:	3 days
2008-03-26 07:32:08 +00:00
Xin LI
b49407ee43 Prevent usage of nested externs. 2005-05-06 15:28:54 +00:00
Bruce M Simpson
872b0f7946 Whitespace. 2004-06-14 22:44:13 +00:00
Bruce M Simpson
17d7976856 Do not depend on the global 'sockt' being initialized to 0;
instead, use the symbolic constant STDIN_FILENO, as this is
a daemon invoked from inetd.
Remove 'sockt' as it is not referenced.
2004-06-14 22:43:05 +00:00
Tim J. Robbins
99d21d504c Use the new style struct sockaddr instead of osockaddr in system calls
so that talkd works without COMPAT_43.

Obtained from:	NetBSD (christos), Rumi Szabolcs
2003-09-28 09:16:09 +00:00
Ruslan Ermilov
fe08efe680 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
Juli Mallett
02a0965ef6 MFp4 @27667: WARNS=5 cleanup on i386.
Remove the unused FILE\ *tf from print_mesg args, and the
    bogus passing in of an uninitialised FILE* for it.

    Call a timeval 'now' instead of 'clock' due to shadowing.

    Remove a nested localtime declaration.

    Make the delete invite argument match the ID type, u_int32_t.

    Use const for pointers to const items.

    Cast to long where printing as such.

    Include netinet/in.h for htonl/htons.

Reviewed by:	imp
2003-04-03 05:13:27 +00:00
Philippe Charnier
3f162cb85d The .Nm utility 2002-07-06 19:19:48 +00:00
Mike Barcroft
fd8e4ebc8c o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
  source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
  Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
  POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
  and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
  complexities associated with having MD (asm and inline) versions, and
  having to prevent exposure of these functions in other headers that
  happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
  third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on:	alpha, i386
Reviewed by:	bde, jake, tmm
2002-02-18 20:35:27 +00:00
Warner Losh
4974a170b0 Fix minor disorder in functions declared in extern.h 2002-02-05 21:07:47 +00:00
Warner Losh
0b67b493a9 o Move externs to extern.h
o Use new-style prototypes exclusively rather than the old foo() style.
o Use new-style function definitions.
o remove register
o make functions passed to signal have the right signature.
o do minor const poisoning.
2002-02-05 21:06:56 +00:00
Kris Kennaway
9357f4121d Lock down with WFORMAT?=1, with overrides in the subdirectories which
are not yet warning-clean.  Tested on i386 and alpha.
2002-02-04 02:33:51 +00:00
Dima Dorfman
f218b7fcbb Include ttymsg.h from ../../usr.bin/wall instead of rolling our own
prototype.
2001-09-09 14:30:11 +00:00
Kris Kennaway
5007eafa5e Save errno in signal handler
Obtained from:	OpenBSD
MFC After:	1 week
2001-07-24 05:41:13 +00:00
Brian Somers
76dada465b Print the month number properly
MFC after: 1 week
2001-07-13 15:07:06 +00:00
Ruslan Ermilov
0efe23d669 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 10:49:54 +00:00
Dima Dorfman
4513fdec5e In the "Message from Talk_Daemon" announcement, print the date as well
as the current time.  It's nice to know whether the talk request you
see was sent just a few minutes ago (assuming you didn't hear the
bell), or if it's been decaying for days (weeks?).
2001-06-07 05:26:57 +00:00
Ruslan Ermilov
e5b5c66bca - Backout botched attempt to intoduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:22:12 +00:00
Ruslan Ermilov
760819894e mdoc(7) police: use the new features of the Nm macro. 2000-11-20 14:42:24 +00:00
Mike Pritchard
229494cb51 Add $FreeBSD$ lines to man pages that are missing them to make it
easier for translation teams.

PR:		docs/13418
Submitted by:	Alexey Zelkin <phantom@cris.net>
1999-08-28 23:10:20 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Brian Somers
9e9a43bdec Ensure that things returned by gethostname() and
friends are terminated and allow for a maximum
host name length of MAXHOSTNAMELEN - 1.
Put parenthesis around sizeof args.
Make some variables static.
Fix telnetd -u (broken by my last commit)

Prompted by: bde
1999-04-07 08:27:45 +00:00
Matthew Dillon
386794da12 Reviewed by: freebsd-current, freebsd-security
Removed getuid() root check so ntalkd can be run from a tty sandbox.
    It isn't suid root anyway, who knows why the getuid() check was even
    in there in the first place!
1998-12-01 21:12:57 +00:00
Bruce Evans
bb6ae0a4a9 Fixed printf format errors. 1998-08-02 16:44:18 +00:00
Bruce Evans
375557fcad Don't assume that time_t is long. 1998-06-29 17:06:00 +00:00
Warner Losh
d83662583c sprintf->snprintf paranoia
Obtained from: OpenBSD (?)
1997-12-24 19:39:57 +00:00
Philippe Charnier
a846453c5e Use err(3). Add protos for -Wall. 1997-12-02 12:33:42 +00:00
Peter Wemm
9e522f7a18 Revert $FreeBSD$ to $Id$ 1997-02-22 14:22:49 +00:00
Paul Traina
dfe0d2158e Fix buffer overrun problem.
Cannidate for: 2.2	[must]

Obtained from: Lite/2 and BSDI's published patch
1997-01-18 08:30:01 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Wolfram Schneider
148531ef1e add forgotten $Id$ 1996-09-22 21:56:57 +00:00
Peter Wemm
f533eaf1c0 zap #include <sgtty.h>, it's not used. 1996-09-07 02:08:35 +00:00
Jordan K. Hubbard
a7939d5aa6 Here is a patch to talkd which makes it send the request to the tty with
the lowest idle time.
Submitted by:	loodvrij@gridpoint.com (Bruce J. Keeler)
1996-03-24 09:27:20 +00:00
Rodney W. Grimes
6c06b4e2aa Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
Andrey A. Chernov
58328669a3 Fix hostnames >32 chars
Submitted by: cstruble@singularity.bevc.blacksburg.va.us
1994-12-15 01:21:06 +00:00
Andrey A. Chernov
5a2162043c Implement security fix correctly: via isprint() 1994-10-22 17:37:06 +00:00
Poul-Henning Kamp
b6cbdb1d7d A nice little security fix. Things must be rough in moscow...
Submitted by:	dima@demos.su (Dima Ruban)
1994-10-22 17:19:49 +00:00
Garrett Wollman
2a3c26c889 Update to new make macros and disable Kerberos because we haven't got it
set up right yet.
1994-08-05 21:24:58 +00:00
Poul-Henning Kamp
331d599d36 Reviewed by: phk
changed ^G to \007
1994-07-24 02:44:28 +00:00
Rodney W. Grimes
ea022d1687 BSD 4.4 Lite Libexec Sources 1994-05-27 12:39:25 +00:00