summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-03 00:38:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:22 -0500
commit02785df1b06647f1adaaac3c93f363ec5070a941 (patch)
tree70b42e956555d7f513c13fb80cb6ab799fb13d7c
parent6f214cc510a59b7a65ee9d4486baf14a3e579f73 (diff)
downloadsamba-02785df1b06647f1adaaac3c93f363ec5070a941.tar.gz
samba-02785df1b06647f1adaaac3c93f363ec5070a941.tar.bz2
samba-02785df1b06647f1adaaac3c93f363ec5070a941.zip
r3497: removed some include cruft, and split out librpc/gen_ndr/tables.h
(This used to be commit 7dd3a5a6dadb0edc4fad56deba84f24b1e6dd2bc)
-rw-r--r--source4/include/cli_context.h5
-rw-r--r--source4/include/includes.h9
-rw-r--r--source4/include/local.h73
-rw-r--r--source4/include/smb_macros.h54
-rw-r--r--source4/librpc/rpc/dcerpc_util.c1
-rw-r--r--source4/rpc_server/dcerpc_server.c1
-rw-r--r--source4/rpc_server/remote/dcesrv_remote.c1
-rw-r--r--source4/torture/rpc/mgmt.c1
-rw-r--r--source4/torture/rpc/scanner.c1
-rw-r--r--source4/utils/ndrdump.c1
10 files changed, 18 insertions, 129 deletions
diff --git a/source4/include/cli_context.h b/source4/include/cli_context.h
index 65128f09f5..a8c3f2d2e1 100644
--- a/source4/include/cli_context.h
+++ b/source4/include/cli_context.h
@@ -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 */
diff --git a/source4/include/includes.h b/source4/include/includes.h
index 9f2c233e73..f20292779f 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -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"
diff --git a/source4/include/local.h b/source4/include/local.h
index 67b83c316d..7723e6cedd 100644
--- a/source4/include/local.h
+++ b/source4/include/local.h
@@ -38,37 +38,11 @@
/* 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
@@ -78,20 +52,6 @@
/* 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"
@@ -162,14 +122,9 @@
#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. */
@@ -179,40 +134,12 @@
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
diff --git a/source4/include/smb_macros.h b/source4/include/smb_macros.h
index 02c8fc3af4..0f13341821 100644
--- a/source4/include/smb_macros.h
+++ b/source4/include/smb_macros.h
@@ -86,25 +86,6 @@
#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 */
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index af92743ccb..7b49e4f8d7 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -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
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index fe58ee53ee..f9e2d8d28e 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -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"
diff --git a/source4/rpc_server/remote/dcesrv_remote.c b/source4/rpc_server/remote/dcesrv_remote.c
index fc080bc59a..ca67ac974e 100644
--- a/source4/rpc_server/remote/dcesrv_remote.c
+++ b/source4/rpc_server/remote/dcesrv_remote.c
@@ -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;
diff --git a/source4/torture/rpc/mgmt.c b/source4/torture/rpc/mgmt.c
index 8cf8bfdf37..45a96cf9f9 100644
--- a/source4/torture/rpc/mgmt.c
+++ b/source4/torture/rpc/mgmt.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_mgmt.h"
+#include "librpc/gen_ndr/tables.h"
/*
diff --git a/source4/torture/rpc/scanner.c b/source4/torture/rpc/scanner.c
index c0415c2058..134272271c 100644
--- a/source4/torture/rpc/scanner.c
+++ b/source4/torture/rpc/scanner.c
@@ -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
diff --git a/source4/utils/ndrdump.c b/source4/utils/ndrdump.c
index 9ccc1e2859..1edf8eda6c 100644
--- a/source4/utils/ndrdump.c
+++ b/source4/utils/ndrdump.c
@@ -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)
{