Mail Archives: cygwin-developers/2003/01/23/04:50:08
On Wed, Jan 22, 2003 at 10:00:24PM -0500, Pierre A. Humblet wrote:
> extern "C" int
> setreuid32 (__uid32_t ruid, __uid32_t euid)
> {
> int ret = 0;
> bool tried;
> __uid32_t old_euid = myself->uid;
>
> if ((tried = ruid != ILLEGAL_UID && cygheap->user.real_uid != ruid && euid != ruid))
> ret = seteuid32 (ruid);
> if (!ret && euid != ILLEGAL_UID)
> ret = seteuid32 (euid);
> if (tried && (ret || euid == ILLEGAL_UID) && seteuid32 (old_euid))
> system_printf ("Cannot restore original euid %u\n", old_euid);
> if (!ret && ruid != ILLEGAL_UID)
> cygheap->user.real_uid = ruid;
> debug_printf ("real: %d, effective: %d", cygheap->user.real_uid, myself->uid);
> return ret;
> }
Could you send a patch?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin AT cygwin DOT com
Red Hat, Inc.
- Raw text -