mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-24 02:42:25 +00:00
[entropy.c.] Portability fix for SCO Unix 3.2v4.x (SCO OSR 3.0).
entropy.c needs seteuid(getuid()) for the setuid(original_uid) to succeed. Patch by gert@greenie.muc.de. This fixes one part of Bug 208
This commit is contained in:
parent
a370f4dcc6
commit
f02dccc0dc
@ -1,3 +1,8 @@
|
||||
20020421
|
||||
- (tim) [entropy.c.] Portability fix for SCO Unix 3.2v4.x (SCO OSR 3.0).
|
||||
entropy.c needs seteuid(getuid()) for the setuid(original_uid) to succeed.
|
||||
Patch by gert@greenie.muc.de. This fixes one part of Bug 208
|
||||
|
||||
20020418
|
||||
- (djm) Avoid SIGCHLD breakage when run from rsync. Fix from
|
||||
Sturle Sunde <sturle.sunde@usit.uio.no>
|
||||
@ -8258,4 +8263,4 @@
|
||||
- Wrote replacements for strlcpy and mkdtemp
|
||||
- Released 1.0pre1
|
||||
|
||||
$Id: ChangeLog,v 1.2060 2002/04/18 12:53:22 djm Exp $
|
||||
$Id: ChangeLog,v 1.2061 2002/04/21 18:26:10 tim Exp $
|
||||
|
@ -45,7 +45,7 @@
|
||||
* XXX: we should tell the child how many bytes we need.
|
||||
*/
|
||||
|
||||
RCSID("$Id: entropy.c,v 1.42 2002/04/18 12:53:27 djm Exp $");
|
||||
RCSID("$Id: entropy.c,v 1.43 2002/04/21 18:26:10 tim Exp $");
|
||||
|
||||
#ifndef OPENSSL_PRNG_ONLY
|
||||
#define RANDOM_SEED_SIZE 48
|
||||
@ -87,9 +87,10 @@ seed_rng(void)
|
||||
close(devnull);
|
||||
|
||||
if (original_uid != original_euid &&
|
||||
setuid(original_uid) == -1) {
|
||||
fprintf(stderr, "(rand child) setuid: %s\n",
|
||||
strerror(errno));
|
||||
( seteuid(getuid()) == -1 ||
|
||||
setuid(original_uid) == -1) ) {
|
||||
fprintf(stderr, "(rand child) setuid(%d): %s\n",
|
||||
original_uid, strerror(errno));
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user