summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-02 02:57:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:13 -0500
commitedbfc0f6e70150e321822365bf0eead2821551bd (patch)
tree38164393e1f9b5225662453fb6253947e7fdc086
parent452ddd94ba22bebe0fda5ee6a7ddceae2057fe40 (diff)
downloadsamba-edbfc0f6e70150e321822365bf0eead2821551bd.tar.gz
samba-edbfc0f6e70150e321822365bf0eead2821551bd.tar.bz2
samba-edbfc0f6e70150e321822365bf0eead2821551bd.zip
r3453: - split out the auth and popt includes
- tidied up some of the system includes - moved a few more structures back from misc.idl to netlogon.idl and samr.idl now that pidl knows about inter-IDL dependencies (This used to be commit 7b7477ac42d96faac1b0ff361525d2c63cedfc64)
-rw-r--r--source4/auth/auth.c1
-rw-r--r--source4/auth/auth.h5
-rw-r--r--source4/auth/auth_builtin.c1
-rw-r--r--source4/auth/auth_sam.c1
-rw-r--r--source4/auth/auth_util.c1
-rw-r--r--source4/auth/auth_winbind.c1
-rw-r--r--source4/client/client.c1
-rw-r--r--source4/gtk/tools/gregedit.c1
-rw-r--r--source4/include/includes.h165
-rw-r--r--source4/include/rewrite.h2
-rw-r--r--source4/include/structs.h12
-rw-r--r--source4/include/system/filesys.h87
-rw-r--r--source4/include/system/syslog.h33
-rw-r--r--source4/ldap_server/ldap_server.c1
-rw-r--r--source4/lib/cmdline/popt_common.c1
-rw-r--r--source4/lib/registry/tools/regdiff.c1
-rw-r--r--source4/lib/registry/tools/regpatch.c1
-rw-r--r--source4/lib/registry/tools/regshell.c1
-rw-r--r--source4/lib/registry/tools/regtree.c1
-rw-r--r--source4/libcli/auth/credentials.c1
-rw-r--r--source4/libcli/auth/gensec.c1
-rw-r--r--source4/libcli/auth/gensec.h3
-rw-r--r--source4/libcli/auth/gensec_krb5.c1
-rw-r--r--source4/libcli/auth/gensec_ntlmssp.c1
-rw-r--r--source4/libcli/auth/ntlmssp.c1
-rw-r--r--source4/libcli/auth/ntlmssp_sign.c1
-rw-r--r--source4/libcli/auth/spnego.c1
-rw-r--r--source4/libcli/auth/spnego_parse.c1
-rw-r--r--source4/libcli/cliconnect.c1
-rw-r--r--source4/libcli/ldap/ldap.c1
-rw-r--r--source4/libcli/raw/clisession.c1
-rw-r--r--source4/libcli/util/smbencrypt.c2
-rw-r--r--source4/librpc/idl/misc.idl14
-rw-r--r--source4/librpc/idl/netlogon.idl8
-rw-r--r--source4/librpc/idl/samr.idl6
-rw-r--r--source4/librpc/rpc/dcerpc_schannel.c1
-rw-r--r--source4/ntvfs/unixuid/vfs_unixuid.c1
-rw-r--r--source4/param/loadparm.c5
-rw-r--r--source4/rpc_server/dcerpc_server.c2
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c2
-rw-r--r--source4/rpc_server/netlogon/schannel_state.c1
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c2
-rw-r--r--source4/rpc_server/samr/samdb.c7
-rw-r--r--source4/smb_server/negprot.c1
-rw-r--r--source4/smb_server/sesssetup.c1
-rw-r--r--source4/smbd/server.c1
-rw-r--r--source4/torture/auth/ntlmssp.c1
-rw-r--r--source4/torture/rpc/netlogon.c1
-rw-r--r--source4/torture/torture.c1
-rw-r--r--source4/utils/ndrdump.c1
-rw-r--r--source4/utils/net/net.c1
-rw-r--r--source4/utils/ntlm_auth.c2
52 files changed, 202 insertions, 190 deletions
diff --git a/source4/auth/auth.c b/source4/auth/auth.c
index 23dae12811..7fe446baf9 100644
--- a/source4/auth/auth.c
+++ b/source4/auth/auth.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "auth/auth.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source4/auth/auth.h b/source4/auth/auth.h
index 98b0994283..dc57d349b4 100644
--- a/source4/auth/auth.h
+++ b/source4/auth/auth.h
@@ -21,6 +21,11 @@
#ifndef _SAMBA_AUTH_H
#define _SAMBA_AUTH_H
+#include "libcli/auth/ntlmssp.h"
+#include "libcli/auth/credentials.h"
+#include "libcli/auth/gensec.h"
+#include "libcli/auth/spnego.h"
+
/* modules can use the following to determine if the interface has changed
* please increment the version number after each interface change
* with a comment and maybe update struct auth_critical_sizes.
diff --git a/source4/auth/auth_builtin.c b/source4/auth/auth_builtin.c
index 30f50806dc..611552e903 100644
--- a/source4/auth/auth_builtin.c
+++ b/source4/auth/auth_builtin.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "auth/auth.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c
index 5aff1d07e6..636935e0b9 100644
--- a/source4/auth/auth_sam.c
+++ b/source4/auth/auth_sam.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_samr.h"
#include "system/time.h"
+#include "auth/auth.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source4/auth/auth_util.c b/source4/auth/auth_util.c
index 3565fbd0dc..e3604997dc 100644
--- a/source4/auth/auth_util.c
+++ b/source4/auth/auth_util.c
@@ -24,6 +24,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_samr.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
+#include "auth/auth.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source4/auth/auth_winbind.c b/source4/auth/auth_winbind.c
index 2f54adcdfd..986cadb86f 100644
--- a/source4/auth/auth_winbind.c
+++ b/source4/auth/auth_winbind.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
+#include "auth/auth.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source4/client/client.c b/source4/client/client.c
index 4a7f0dd258..14d31628c7 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "lib/cmdline/popt_common.h"
#include "librpc/gen_ndr/ndr_srvsvc.h"
#include "libcli/raw/libcliraw.h"
#include "system/time.h"
diff --git a/source4/gtk/tools/gregedit.c b/source4/gtk/tools/gregedit.c
index d7a1e44ad1..c2ae043892 100644
--- a/source4/gtk/tools/gregedit.c
+++ b/source4/gtk/tools/gregedit.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "lib/cmdline/popt_common.h"
#include "gtk/common/select.h"
#include "gtk/common/gtk-smb.h"
diff --git a/source4/include/includes.h b/source4/include/includes.h
index c38c0acc8b..f45665ad05 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -72,12 +72,10 @@
/** Feel free to add definitions for other compilers here. */
#endif
-#include <unistd.h>
#include <sys/types.h>
-#include <unistd.h>
#include <stdio.h>
-#include <stddef.h>
#include <stdlib.h>
+#include <stddef.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
@@ -87,53 +85,15 @@
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-
-#ifdef HAVE_MEMORY_H
-#include <memory.h>
-#endif
-
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#else
-#ifdef HAVE_SYS_FCNTL_H
-#include <sys/fcntl.h>
-#endif
-#endif
-
-#include <sys/stat.h>
-
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-
#include <signal.h>
-
#include <errno.h>
-#ifdef HAVE_SYS_MODE_H
-/* apparently AIX needs this for S_ISLNK */
-#ifndef S_ISLNK
-#include <sys/mode.h>
-#endif
-#endif
-
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#else
#include <varargs.h>
#endif
-#ifdef HAVE_STROPTS_H
-#include <stropts.h>
-#endif
-
/* we support ADS if we want it and have krb5 and ldap libs */
#if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP)
#define HAVE_ADS
@@ -220,10 +180,6 @@ struct ipv4_addr {
#define UINT16_MAX 65535
#endif
-/*
- * Type for stat structure.
- */
-
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif
@@ -300,12 +256,6 @@ extern int errno;
#include "librpc/rpc/dcerpc.h"
#include "librpc/gen_ndr/tables.h"
-#include "libcli/auth/ntlmssp.h"
-#include "libcli/auth/credentials.h"
-#include "libcli/auth/gensec.h"
-#include "libcli/auth/spnego.h"
-#include "auth/auth.h"
-
#include "smb_interfaces.h"
#include "smbd/server.h"
#include "smbd/service.h"
@@ -491,105 +441,11 @@ int vasprintf(char **ptr, const char *format, va_list ap);
#define MSG_WAITALL 0
#endif
-/* default socket options. Dave Miller thinks we should default to TCP_NODELAY
- given the socket IO pattern that Samba uses */
-#ifdef TCP_NODELAY
-#define DEFAULT_SOCKET_OPTIONS "TCP_NODELAY"
-#else
-#define DEFAULT_SOCKET_OPTIONS ""
-#endif
-
/* Load header file for dynamic linking stuff */
-
#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
-/* dmalloc -- free heap debugger (dmalloc.org). This should be near
- * the *bottom* of include files so as not to conflict. */
-#ifdef ENABLE_DMALLOC
-# include <dmalloc.h>
-#endif
-
-
-/* Some POSIX definitions for those without */
-
-#ifndef S_IFDIR
-#define S_IFDIR 0x4000
-#endif
-#ifndef S_ISDIR
-#define S_ISDIR(mode) ((mode & 0xF000) == S_IFDIR)
-#endif
-#ifndef S_IRWXU
-#define S_IRWXU 00700 /* read, write, execute: owner */
-#endif
-#ifndef S_IRUSR
-#define S_IRUSR 00400 /* read permission: owner */
-#endif
-#ifndef S_IWUSR
-#define S_IWUSR 00200 /* write permission: owner */
-#endif
-#ifndef S_IXUSR
-#define S_IXUSR 00100 /* execute permission: owner */
-#endif
-#ifndef S_IRWXG
-#define S_IRWXG 00070 /* read, write, execute: group */
-#endif
-#ifndef S_IRGRP
-#define S_IRGRP 00040 /* read permission: group */
-#endif
-#ifndef S_IWGRP
-#define S_IWGRP 00020 /* write permission: group */
-#endif
-#ifndef S_IXGRP
-#define S_IXGRP 00010 /* execute permission: group */
-#endif
-#ifndef S_IRWXO
-#define S_IRWXO 00007 /* read, write, execute: other */
-#endif
-#ifndef S_IROTH
-#define S_IROTH 00004 /* read permission: other */
-#endif
-#ifndef S_IWOTH
-#define S_IWOTH 00002 /* write permission: other */
-#endif
-#ifndef S_IXOTH
-#define S_IXOTH 00001 /* execute permission: other */
-#endif
-
-/* For sys_adminlog(). */
-#ifndef LOG_EMERG
-#define LOG_EMERG 0 /* system is unusable */
-#endif
-
-#ifndef LOG_ALERT
-#define LOG_ALERT 1 /* action must be taken immediately */
-#endif
-
-#ifndef LOG_CRIT
-#define LOG_CRIT 2 /* critical conditions */
-#endif
-
-#ifndef LOG_ERR
-#define LOG_ERR 3 /* error conditions */
-#endif
-
-#ifndef LOG_WARNING
-#define LOG_WARNING 4 /* warning conditions */
-#endif
-
-#ifndef LOG_NOTICE
-#define LOG_NOTICE 5 /* normal but significant condition */
-#endif
-
-#ifndef LOG_INFO
-#define LOG_INFO 6 /* informational */
-#endif
-
-#ifndef LOG_DEBUG
-#define LOG_DEBUG 7 /* debug-level messages */
-#endif
-
extern int DEBUGLEVEL;
#ifndef RTLD_LAZY
@@ -631,25 +487,6 @@ time_t timegm(struct tm *tm);
#define strlen(x) valgrind_strlen(x)
#endif
-/*
- * Veritas File System. Often in addition to native.
- * Quotas different.
- */
-#if defined(HAVE_SYS_FS_VX_QUOTA_H)
-#define VXFS_QUOTA
-#endif
-
-#if HAVE_SYS_ATTRIBUTES_H
-#include <sys/attributes.h>
-#endif
-
-/* mutually exclusive (SuSE 8.2) */
-#if HAVE_ATTR_XATTR_H
-#include <attr/xattr.h>
-#elif HAVE_SYS_XATTR_H
-#include <sys/xattr.h>
-#endif
-
#define TALLOC_ABORT(reason) smb_panic(reason)
diff --git a/source4/include/rewrite.h b/source4/include/rewrite.h
index b26c8f2e5d..8b5e00fdd2 100644
--- a/source4/include/rewrite.h
+++ b/source4/include/rewrite.h
@@ -111,6 +111,4 @@ typedef struct {
void *cd_direct, *cd_pull, *cd_push;
} *smb_iconv_t;
-#include "lib/cmdline/popt_common.h"
-
#endif /* _REWRITE_H */
diff --git a/source4/include/structs.h b/source4/include/structs.h
index 428495ef13..6bc19b1127 100644
--- a/source4/include/structs.h
+++ b/source4/include/structs.h
@@ -44,6 +44,7 @@ struct samr_ChangePasswordUser3;
struct samr_ChangePasswordUser2;
struct samr_CryptPassword;
struct samr_CryptPasswordEx;
+struct samr_LogonHours;
struct netr_SamInfo3;
struct netr_Authenticator;
@@ -52,3 +53,14 @@ struct iface_struct;
struct tm;
struct utimbuf;
+
+
+struct auth_usersupplied_info;
+struct auth_serversupplied_info;
+struct creds_CredentialState;
+struct ntlmssp_state;
+struct auth_methods;
+struct schannel_state;
+struct spnego_data;
+typedef NTSTATUS (*gensec_password_callback)(struct gensec_security *gensec_security, TALLOC_CTX *mem_ctx,
+ char **password);
diff --git a/source4/include/system/filesys.h b/source4/include/system/filesys.h
index d038d8c085..dc13e148e5 100644
--- a/source4/include/system/filesys.h
+++ b/source4/include/system/filesys.h
@@ -20,6 +20,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <unistd.h>
+#include <sys/stat.h>
+
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
@@ -58,3 +61,87 @@
#include <sys/file.h>
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#else
+#ifdef HAVE_SYS_FCNTL_H
+#include <sys/fcntl.h>
+#endif
+#endif
+
+#ifdef HAVE_SYS_MODE_H
+/* apparently AIX needs this for S_ISLNK */
+#ifndef S_ISLNK
+#include <sys/mode.h>
+#endif
+#endif
+
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+
+/*
+ * Veritas File System. Often in addition to native.
+ * Quotas different.
+ */
+#if defined(HAVE_SYS_FS_VX_QUOTA_H)
+#define VXFS_QUOTA
+#endif
+
+#if HAVE_SYS_ATTRIBUTES_H
+#include <sys/attributes.h>
+#endif
+
+/* mutually exclusive (SuSE 8.2) */
+#if HAVE_ATTR_XATTR_H
+#include <attr/xattr.h>
+#elif HAVE_SYS_XATTR_H
+#include <sys/xattr.h>
+#endif
+
+
+/* Some POSIX definitions for those without */
+
+#ifndef S_IFDIR
+#define S_IFDIR 0x4000
+#endif
+#ifndef S_ISDIR
+#define S_ISDIR(mode) ((mode & 0xF000) == S_IFDIR)
+#endif
+#ifndef S_IRWXU
+#define S_IRWXU 00700 /* read, write, execute: owner */
+#endif
+#ifndef S_IRUSR
+#define S_IRUSR 00400 /* read permission: owner */
+#endif
+#ifndef S_IWUSR
+#define S_IWUSR 00200 /* write permission: owner */
+#endif
+#ifndef S_IXUSR
+#define S_IXUSR 00100 /* execute permission: owner */
+#endif
+#ifndef S_IRWXG
+#define S_IRWXG 00070 /* read, write, execute: group */
+#endif
+#ifndef S_IRGRP
+#define S_IRGRP 00040 /* read permission: group */
+#endif
+#ifndef S_IWGRP
+#define S_IWGRP 00020 /* write permission: group */
+#endif
+#ifndef S_IXGRP
+#define S_IXGRP 00010 /* execute permission: group */
+#endif
+#ifndef S_IRWXO
+#define S_IRWXO 00007 /* read, write, execute: other */
+#endif
+#ifndef S_IROTH
+#define S_IROTH 00004 /* read permission: other */
+#endif
+#ifndef S_IWOTH
+#define S_IWOTH 00002 /* write permission: other */
+#endif
+#ifndef S_IXOTH
+#define S_IXOTH 00001 /* execute permission: other */
+#endif
+
diff --git a/source4/include/system/syslog.h b/source4/include/system/syslog.h
index 7fcb87784b..7182e2e2d6 100644
--- a/source4/include/system/syslog.h
+++ b/source4/include/system/syslog.h
@@ -28,3 +28,36 @@
#endif
#endif
+/* For sys_adminlog(). */
+#ifndef LOG_EMERG
+#define LOG_EMERG 0 /* system is unusable */
+#endif
+
+#ifndef LOG_ALERT
+#define LOG_ALERT 1 /* action must be taken immediately */
+#endif
+
+#ifndef LOG_CRIT
+#define LOG_CRIT 2 /* critical conditions */
+#endif
+
+#ifndef LOG_ERR
+#define LOG_ERR 3 /* error conditions */
+#endif
+
+#ifndef LOG_WARNING
+#define LOG_WARNING 4 /* warning conditions */
+#endif
+
+#ifndef LOG_NOTICE
+#define LOG_NOTICE 5 /* normal but significant condition */
+#endif
+
+#ifndef LOG_INFO
+#define LOG_INFO 6 /* informational */
+#endif
+
+#ifndef LOG_DEBUG
+#define LOG_DEBUG 7 /* debug-level messages */
+#endif
+
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 6013b6ecf4..0cc83eca65 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "auth/auth.h"
/*
close the socket and shutdown a server_context
diff --git a/source4/lib/cmdline/popt_common.c b/source4/lib/cmdline/popt_common.c
index bd46373d58..80be23d364 100644
--- a/source4/lib/cmdline/popt_common.c
+++ b/source4/lib/cmdline/popt_common.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "lib/cmdline/popt_common.h"
/* Handle command line options:
* -d,--debuglevel
diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c
index bedf3222d1..1d69734f21 100644
--- a/source4/lib/registry/tools/regdiff.c
+++ b/source4/lib/registry/tools/regdiff.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "lib/cmdline/popt_common.h"
static void writediff(struct registry_key *oldkey, struct registry_key *newkey, FILE *out)
{
diff --git a/source4/lib/registry/tools/regpatch.c b/source4/lib/registry/tools/regpatch.c
index eed249d353..298a922fbf 100644
--- a/source4/lib/registry/tools/regpatch.c
+++ b/source4/lib/registry/tools/regpatch.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "lib/cmdline/popt_common.h"
/*
* Routines to parse a REGEDIT4 file
diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c
index 8449446c86..fcc7204423 100644
--- a/source4/lib/registry/tools/regshell.c
+++ b/source4/lib/registry/tools/regshell.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "lib/cmdline/popt_common.h"
#include "system/time.h"
/*
diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c
index 66bce1e499..64948b06fe 100644
--- a/source4/lib/registry/tools/regtree.c
+++ b/source4/lib/registry/tools/regtree.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "lib/cmdline/popt_common.h"
static void print_tree(int l, struct registry_key *p, int fullpath, int novals)
{
diff --git a/source4/libcli/auth/credentials.c b/source4/libcli/auth/credentials.c
index f3f8324005..4a17b13910 100644
--- a/source4/libcli/auth/credentials.c
+++ b/source4/libcli/auth/credentials.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "system/time.h"
+#include "auth/auth.h"
/*
initialise the credentials state for old-style 64 bit session keys
diff --git a/source4/libcli/auth/gensec.c b/source4/libcli/auth/gensec.c
index a00a36e171..aab1928687 100644
--- a/source4/libcli/auth/gensec.c
+++ b/source4/libcli/auth/gensec.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "auth/auth.h"
/* the list of currently registered GENSEC backends */
const static struct gensec_security_ops **generic_security_ops;
diff --git a/source4/libcli/auth/gensec.h b/source4/libcli/auth/gensec.h
index 624c7ebe1d..b2c685332b 100644
--- a/source4/libcli/auth/gensec.h
+++ b/source4/libcli/auth/gensec.h
@@ -82,9 +82,6 @@ struct gensec_security_ops {
void (*end)(struct gensec_security *gensec_security);
};
-typedef NTSTATUS (*gensec_password_callback)(struct gensec_security *gensec_security, TALLOC_CTX *mem_ctx,
- char **password);
-
#define GENSEC_INTERFACE_VERSION 0
struct gensec_security {
diff --git a/source4/libcli/auth/gensec_krb5.c b/source4/libcli/auth/gensec_krb5.c
index f393ce09c1..0e374e8219 100644
--- a/source4/libcli/auth/gensec_krb5.c
+++ b/source4/libcli/auth/gensec_krb5.c
@@ -27,6 +27,7 @@
#include "system/kerberos.h"
#include "libcli/auth/kerberos.h"
#include "librpc/gen_ndr/ndr_krb5pac.h"
+#include "auth/auth.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source4/libcli/auth/gensec_ntlmssp.c b/source4/libcli/auth/gensec_ntlmssp.c
index f75e7b4d73..4b1d5f3b02 100644
--- a/source4/libcli/auth/gensec_ntlmssp.c
+++ b/source4/libcli/auth/gensec_ntlmssp.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "auth/auth.h"
struct gensec_ntlmssp_state {
struct auth_context *auth_context;
diff --git a/source4/libcli/auth/ntlmssp.c b/source4/libcli/auth/ntlmssp.c
index 2ea0bcb84e..96c733e3b0 100644
--- a/source4/libcli/auth/ntlmssp.c
+++ b/source4/libcli/auth/ntlmssp.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "auth/auth.h"
static NTSTATUS ntlmssp_client_initial(struct ntlmssp_state *ntlmssp_state,
TALLOC_CTX *out_mem_ctx,
diff --git a/source4/libcli/auth/ntlmssp_sign.c b/source4/libcli/auth/ntlmssp_sign.c
index 5a99f14496..689a2d353e 100644
--- a/source4/libcli/auth/ntlmssp_sign.c
+++ b/source4/libcli/auth/ntlmssp_sign.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "auth/auth.h"
#define CLI_SIGN "session key to client-to-server signing key magic constant"
#define CLI_SEAL "session key to client-to-server sealing key magic constant"
diff --git a/source4/libcli/auth/spnego.c b/source4/libcli/auth/spnego.c
index 2779f47474..ef9763cad7 100644
--- a/source4/libcli/auth/spnego.c
+++ b/source4/libcli/auth/spnego.c
@@ -23,6 +23,7 @@
*/
#include "includes.h"
+#include "auth/auth.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source4/libcli/auth/spnego_parse.c b/source4/libcli/auth/spnego_parse.c
index 12d3d05734..d6eacc4a6a 100644
--- a/source4/libcli/auth/spnego_parse.c
+++ b/source4/libcli/auth/spnego_parse.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "auth/auth.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index 2949633b86..2c66a1b5b3 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "system/filesys.h"
#include "libcli/raw/libcliraw.h"
/*
diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c
index 987a822219..9b481313e3 100644
--- a/source4/libcli/ldap/ldap.c
+++ b/source4/libcli/ldap/ldap.c
@@ -26,6 +26,7 @@
#include "includes.h"
#include "system/network.h"
#include "system/iconv.h"
+#include "auth/auth.h"
/****************************************************************************
*
diff --git a/source4/libcli/raw/clisession.c b/source4/libcli/raw/clisession.c
index 14018f676c..23e1d8507e 100644
--- a/source4/libcli/raw/clisession.c
+++ b/source4/libcli/raw/clisession.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
+#include "auth/auth.h"
#define SETUP_REQUEST_SESSION(cmd, wct, buflen) do { \
req = smbcli_request_setup_session(session, cmd, wct, buflen); \
diff --git a/source4/libcli/util/smbencrypt.c b/source4/libcli/util/smbencrypt.c
index 1cf0890ba8..1e911f094b 100644
--- a/source4/libcli/util/smbencrypt.c
+++ b/source4/libcli/util/smbencrypt.c
@@ -24,7 +24,7 @@
#include "includes.h"
#include "system/time.h"
-#include "byteorder.h"
+#include "auth/auth.h"
/*
This implements the X/Open SMB password encryption
diff --git a/source4/librpc/idl/misc.idl b/source4/librpc/idl/misc.idl
index ce884b6c5c..dd31f0f54a 100644
--- a/source4/librpc/idl/misc.idl
+++ b/source4/librpc/idl/misc.idl
@@ -123,24 +123,10 @@ interface misc
GUID uuid;
} policy_handle;
- /* this is also used in samr and netlogon */
- typedef [public, flag(NDR_PAHEX)] struct {
- uint16 units_per_week;
- [size_is(1260), length_is(units_per_week/8)] uint8 *bitmap;
- } samr_LogonHours;
-
typedef [public, flag(NDR_PAHEX)] struct {
uint8 hash[16];
} samr_Password;
- typedef [public,flag(NDR_PAHEX)] struct {
- uint8 key[16];
- } netr_UserSessionKey;
-
- typedef [public,flag(NDR_PAHEX)] struct {
- uint8 key[8];
- } netr_LMSessionKey;
-
typedef [public, flag(NDR_PAHEX)] struct {
uint8 data[8];
} netr_Credential;
diff --git a/source4/librpc/idl/netlogon.idl b/source4/librpc/idl/netlogon.idl
index b880698ffd..7f04d2b648 100644
--- a/source4/librpc/idl/netlogon.idl
+++ b/source4/librpc/idl/netlogon.idl
@@ -129,6 +129,14 @@ interface netlogon
uint32 attributes;
} netr_GroupMembership;
+ typedef [public,flag(NDR_PAHEX)] struct {
+ uint8 key[16];
+ } netr_UserSessionKey;
+
+ typedef [public,flag(NDR_PAHEX)] struct {
+ uint8 key[8];
+ } netr_LMSessionKey;
+
typedef [public] struct {
NTTIME last_logon;
NTTIME last_logoff;
diff --git a/source4/librpc/idl/samr.idl b/source4/librpc/idl/samr.idl
index 4d41e389e6..df33066a12 100644
--- a/source4/librpc/idl/samr.idl
+++ b/source4/librpc/idl/samr.idl
@@ -567,6 +567,12 @@
uint16 code_page;
} samr_UserInfo2;
+ /* this is also used in samr and netlogon */
+ typedef [public, flag(NDR_PAHEX)] struct {
+ uint16 units_per_week;
+ [size_is(1260), length_is(units_per_week/8)] uint8 *bitmap;
+ } samr_LogonHours;
+
typedef struct {
samr_Name account_name;
samr_Name full_name;
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index d6fc7ad511..3472e1cbe2 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_schannel.h"
+#include "auth/auth.h"
enum schannel_position {
DCERPC_SCHANNEL_STATE_START = 0,
diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c
index 062f6b1b85..296dadcfe4 100644
--- a/source4/ntvfs/unixuid/vfs_unixuid.c
+++ b/source4/ntvfs/unixuid/vfs_unixuid.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "auth/auth.h"
struct unixuid_private {
void *samctx;
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 8e6538cc12..5b46118200 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -55,6 +55,7 @@
#include "includes.h"
#include "system/time.h"
#include "system/iconv.h"
+#include "system/network.h"
#include "librpc/gen_ndr/ndr_svcctl.h"
BOOL in_client = False; /* Not in the client by default */
@@ -911,7 +912,9 @@ static void init_globals(void)
/* options that can be set on the command line must be initialised via
the slower do_parameter() to ensure that FLAG_CMDLINE is obeyed */
- do_parameter("socket options", DEFAULT_SOCKET_OPTIONS);
+#ifdef TCP_NODELAY
+ do_parameter("socket options", "TCP_NODELAY");
+#endif
do_parameter("workgroup", DEFAULT_WORKGROUP);
do_parameter("netbios name", get_myname());
do_parameter("max protocol", "NT1");
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index 652aa87f5a..32addde703 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -23,8 +23,8 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_epmapper.h"
-#include "librpc/gen_ndr/ndr_dcom.h"
#include "librpc/gen_ndr/ndr_oxidresolver.h"
+#include "auth/auth.h"
/*
see if two endpoints match
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 61f0f58fba..e4afa3d45e 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -23,6 +23,8 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
#include "rpc_server/common/common.h"
+#include "librpc/gen_ndr/ndr_dcom.h"
+#include "auth/auth.h"
struct server_pipe_state {
struct netr_Credential client_challenge;
diff --git a/source4/rpc_server/netlogon/schannel_state.c b/source4/rpc_server/netlogon/schannel_state.c
index 6e46108e7a..8797ffa120 100644
--- a/source4/rpc_server/netlogon/schannel_state.c
+++ b/source4/rpc_server/netlogon/schannel_state.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "system/time.h"
+#include "auth/auth.h"
/* a reasonable amount of time to keep credentials live */
#define SCHANNEL_CREDENTIALS_EXPIRY 600
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index b3938ce417..e1dc234f19 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -1054,7 +1054,7 @@ static NTSTATUS samr_OpenGroup(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
} while (0)
#define SET_LHOURS(msg, field, attr) do { \
- if (samdb_msg_add_logon_hours(a_state->sam_ctx, mem_ctx, msg, attr, r->in.info->field) != 0) { \
+ if (samdb_msg_add_logon_hours(a_state->sam_ctx, mem_ctx, msg, attr, &r->in.info->field) != 0) { \
return NT_STATUS_NO_MEMORY; \
} \
} while (0)
diff --git a/source4/rpc_server/samr/samdb.c b/source4/rpc_server/samr/samdb.c
index 3fb8fcef1e..15796a695e 100644
--- a/source4/rpc_server/samr/samdb.c
+++ b/source4/rpc_server/samr/samdb.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_netlogon.h"
/*
connect to the SAM database
@@ -789,12 +790,12 @@ int samdb_msg_add_acct_flags(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message
add a logon_hours element to a message
*/
int samdb_msg_add_logon_hours(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message *msg,
- const char *attr_name, struct samr_LogonHours hours)
+ const char *attr_name, struct samr_LogonHours *hours)
{
struct ldb_wrap *sam_ctx = ctx;
struct ldb_val val;
- val.length = hours.units_per_week / 8;
- val.data = hours.bitmap;
+ val.length = hours->units_per_week / 8;
+ val.data = hours->bitmap;
ldb_set_alloc(sam_ctx->ldb, talloc_realloc_fn, mem_ctx);
return ldb_msg_add_value(sam_ctx->ldb, msg, attr_name, &val);
}
diff --git a/source4/smb_server/negprot.c b/source4/smb_server/negprot.c
index 030ccf8fa3..aa809664a1 100644
--- a/source4/smb_server/negprot.c
+++ b/source4/smb_server/negprot.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "auth/auth.h"
/* initialise the auth_context for this server and return the cryptkey */
static void get_challenge(struct smbsrv_connection *smb_conn, char buff[8])
diff --git a/source4/smb_server/sesssetup.c b/source4/smb_server/sesssetup.c
index 7aaec90f13..c3d378f0e3 100644
--- a/source4/smb_server/sesssetup.c
+++ b/source4/smb_server/sesssetup.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "auth/auth.h"
/*
setup the OS, Lanman and domain portions of a session setup reply
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index 40ec69c3b9..830d26fa7f 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "lib/cmdline/popt_common.h"
static void exit_server(const char *reason)
{
diff --git a/source4/torture/auth/ntlmssp.c b/source4/torture/auth/ntlmssp.c
index e98fe789b8..5d8db9030d 100644
--- a/source4/torture/auth/ntlmssp.c
+++ b/source4/torture/auth/ntlmssp.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "auth/auth.h"
BOOL torture_ntlmssp_self_check(void)
{
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 6971193f92..6d81b774d8 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -24,6 +24,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
+#include "auth/auth.h"
static const char *machine_password;
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 969e68265d..62b69ea8fb 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "lib/cmdline/popt_common.h"
#include "libcli/raw/libcliraw.h"
#include "system/time.h"
diff --git a/source4/utils/ndrdump.c b/source4/utils/ndrdump.c
index d408433fc3..a4182281c8 100644
--- a/source4/utils/ndrdump.c
+++ b/source4/utils/ndrdump.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "lib/cmdline/popt_common.h"
#include "system/iconv.h"
static const struct dcerpc_interface_table *find_pipe(const char *pipe_name)
diff --git a/source4/utils/net/net.c b/source4/utils/net/net.c
index ce817309cc..5a4ececa5b 100644
--- a/source4/utils/net/net.c
+++ b/source4/utils/net/net.c
@@ -42,6 +42,7 @@
/*****************************************************/
#include "includes.h"
+#include "lib/cmdline/popt_common.h"
/*
run a function from a function table. If not found then
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c
index e83aa76cf4..060e590d15 100644
--- a/source4/utils/ntlm_auth.c
+++ b/source4/utils/ntlm_auth.c
@@ -23,6 +23,8 @@
*/
#include "includes.h"
+#include "lib/cmdline/popt_common.h"
+#include "auth/auth.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND