summaryrefslogtreecommitdiff
path: root/source4/include
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-01-09 21:44:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:49:57 -0500
commit5c8447773f306e302c7182611e4fc03978c340b6 (patch)
tree912ffdb6b8f878350e3f3f27c3ea414a7a06fade /source4/include
parent1f10e729c024cba1d530733ef98c22e2acd7dc19 (diff)
downloadsamba-5c8447773f306e302c7182611e4fc03978c340b6.tar.gz
samba-5c8447773f306e302c7182611e4fc03978c340b6.tar.bz2
samba-5c8447773f306e302c7182611e4fc03978c340b6.zip
r12801: Some more include/ cleanups (remove unused macros + move files
to specific dirs) (This used to be commit 243cf760b077e155f5ac508aeebf819f7708a84e)
Diffstat (limited to 'source4/include')
-rw-r--r--source4/include/debug.h3
-rw-r--r--source4/include/includes.h14
-rw-r--r--source4/include/request.h62
-rw-r--r--source4/include/signing.h40
-rw-r--r--source4/include/xfile.h49
5 files changed, 13 insertions, 155 deletions
diff --git a/source4/include/debug.h b/source4/include/debug.h
index d92232c645..40d04766e1 100644
--- a/source4/include/debug.h
+++ b/source4/include/debug.h
@@ -56,6 +56,3 @@ extern int DEBUGLEVEL;
#define DEBUGTAB(n) do_debug_tab(n)
enum debug_logtype {DEBUG_STDOUT = 0, DEBUG_FILE = 1, DEBUG_STDERR = 2};
-
-/* keep some debug class defines for now to avoid changing old code too much */
-#define DBGC_AUTH 0
diff --git a/source4/include/includes.h b/source4/include/includes.h
index dd4f19009a..fae9a29a9c 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -36,6 +36,18 @@
/** Feel free to add definitions for other compilers here. */
#endif
+#ifndef PRINTF_ATTRIBUTE
+#if !defined(NO_PRINTF_ATTRIBUTE) && (__GNUC__ >= 3)
+/** Use gcc attribute to check printf fns. a1 is the 1-based index of
+ * the parameter containing the format, and a2 the index of the first
+ * argument. Note that some gcc 2.x versions don't handle this
+ * properly **/
+#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
+#else
+#define PRINTF_ATTRIBUTE(a1, a2)
+#endif
+#endif
+
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
@@ -79,7 +91,7 @@ struct ipv4_addr {
/* Lists, trees, caching, database... */
#include "xfile.h"
-#include "lib/talloc/talloc.h"
+#include "talloc/talloc.h"
#include "nt_status.h"
#include "structs.h"
#include "trans2.h"
diff --git a/source4/include/request.h b/source4/include/request.h
deleted file mode 100644
index 587adeef21..0000000000
--- a/source4/include/request.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef _REQUEST_H
-#define _REQUEST_H
-/*
- Unix SMB/CIFS implementation.
- SMB parameters and setup
- Copyright (C) Andrew Tridgell 2003
- Copyright (C) James Myers 2003 <myersjj@samba.org>
-
- 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.
-*/
-
-#include "signing.h"
-
-/*
- Shared state structure between client and server, representing the basic packet.
-*/
-
-struct request_buffer {
- /* the raw SMB buffer, including the 4 byte length header */
- uint8_t *buffer;
-
- /* the size of the raw buffer, including 4 byte header */
- uint_t size;
-
- /* how much has been allocated - on reply the buffer is over-allocated to
- prevent too many realloc() calls
- */
- uint_t allocated;
-
- /* the start of the SMB header - this is always buffer+4 */
- uint8_t *hdr;
-
- /* the command words and command word count. vwv points
- into the raw buffer */
- uint8_t *vwv;
- uint_t wct;
-
- /* the data buffer and size. data points into the raw buffer */
- uint8_t *data;
- uint_t data_size;
-
- /* ptr is used as a moving pointer into the data area
- * of the packet. The reason its here and not a local
- * variable in each function is that when a realloc of
- * a send packet is done we need to move this
- * pointer */
- uint8_t *ptr;
-};
-
-#endif
diff --git a/source4/include/signing.h b/source4/include/signing.h
deleted file mode 100644
index dfc5a4bd7e..0000000000
--- a/source4/include/signing.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef _SIGNING_H
-#define _SIGNING_H
-/*
- Unix SMB/CIFS implementation.
- SMB Signing
-
- Andrew Bartlett <abartlet@samba.org> 2003-2004
-
- 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.
-*/
-
-enum smb_signing_engine_state {
- SMB_SIGNING_ENGINE_OFF,
- SMB_SIGNING_ENGINE_BSRSPYL,
- SMB_SIGNING_ENGINE_ON
-};
-
-struct smb_signing_context {
- enum smb_signing_engine_state signing_state;
- DATA_BLOB mac_key;
- uint32_t next_seq_num;
- BOOL allow_smb_signing;
- BOOL doing_signing;
- BOOL mandatory_signing;
- BOOL seen_valid; /* Have I ever seen a validly signed packet? */
-};
-
-#endif
diff --git a/source4/include/xfile.h b/source4/include/xfile.h
deleted file mode 100644
index 89fa9d1e11..0000000000
--- a/source4/include/xfile.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
- stdio replacement
- Copyright (C) Andrew Tridgell 2001
-
- 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.
-*/
-
-#ifndef _XFILE_H_
-#define _XFILE_H_
-/*
- see xfile.c for explanations
-*/
-
-typedef struct {
- int fd;
- char *buf;
- char *next;
- int bufsize;
- int bufused;
- int open_flags;
- int buftype;
- int flags;
-} XFILE;
-
-extern XFILE *x_stdin, *x_stdout, *x_stderr;
-
-/* buffering type */
-#define X_IOFBF 0
-#define X_IOLBF 1
-#define X_IONBF 2
-
-#define x_getc(f) x_fgetc(f)
-
-int x_vfprintf(XFILE *f, const char *format, va_list ap) PRINTF_ATTRIBUTE(2, 0);
-int x_fprintf(XFILE *f, const char *format, ...) PRINTF_ATTRIBUTE(2, 3);
-#endif /* _XFILE_H_ */