41 Commits

Author SHA1 Message Date
Simon Josefsson
7b585da14b talkd: Fix indentation in last commit.
* talkd/table.c (lookup_request): Indent.
2025-07-08 21:07:36 +02:00
Bruno Haible
41af1529f1 talkd: Fix use-after-free bug.
* talkd/table.c (lookup_request): Fetch ptr->next before possibly deleting the
object at ptr.

Signed-off-by: Simon Josefsson <simon@josefsson.org>
2025-07-02 09:58:47 +02:00
Simon Josefsson
04c3738a6c maint: Run 'make update-copyright'. 2025-01-01 18:21:25 +01:00
Simon Josefsson
aba8d6528e maint: Run 'make update-copyright'. 2024-01-01 11:28:59 +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
ae85332551 Update copyright years with 2014. (silent change) 2014-01-18 12:23:21 +01:00
Mats Erik Andersson
d1d52cce92 Update copyright years with 2013. (silent change) 2013-05-22 21:03:41 +02:00
Mats Erik Andersson
b5d9f38a35 talkd: Nominally functional ACL checking. 2012-09-06 16:49:34 +02:00
Alfred M. Szmidt
99c71142f2 Updated copyright years; happy 2012! (silent change) 2012-01-01 19:27:00 +01:00
Alfred M. Szmidt
67ee421368 Replaced all usage of ARG_UNUSED with _GL_UNUSED_PARAMETER. 2011-06-18 18:35:55 +02:00
Alfred M. Szmidt
d9788a7d35 Updated copyright years; happy 2011! (silent change) 2011-01-02 15:23:38 +00:00
Alfred M. Szmidt
9ecfcb8d21 Converted K&R style declarations to ISO C89.
* ftp/cmds.c (account, all_lower, all_upper, another, cd, cdup)
(changetype, confirm, cp_subst, delete, disconnect, do_chmod)
(do_umask, domap, doproxy, dotrans, fatal, get, getit, globulize)
(lcd, ls, macdef, makedir, mdelete, mget, mls, modtime, mput)
(newer, onoff, proxabort, put, pwd, quit, quote, quote1, reget)
(remglob, removedir, renamefile, restart, rmthelp, rmtstatus)
(setascii, setbell, setbinary, setcase, setcr, setdebug, setform)
(setftmode, setglob, sethash, setnmap, setntrans, setpassive)
(setpeer, setport, setprompt, setrunique, setstruct, setsunique)
(settenex, settrace, settype, setverbose, shell, site, site_idle)
(sizecmd, status, strdown, syst, user): Use ANSI style
declarations for prototypes.
* ftp/extern.h (abortpt, abortrecv, abortsend, cmdabort, intr)
(lostpeer, proxabort, psabort): Likewise.
* ftp/ftp.c (abort_remote, abortpt, abortrecv, abortsend)
(dataconn, empty, getreply, gunique, hookup, initconn, login)
(proxtrans, psabort, pswitch, ptransfer, recvrequest, reset)
(sendrequest, tvsub): Likewise.
* ftp/main.c (makeargv, slurpstring): Likewise.
* ftpd/ftpcmd.y (lookupyyle): Likewise.
* libinetutils/tftpsubs.c (r_init, w_init): Likewise.
* libls/cmp.c (acccmp, modcmp, namecmp, revacccmp, revmodcmp)
(revnamecmp, revsizecmp, revstatcmp, sizecmp, statcmp): Likewise.
* libls/fts.c (fts_alloc, fts_build, fts_children, fts_close)
(fts_lfree, fts_load, fts_maxarglen, fts_open, fts_padjust)
(fts_palloc, fts_read, fts_set, fts_sort, fts_stat): Likewise.
* libls/ls.c (display, ls_main, mastercmp, traverse): Likewise.
* libls/print.c (compute_columns, printacol, printaname, printcol)
(printlink, printlong, printscol, printstream, printtime)
(printtype): Likewise.
* libls/stat_flags.c (flags_to_string, string_to_flags): Likewise.
* libls/util.c (putname, usage): Likewise.
* ping/ping.c (ping_finish): Likewise.
* ping/ping6.c (echo_finish, ping_finish): Likewise.
* ping/ping_address.c (address_finish): Likewise.
* ping/ping_echo.c (echo_finish): Likewise.
* ping/ping_timestamp.c (timestamp_finish): Likewise.
* src/inetd.c (fix_tcpmux): Likewise.
* src/logger.c (open_socket): Likewise.
* src/rcp.c (response): Likewise.
* src/rlogin.c (sendwindow, writer): Likewise.
* src/syslogd.c (create_inet_socket): Likewise.
* src/tftp.c (w_init, , r_init, , tail, , command, intr, makeargv)
(startclock, stopclock, getcmd, intr): Likewise.
* src/tftpd.c (r_init, w_init): Likewise.
* src/uucpd.c (getpwnam, , dologout, dologout, dologin): Likewise.
* talk/ctl.c (open_ctl, open_sockt): Likewise.
* talk/get_names.c (getlogin, , ttyname): Likewise.
* talk/init_disp.c (init_display, quit, set_edit_chars): Likewise.
* talk/invite.c (announce_invite, invite_remote, send_delete):
Likewise.
* talk/io.c (talk): Likewise.
* talk/look_up.c (check_local): Likewise.
* talk/msgs.c (end_msgs, start_msgs): Likewise.
* talkd/table.c (new_id): Likewise.
* talkd/talkd.c (talkd_init): Likewise.
* telnet/commands.c (docharmode, dokludgemode, dolinemode)
(dolmmode, env_help, env_init, env_list, modehelp, getslc)
(lclchars, logout, modehelp, quit, send_esc, send_help, slc_help)
(slccmd, help, slc_help, suspend, togcrlf, togcrmod, togdebug)
(togglehelp): Likewise.
* telnet/main.c (tninit): Likewise.
* telnet/network.c (init_network, netflush, setneturg, stilloob):
Likewise.
* telnet/sys_bsd.c (susp, TerminalAutoFlush, TerminalDefaultChars)
(TerminalFlushOutput, TerminalSaveState, xmitAO, init_sys)
(sys_telnet_init): Likewise.
* telnet/telnet.c (doflush, dosynch, env_opt_start)
(env_opt_start_info, get_status, gettermname, init_telnet, intp)
(netclear, rlogin_susp, sendabort, sendayt, sendbrk, sendeof)
(sendnaws, sendsusp, slc_check, slc_end_reply, slc_export)
(slc_init, slc_mode_export, slc_start_reply, slc_update, slcstate)
(suboption, telrcv, telsnd, xmitAO, xmitEC, xmitEL): Likewise.
* telnet/terminal.c (getconnmode, init_terminal, setcommandmode):
Likewise.
* telnet/tn3270.c (init_3270): Likewise.
* telnet/utilities.c (EmptyTerminal, SetForExit, optionstatus):
Likewise.
* telnetd/pty.c (scrub_env): Likewise.
* telnetd/slc.c (netflush, check_slc, default_slc, deferslc)
(get_slc_defaults, send_slc): Likewise.
* telnetd/state.c (doclientstat, doclientstat, recv_ayt, send_brk)
(send_eof, send_intr, send_status, send_susp, suboption, telrcv):
Likewise.
* telnetd/telnetd.c (print_hostinfo, telnetd_run): Likewise.
* telnetd/telnetd.h (netclear, netflush): Likewise.
* telnetd/term.c (init_termbuf, set_termbuf, term_change_eof)
(term_send_eof, tty_flowmode, tty_isbinaryin, tty_isbinaryout)
(tty_iscrnl, tty_isecho, tty_isediting, tty_islitecho, tty_israw)
(tty_issofttab, tty_istrapsig, tty_linemode, tty_restartany):
Likewise.
* telnetd/termstat.c (netflush, defer_terminit, flowstat)
(localstat, terminit): Likewise.
* telnetd/utility.c (_gettermname, debug_close, debug_open)
(io_drain, io_setup, net_buffer_is_full, net_input_level)
(net_output_level, net_read, netclear, netflush)
(pty_buffer_is_full, pty_input_level, pty_output_level, pty_read)
(ptyflush, set_neturg): Likewise.

* ftp/ftp.c (getreply): Pass bogus value to lostpeer.
(proxtrans): Likewise.
(reset): Likewise.
(abort_remote): Likewise.
* ftp/cmds.c (another): Likewise.
2010-08-19 19:14:12 +02:00
Alfred M. Szmidt
4cbbc972b6 Use EXIT_SUCCESS and EXIT_FAILURE macros through out.
* cfg.mk (local-checks-to-skip): Removed sc_prohibit_magic_number_exit from list.
* whois/whois.c (main, err_sys, err_quit): Don't use magical exit numbers.
* telnetd/utility.c (io_drain, fatal): Likewise.
* telnetd/telnetd.c (main, telnetd_setup): Likewise.
* telnetd/state.c (telrcv): Likewise.
* telnetd/pty.c (startslave, cleanup): Likewise.
* telnet/terminal.c (init_terminal): Likewise.
* telnet/network.c (init_network): Likewise.
* telnet/main.c (main): Likewise.
* talkd/talkd.c (talkd_init, alarm_handler): Likewise.
* talkd/table.c (insert_table): Likewise.
* talkd/announce.c (announce): Likewise.
* talkd/acl.c (netdef_parse, read_acl): Likewise.
* talk/init_disp.c (init_display, quit): Likewise.
* src/uucpd.c (main): Likewise.
* src/traceroute.c (main): Likewise.
* src/tftpd.c (main, tftp, timer, justquit): Likewise.
* src/tftp.c (main, command, quit): Likewise.
* src/syslogd.c (main, add_funix, crunch_list, die): Likewise.
* src/rshd.c (main, doit, getstr): Likewise.
* src/rsh.c (main, else, sigmask, talk, copyargs): Likewise.
* src/rlogind.c (main, rlogin_daemon, rlogind_auth)
(rlogind_mainloop, getstr, cleanup, fatal): Likewise.
* src/rlogin.c (main): Likewise.
* src/rexecd.c (main, doit): Likewise.
* src/rexec.c (main): Likewise.
* src/rcp.c (main, toremote, sink): Likewise.
* src/logger.c (main): Likewise.
* src/inetd.c (echo_stream, discard_stream, chargen_stream)
(tcpmux, main): Likewise.
* ping/ping.c (main): Likewise.
* libtelnet/auth.c (auth_send): Likewise.
* libls/util.c (usage): Likewise.
* libls/ls.c (traverse, display): Likewise.
* ifconfig/ifconfig.c (main): Likewise.
* ftpd/ftpd.c (main, pass): Likewise.
* ftp/cmds.c (fatal): Likewise.
* libinetutils/daemon.c: Include <stdlib.h>.
(waitdaemon_timeout): Don't use magical exit numbers.
2010-08-19 19:13:53 +02:00
Alfred M. Szmidt
c583418f78 Updated copyright years for 2010.
Happy New Year!
2010-01-02 14:58:43 +01:00
Simon Josefsson
1cad30e670 Include config.h properly. 2009-11-14 17:48:41 +01:00
Alfred M. Szmidt
0ae726abd8 Updated copyright notice. (silent change) 2009-11-03 18:35:51 +01:00
Alfred M. Szmidt
5dc26adea6 Updated to GPLv3. 2007-06-29 16:29:35 +00:00
Alfred M. Szmidt
836bde0319 Ran indent and cppi. Removed lint keywords. 2006-10-21 15:24:21 +00:00
Sergey Poznyakoff
45f6763da3 Remove leftover BSD-isms: err,errx,warn,warnx, cast
to (void) before function calls. Use GNU error() uniformly
2005-10-11 11:16:16 +00:00
Sergey Poznyakoff
7d9fb422ea Updated FSF postal mail address 2005-07-31 20:05:12 +00:00
Sergey Poznyakoff
b35f42d9a1 * Makefile.am: Add -I ../libinetutils to have the argvc_xx()
protitypes.
	* acl.c: add <ctype.h> we use isdigit()
	add "argv.h" we use argv_xx() functions.
	(read_address): Declared static and variable addr unuse nuked.
	(netdef_parse): Declared static.
	(open_users_acl): Declared static.
	(netdef_free): Declared static.
	(acl_free): Declared static.
	(discard_acl): Declared static.
	* announce.c (init_line format_line finish_line print_mesg):
	Declared static.
	* intalkd.h: Add prototypes for global functions.
	* print.c (messages_types): Array declared const and static.
	(answers): Array declared cnst and static.
	(_xlat_num): Declared static.
	(print_request): First argument declared const and should
	have a return value.
	(print_response): First argument declared const and should
	have a return value.
	* process.c (process_request): Bug, process did not have
	a return value.
	* table.c (lookup_request): Declared static and function
	pointer with proper prototypes.
	(fuzzy_comp): Declared static.
	(exact_comp): Did not have a return value.
	(delete_invite): Change prototype to correspond to
	include/protocols/talkd.h wich want a unsinge long.
	* talkd.c (main): Returned 0 for good measure.
	(alarm_handler): It is a signal handler correct the prototype.
2001-10-30 05:42:41 +00:00
Sergey Poznyakoff
9294640ec0 Added extra debug info. 2001-10-29 09:27:49 +00:00
Sergey Poznyakoff
9974e41e9f Completely rewritten. 2001-10-25 20:33:06 +00:00
Sergey Poznyakoff
5ddf123bac ChangeLog configure.in ftp/Makefile.am ftpd/Makefile.am
ftpd/ftpcmd.y ftpd/ftpd.c ftpd/logwtmp.c ftpd/popen.c
 	glob/Makefile.am headers/config.h.in inetd/ChangeLog
 	inetd/Makefile.am inetd/inetd.c libinetutils/ChangeLog
 	libinetutils/Makefile.am libinetutils/cleansess.c
 	libinetutils/daemon.c libinetutils/des_rw.c
 	libinetutils/forkpty.c libinetutils/getusershell.c
 	libinetutils/herror.c libinetutils/hstrerror.c
 	libinetutils/iruserok.c libinetutils/localhost.c
 	libinetutils/login_tty.c libinetutils/logout.c
 	libinetutils/logwtmp.c libinetutils/openpty.c
 	libinetutils/readstream.c libinetutils/revoke.c
 	libinetutils/setenv.c libinetutils/setsig.c
 	libinetutils/strdup.c libinetutils/stub_tgetent.c
 	libinetutils/tftpsubs.c libinetutils/ttymsg.c
 	libinetutils/utmp_init.c libinetutils/utmp_logout.c
 	libinetutils/xgetcwd.c libinetutils/xstrdup.c
 	libls/Makefile.am libtelnet/Makefile.am libtelnet/genget.c
 	libtelnet/getent.c libtelnet/misc.c ping/Makefile.am
 	rcp/Makefile.am rcp/rcp.c rcp/util.c rexecd/ChangeLog
 	rexecd/Makefile.am rexecd/rexecd.c rlogin/Makefile.am
 	rlogin/rlogin.c rlogind/Makefile.am rlogind/rlogind.c
 	rsh/Makefile.am rsh/rsh.c rshd/Makefile.am rshd/rshd.c
 	syslog/Makefile.am syslog/syslog.c syslogd/Makefile.am
 	syslogd/syslogd.c talk/Makefile.am talk/ctl.c
 	talk/ctl_transact.c talk/display.c talk/get_addrs.c
 	talk/get_names.c talk/init_disp.c talk/invite.c talk/io.c
 	talk/look_up.c talk/msgs.c talk/talk.c talkd/Makefile.am
 	talkd/announce.c talkd/print.c talkd/process.c talkd/table.c
 	talkd/talkd.c telnet/Makefile.am telnet/authenc.c
 	telnet/commands.c telnet/externs.h telnet/main.c
 	telnet/network.c telnet/ring.c telnet/ring.h telnet/sys_bsd.c
 	telnet/telnet.c telnet/terminal.c telnet/tn3270.c
 	telnet/utilities.c telnetd/Makefile.am telnetd/authenc.c
 	telnetd/slc.c telnetd/state.c telnetd/sys_term.c
 	telnetd/telnetd.c telnetd/termstat.c telnetd/utility.c
 	tftp/Makefile.am tftp/tftp.c tftpd/Makefile.am tftpd/tftpd.c
 	uucpd/Makefile.am uucpd/uucpd.c whois/Makefile.am whois/net.c

In a bold move, bring all the functions prototype to ANSI C.
2000-07-19 04:08:39 +00:00
Sergey Poznyakoff
ce4e7a0f5a ftp/ChangeLog ftp/cmds.c ftp/cmdtab.c ftp/domacro.c
ftp/extern.h ftp/ftp.1 ftp/ftp.c ftp/ftp_var.h ftp/main.c
 	ftp/ruserpass.c ftpd/ChangeLog ftpd/extern.h ftpd/ftpcmd.y
 	ftpd/ftpd.8 ftpd/ftpd.c ftpd/popen.c headers/ChangeLog
 	headers/paths.h headers/syslog-int.h headers/tftpsubs.h
 	headers/arpa/ftp.h headers/arpa/telnet.h headers/arpa/tftp.h
 	headers/protocols/talkd.h inetd/ChangeLog inetd/inetd.8
 	inetd/inetd.c libinetutils/ChangeLog libinetutils/daemon.c
 	libinetutils/des_rw.c libinetutils/forkpty.c
 	libinetutils/iruserok.c libinetutils/kcmd.c
 	libinetutils/krcmd.c libinetutils/login_tty.c
 	libinetutils/openpty.c libinetutils/snprintf.c
 	libinetutils/snprintf.h libinetutils/syslog.c
 	libinetutils/tftpsubs.c libinetutils/ttymsg.c
 	libinetutils/utmp_init.c libls/cmp.c libls/extern.h libls/ls.1
 	libls/ls.c libls/ls.h libls/print.c libls/stat_flags.c
 	libls/util.c libtelnet/ChangeLog libtelnet/auth-proto.h
 	libtelnet/auth.c libtelnet/auth.h libtelnet/enc-proto.h
 	libtelnet/enc_des.c libtelnet/encrypt.c libtelnet/encrypt.h
 	libtelnet/forward.c libtelnet/genget.c libtelnet/getent.c
 	libtelnet/kerberos.c libtelnet/kerberos5.c
 	libtelnet/key-proto.h libtelnet/misc-proto.h libtelnet/misc.c
 	libtelnet/misc.h libtelnet/read_passwd.c rcp/ChangeLog
 	rcp/extern.h rcp/rcp.1 rcp/rcp.c rcp/util.c rexecd/ChangeLog
 	rexecd/rexecd.8 rexecd/rexecd.c rlogin/ChangeLog
 	rlogin/rlogin.1 rlogin/rlogin.c rlogind/ChangeLog
 	rlogind/rlogind.8 rlogind/rlogind.c rsh/ChangeLog rsh/rsh.1
 	rsh/rsh.c rshd/ChangeLog rshd/rshd.8 rshd/rshd.c
 	syslog/ChangeLog syslog/syslog.1 syslog/syslog.c
 	syslogd/ChangeLog syslogd/syslog.conf.5 syslogd/syslogd.8
 	syslogd/syslogd.c talk/ChangeLog talk/ctl.c
 	talk/ctl_transact.c talk/display.c talk/get_addrs.c
 	talk/get_names.c talk/init_disp.c talk/invite.c talk/io.c
 	talk/look_up.c talk/msgs.c talk/talk.1 talk/talk.c talk/talk.h
 	talk/talk_ctl.h talkd/ChangeLog talkd/announce.c talkd/print.c
 	talkd/process.c talkd/table.c talkd/talkd.8 talkd/talkd.c
 	telnet/ChangeLog telnet/authenc.c telnet/commands.c
 	telnet/defines.h telnet/externs.h telnet/fdset.h
 	telnet/general.h telnet/main.c telnet/network.c telnet/ring.c
 	telnet/ring.h telnet/sys_bsd.c telnet/telnet.1 telnet/telnet.c
 	telnet/terminal.c telnet/tn3270.c telnet/types.h
 	telnet/utilities.c telnetd/ChangeLog telnetd/authenc.c
 	telnetd/defs.h telnetd/ext.h telnetd/global.c telnetd/slc.c
 	telnetd/state.c telnetd/sys_term.c telnetd/telnetd.8
 	telnetd/telnetd.c telnetd/telnetd.h telnetd/termstat.c
 	telnetd/utility.c tftp/ChangeLog tftp/extern.h tftp/main.c
 	tftp/tftp.1 tftp/tftp.c tftpd/ChangeLog tftpd/tftpd.8
 	tftpd/tftpd.c uucpd/ChangeLog uucpd/uucpd.c whois/ChangeLog
 	whois/main.c whois/net.c

	* *: Clause 3 removed.
	excerpt from email with RMS:
	"UCB has agreed to drop the advertising clause from the license for all
	BSD software.  The advertising clause is this one:

	3. All advertising materials mentioning features or use of this software
		must display the following acknowledgement:
		This product includes software developed by the University of
		California, Berkeley and its contributors.

	This means that we can delete that paragraph from all files which give
	the University of California as the only copyright holder."
2000-07-06 04:21:09 +00:00
Miles Bader
eee191e266 4.4BSD-Lite distribution 1997-03-01 16:19:22 +00:00
Miles Bader
36598dc17f Use TIME_WITH_SYS_TIME macro. 1997-02-17 04:43:37 +00:00
Miles Bader
cfb0916b53 <osockaddr.h>: Conditionalize on HAVE_OSOCKADDR_H instead of !HAVE_OSOCKADDR. 1996-08-21 17:03:50 +00:00
Miles Bader
48d22d5b47 [HAVE_CONFIG_H] <config.h>: New include. 1996-07-22 04:05:06 +00:00
Miles Bader
d2c0ac2671 [!HAVE_OSOCKADDR] <osockaddr.h>: New include. 1996-07-13 04:47:07 +00:00
Miles Bader
4974efcccc entered into RCS 1996-07-09 22:46:22 +00:00