* v4rcp.c: Punt nastiness to redefine setreuid, as we don't use
authorTom Yu <tlyu@mit.edu>
Mon, 23 Feb 1998 01:13:26 +0000 (01:13 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 23 Feb 1998 01:13:26 +0000 (01:13 +0000)
it.

* krcp.c: Use krb5_seteuid(). [krb5-libs/505]  Fix up inclusions
to use <> rather than "".

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10469 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/bsd/ChangeLog
src/appl/bsd/krcp.c
src/appl/bsd/v4rcp.c

index 30a17509d57de60c978809ca9e2c767ec1816ea9..9ab4cc1617c3a2e9a7387d11905bc5db65a8dd5c 100644 (file)
@@ -1,3 +1,11 @@
+Sun Feb 22 19:16:12 1998  Tom Yu  <tlyu@mit.edu>
+
+       * v4rcp.c: Punt nastiness to redefine setreuid, as we don't use
+       it.
+
+       * krcp.c: Use krb5_seteuid(). [krb5-libs/505]  Fix up inclusions
+       to use <> rather than "".
+
 Wed Feb 18 15:26:52 1998  Tom Yu  <tlyu@mit.edu>
 
        * Makefile.in: Remove trailing slash from thisconfigdir.  Fix up
index 5da0fadc009bfff2d966582d759c65ffe69aa23e..a6fe0dc7efa0d157c9ce2cf1d20e5c37b5799fbb 100644 (file)
@@ -65,21 +65,16 @@ char copyright[] =
 #else
 #include <varargs.h>
 #endif
-     
-#ifdef HAVE_SETRESUID
-#ifndef HAVE_SETREUID
-#define HAVE_SETREUID
-#define setreuid(r,e) setresuid(r,e,-1)
-#endif
-#endif
+
 #ifndef roundup
 #define roundup(x,y) ((((x)+(y)-1)/(y))*(y))
 #endif
 
 #ifdef KERBEROS
-#include "krb5.h"
-#include "com_err.h"
-     
+#include <krb5.h>
+#include <k5-util.h>
+#include <com_err.h>
+
 #define RCP_BUFSIZ 4096
      
 int sock;
@@ -546,26 +541,18 @@ krb5_creds *cred;
 
                }
                euid = geteuid();
-#ifdef HAVE_SETREUID
-               if (euid == 0)
-                   (void) setreuid(0, userid);
-               sink(1, argv+argc-1);
-               if (euid == 0)
-                   (void) setreuid(userid, 0);
-#else
                if (euid == 0) {
                    (void) setuid(0);
-                   if(seteuid(userid)) {
+                   if(krb5_seteuid(userid)) {
                        perror("rcp seteuid user"); errs++; exit(errs);
                    }
                }
                sink(1, argv+argc-1);
                if (euid == 0) {
-                   if(seteuid(0)) {
+                   if(krb5_seteuid(0)) {
                        perror("rcp seteuid 0"); errs++; exit(errs);
                    }
                }
-#endif
 #else
                rem = rcmd(&host, port, pwd->pw_name, suser,
                           buf, 0);
index 5c0b5896c2789579be8fa757e1d3042794e20f68..7461b25ff42465c2de97d9dfd3c747ad49f99342 100644 (file)
@@ -36,8 +36,9 @@ static char sccsid[] = "@(#)rcp.c     5.10 (Berkeley) 9/20/88";
  * rcp
  */
 #ifdef KERBEROS
-#include "krb5.h"
-#include "com_err.h"
+#include <krb5.h>
+#include <com_err.h>
+#include <k5-util.h>
 #endif
 
 #ifdef HAVE_UNISTD_H
@@ -286,12 +287,6 @@ int kstream_write(krem, buf, len)
 #define vfork fork
 #endif
 
-#ifdef hpux
-#define setreuid(r,e) setresuid(r,e,-1)
-#endif
-#ifdef __svr4__
-#define setreuid(r,e) setuid(r)
-#endif
 #ifndef roundup
 #define roundup(x,y) ((((x)+(y)-1)/(y))*(y))
 #endif