svn commit: samba r22152 - in
branches/SAMBA_4_0/source/lib/replace: . test
metze at samba.org
metze at samba.org
Tue Apr 10 16:00:17 GMT 2007
Author: metze
Date: 2007-04-10 16:00:13 +0000 (Tue, 10 Apr 2007)
New Revision: 22152
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22152
Log:
merge from samba3:
remove netgr functions from libreplace they're not used
in samba4 currently and samba3 has explicit configure checks for them.
should fix bug #4496
metze
Modified:
branches/SAMBA_4_0/source/lib/replace/README
branches/SAMBA_4_0/source/lib/replace/libreplace.m4
branches/SAMBA_4_0/source/lib/replace/replace.c
branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/README
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/README 2007-04-10 15:59:39 UTC (rev 22151)
+++ branches/SAMBA_4_0/source/lib/replace/README 2007-04-10 16:00:13 UTC (rev 22152)
@@ -12,7 +12,6 @@
strlcat
mktime
rename
-innetgr
initgroups
memmove
strdup
@@ -89,5 +88,4 @@
Prerequisites:
memset (for bzero)
syslog (for vsyslog)
-setnetgrent, getnetgrent, endnetgrent (for innetgr)
mktemp (for mkstemp and mkdtemp)
Modified: branches/SAMBA_4_0/source/lib/replace/libreplace.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2007-04-10 15:59:39 UTC (rev 22151)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2007-04-10 16:00:13 UTC (rev 22152)
@@ -150,7 +150,7 @@
AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror)
AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
-AC_CHECK_FUNCS(waitpid strlcpy strlcat innetgr initgroups memmove strdup)
+AC_CHECK_FUNCS(waitpid strlcpy strlcat initgroups memmove strdup)
AC_CHECK_FUNCS(pread pwrite strndup strcasestr strtok_r mkdtemp socketpair)
AC_HAVE_DECL(setresuid, [#include <unistd.h>])
AC_HAVE_DECL(setresgid, [#include <unistd.h>])
@@ -331,8 +331,7 @@
m4_include(timegm.m4)
m4_include(repdir.m4)
-AC_CHECK_FUNCS([syslog memset setnetgrent getnetgrent endnetgrent memcpy],,
- [AC_MSG_ERROR([Required function not found])])
+AC_CHECK_FUNCS([syslog memset memcpy],,[AC_MSG_ERROR([Required function not found])])
echo "LIBREPLACE_BROKEN_CHECKS: END"
]) dnl end AC_LIBREPLACE_BROKEN_CHECKS
Modified: branches/SAMBA_4_0/source/lib/replace/replace.c
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/replace.c 2007-04-10 15:59:39 UTC (rev 22151)
+++ branches/SAMBA_4_0/source/lib/replace/replace.c 2007-04-10 16:00:13 UTC (rev 22152)
@@ -154,33 +154,6 @@
#endif /* !HAVE_MKTIME */
-#ifndef HAVE_INNETGR
-#if defined(HAVE_SETNETGRENT) && defined(HAVE_GETNETGRENT) && defined(HAVE_ENDNETGRENT)
-/*
- * Search for a match in a netgroup. This replaces it on broken systems.
- */
-int rep_innetgr(const char *group, const char *host, const char *user,
- const char *dom)
-{
- char *hst, *usr, *dm;
-
- setnetgrent(group);
- while (getnetgrent(&hst, &usr, &dm)) {
- if (((host == 0) || (hst == 0) || !strcmp(host, hst)) &&
- ((user == 0) || (usr == 0) || !strcmp(user, usr)) &&
- ((dom == 0) || (dm == 0) || !strcmp(dom, dm))) {
- endnetgrent();
- return (1);
- }
- }
- endnetgrent();
- return (0);
-}
-#endif /* HAVE_SETNETGRENT HAVE_GETNETGRENT HAVE_ENDNETGRENT */
-#endif /* HAVE_INNETGR */
-
-
-
#ifndef HAVE_INITGROUPS
/****************************************************************************
some systems don't have an initgroups call
Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2007-04-10 15:59:39 UTC (rev 22151)
+++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c 2007-04-10 16:00:13 UTC (rev 22152)
@@ -125,12 +125,6 @@
return true;
}
-static int test_innetgr(void)
-{
- /* FIXME */
- return true;
-}
-
static int test_initgroups(void)
{
/* FIXME */
@@ -480,7 +474,6 @@
ret &= test_strlcpy();
ret &= test_strlcat();
ret &= test_mktime();
- ret &= test_innetgr();
ret &= test_initgroups();
ret &= test_memmove();
ret &= test_strdup();
More information about the samba-cvs
mailing list