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_8-66-ge5d39ad


From: Simon Josefsson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_8-66-ge5d39ad
Date: Sun, 21 Nov 2010 11:49:04 +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  e5d39ad8e0eca30a626b1acefa6a8d77ed26cb8e (commit)
      from  5e52b86b129eb460085bfcbaf0e243ad52328a2e (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=e5d39ad8e0eca30a626b1acefa6a8d77ed26cb8e


commit e5d39ad8e0eca30a626b1acefa6a8d77ed26cb8e
Author: Mike Frysinger <address@hidden>
Date:   Fri Nov 19 02:04:54 2010 -0500

    rshd: detect __rcmd_errstr support in the C lib
    
    Not all C libraries support __rcmd_errstr, so add a configure test for it.
    
    Signed-off-by: Mike Frysinger <address@hidden>
    Signed-off-by: Simon Josefsson <address@hidden>

diff --git a/ChangeLog b/ChangeLog
index c75d8b0..7a520f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-21  Mike Frysinger <address@hidden>
+
+       * configure.ac: Check for __rcmd_errstr.
+       * src/rshd.c (doit): Protect declaration and use of __rcmd_errstr
+       variable with HAVE___RCMD_ERRSTR check.
+
 2010-11-19  Mike Frysinger <address@hidden>
 
        * ftp/extern.h: Rename function ruserpass to remote_userpass.
diff --git a/configure.ac b/configure.ac
index c1ac270..79d655c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -587,7 +587,7 @@ AC_CHECK_FUNCS(cfsetspeed cgetent dirfd fchdir flock \
                setsid setregid setreuid setresgid setresuid setutent_r \
                sigaction sigvec strchr setproctitle tcgetattr tzset utimes \
                utime uname \
-               updwtmp updwtmpx vhangup wait3 wait4 opendir2)
+               updwtmp updwtmpx vhangup wait3 wait4 opendir2 __rcmd_errstr)
 
 dnl Functions that we will define if necessary.
 AC_REPLACE_FUNCS(getpass getusershell memcmp memcpy memmove memset \
diff --git a/src/rshd.c b/src/rshd.c
index d49facd..9301ef2 100644
--- a/src/rshd.c
+++ b/src/rshd.c
@@ -284,7 +284,9 @@ extern char **environ;
 void
 doit (int sockfd, struct sockaddr_in *fromp)
 {
+#ifdef HAVE___RCMD_ERRSTR
   extern char *__rcmd_errstr;  /* syslog hook from libc/net/rcmd.c. */
+#endif
   struct hostent *hp;
   struct passwd *pwd;
   u_short port;
@@ -757,11 +759,13 @@ doit (int sockfd, struct sockaddr_in *fromp)
                      && (iruserok (fromp->sin_addr.s_addr, pwd->pw_uid == 0,
                                    remuser, locuser)) < 0))
     {
+#ifdef HAVE___RCMD_ERRSTR
       if (__rcmd_errstr)
        syslog (LOG_INFO | LOG_AUTH,
                "address@hidden as %s: permission denied (%s). cmd='%.80s'",
                remuser, hostname, locuser, __rcmd_errstr, cmdbuf);
       else
+#endif
        syslog (LOG_INFO | LOG_AUTH,
                "address@hidden as %s: permission denied. cmd='%.80s'",
                remuser, hostname, locuser, cmdbuf);

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

Summary of changes:
 ChangeLog    |    6 ++++++
 configure.ac |    2 +-
 src/rshd.c   |    4 ++++
 3 files changed, 11 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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