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_100-10-gf4


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1_100-10-gf475b43
Date: Wed, 16 Oct 2013 22:08:14 +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  f475b43550975cf05f7a06c35b0e4d0506d47c5f (commit)
      from  807de6dd3342a98ed655e0cae783d34e6c9c6ad5 (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=f475b43550975cf05f7a06c35b0e4d0506d47c5f


commit f475b43550975cf05f7a06c35b0e4d0506d47c5f
Author: Mats Erik Andersson <address@hidden>
Date:   Wed Oct 16 22:54:01 2013 +0200

    Act on failed read_utmp.
    
    A failed call to read_utmp() is very rare,
    but is best checked none the less.

diff --git a/ChangeLog b/ChangeLog
index 6a3872b..d954b04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
 2013-10-16  Mats Erik Andersson  <address@hidden>
 
+       syslogd, talkd: Act on failed read_utmp.
+
+       * src/syslogd.c (wallmsg)
+       [UTMP_NAME_FUNCTION || !HAVE_GETUTXENT]: Check call
+       to read_utmp() for failure, filing an error massage.
+       * talkd/process.c (find_user) [!HAVE_GETUTXUSER]:
+       Likewise, then returning FAILED.
+
+       rsh: Symbolic descriptor name.
+
+       * src/rsh.d (talk): Use STDOUT_FILENO and STDERR_FILENO
+       as arguments to write().
+
+2013-10-16  Mats Erik Andersson  <address@hidden>
+
        rsh: Kill child process after SIGPIPE.
        The default action for SIGPIPE will leave the
        child process running.  This caused, until now
diff --git a/src/rsh.c b/src/rsh.c
index 87356f2..6f63118 100644
--- a/src/rsh.c
+++ b/src/rsh.c
@@ -718,7 +718,7 @@ talk (int null_input_option, sigset_t * osigs, pid_t pid, 
int rem)
                FD_CLR (rfd2, &readfrom);
            }
          else
-           write (2, buf, cc);
+           write (STDERR_FILENO, buf, cc);
        }
       if (FD_ISSET (rem, &ready))
        {
@@ -741,7 +741,7 @@ talk (int null_input_option, sigset_t * osigs, pid_t pid, 
int rem)
                FD_CLR (rem, &readfrom);
            }
          else
-           write (1, buf, cc);
+           write (STDOUT_FILENO, buf, cc);
        }
     }
   while ((FD_ISSET (rfd2, &readfrom) || FD_ISSET (rem, &readfrom))
diff --git a/src/syslogd.c b/src/syslogd.c
index 7af10f3..fd77aed 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -1603,8 +1603,12 @@ wallmsg (struct filed *f, struct iovec *iov)
 
   while ((utp = getutxent ()))
 #else /* UTMP_NAME_FUNCTION || !HAVE_GETUTXENT */
-  read_utmp (UTMP_FILE, &utmp_count, &utmpbuf,
-            READ_UTMP_USER_PROCESS | READ_UTMP_CHECK_PIDS);
+  if (read_utmp (UTMP_FILE, &utmp_count, &utmpbuf,
+                READ_UTMP_USER_PROCESS | READ_UTMP_CHECK_PIDS) < 0)
+    {
+      logerror ("opening utmp file");
+      return;
+    }
 
   for (utp = utmpbuf; utp < utmpbuf + utmp_count; utp++)
 #endif /* UTMP_NAME_FUNCTION || !HAVE_GETUTXENT */
@@ -2179,7 +2183,7 @@ cfline (const char *line, struct filed *f)
              selector ? " tagged " : "",
              selector ? selector : "");
 
-  errno = 0;                   /* keep strerror() stuff out of logerror 
messages */
+  errno = 0;   /* keep strerror() stuff out of logerror messages */
 
   /* Clear out file entry.  */
   memset (f, 0, sizeof (*f));
diff --git a/talkd/process.c b/talkd/process.c
index e70172c..9dd1b9e 100644
--- a/talkd/process.c
+++ b/talkd/process.c
@@ -217,8 +217,9 @@ find_user (char *name, char *tty)
 
   while ((uptr = getutxuser (name)))
 #else /* !HAVE_GETUTXUSER */
-  read_utmp (UTMP_FILE, &utmp_count, &utmpbuf,
-            READ_UTMP_USER_PROCESS | READ_UTMP_CHECK_PIDS);
+  if (read_utmp (UTMP_FILE, &utmp_count, &utmpbuf,
+                READ_UTMP_USER_PROCESS | READ_UTMP_CHECK_PIDS) < 0)
+    return FAILED;
 
   for (uptr = utmpbuf; uptr < utmpbuf + utmp_count; uptr++)
     {

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

Summary of changes:
 ChangeLog       |   15 +++++++++++++++
 src/rsh.c       |    4 ++--
 src/syslogd.c   |   10 +++++++---
 talkd/process.c |    5 +++--
 4 files changed, 27 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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