summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-12-30 01:13:15 +0000
committerJeremy Allison <jra@samba.org>1998-12-30 01:13:15 +0000
commitd5dc72bc89f72175ee23e27dceb4f15d5c7a46bc (patch)
tree1ca49762700c9ce7314de6fe65b9384ba2d9f8ec
parentdd45874a6e328b014295a5462b2029215e984f32 (diff)
downloadsamba-d5dc72bc89f72175ee23e27dceb4f15d5c7a46bc.tar.gz
samba-d5dc72bc89f72175ee23e27dceb4f15d5c7a46bc.tar.xz
samba-d5dc72bc89f72175ee23e27dceb4f15d5c7a46bc.zip
Added BROKEN_NIS_INCLUDE fix here also.
Jeremy.
-rw-r--r--source/lib/util.c34
1 files changed, 28 insertions, 6 deletions
diff --git a/source/lib/util.c b/source/lib/util.c
index 3813e7859d8..281cce64349 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -23,12 +23,34 @@
#if (defined(HAVE_NETGROUP) && defined (WITH_AUTOMOUNT))
#ifdef WITH_NISPLUS_HOME
-#include <rpcsvc/nis.h>
-#else
-#include "rpcsvc/ypclnt.h"
+#ifdef BROKEN_NISPLUS_INCLUDE_FILES
+/*
+ * The following lines are needed due to buggy include files
+ * in Solaris 2.6 which define GROUP in both /usr/include/sys/acl.h and
+ * also in /usr/include/rpcsvc/nis.h. The definitions conflict. JRA.
+ * Also GROUP_OBJ is defined as 0x4 in /usr/include/sys/acl.h and as
+ * an enum in /usr/include/rpcsvc/nis.h.
+ */
+
+#if defined(GROUP)
+#undef GROUP
#endif
+
+#if defined(GROUP_OBJ)
+#undef GROUP_OBJ
#endif
+#endif /* BROKEN_NISPLUS_INCLUDE_FILES */
+
+#include <rpcsvc/nis.h>
+
+#else /* !WITH_NISPLUS_HOME */
+
+#include "rpcsvc/ypclnt.h"
+
+#endif /* WITH_NISPLUS_HOME */
+#endif /* HAVE_NETGROUP && WITH_AUTOMOUNT */
+
#ifdef WITH_SSL
#include <ssl.h>
#undef Realloc /* SSLeay defines this and samba has a function of this name */
@@ -1830,7 +1852,7 @@ BOOL matchname(char *remotehost,struct in_addr addr)
int i;
if ((hp = Get_Hostbyname(remotehost)) == 0) {
- DEBUG(0,("Get_Hostbyname(%s): lookup failure", remotehost));
+ DEBUG(0,("Get_Hostbyname(%s): lookup failure.\n", remotehost));
return False;
}
@@ -1844,7 +1866,7 @@ BOOL matchname(char *remotehost,struct in_addr addr)
if (strcasecmp(remotehost, hp->h_name)
&& strcasecmp(remotehost, "localhost")) {
- DEBUG(0,("host name/name mismatch: %s != %s",
+ DEBUG(0,("host name/name mismatch: %s != %s\n",
remotehost, hp->h_name));
return False;
}
@@ -1861,7 +1883,7 @@ BOOL matchname(char *remotehost,struct in_addr addr)
* it, but that could be dangerous, too.
*/
- DEBUG(0,("host name/address mismatch: %s != %s",
+ DEBUG(0,("host name/address mismatch: %s != %s\n",
inet_ntoa(addr), hp->h_name));
return False;
}