=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/uidswap.c,v retrieving revision 1.9 retrieving revision 1.9.2.2 diff -u -r1.9 -r1.9.2.2 --- src/usr.bin/ssh/uidswap.c 2000/09/07 20:27:55 1.9 +++ src/usr.bin/ssh/uidswap.c 2001/02/19 17:19:42 1.9.2.2 @@ -12,9 +12,9 @@ */ #include "includes.h" -RCSID("$OpenBSD: uidswap.c,v 1.9 2000/09/07 20:27:55 deraadt Exp $"); +RCSID("$OpenBSD: uidswap.c,v 1.9.2.2 2001/02/19 17:19:42 jason Exp $"); -#include "ssh.h" +#include "log.h" #include "uidswap.h" /* @@ -30,10 +30,9 @@ /* Lets assume that posix saved ids also work with seteuid, even though that is not part of the posix specification. */ #define SAVED_IDS_WORK_WITH_SETEUID -#endif /* _POSIX_SAVED_IDS */ - /* Saved effective uid. */ static uid_t saved_euid = 0; +#endif /* _POSIX_SAVED_IDS */ /* * Temporarily changes to the given uid. If the effective user @@ -49,7 +48,7 @@ /* Set the effective uid to the given (unprivileged) uid. */ if (seteuid(uid) == -1) debug("seteuid %u: %.100s", (u_int) uid, strerror(errno)); -#else /* SAVED_IDS_WORK_WITH_SETUID */ +#else /* SAVED_IDS_WORK_WITH_SETEUID */ /* Propagate the privileged uid to all of our uids. */ if (setuid(geteuid()) < 0) debug("setuid %u: %.100s", (u_int) geteuid(), strerror(errno)); @@ -64,7 +63,7 @@ * Restores to the original uid. */ void -restore_uid() +restore_uid(void) { #ifdef SAVED_IDS_WORK_WITH_SETEUID /* Set the effective uid back to the saved uid. */