+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
#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;
}
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);
* 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
#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