search for: saved_euid

Displaying 8 results from an estimated 8 matches for "saved_euid".

2001 Apr 25
0
NeXT // Broken _POSIX_SAVED_ID patch
...ved uids or not. */ +#if defined(_POSIX_SAVED_IDS) && !defined(BROKEN_SAVED_UIDS) /* 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 +/* Saved effective uid. */ +static uid_t saved_euid = 0; +static gid_t saved_egid = 0; +#endif + /* Saved effective uid. */ static int privileged = 0; static int temporarily_use_uid_effective = 0; -static uid_t saved_euid = 0; -static gid_t saved_egid; static gid_t saved_egroups[NGROUPS_MAX], user_groups[NGROUPS_MAX]; static int saved_egroupsle...
2002 Jul 30
0
[Bug 374] New: uidswap.c doesn't compile on SCO 3.2v4.2
...: --- uidswap.c 23 Jul 2002 21:29:50 -0000 1.34 +++ uidswap.c 30 Jul 2002 19:21:20 -0000 @@ -114,8 +114,8 @@ if (!temporarily_use_uid_effective) fatal("restore_uid: temporarily_use_uid not effective"); - debug("restore_uid: %u/%u", (u_int)saved_euid, (u_int)saved_egid); #ifdef SAVED_IDS_WORK_WITH_SETEUID + debug("restore_uid: %u/%u", (u_int)saved_euid, (u_int)saved_egid); /* Set the effective uid back to the saved privileged uid. */ if (seteuid(saved_euid) < 0) fatal("seteuid %u: %.100s&...
2001 Sep 28
1
openssh-2.9.9p2 assumes pid_t, uid_t, etc. are not 'long'
...= RCS file: uidswap.c,v retrieving revision 2.9.9.2 retrieving revision 2.9.9.2.0.1 diff -pu -r2.9.9.2 -r2.9.9.2.0.1 --- uidswap.c 2001/08/15 23:17:22 2.9.9.2 +++ uidswap.c 2001/09/28 18:37:50 2.9.9.2.0.1 @@ -52,8 +52,8 @@ temporarily_use_uid(struct passwd *pw) #ifdef SAVED_IDS_WORK_WITH_SETEUID saved_euid = geteuid(); saved_egid = getegid(); - debug("temporarily_use_uid: %d/%d (e=%d)", - pw->pw_uid, pw->pw_gid, saved_euid); + debug("temporarily_use_uid: %ld/%ld (e=%ld)", + (long)pw->pw_uid, (long)pw->pw_gid, (long)saved_euid); if (saved_euid != 0) { pri...
2005 Feb 19
0
[PATCH]: uidswap.c: Drop uid 0 check on Cygwin
...1.45 diff -p -u -r1.45 uidswap.c --- uidswap.c 19 Oct 2004 06:33:33 -0000 1.45 +++ uidswap.c 19 Feb 2005 10:33:38 -0000 @@ -56,10 +56,12 @@ temporarily_use_uid(struct passwd *pw) debug("temporarily_use_uid: %u/%u (e=%u/%u)", (u_int)pw->pw_uid, (u_int)pw->pw_gid, (u_int)saved_euid, (u_int)saved_egid); +#ifndef HAVE_CYGWIN if (saved_euid != 0) { privileged = 0; return; } +#endif #else if (geteuid() != 0) { privileged = 0; -- Corinna Vinschen Cygwin Project Co-Leader Red Hat, Inc.
2000 Jan 27
0
more NetBSD patches, for OpenSSH V1.2.2
...000/01/27 17:12:05 hubertf Exp $ --- uidswap.c.orig Thu Jan 20 14:18:16 2000 +++ uidswap.c Thu Jan 27 17:04:38 2000 @@ -26,8 +26,10 @@ is not part of the posix specification. */ #define SAVED_IDS_WORK_WITH_SETEUID +#ifdef SAVED_IDS_WORK_WITH_SETEUID /* Saved effective uid. */ static uid_t saved_euid = 0; +#endif #endif /* _POSIX_SAVED_IDS */ $NetBSD: patch-ah,v 1.2 2000/01/27 17:12:05 hubertf Exp $ --- Makefile.in.orig Thu Jan 27 04:15:48 2000 +++ Makefile.in Thu Jan 27 17:07:34 2000 @@ -6,6 +6,7 @@ mandir=@mandir@ mansubdir=@mansubdir@ sysconfdir=@sysconfdir@ +examplesdir=@prefix@/sh...
2001 Apr 24
10
Call for testing for coming 2.9 release.
If we can get people to test their platforms against the last snapshot/cvs tree I'd be greatful. (http://www.openssh.com/portable.html) I know NeXT platform has problems. I'm going to spend tonight looking at it. Also, take a moment to see what manpage type ./configure decided for your system and if it's 'cat' please let us know. Thanks. - Ben
2000 Jan 18
0
More NetBSD patches
.../uidswap.c,v retrieving revision 1.2 diff -u -r1.2 uidswap.c --- uidswap.c 2000/01/17 16:53:38 1.2 +++ uidswap.c 2000/01/18 15:23:27 @@ -27,8 +27,10 @@ #define SAVED_IDS_WORK_WITH_SETEUID #endif /* _POSIX_SAVED_IDS */ +#ifdef SAVED_IDS_WORK_WITH_SETEUID /* Saved effective uid. */ static uid_t saved_euid = 0; +#endif /* * Temporarily changes to the given uid. If the effective user
2001 Apr 22
1
relaxing access rights verifications
...E! @"); diff -ur openssh-2.5.2p2.orig/uidswap.c openssh-2.5.2p2/uidswap.c --- openssh-2.5.2p2.orig/uidswap.c Mon Feb 26 22:39:07 2001 +++ openssh-2.5.2p2/uidswap.c Sat Apr 21 23:23:00 2001 @@ -32,6 +32,7 @@ #define SAVED_IDS_WORK_WITH_SETEUID /* Saved effective uid. */ static uid_t saved_euid = 0; +static gid_t saved_egid = 0; #endif /* @@ -59,6 +60,27 @@ #endif /* SAVED_IDS_WORK_WITH_SETEUID */ } +void +temporarily_use_gid(gid_t gid) +{ +#ifdef SAVED_IDS_WORK_WITH_SETEUID + /* Save the current egid. */ + saved_egid = getegid(); + + /* Set the effective gid to the given (unprivi...