search for: saved_egid

Displaying 6 results from an estimated 6 matches for "saved_egid".

2001 Apr 25
0
NeXT // Broken _POSIX_SAVED_ID patch
...fined(_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_egroupslen = -1, user_groupslen = -1; -...
2001 Apr 22
1
relaxing access rights verifications
...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 (unprivileged) gid. */ + if (setegid(g...
2002 Jul 30
0
[Bug 374] New: uidswap.c doesn't compile on SCO 3.2v4.2
...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", (u_int)saved...
2005 Feb 19
0
[PATCH]: uidswap.c: Drop uid 0 check on Cygwin
....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.
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
2001 Sep 28
1
openssh-2.9.9p2 assumes pid_t, uid_t, etc. are not 'long'
...trieving 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) { privileged = 0; return;