[1422] in Kerberos-V5-bugs

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

Re: __svr4__ define in SunPro C 2.0.1 / Solaris 2.4

daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Thu May 18 15:13:44 1995

From: epeisach@MIT.EDU
Date: Thu, 18 May 1995 15:13:29 -0400
To: orchard@punch.engr.wisc.edu (Bruce Orchard)
Cc: krb5-bugs@MIT.EDU
In-Reply-To: [1420]


Thank you for your bug report. I have not checked the tree for other
defines of __svr4__ so we would be interested in other gotchas that you
come across.

I have installed a fix for the lib/krb4/in_tkt.c to properly detect if
setreuid is present on the system and deal accordingly.

If you apply the patch, you will need to regenerate the configure file
using autoconf and regenerate your makefile.

	Ezra

Index: configure.in
===================================================================
RCS file: /mit/krb5/.cvsroot/src/lib/krb4/configure.in,v
retrieving revision 1.5
diff -c -r1.5 configure.in
*** configure.in	1995/05/09 02:11:12	1.5
--- configure.in	1995/05/18 18:43:39
***************
*** 43,48 ****
--- 43,50 ----
  	AC_DEFINE(BITS32)
  fi
  AC_FUNC_CHECK(strsave,AC_DEFINE(HAVE_STRSAVE))
+ AC_FUNC_CHECK(setreuid,AC_DEFINE(HAVE_SETREUID))
+ AC_FUNC_CHECK(setresuid,AC_DEFINE(HAVE_SETRESUID))
  ET_RULES
  SubdirLibraryRule([$(OBJS)])
  KRB_INCLUDE
Index: in_tkt.c
===================================================================
RCS file: /mit/krb5/.cvsroot/src/lib/krb4/in_tkt.c,v
retrieving revision 1.1
diff -c -r1.1 in_tkt.c
*** in_tkt.c	1995/04/27 15:49:41	1.1
--- in_tkt.c	1995/05/18 18:55:00
***************
*** 31,41 ****
   * success, or KFAILURE if something goes wrong.
   */
  
! #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
--- 31,42 ----
   * success, or KFAILURE if something goes wrong.
   */
  
! #ifndef HAVE_SETREUID
! #ifdef HAVE_SETRESUID
! /* for hpux */
  #define setreuid(r,e) setresuid(r,e,-1)
  #else
! /* for svr4 */
  #define setreuid(r,e) setuid(r)
  #endif
  #endif

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