svn commit: samba r9374 - in branches/SAMBA_4_0/source/lib/replace: .

tridge at samba.org tridge at samba.org
Thu Aug 18 01:57:44 GMT 2005


Author: tridge
Date: 2005-08-18 01:57:43 +0000 (Thu, 18 Aug 2005)
New Revision: 9374

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9374

Log:
HPUX is also missing setegid()


Modified:
   branches/SAMBA_4_0/source/lib/replace/config.m4
   branches/SAMBA_4_0/source/lib/replace/replace.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/config.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/config.m4	2005-08-18 01:24:08 UTC (rev 9373)
+++ branches/SAMBA_4_0/source/lib/replace/config.m4	2005-08-18 01:57:43 UTC (rev 9374)
@@ -15,4 +15,5 @@
     AC_DEFINE(REPLACE_INET_NTOA,1,[Whether inet_ntoa should be replaced])
 fi
 
-AC_CHECK_FUNCS(strtoull __strtoull strtouq strtoll __strtoll strtoq seteuid setresuid)
+AC_CHECK_FUNCS(strtoull __strtoull strtouq strtoll __strtoll strtoq)
+AC_CHECK_FUNCS(seteuid setresuid setegid setresgid)

Modified: branches/SAMBA_4_0/source/lib/replace/replace.c
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/replace.c	2005-08-18 01:24:08 UTC (rev 9373)
+++ branches/SAMBA_4_0/source/lib/replace/replace.c	2005-08-18 01:57:43 UTC (rev 9374)
@@ -515,3 +515,14 @@
 #endif
 }
 #endif
+
+#ifndef HAVE_SETEGID
+ int setegid(gid_t egid)
+{
+#ifdef HAVE_SETRESGID
+	return setresgid(-1, egid, -1);
+#else
+#  error "You need a setegid function"
+#endif
+}
+#endif



More information about the samba-cvs mailing list