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-148-g4d1fc


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-148-g4d1fc9a
Date: Wed, 15 Aug 2012 13:21:05 +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  4d1fc9ac2cc7e4aef00884370d2383bc0eb1b87a (commit)
      from  a7a5c3ec659145ff8f31798f351fcd180cbc36c0 (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=4d1fc9ac2cc7e4aef00884370d2383bc0eb1b87a


commit 4d1fc9ac2cc7e4aef00884370d2383bc0eb1b87a
Author: Mats Erik Andersson <address@hidden>
Date:   Wed Aug 15 14:51:40 2012 +0200

    rcp, rlogin, rsh: Better setuid checking.

diff --git a/ChangeLog b/ChangeLog
index d330172..6e6a625 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2012-08-15  Mats Erik Andersson  <address@hidden>
 
+       * src/rcp.c (main) [KERBEROS || SHISHI]: Add `!use_kerberos'
+       when checking for effective root UID.
+       * src/rlogin.c (main): Likewise.
+       * src/rsh.c (main): Likewise.
+
+2012-08-15  Mats Erik Andersson  <address@hidden>
+
        rcp, rlogin, rsh: Host names with instances.
 
        * libinetutils/kcmd.c (kcmd) [SHISHI]: New variable HOST.
diff --git a/src/rcp.c b/src/rcp.c
index 3518a71..823638b 100644
--- a/src/rcp.c
+++ b/src/rcp.c
@@ -357,11 +357,13 @@ main (int argc, char *argv[])
     error (EXIT_FAILURE, 0, "encryption must use Kerberos");
 #endif
 
-#if !defined KERBEROS && !defined SHISHI
+#if defined KERBEROS || defined SHISHI
+  if (!use_kerberos && geteuid ())
+#else
   /* We must be setuid root.  */
   if (geteuid ())
-    error (EXIT_FAILURE, 0, "must be setuid root.");
 #endif
+    error (EXIT_FAILURE, 0, "must be setuid root.");
 
   /* Command to be executed on remote system using "rsh". */
 #if defined KERBEROS || defined SHISHI
diff --git a/src/rlogin.c b/src/rlogin.c
index 038d76a..12d3eae 100644
--- a/src/rlogin.c
+++ b/src/rlogin.c
@@ -363,9 +363,13 @@ main (int argc, char *argv[])
 
   argc -= index;
 
+#if defined KERBEROS || defined SHISHI
+  if (!use_kerberos && geteuid ())
+#else
   /* We must be uid root to access rcmd().  */
   if (geteuid ())
-    error (EXIT_FAILURE, 0, "must be setuid root.\n");
+#endif
+    error (EXIT_FAILURE, 0, "must be setuid root.");
 
   /* Get the name of the user invoking us: the client-user-name.  */
   if (!(pw = getpwuid (uid = getuid ())))
diff --git a/src/rsh.c b/src/rsh.c
index 153ca33..5875dd1 100644
--- a/src/rsh.c
+++ b/src/rsh.c
@@ -283,9 +283,13 @@ main (int argc, char **argv)
   argc -= index;
   argv += index;
 
+#if defined KERBEROS || defined SHISHI
+  if (!use_kerberos && geteuid ())
+#else
   /* We must be setuid root.  */
   if (geteuid ())
-    error (EXIT_FAILURE, 0, "must be setuid root.\n");
+#endif
+    error (EXIT_FAILURE, 0, "must be setuid root.");
 
   if (!(pw = getpwuid (uid = getuid ())))
     error (EXIT_FAILURE, 0, "unknown user id");

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

Summary of changes:
 ChangeLog    |    7 +++++++
 src/rcp.c    |    6 ++++--
 src/rlogin.c |    6 +++++-
 src/rsh.c    |    6 +++++-
 4 files changed, 21 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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