r3497: removed some include cruft, and split out librpc/gen_ndr/tables.h
authorAndrew Tridgell <tridge@samba.org>
Wed, 3 Nov 2004 00:38:05 +0000 (00:38 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:22 +0000 (13:05 -0500)
(This used to be commit 7dd3a5a6dadb0edc4fad56deba84f24b1e6dd2bc)

source4/include/cli_context.h
source4/include/includes.h
source4/include/local.h
source4/include/smb_macros.h
source4/librpc/rpc/dcerpc_util.c
source4/rpc_server/dcerpc_server.c
source4/rpc_server/remote/dcesrv_remote.c
source4/torture/rpc/mgmt.c
source4/torture/rpc/scanner.c
source4/utils/ndrdump.c

index 65128f09f5b4eacd93c95e8ccda49f6f73a5412f..a8c3f2d2e11e286e8b281fd8a93279a96eb2d727 100644 (file)
@@ -19,9 +19,6 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#ifndef _SMBCLI_CONTEXT_H
-#define _SMBCLI_CONTEXT_H
-
 /* 
    smbcli_state: internal state used in libcli library for single-threaded callers, 
    i.e. a single session on a single socket. 
@@ -32,5 +29,3 @@ struct smbcli_state {
        struct smbcli_tree *tree;
        struct substitute_context *substitute;
 };
-
-#endif /* _SMBCLI_CONTEXT_H */
index 9f2c233e73926a014ef1b037a6ac7bde96171adb..f20292779f103d3a4d6ec6946e5f5396e0cddbde 100644 (file)
@@ -141,14 +141,6 @@ struct ipv4_addr {
        uint32_t addr;
 };
 
-#ifndef MIN
-#define MIN(a,b) ((a)<(b)?(a):(b))
-#endif
-
-#ifndef MAX
-#define MAX(a,b) ((a)>(b)?(a):(b))
-#endif
-
 #ifndef HAVE_STRERROR
 extern char *sys_errlist[];
 #define strerror(i) sys_errlist[i]
@@ -190,7 +182,6 @@ extern int errno;
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "librpc/gen_ndr/ndr_dcerpc.h"
 #include "librpc/rpc/dcerpc.h"
-#include "librpc/gen_ndr/tables.h"
 #include "smb_interfaces.h"
 #include "smbd/server.h"
 #include "smbd/service.h"
index 67b83c316d82ffb5762e21389f754394295d35ad..7723e6ceddab7e431699bf6a8f9daacd3e425067 100644 (file)
 /* to a maximum of 8 if old smb clients break because of long printer names. */
 #define MAXPRINTERLEN 15
 
-/* max number of directories open at once */
-/* note that with the new directory code this no longer requires a
-   file handle per directory, but large numbers do use more memory */
-#define MAX_OPEN_DIRECTORIES 256
-
-/* max number of directory handles */
-/* As this now uses the bitmap code this can be
-   quite large. */
-#define MAX_DIRECTORY_HANDLES 2048
-
-/* maximum number of file caches per smbd */
-#define MAX_WRITE_CACHES 10
-
 /* define what facility to use for syslog */
 #ifndef SYSLOG_FACILITY
 #define SYSLOG_FACILITY LOG_DAEMON
 #endif
 
-/* 
- * Default number of maximum open files per smbd. This is
- * also limited by the maximum available file descriptors
- * per process and can also be set in smb.conf as "max open files"
- * in the [global] section.
- */
-
-#ifndef MAX_OPEN_FILES
-#define MAX_OPEN_FILES 10000
-#endif
-#define WORDMAX 0xFFFF
-
 /* the maximum password length before we declare a likely attack */
 #define MAX_PASS_LEN 200
 
 /* wchar separators for lists */
 #define LIST_SEP_W wchar_list_sep
 
-/* this is where browse lists are kept in the lock dir */
-#define SERVER_LIST "browse.dat"
-
-/* shall filenames with illegal chars in them get mangled in long
-   filename listings? */
-#define MANGLE_LONG_FILENAMES 
-
-/* define this if you want to stop spoofing with .. and soft links
-   NOTE: This also slows down the server considerably */
-#define REDUCE_PATHS
-
-/* the size of the directory cache */
-#define DIRCACHESIZE 20
-
 /* what default type of filesystem do we want this to show up as in a
    NT file manager window? */
 #define FSTYPE_STRING "NTFS"
 
 #define OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR 2
 
-/* the read preciction code has been disabled until some problems with
-   it are worked out */
-#define USE_READ_PREDICTION 0
-
 /*
  * Default passwd chat script.
  */
-
 #define DEFAULT_PASSWD_CHAT "*new*password* %n\\n *new*password* %n\\n *changed*"
 
 /* Minimum length of allowed password when changing UNIX password. */
    than 62*62 for the current code */
 #define MAX_SESSION_ID 3000
 
-/* For the benifit of PAM and the 'session exec' scripts, we fake up a terminal
-   name. This can be in one of two forms:  The first for systems not using
-   utmp (and therefore not constrained as to length or the need for a number
-   < 3000 or so) and the second for systems with this 'well behaved terminal
-   like name' constraint.
-*/
-
-#ifndef SESSION_TEMPLATE
-/* Paramaters are 'pid' and 'vuid' */
-#define SESSION_TEMPLATE "smb/%lu/%d"
-#endif
-
-#ifndef SESSION_UTMP_TEMPLATE
-#define SESSION_UTMP_TEMPLATE "smb/%d"
-#endif
-
-/* the maximum age in seconds of a password. Should be a lp_ parameter */
-#define MAX_PASSWORD_AGE (21*24*60*60)
-
-/* Allocation roundup. */
-#define SMB_ROUNDUP_ALLOCATION_SIZE 0x100000
-
 /* shall we deny oplocks to clients that get timeouts? */
 #define FASCIST_OPLOCK_BACKOFF 1
 
-/* this enables the "rabbit pellet" fix for SMBwritebraw */
-#define RABBIT_PELLET_FIX 1
-
 /* Max number of jobs per print queue. */
 #define PRINT_MAX_JOBID 10000
 
-/* Max number of open RPC pipes. */
-#define MAX_OPEN_PIPES 2048
-
 /* Tuning for server auth mutex. */
 #define CLI_AUTH_TIMEOUT 5000 /* In milli-seconds. */
 #define NUM_CLI_AUTH_CONNECT_RETRIES 3
index 02c8fc3af4df067ffb193f25e4c2e736250bd3e2..0f1334182185dc7c394e7232ac677f96459aaa11 100644 (file)
 #define VALID_SNUM(snum)   (lp_snum_ok(snum))
 #define GUEST_OK(snum)     (VALID_SNUM(snum) && lp_guest_ok(snum))
 
-/* 
- * Used by the stat cache code to check if a returned
- * stat structure is valid.
- */
-
-#define VALID_STAT(st) ((st).st_nlink != 0)  
-#define VALID_STAT_OF_DIR(st) (VALID_STAT(st) && S_ISDIR((st).st_mode))
-
-#ifndef MIN
-#define MIN(a,b) ((a)<(b)?(a):(b))
-#endif
-#ifndef MAX
-#define MAX(a,b) ((a)>(b)?(a):(b))
-#endif
-
-#ifndef ABS
-#define ABS(a) ((a)>0?(a):(-(a)))
-#endif
-
 /* these are the datagram types */
 #define DGRAM_DIRECT_UNIQUE 0x10
 
@@ -132,35 +113,24 @@ true if two IP addresses are equal
 #define ip_equal(ip1,ip2) ((ip1).s_addr == (ip2).s_addr)
 #define ipv4_equal(ip1,ip2) ((ip1).addr == (ip2).addr)
 
-/*****************************************************************
- splits out the last subkey of a key
- *****************************************************************/  
-
-#define reg_get_subkey(full_keyname, key_name, subkey_name) \
-       split_at_last_component(full_keyname, key_name, '\\', subkey_name)
-
-/****************************************************************************
- Used by dptr_zero.
-****************************************************************************/
-
-#define DPTR_MASK ((uint32_t)(((uint32_t)1)<<31))
-
-/****************************************************************************
- Return True if the offset is at zero.
-****************************************************************************/
-
-#define dptr_zero(buf) ((IVAL(buf,1)&~DPTR_MASK) == 0)
-
 /*******************************************************************
 copy an IP address from one buffer to another
 ********************************************************************/
 
 #define putip(dest,src) memcpy(dest,src,4)
 
-/*******************************************************************
- Return True if a server has CIFS UNIX capabilities.
-********************************************************************/
 
-#define SERVER_HAS_UNIX_CIFS(c) (cli_state_has_unix_cifs(c))
+#ifndef MIN
+#define MIN(a,b) ((a)<(b)?(a):(b))
+#endif
+
+#ifndef MAX
+#define MAX(a,b) ((a)>(b)?(a):(b))
+#endif
+
+#ifndef ABS
+#define ABS(a) ((a)>0?(a):(-(a)))
+#endif
+
 
 #endif /* _SMB_MACROS_H */
index af92743ccb1de06d926c8be63a5f4068c3117098..7b49e4f8d7d33bea84df815c2b180704604381dc 100644 (file)
@@ -24,6 +24,7 @@
 #include "includes.h"
 #include "system/network.h"
 #include "librpc/gen_ndr/ndr_epmapper.h"
+#include "librpc/gen_ndr/tables.h"
 
 /*
   find the pipe name for a local IDL interface
index fe58ee53ee732e845709608d02eade313bfb13e7..f9e2d8d28e154f3d949e75b721b8e19312604fc0 100644 (file)
@@ -24,6 +24,7 @@
 #include "includes.h"
 #include "librpc/gen_ndr/ndr_epmapper.h"
 #include "librpc/gen_ndr/ndr_oxidresolver.h"
+#include "librpc/gen_ndr/tables.h"
 #include "auth/auth.h"
 #include "dlinklist.h"
 #include "rpc_server/dcerpc_server.h"
index fc080bc59a357f4d6aecaf53ea30e35916ba79f1..ca67ac974e8b537a90e7cedebeec5f50cb628347 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "rpc_server/dcerpc_server.h"
+#include "librpc/gen_ndr/tables.h"
 
 struct dcesrv_remote_private {
        struct dcerpc_pipe *c_pipe;
index 8cf8bfdf371dc470014f8a6d051ce912c0dfcbf4..45a96cf9f973809c0f4c45e6209b24977b233f65 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "librpc/gen_ndr/ndr_mgmt.h"
+#include "librpc/gen_ndr/tables.h"
 
 
 /*
index c0415c2058a19ca4c3ffb9122f5a5d18e88008ea..134272271ca0860ebe56e1721b229334007c7e37 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "includes.h"
 #include "librpc/gen_ndr/ndr_mgmt.h"
+#include "librpc/gen_ndr/tables.h"
 
 /*
   work out how many calls there are for an interface
index 9ccc1e285910139f891574a06d16c2d7906179b6..1edf8eda6c76b8f4bcd3a3406ce00b5c4b065955 100644 (file)
@@ -21,6 +21,7 @@
 #include "includes.h"
 #include "lib/cmdline/popt_common.h"
 #include "system/iconv.h"
+#include "librpc/gen_ndr/tables.h"
 
 static const struct dcerpc_interface_table *find_pipe(const char *pipe_name)
 {