Fixes for IRIX kernel oplocks and systems that don't have nss.h
authorJeremy Allison <jra@samba.org>
Tue, 20 Jun 2000 00:32:32 +0000 (00:32 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 20 Jun 2000 00:32:32 +0000 (00:32 +0000)
Jeremy.

source/configure
source/configure.in
source/include/config.h.in
source/nsswitch/winbind_nss_config.h
source/smbd/oplock_irix.c

index 3d3b28e39692c058cacd0c9354936669652b5747..e0a4d22f75396d38129cc3e701d0566416b460e7 100755 (executable)
@@ -2578,7 +2578,7 @@ else
 fi
 done
 
-for ac_hdr in sys/security.h security/pam_appl.h
+for ac_hdr in nss.h sys/security.h security/pam_appl.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
index 1ff89e02d041bfa3d154730ed0a0de026fd05588..b8a7226e920140ebaf7d6f1de529fe348bbd03e3 100644 (file)
@@ -201,7 +201,7 @@ case "$host_os" in
        ;;
 esac
 AC_CHECK_HEADERS(shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
-AC_CHECK_HEADERS(sys/security.h security/pam_appl.h)
+AC_CHECK_HEADERS(nss.h sys/security.h security/pam_appl.h)
 AC_CHECK_HEADERS(stropts.h poll.h readline.h history.h readline/readline.h)
 AC_CHECK_HEADERS(readline/history.h sys/capability.h syscall.h sys/syscall.h)
 AC_CHECK_HEADERS(sys/acl.h sys/cdefs.h glob.h)
index 699dbe6fc90728e29577c4fb49228c0923701dd3..ed5c5f62914830a2d6af2dec6eed1ebad6bc4140 100644 (file)
 /* Define if you have the <netinet/tcp.h> header file.  */
 #undef HAVE_NETINET_TCP_H
 
+/* Define if you have the <nss.h> header file.  */
+#undef HAVE_NSS_H
+
 /* Define if you have the <poll.h> header file.  */
 #undef HAVE_POLL_H
 
index 0aac5a786a0edbff12b08f4a35576a92b572cc63..c8e43f396c2f85919448eb9efb6b74da55a7b37a 100644 (file)
 #include <sys/stat.h>
 #include <errno.h>
 #include <pwd.h>
+
+#ifdef HAVE_NSS_H
 #include <nss.h>
+#else
+/* Minimal needed to compile.. */
+enum nss_status {
+NSS_STATUS_SUCCESS,
+NSS_STATUS_NOTFOUND,
+NSS_STATUS_UNAVAIL
+};
+#endif
 
 /* I'm trying really hard not to include anything from smb.h with the
    result of some silly looking redeclaration of structures. */
index c4d528c83546be75e46308d5b0cff10ce615ad0f..cf1cbbb0fcd2e1dcfe38c4538556030a8813d444 100644 (file)
@@ -26,7 +26,6 @@
 #if HAVE_KERNEL_OPLOCKS_IRIX
 extern int DEBUGLEVEL;
 
-
 static int oplock_pipe_write = -1;
 static int oplock_pipe_read = -1;
 
@@ -93,6 +92,7 @@ Disabling kernel oplock support.\n", strerror(errno) ));
 ****************************************************************************/
 static BOOL irix_oplock_receive_message(fd_set *fds, char *buffer, int buffer_len)
 {
+       extern int smb_read_error;
      oplock_stat_t os;
      SMB_DEV_T dev;
      SMB_INO_T inode;