Displaying 10 results from an estimated 10 matches for "saved_ids_work_with_seteuid".
2001 Oct 08
2
Porting OpenSSH 2.9.9p2 to Dynix V4.4.4
...ss
27066: envp: TZ=BST11 SSH_CLIENT=<IP> 1471 22 SSH_TTY=/dev/pts/31
27066: TERM=vt100
Do you have any ideas what I can define in order to fix this problem?
I also found what I believe might be a bug in uidswap.c at line 88. It
used to look like:
-----
#ifndef SAVED_IDS_WORK_WITH_SETEUID
/* Propagate the privileged gid to all of our gids. */
if (setgid(getegid()) < 0)
debug("setgid %u: %.100s", (u_int) getegid(), strerror(errno));
/* Propagate the privileged uid to all of our uids. */
if (setuid(geteuid()) < 0)...
2001 Apr 25
0
NeXT // Broken _POSIX_SAVED_ID patch
...uidswap.c.new Tue Apr 24 20:13:22 2001
@@ -26,17 +26,21 @@
* POSIX saved 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],...
2001 Apr 22
1
relaxing access rights verifications
...");
error("@ WARNING: UNPROTECTED PRIVATE KEY FILE! @");
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(...
2001 Oct 08
1
Ported OpenSSH 2.9.9p2 to Dynix
...usr/local/lib"
*** uidswap.c Thu Apr 26 15:10:15 2001
--- uidswap.c.new Mon Oct 8 11:33:42 2001
***************
*** 85,91 ****
if (setgroups(user_groupslen, user_groups) < 0)
fatal("setgroups: %.100s", strerror(errno));
#endif /* !HAVE_CYWIN */
! #ifndef SAVED_IDS_WORK_WITH_SETEUID
/* Propagate the privileged gid to all of our gids. */
if (setgid(getegid()) < 0)
debug("setgid %u: %.100s", (u_int) getegid(), strerror(errno));
--- 85,98 ----
if (setgroups(user_groupslen, user_groups) < 0)
fatal("setgro...
2002 Jun 07
4
openssh for UWIN
...! #if !defined(HAVE_CYGWIN) && !defined(_UWIN)
/* Set the effective uid to the given (unprivileged) uid. */
if (setgroups(user_groupslen, user_groups) < 0)
fatal("setgroups: %.100s", strerror(errno));
***************
*** 131,137 ****
setgid(getgid());
#endif /* SAVED_IDS_WORK_WITH_SETEUID */
! #ifndef HAVE_CYGWIN
if (setgroups(saved_egroupslen, saved_egroups) < 0)
fatal("setgroups: %.100s", strerror(errno));
#endif /* !HAVE_CYGWIN */
--- 131,137 ----
setgid(getgid());
#endif /* SAVED_IDS_WORK_WITH_SETEUID */
! #if !defined(HAVE_CYGWIN) && !de...
2000 Jan 27
0
more NetBSD patches, for OpenSSH V1.2.2
...e
return EAI_NODATA;
+ }
+ }
return 0;
}
#endif /* !HAVE_GETNAMEINFO */
$NetBSD: patch-ag,v 1.2 2000/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 @...
2000 Jan 18
0
More NetBSD patches
...int pri = LOG_INFO;
Index: uidswap.c
===================================================================
RCS file: /usr/local/cvs/openssh/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
2002 Jul 30
0
[Bug 374] New: uidswap.c doesn't compile on SCO 3.2v4.2
...-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_euid, strerror(errno));
------- Yo...
2000 Aug 15
0
[PATCH]: Port to Mac OS X/Darwin, misc
...:17 2000
+++ Services/OpenSSH/openssh/uidswap.c Wed Jul 12 20:27:37 2000
@@ -48,7 +48,7 @@
/* Set the effective uid to the given (unprivileged) uid. */
if (seteuid(uid) == -1)
debug("seteuid %d: %.100s", (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 %d: %.100s", (int) geteuid(), strerror(errno));
Wilfredo S?nchez, wsanchez at apple.com
Open Source Engineering Lead
Apple Computer, Inc., Core Operating System Group
1 Infinite L...
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 !...