commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-314-g2a327


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-314-g2a3279a
Date: Sat, 13 Jul 2013 00:16:25 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  2a3279a0babcdab8a20d8f7139254aacef2e8ed8 (commit)
      from  f8d2f1e566c07f985948990d67d867b723cb133f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=2a3279a0babcdab8a20d8f7139254aacef2e8ed8


commit 2a3279a0babcdab8a20d8f7139254aacef2e8ed8
Author: Mats Erik Andersson <address@hidden>
Date:   Sat Jul 13 01:17:41 2013 +0200

    talk, talkd: Convenience changes.

diff --git a/ChangeLog b/ChangeLog
index 02ec2df..e623d1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2013-07-11  Mats Erik Andersson  <address@hidden>
+
+       talk, talkd: Convenience changes.
+
+       * talk/display.c (display) <'^D'>: Clear both
+       local windows, but render the character as
+       notification on the remote terminal.
+
+       * talkd/process.c (process_request) <ANNOUNCE>:
+       If logging is set and reply is successful, make
+       a syslog note about the participants.
+       <LOOK_UP>: Likewise.
+
 2013-07-04  Mats Erik Andersson  <address@hidden>
 
        traceroute: Gateway selection.
diff --git a/doc/inetutils.texi b/doc/inetutils.texi
index 7e9010e..bfaa2e4 100644
--- a/doc/inetutils.texi
+++ b/doc/inetutils.texi
@@ -2761,10 +2761,19 @@ talk @var{your_name}@@@var{your_machine}
 
 It doesn't matter from which machine the recipient replies, as long as
 his login-name is the same.  Once communication is established, the
-two parties may type simultaneously, with their output appearing in
-separate windows.  Typing @kbd{C-L} will cause the screen to be
+two parties may type text simultaneously, with their output appearing
+in separate windows.
+Typing @kbd{C-L} will cause the screen to be
 reprinted, while erase, kill, and word kill characters will
-behave normally.  To exit, just type an interrupt character;
+behave normally.
+In addition, @kbd{C-D} will cause both windows to be
+locally cleared of all text.
+This keystroke will appear as a simple @samp{^D} on the remote
+terminal, though.
+It signals to the other party that you yourself have just
+cleared your terminal of all text.
+
+To exit, just type an interrupt character @kbd{C-C};
 @command{talk} then moves the cursor to the bottom of the screen
 and restores the terminal to its previous state.
 
@@ -3162,7 +3171,7 @@ services:
 
 @example
 ftp           stream  tcp   nowait root  /usr/libexec/ftpd       ftpd -l
-ntalk         dgram   udp   wait   root  /usr/libexec/ntalkd     ntalkd
+ntalk         dgram   udp   wait   nobody:tty  /usr/libexec/talkd  talkd
 tcpmux        stream  tcp   nowait root  internal
 tcpmux/+date  stream  tcp   nowait guest /bin/date               date
 tcpmux/phonebook stream tcp nowait guest /usr/bin/phonebook      phonebook
@@ -4605,15 +4614,20 @@ for a conversation.
 This implementation uses the newer protocol @samp{ntalk/udp},
 and is intended to be invoked by a super-server
 @command{inetd} at that datagram port.
+It is recommended that @command{inetd} launch @command{talkd}
+with ownership @samp{nobody:tty}, or with @samp{tty:tty}.
+
 Bear in mind that this service is usable with IPv4 only,
 since the exchange protocol was conceived to handle only
-one address family.
-This fact is independent of @command{inetd}.
+this particular address family.
+This fact is independent of the abilities of @command{inetd}.
 
-Observe that the server @command{talkd} is dependent
+Observe also that the server @command{talkd} is dependent
 on the name claimed by @command{hostname}, for establishing
-connections between interested parties.  Multi-homed hosts
-are not well behaved together with @command{talkd}.
+connections between interested parties.
+The server @command{talkd} running on a multi-homed host
+is not able to respond to invitations for a valid host name
+that differs from the name reported by @command{hostname}.
 
 The present implementation offers ACL-mechanisms for fine
 grained access control.
diff --git a/talk/display.c b/talk/display.c
index 3978b82..70b1c78 100644
--- a/talk/display.c
+++ b/talk/display.c
@@ -191,6 +191,9 @@ display (register xwin_t * win, register char *text, int 
size)
          text++;
          continue;
        }
+      /* Refresh screen with input ^L, Ctrl-L.
+       * Local trigger only.
+       */
       if (*text == '\f')
        {
          if (win == &my_win)
@@ -198,6 +201,18 @@ display (register xwin_t * win, register char *text, int 
size)
          text++;
          continue;
        }
+      /* Clear both windows with input ^D, Ctrl-D.
+       * Local trigger only.
+       */
+      if (*text == '\04' && win == &my_win)
+       {
+         wclear (my_win.x_win);
+         wclear (his_win.x_win);
+         wrefresh (my_win.x_win);
+         wrefresh (his_win.x_win);
+         text++;
+         continue;
+       }
       if (win->x_col == COLS - 1)
        {
          /* check for wraparound */
diff --git a/talkd/process.c b/talkd/process.c
index 620de13..dad2394 100644
--- a/talkd/process.c
+++ b/talkd/process.c
@@ -42,6 +42,11 @@ process_request (CTL_MSG * msg, struct sockaddr_in *sa_in, 
CTL_RESPONSE * rp)
       return 0;
     }
 
+  /* Convert the machine independent represention
+   * of the talk protocol to the present architecture.
+   * In particular, `msg->addr.sa_family' will be
+   * valid for socket initialization.
+   */
   msg->id_num = ntohl (msg->id_num);
   msg->addr.sa_family = ntohs (msg->addr.sa_family);
   if (msg->addr.sa_family != AF_INET)
@@ -51,6 +56,7 @@ process_request (CTL_MSG * msg, struct sockaddr_in *sa_in, 
CTL_RESPONSE * rp)
       rp->answer = BADADDR;
       return 0;
     }
+  /* Convert to valid socket address for this architecture.  */
   msg->ctl_addr.sa_family = ntohs (msg->ctl_addr.sa_family);
   if (msg->ctl_addr.sa_family != AF_INET)
     {
@@ -67,8 +73,10 @@ process_request (CTL_MSG * msg, struct sockaddr_in *sa_in, 
CTL_RESPONSE * rp)
       if (logging || debug)
        syslog (LOG_NOTICE, "dropping request: address@hidden",
                msg->l_name, inet_ntoa (sa_in->sin_addr));
-      /* Answer FAILED to minimise information leakage,
-       * since ACL has denied access.  */
+
+      /* The answer FAILED is returned to minimize the amount
+       * of information disclosure, since ACL has denied access.
+       */
       rp->answer = FAILED;
       return 0;
     }
@@ -84,6 +92,14 @@ process_request (CTL_MSG * msg, struct sockaddr_in *sa_in, 
CTL_RESPONSE * rp)
     {
     case ANNOUNCE:
       do_announce (msg, rp);
+      if (logging && rp->answer == SUCCESS)
+       syslog (LOG_INFO, "address@hidden called by address@hidden",
+               msg->r_name,
+               (msg->r_tty[0]
+                 ? msg->r_tty
+                 : inet_ntoa (sa_in->sin_addr)),
+               msg->l_name,
+               inet_ntoa (os2sin_addr (msg->addr)));
       break;
 
     case LEAVE_INVITE:
@@ -105,6 +121,9 @@ process_request (CTL_MSG * msg, struct sockaddr_in *sa_in, 
CTL_RESPONSE * rp)
          rp->addr = ptr->addr;
          rp->addr.sa_family = htons (ptr->addr.sa_family);
          rp->answer = SUCCESS;
+         if (logging)
+           syslog (LOG_INFO, "%s talks to address@hidden",
+               msg->r_name, msg->l_name, inet_ntoa (sa_in->sin_addr));
        }
       else
        rp->answer = NOT_HERE;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          |   13 +++++++++++++
 doc/inetutils.texi |   32 +++++++++++++++++++++++---------
 talk/display.c     |   15 +++++++++++++++
 talkd/process.c    |   23 +++++++++++++++++++++--
 4 files changed, 72 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]