349 Commits

Author SHA1 Message Date
Erik Auerswald
0c9d12e0da syslod, talkd: GNU/Linux w/o utmp compatibility
Some newer GNU/Linux systems no longer have a "utmp" file.
This file is used by both syslogd and talkd to find the
TTY device files of active user sessions in order to send
messages to specific or all users.

Gnulib can emulate a utmp file via the read_utmp() function
from the readutmp module.  This emulation is activated by
defining "READUTMP_USE_SYSTEMD", triggered via configure's
"--enable-systemd" option on systems without utmp and with
systemd.

But, this emulation reports non-existing TTY device files
for active user sessions.  Attempting to send a message to a
non-existing TTY produces an error, but that is normal behavior
for such a system.  Thus, ignore this error on such systems,
but not others.

* NEWS.md: Mention enhancement.
* libinetutils/ttymsg.c (inetutils_ttymsg): Ignore errors for
  non-existings TTY files reported in emulated utmp entries.
2025-12-03 21:24:22 +01:00
Simon Josefsson
8e9d7c933a doc: Fix codespell nits 2025-11-27 00:33:35 +01:00
Simon Josefsson
04c3738a6c maint: Run 'make update-copyright'. 2025-01-01 18:21:25 +01:00
Collin Funk
dd4c077b34 maint: Fix most instances of '-Wstrict-prototypes'.
* libinetutils/des_rw.c (des_clear_key, des_read, des_write): Don't
use K&R-style function declarations.
* ifconfig/system/linux.c (pnd_read): Use void instead of an empty
argument list.
* libtelnet/auth.c (auth_status, auth_request, auth_send_retry):
Likewise.
* libtelnet/kerberos5.c (kerberos5_cleanup): Likewise.
* ping/ping.c (ping_run): Likewise.
* ping/ping6.c (ping_run): Likewise.
* ping/ping6.h (ping_run): Likewise.
* ping/ping_impl.h (ping_run): Likewise.
* telnet/authenc.c (net_encrypt, telnet_spin): Likewise.
* telnet/commands.c (_setlist_init, auth_help, EncryptHelp)
(ayt_status): Likewise.
* telnet/sys_bsd.c (TerminalNewMode): Likewise.
* telnet/tn3270.c (outputPurge, Push3270, Finish3270, SetIn3270)
(tn3270_ttype): Likewise.
* telnetd/state.c (willoption): Likewise.
* telnetd/telnetd.h (pty_buffer_level): Likewise.
* telnetd/term.c (term_send_eof, term_change_eof, tty_linemode)
(tty_isecho, tty_flowmode, tty_restartany, tty_israw)
(tty_isbinaryin, tty_isbinaryout, tty_isediting, tty_istrapsig)
(tty_issofttab, tty_islitecho, tty_iscrnl, copy_termbuf): Likewise.
* telnetd/termstat.c (termstat, _termstat): Likewise.
* telnetd/utility.c (net_encrypt, telnet_spin): Likewise.
* src/rcp.c (krb_realmofhost): Add the parameter type.
* telnet/ring.c (ring_encrypt): Likewise.
* telnet/ring.h (ring_encrypt): Likewise.
2024-05-09 18:51:54 -07:00
Collin Funk
711242da5b maint: Remove uses of the 'register' keyword.
* libicmp/*.c: Don't use the 'register' keyword when declaring
variables or arguments.
* libinetutils/*.c: Likewise.
* libtelnet/*.h: Likewise.
* libtelnet/*.c: Likewise.
* src/*.c: Likewise.
* talk/*.c: Likewise.
* telnet/*.c: Likewise.
* telnetd/*.c: Likewise.
2024-05-08 21:22:33 -07:00
Collin Funk
e5a9384c92 maint: Remove unnecessary standard library extern function decls.
* ftp/cmds.c (account, user): Don't declare getpass since it is
defined in unistd.h.
* ftp/ftp.c (login): Likewise. Don't declare fclose and pclose since
they are defined in stdio.h.
* ftpd/extern.h: Don't declare getusershell since it is defined in
unistd.h.
* ftpd/ftpd.c: Don't declare fclose since it is defined in stdio.h.
* libinetutils/logwtmp.c: Don't declare errno since it is defined in
errno.h.
* libtelnet/misc.c (auth_encrypt_user): Include string.h and don't
declare strdup.
* telnet/authenc.c (telnet_gets):  Don't declare getpass since it is
defined in unistd.h.
* telnet/commands.c (hostname): Use NULL instead of 0.
(env_init, shell): Include string.h and don't redeclare functions.
2024-05-08 20:29:36 -07:00
Collin Funk
4d71ebcc50 Fix sc_bsd_caddr checks.
* libinetutils/if_index.c (if_nameindex): Don't cast non-void pointer
arithmetic.
* ftp/ftp.c (hookup): Don't cast pointers to memmove and memset.
* src/inetd.c (getconfigent): Likewise.
* telnet/commands.c (tn): Likewise.
2024-05-06 14:50:17 -07:00
Collin Funk
b5888324ce Fix sc_unsigned_int checks.
* ftpd/ftpd.c (send_data, receive_data): Convert 'u_int' to
'unsigned int'.
* libinetutils/ttymsg.c (inetutils_ttymsg): Likewise.
* libls/extern.h: Likewise.
* libls/print.c (minor, printtype): Likewise.
* libls/stat_flags.c (flags_to_string, string_to_flags): Likewise.
* src/rlogin.c (winsize, get_window_size, getescape): Likewise.
* src/rsh.c (copyargs): Likewise.
2024-05-04 01:42:20 -07:00
Simon Josefsson
c7f6910d68 Drop HAVE_CONFIG_H. 2024-04-24 15:02:44 +02:00
Simon Josefsson
aba8d6528e maint: Run 'make update-copyright'. 2024-01-01 11:28:59 +01:00
Simon Josefsson
e158f9c70d syslogd: Build fixes for macOS.
Thanks to Rui Chen and Caleb Xu, see
<https://savannah.gnu.org/bugs/?65093>.
2023-12-30 11:32:26 +01:00
Simon Josefsson
2cf199580a maint: Re-indent using GNU indent 2.2.13. 2023-12-29 18:35:01 +01:00
Simon Josefsson
4bfe18d36f maint: Run 'make update-copyright'. 2023-01-01 01:37:41 +01:00
Simon Josefsson
c1b8d134d5 Indent code. 2022-10-26 00:03:45 +02:00
Alfred M. Szmidt
6d519229fa Happy GNU 2022 year! 2022-01-01 17:23:02 +01:00
Simon Josefsson
1d5c923528 maint: Use copyright year ranges for readability.
* cfg.mk (update-copyright-env): Add, from coreutils.
(VC_LIST_ALWAYS_EXCLUDE_REGEX): Add, for update-copyright exceptions.
* README: Add info about copyright year ranges.
* *: Update copyright notices.
2021-09-03 18:41:09 +02:00
Simon Josefsson
0ceee23262 Use gnulib module 'attribute' instead of obsolete 'snippets/unused-parameters'.
* */*.c: Use MAYBE_UNUSED instead of _GL_UNUSED_PARAMETER.
* */*.c: Include attribute.h instead of unused-parameters.h.
2021-09-01 22:49:18 +02:00
Alfred M. Szmidt
911413ea57 Happy GNU 2021 year! 2021-01-01 11:35:27 +01:00
Simon Josefsson
d8de4587f2 Update copyright years to use intervals up to 2020. 2020-01-01 13:21:37 +01:00
Mats Erik Andersson
3d64a8c728 Update copyright years to 2017. (silent change) 2017-02-21 14:25:23 +01:00
Mats Erik Andersson
84dcf08568 Update copyright years to 2016. (silent change) 2016-01-22 19:09:49 +01:00
Mats Erik Andersson
d3c9b1b8fa Update copyright years with 2015. (silent change) 2015-01-16 14:09:44 +01:00
Mats Erik Andersson
547bb31ef5 libinetutils: Skeletal preparations for Heimdal.
Lay the foundation for separate authentication code to be
used by the r-commands when built with standard Kerberos5.
2014-04-26 19:01:49 +02:00
Mats Erik Andersson
bd212de456 Begin adaptions to Heimdal's Kerberos.
Aim at an adaption of all r-commands, with the first
incomplete steps for `rsh'.
2014-04-25 20:37:40 +02:00
Mats Erik Andersson
bbff25dd37 Silence warnings with libshishi. 2014-04-25 14:21:45 +02:00
Mats Erik Andersson
ae85332551 Update copyright years with 2014. (silent change) 2014-01-18 12:23:21 +01:00
Mats Erik Andersson
fa0085314a inetd: Ensure successful daemon mode.
Check all remaining calls to chdir.
2013-11-27 16:42:12 +01:00
Mats Erik Andersson
d1d52cce92 Update copyright years with 2013. (silent change) 2013-05-22 21:03:41 +02:00
Mats Erik Andersson
0b845519d6 Mixed compiler warnings. 2013-05-22 18:09:42 +02:00
Mats Erik Andersson
2d29628f5b rlogind: Client's principal name. 2013-05-15 15:03:32 +02:00
Mats Erik Andersson
1054aa7354 Partial adaptions to Kerberos5. 2013-03-28 16:44:21 +01:00
Guillem Jover
b1d8390d0a Cleanup automake variables. 2013-01-24 15:20:39 +01:00
Mats Erik Andersson
0dc3545ca8 Move if_nameindex to libinetutils.
Build if_nametoindex() and if_nameindex() in libinetutils.a
if they are missing in the system library.
2012-11-28 19:26:18 +01:00
Mats Erik Andersson
3299ba83d9 Mixed testing issues. 2012-11-14 22:28:21 +01:00
Mats Erik Andersson
9f35cb2128 rlogind: Buffer overflow with encryption. 2012-11-08 22:06:54 +01:00
Mats Erik Andersson
171cec6e1d rlogind: Name specification in Kerberos mode.
Improve realm detection and handle urgent
data in non-encrypted Kerberos mode.
2012-10-12 02:55:04 +02:00
Mats Erik Andersson
066ab95148 Overflow protection. 2012-10-03 22:20:14 +02:00
Mats Erik Andersson
108417e111 rlogin: Signal protection issues.
Attempt consistent signal handling for all
supported systems.  Also influencing window
resizing and its IPC.
2012-09-27 23:54:36 +02:00
Mats Erik Andersson
fc8280bc58 Consistency checks. 2012-09-19 12:14:55 +02:00
Mats Erik Andersson
2425fa8d7d libinetutils: Compiler warnings. 2012-09-14 20:59:49 +02:00
Mats Erik Andersson
78079c5208 Address resolution alternative. 2012-09-13 21:59:15 +02:00
Mats Erik Andersson
df22b0e7de Realm for server lookup. 2012-08-21 23:35:34 +02:00
Mats Erik Andersson
a7a5c3ec65 Refine r-commands with libshishi. 2012-08-15 02:44:41 +02:00
Mats Erik Andersson
7439cb7c3d Authorization type k5login.
Enable k5login authorization in telnetd and
rlogind/rshd for future versions of libshishi.
2012-08-08 11:52:57 +02:00
Mats Erik Andersson
3054a34cda rlogind, rshd: Exchange protocol audit.
Make sure they follow identical protocols.
2012-08-03 15:25:44 +02:00
Mats Erik Andersson
a1df58afcb Macro usage for socket lengths. 2012-08-03 03:34:38 +02:00
Mats Erik Andersson
eb139e0534 Reworked support for utmpx/utmp. 2012-08-01 15:16:47 +02:00
Mats Erik Andersson
4689d41a2a rlogind, rshd: Protocol coherence. 2012-07-27 15:39:50 +02:00
Mats Erik Andersson
c239b98317 rcp: Non-encrypting libshishi support. 2012-07-26 03:40:56 +02:00
Mats Erik Andersson
6c7b2815da rlogin, rsh: Host lookup. 2012-07-26 03:40:56 +02:00