r10510: Decrease the amount of data included by includes.h a bit
authorJelmer Vernooij <jelmer@samba.org>
Mon, 26 Sep 2005 15:59:43 +0000 (15:59 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:38:58 +0000 (13:38 -0500)
(This used to be commit 03647e1321cf6c9bd6ced3945265f635e9468973)

31 files changed:
source4/SConstruct
source4/build/m4/rewrite.m4
source4/client/client.c
source4/gtk/common/credentials.c
source4/heimdal_build/config.h
source4/include/credentials.h
source4/include/includes.h
source4/include/local.h
source4/include/smb_macros.h
source4/include/structs.h
source4/include/system/readline.h [new file with mode: 0644]
source4/lib/SConscript
source4/lib/cmdline/popt_common.c
source4/lib/cmdline/readline.c
source4/lib/credentials.c
source4/lib/replace/SConscript
source4/lib/replace/config.m4
source4/lib/replace/win32/replace.h
source4/lib/samba3/secrets.c
source4/ntvfs/cifs/vfs_cifs.c
source4/rpc_server/remote/dcesrv_remote.c
source4/scripting/ejs/smbcalls_cli.c
source4/scripting/ejs/smbcalls_creds.c
source4/torture/basic/secleak.c
source4/torture/gentest.c
source4/torture/locktest.c
source4/torture/masktest.c
source4/torture/rpc/samlogon.c
source4/torture/rpc/samsync.c
source4/torture/rpc/schannel.c
source4/utils/ntlm_auth.c

index 6e38428b5676483d7e3d5c98be00f54de3b17995..297147fbe3fb570a52eb690b663a2e72a17d6a82 100644 (file)
@@ -9,9 +9,9 @@
 #
 # TODO:
 # - finish fallback code
-# - finish proto code
 # - support for init functions
 # - separate config file for lib/replace/
+# - Subsystem() ?
 
 import cPickle, string, os
 
@@ -30,6 +30,8 @@ hostenv = Environment(
         CPPDEFINES={'_SAMBA_BUILD_': None},
                )
 
+hostenv.Help(opts.GenerateHelpText(hostenv))
+
 # We don't care about NFS builds...
 hostenv.SetOption('max_drift', 1)
 
index 9a61d2add06c06fb9f409eae02b81cff49c9ab88..846a9e2ceb2c6ececbeb2bb2567d8ec48f4f605e 100644 (file)
@@ -79,7 +79,6 @@ AC_DIRENT_D_OFF
 AC_CHECK_TYPE(ino_t,unsigned)
 AC_CHECK_TYPE(loff_t,off_t)
 AC_CHECK_TYPE(offset_t,loff_t)
-AC_CHECK_TYPES(ssize_t)
 AC_CHECK_TYPES(intptr_t)
 AC_CHECK_TYPES(long long)
 
index bd40c97efdde93593b2e9a8f1c8e9c2687616304..0bd4a4c98a7953cbedf4b695a3ef39d32350a901 100644 (file)
@@ -32,6 +32,8 @@
 #include "system/dir.h"
 #include "system/filesys.h"
 #include "dlinklist.h"
+#include "credentials.h"
+#include "system/readline.h"
 
 #ifndef REGISTER
 #define REGISTER 0
index 01132ec6bd6cb8353e46ce04c4f6231e9c69eeb1..176fe08c21bd29658d65072692ba71aec32bee49 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "includes.h"
 #include "gtk/common/gtk-smb.h"
+#include "include/credentials.h"
 
 static void gtk_get_credentials(struct cli_credentials *credentials)
 {
index f185307b31b9ed7dbe8bb43c0b6bfc187e5c1f3d..660739c73f4c1be21318d6dc865c6cad65d5e333 100644 (file)
@@ -63,4 +63,8 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg }
 #define HAVE_STRNDUP
 #endif
 
+#ifndef HAVE_SSIZE_T
+#define HAVE_SSIZE_T
+#endif
+
 #endif
index 5dadbbd1c51a8d2c27911aaff3c3684f76d7a88b..4b9c1363f9dbca2c4e5dccfdadf1b178bb6bd212 100644 (file)
@@ -21,6 +21,8 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+struct ccache_container;
+
 /* In order of priority */
 enum credentials_obtained { 
        CRED_UNINITIALISED = 0,  /* We don't even have a guess yet */
index 3636dec58d956fcd16ed53ede66ab92bce4b3258..882c8e627740054f6dd94a9abe05f27d0b2dc67d 100644 (file)
 #include <varargs.h>
 #endif
 
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
-
-#ifdef HAVE_WINDOWS_H
-#include <windows.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
@@ -131,9 +119,6 @@ struct ipv4_addr {
 #include "ntvfs/ntvfs.h"
 #include "cli_context.h"
 #include "lib/com/com.h"
-#include "credentials.h"
-
-
 
 #define malloc_p(type) (type *)malloc(sizeof(type))
 #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count)
@@ -189,10 +174,6 @@ extern int DEBUGLEVEL;
 #endif
 #define discard_const_p(type, ptr) ((type *)discard_const(ptr))
 
-#ifndef HAVE_SSIZE_T
-#define ssize_t int
-#endif
-
 #ifndef UINT16_MAX
 #define UINT16_MAX 65535
 #endif
@@ -203,4 +184,3 @@ extern int DEBUGLEVEL;
 #define smb_xmalloc_p(type) (type *)smb_xmalloc(sizeof(type))
 
 #endif /* _INCLUDES_H */
-
index ae17f576bd339b4d669aff2350d622da0d649e5f..9c42b9b9ffa6bc806e7afb65ec0b50a5610db6c4 100644 (file)
 /* the default netbios keepalive timeout */
 #define DEFAULT_KEEPALIVE 300
 
-/* the directory to sit in when idle */
-/* #define IDLE_DIR "/" */
-
 /* Timout (in seconds) to wait for an oplock break
    message to return from the client. */
 
index aee2adf38fe1c8cc7dc1842c4744f6b6c97b338c..f5ac3ac96d24c5261c37535893087f73d737b0c7 100644 (file)
@@ -44,9 +44,6 @@
        DEBUG(0,("PANIC: assert failed at %s(%d)\n", __FILE__, __LINE__)); \
        smb_panic("assert failed"); }} while (0)
 
-/* REWRITE TODO: remove these smb_xxx macros */
-#define smb_buf(buf) (((char *)(buf)) + MIN_SMB_SIZE + CVAL(buf,HDR_WCT+4)*2)
-
 #define smb_len(buf) (PVAL(buf,3)|(PVAL(buf,2)<<8)|(PVAL(buf,1)<<16))
 #define _smb_setlen(buf,len) do {(buf)[0] = 0; (buf)[1] = ((len)&0x10000)>>16; \
         (buf)[2] = ((len)&0xFF00)>>8; (buf)[3] = (len)&0xFF;} while (0)
index ca28c1fc7af2e52997fd62af01da4d3ac78fe330..e09d9bb242c918f3c35cf047f736493f23426f56 100644 (file)
@@ -297,3 +297,7 @@ struct ldb_map_objectclass;
 struct param_context;
 struct param_section;
 struct param;
+
+enum credentials_obtained;
+struct cli_credentials;
+struct ccache_container;
diff --git a/source4/include/system/readline.h b/source4/include/system/readline.h
new file mode 100644 (file)
index 0000000..c3e5653
--- /dev/null
@@ -0,0 +1,44 @@
+/* 
+   Unix SMB/CIFS implementation.
+
+   readline wrappers
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifdef HAVE_LIBREADLINE
+#  ifdef HAVE_READLINE_READLINE_H
+#    include <readline/readline.h>
+#    ifdef HAVE_READLINE_HISTORY_H
+#      include <readline/history.h>
+#    endif
+#  else
+#    ifdef HAVE_READLINE_H
+#      include <readline.h>
+#      ifdef HAVE_HISTORY_H
+#        include <history.h>
+#      endif
+#    else
+#      undef HAVE_LIBREADLINE
+#    endif
+#  endif
+#endif
+
+#ifdef HAVE_NEW_LIBREADLINE
+#  define RL_COMPLETION_CAST (rl_completion_func_t *)
+#else
+/* This type is missing from libreadline<4.0  (approximately) */
+#  define RL_COMPLETION_CAST
+#endif /* HAVE_NEW_LIBREADLINE */
index c41b6ea067ffe2b8fc8012416c3f5bcf7e7abef5..a184eecd105cda0482b2bb0a31bf7b8e5521d284 100644 (file)
@@ -13,7 +13,7 @@ basic_files = ['version.c', 'xfile.c', 'debug.c', 'fault.c',
 
 proto_files = basic_files
 
-basic = hostenv.StaticLibrary('basic', [dynconfig,charset,talloc,basic_files])
+basic = hostenv.StaticLibrary('basic', [dynconfig,charset,talloc,basic_files,charset])
 Export('basic')
 
 hostenv.StaticLibrary('tdr', ['tdr/tdr.c'])
index 43ea203b78bc9d02c6880a2fcd8c1f56412ec5d8..76c8a537e3ce86a9cae74e1517f4f4fc7a968b4a 100644 (file)
@@ -25,6 +25,7 @@
 #include "system/filesys.h"
 #include "system/passwd.h"
 #include "lib/cmdline/popt_common.h"
+#include "credentials.h"
 
 /* Handle command line options:
  *             -d,--debuglevel 
index 7928b8db2e3233c4a5a4b2740d547731e7582280..52f45eb759e0b58cd878d3e96a1de7bf4207807a 100644 (file)
 #include "pstring.h"
 
 #include <unistd.h>
-
-#ifdef HAVE_LIBREADLINE
-#  ifdef HAVE_READLINE_READLINE_H
-#    include <readline/readline.h>
-#    ifdef HAVE_READLINE_HISTORY_H
-#      include <readline/history.h>
-#    endif
-#  else
-#    ifdef HAVE_READLINE_H
-#      include <readline.h>
-#      ifdef HAVE_HISTORY_H
-#        include <history.h>
-#      endif
-#    else
-#      undef HAVE_LIBREADLINE
-#    endif
-#  endif
-#endif
-
-#ifdef HAVE_NEW_LIBREADLINE
-#  define RL_COMPLETION_CAST (rl_completion_func_t *)
-#else
-/* This type is missing from libreadline<4.0  (approximately) */
-#  define RL_COMPLETION_CAST
-#endif /* HAVE_NEW_LIBREADLINE */
+#include "system/readline.h"
 
 /****************************************************************************
  Display the prompt and wait for input. Call callback() regularly
index 045047d358a9f6728810f6462aaedf6d299c96b3..166d60b00d3f691e23b697cb390b8db20f02afd8 100644 (file)
@@ -27,6 +27,7 @@
 #include "librpc/gen_ndr/ndr_samr.h" /* for struct samrPassword */
 #include "system/kerberos.h"
 #include "auth/kerberos/kerberos.h"
+#include "include/credentials.h"
 
 
 /**
index 47bfa481f228aca38b1e30dc215ce1fd7e79eaa7..f45d0e7d5acded55e610dfcb34056b2d1082b949 100644 (file)
@@ -51,6 +51,7 @@ int main() {
                'u_int32_t': 'unsigned long',
                'int64_t': 'long long',
                'uint64_t': 'unsigned long long',
+               'ssize_t': 'int'
        }
 
        type_headers = """
index 2b8d4ca3d19d0089f2d6f0ddeda40b8c96806f16..0b95079b24625511cb4fc93b068d1697b46c41c4 100644 (file)
@@ -10,6 +10,7 @@ AC_CHECK_TYPE(uint64_t, unsigned long long)
 AC_CHECK_TYPE(u_int32_t, unsigned long)
 AC_CHECK_TYPE(u_int16_t, unsigned short)
 AC_CHECK_TYPE(u_int8_t, unsigned char)
+AC_CHECK_TYPE(ssize_t, int)
 
 AC_CACHE_CHECK([for broken inet_ntoa],samba_cv_REPLACE_INET_NTOA,[
 AC_TRY_RUN([
index 94fa140681f5eb8bc603f710db7836203594c4d1..185d448d9549791bbc1e877b5b712d80a54a12bd 100644 (file)
@@ -1,6 +1,18 @@
 #ifndef _WIN32_REPLACE_H
 #define _WIN32_REPLACE_H
 
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
 /* Map BSD Socket errorcodes to the WSA errorcodes (if possible) */ 
 
 #define EAFNOSUPPORT   WSAEAFNOSUPPORT
index 0f3cc0c581dd24590be911c5be967f336dc1cf60..0981a7a6ec0b88ed42c42c2a9cb7e83b6aff21be 100644 (file)
@@ -30,6 +30,7 @@
 #include "system/filesys.h"
 #include "librpc/gen_ndr/ndr_security.h"
 #include "lib/tdb/include/tdbutil.h"
+#include "credentials.h"
 
 /**
  * Unpack SID into a pointer
index 789f24259a4ec3b87387c04bfee10d37c9a6d097..04ed1fd7d9cf816539d116b8740a57756047ce07 100644 (file)
@@ -32,6 +32,7 @@
 #include "libcli/smb_composite/smb_composite.h"
 #include "smb_server/smb_server.h"
 #include "smbd/service_stream.h"
+#include "credentials.h"
 
 /* this is stored in ntvfs_private */
 struct cvfs_private {
index 9e77347fa72d788d99f7a978a945ac7ad8f5cb8f..08734493ba7ce0667d7800aeec6f60a08ccd304a 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "rpc_server/dcerpc_server.h"
+#include "credentials.h"
 
 struct dcesrv_remote_private {
        struct dcerpc_pipe *c_pipe;
index d7ffea29fe81babc7c477bcd98d870b5c79d8d88..3b0905d7d30f9382d806bb44875230955206bbb0 100644 (file)
@@ -26,6 +26,7 @@
 #include "libcli/raw/libcliraw.h"
 #include "libcli/composite/composite.h"
 #include "clilist.h"
+#include "credentials.h"
 
 #if 0
 
index cc2ccf8c47455c9aa67519b01e635e6e89e1d8de..d615bcbed24826235f566dfcaad2bd0048baa5ae 100644 (file)
@@ -24,6 +24,7 @@
 #include "scripting/ejs/smbcalls.h"
 #include "lib/appweb/ejs/ejs.h"
 #include "lib/cmdline/popt_common.h"
+#include "credentials.h"
 
 /*
   helper function to get the local objects credentials ptr
index f77b399874801ed022dc2fa1eed6e3402ebb2dfd..2a1c5b15d519ad8c99598dbf0d7c544d618d5ba4 100644 (file)
@@ -24,6 +24,7 @@
 #include "libcli/raw/libcliraw.h"
 #include "system/time.h"
 #include "libcli/composite/composite.h"
+#include "credentials.h"
 #include "libcli/smb_composite/smb_composite.h"
 
 static BOOL try_failed_login(struct smbcli_state *cli)
index 8a2bba8497d0e84b66456cfe772dfe78bd9c9c30..2765df35f04497406f9c7f82ff4ff8d6a21d6294 100644 (file)
@@ -24,6 +24,7 @@
 #include "request.h"
 #include "libcli/raw/libcliraw.h"
 #include "librpc/gen_ndr/ndr_security.h"
+#include "credentials.h"
 
 #define NSERVERS 2
 #define NINSTANCES 2
index be363d0cb3942cd4eefc686a94bdab9c9bd82322..980fc6287cb1e8275176b3deb0779ae18efd0147 100644 (file)
@@ -22,6 +22,7 @@
 #include "system/filesys.h"
 #include "system/time.h"
 #include "pstring.h"
+#include "credentials.h"
 
 static int numops = 1000;
 static BOOL showall;
index 0b1c58a2f257e8596b450f9972f180a769052434..b432c7129a597d4960d1e3a02eb4ab4a4e260a09 100644 (file)
@@ -23,6 +23,7 @@
 #include "clilist.h"
 #include "libcli/raw/libcliraw.h"
 #include "system/time.h"
+#include "credentials.h"
 #include "pstring.h"
 
 static struct cli_credentials *credentials;
index ef0ccd9037e6595ab58d0d26b8409794f2b158d7..8fa784c624fc42d9cc08be67c4c04bc5e467dc33 100644 (file)
@@ -27,6 +27,7 @@
 #include "auth/auth.h"
 #include "lib/crypto/crypto.h"
 #include "lib/cmdline/popt_common.h"
+#include "credentials.h"
 
 #define TEST_MACHINE_NAME "samlogontest"
 #define TEST_USER_NAME "samlogontestuser"
index 9cd30ef019c9902f893ecec35df7e85c3eabc6e0..1f526ff7bcb72ace4d0b1dbf08b26b5663e42402 100644 (file)
@@ -28,6 +28,7 @@
 #include "dlinklist.h"
 #include "lib/crypto/crypto.h"
 #include "system/time.h"
+#include "credentials.h"
 
 #define TEST_MACHINE_NAME "samsynctest"
 #define TEST_WKSTA_MACHINE_NAME "samsynctest2"
index c10405354e7da54c2ca9f1a82b1817f4cde33e90..d5df777451bedb15e87eb4a7587d51aa0d1b3f26 100644 (file)
@@ -24,6 +24,7 @@
 #include "librpc/gen_ndr/ndr_samr.h"
 #include "librpc/gen_ndr/ndr_netlogon.h"
 #include "lib/cmdline/popt_common.h"
+#include "credentials.h"
 
 #define TEST_MACHINE_NAME "schanneltest"
 
index 5d46e9aad44ebb08c983fae6a1b94bb27d677f97..87cd16daaa2816b24b8507efee5457b9201823e1 100644 (file)
@@ -28,6 +28,7 @@
 #include "lib/cmdline/popt_common.h"
 #include "auth/auth.h"
 #include "librpc/gen_ndr/ndr_security.h"
+#include "credentials.h"
 
 #define SQUID_BUFFER_SIZE 2010