[1674] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

setreuid()/__svr4__ under Solaris 2.4

daemon@ATHENA.MIT.EDU (michael shiplett)
Tue Oct 17 14:45:35 1995

To: krb5-bugs@MIT.EDU
From: michael shiplett <walrus@ans.net>
Date: Tue, 17 Oct 1995 14:45:11 -0400

The current workaround used in src/lib/krb4/in_tkt.c instead of
checking for/setting HAS_RESUID does not work under Solaris 2.4 when
using Solaris cc.

Here's the code fragment

#ifdef hpux
/* should be HAS_RESUID */
#define setreuid(r,e) setresuid(r,e,-1)
#else
#ifdef __svr4__
#define setreuid(r,e) setuid(r)
#endif
#endif

Solaris cc defines __svr4 but not __svr4__. The fix is either to check
for setreuid() with autoconf [good] or to change the line [acceptable]
to
	       #if defined(__svr4__) || defined(__svr4)

michael

home help back first fref pref prev next nref lref last post