diff options
author | Bruce M Simpson <bms@FreeBSD.org> | 2004-06-14 22:34:13 +0000 |
---|---|---|
committer | Bruce M Simpson <bms@FreeBSD.org> | 2004-06-14 22:34:13 +0000 |
commit | 9d61853d9fda6b606f5b4fecbbe91f68c97de226 (patch) | |
tree | 819f86abf00c0fd16b18f7995e44faeb81b29f01 /usr.bin/talk/get_names.c | |
parent | 0abff1d4b6a9331ba4a42a7721966124cd0be8eb (diff) | |
download | src-9d61853d9fda6b606f5b4fecbbe91f68c97de226.tar.gz src-9d61853d9fda6b606f5b4fecbbe91f68c97de226.zip |
Change the default behaviour of talk(1) to use "localhost" as the
"machine name" in ntalkd(8) request packets, when the destination
and source are local.
This should make talk(1) use much more pleasant for those security-
conscious individuals who have chosen to bind talkd to "localhost".
Previous to this change, talk(1) would require that the hostname of
the machine, as retrieved by gethostname(3), resolved to a valid and
reachable IPv4 address, using gethostbyname(3).
This makes talk(1) dependent on a valid host entry for "localhost"
in /etc/hosts (or the Domain Name System).
PR: bin/23178
Submitted by: angui.sh admin (with cleanups)
Notes
Notes:
svn path=/head/; revision=130494
Diffstat (limited to 'usr.bin/talk/get_names.c')
-rw-r--r-- | usr.bin/talk/get_names.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/talk/get_names.c b/usr.bin/talk/get_names.c index f2346ee729f4..ad6b8235eec1 100644 --- a/usr.bin/talk/get_names.c +++ b/usr.bin/talk/get_names.c @@ -90,7 +90,7 @@ get_names(argc, argv) if (*cp == '\0') { /* this is a local to local talk */ his_name = argv[1]; - his_machine_name = my_machine_name; + my_machine_name = his_machine_name = "localhost"; } else { if (*cp++ == '@') { /* user@host */ |