summaryrefslogtreecommitdiff
path: root/source4/include
diff options
context:
space:
mode:
Diffstat (limited to 'source4/include')
-rw-r--r--source4/include/asn_1.h53
-rw-r--r--source4/include/charset.h57
-rw-r--r--source4/include/cli_context.h32
-rw-r--r--source4/include/clilist.h28
-rw-r--r--source4/include/db_wrap.h30
-rw-r--r--source4/include/enums.h8
-rw-r--r--source4/include/includes.h4
-rw-r--r--source4/include/messages.h35
-rw-r--r--source4/include/secrets.h67
-rw-r--r--source4/include/smb.h23
-rw-r--r--source4/include/smb_macros.h6
-rw-r--r--source4/include/structs.h3
12 files changed, 18 insertions, 328 deletions
diff --git a/source4/include/asn_1.h b/source4/include/asn_1.h
deleted file mode 100644
index 2dc9bef06d..0000000000
--- a/source4/include/asn_1.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
- simple ASN1 code
- 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 _ASN_1_H
-#define _ASN_1_H
-
-struct nesting {
- off_t start;
- size_t taglen; /* for parsing */
- struct nesting *next;
-};
-
-struct asn1_data {
- uint8_t *data;
- size_t length;
- off_t ofs;
- struct nesting *nesting;
- BOOL has_error;
-};
-
-#define ASN1_APPLICATION(x) ((x)+0x60)
-#define ASN1_APPLICATION_SIMPLE(x) ((x)+0x40)
-#define ASN1_SEQUENCE(x) ((x)+0x30)
-#define ASN1_CONTEXT(x) ((x)+0xa0)
-#define ASN1_CONTEXT_SIMPLE(x) ((x)+0x80)
-#define ASN1_GENERAL_STRING 0x1b
-#define ASN1_OCTET_STRING 0x4
-#define ASN1_OID 0x6
-#define ASN1_BOOLEAN 0x1
-#define ASN1_INTEGER 0x2
-#define ASN1_ENUMERATED 0xa
-#define ASN1_SET 0x31
-
-#define ASN1_MAX_OIDS 20
-
-#endif /* _ASN_1_H */
diff --git a/source4/include/charset.h b/source4/include/charset.h
deleted file mode 100644
index ba1402acb3..0000000000
--- a/source4/include/charset.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
- charset defines
- Copyright (C) Andrew Tridgell 2001
- Copyright (C) Jelmer Vernooij 2002
-
- 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.
-*/
-
-/* this defines the charset types used in samba */
-typedef enum {CH_UTF16=0, CH_UNIX=1, CH_DISPLAY=2, CH_DOS=3, CH_UTF8=4, CH_UTF16BE=5} charset_t;
-
-#define NUM_CHARSETS 6
-
-/*
- * for each charset we have a function that pulls from that charset to
- * a ucs2 buffer, and a function that pushes to a ucs2 buffer
- * */
-
-struct charset_functions {
- const char *name;
- size_t (*pull)(void *, const char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft);
- size_t (*push)(void *, const char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft);
- struct charset_functions *prev, *next;
-};
-
-/* this type is used for manipulating unicode codepoints */
-typedef uint32_t codepoint_t;
-
-#define INVALID_CODEPOINT ((codepoint_t)-1)
-
-
-/* generic iconv conversion structure */
-typedef struct {
- size_t (*direct)(void *cd, const char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft);
- size_t (*pull)(void *cd, const char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft);
- size_t (*push)(void *cd, const char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft);
- void *cd_direct, *cd_pull, *cd_push;
-} *smb_iconv_t;
-
diff --git a/source4/include/cli_context.h b/source4/include/cli_context.h
deleted file mode 100644
index 843e8e8ca9..0000000000
--- a/source4/include/cli_context.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
- SMB parameters and setup
- Copyright (C) Andrew Tridgell 2004
- 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.
-*/
-
-/*
- smbcli_state: internal state used in libcli library for single-threaded callers,
- i.e. a single session on a single socket.
- */
-struct smbcli_state {
- struct smbcli_transport *transport;
- struct smbcli_session *session;
- struct smbcli_tree *tree;
- struct substitute_context *substitute;
- struct smblsa_state *lsa;
-};
diff --git a/source4/include/clilist.h b/source4/include/clilist.h
deleted file mode 100644
index d031987768..0000000000
--- a/source4/include/clilist.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
-
- Copyright (C) Andrew Tridgell 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.
-*/
-
-struct clilist_file_info {
- uint64_t size;
- uint16_t attrib;
- time_t mtime;
- const char *name;
- const char *short_name;
-};
-
diff --git a/source4/include/db_wrap.h b/source4/include/db_wrap.h
deleted file mode 100644
index 48e1bbc9e1..0000000000
--- a/source4/include/db_wrap.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
-
- database wrap headers
-
- Copyright (C) Andrew Tridgell 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.
-*/
-
-
-struct tdb_wrap {
- struct tdb_context *tdb;
-
- const char *name;
- struct tdb_wrap *next, *prev;
-};
-
diff --git a/source4/include/enums.h b/source4/include/enums.h
index 4e8e7b04a0..6003dfc7a0 100644
--- a/source4/include/enums.h
+++ b/source4/include/enums.h
@@ -28,3 +28,11 @@ enum protocol_types {PROTOCOL_NONE,PROTOCOL_CORE,PROTOCOL_COREPLUS,PROTOCOL_LANM
/* security levels */
enum security_types {SEC_SHARE,SEC_USER};
+
+/* passed to br lock code */
+enum brl_type {READ_LOCK, WRITE_LOCK, PENDING_READ_LOCK, PENDING_WRITE_LOCK};
+
+enum smb_signing_state {SMB_SIGNING_OFF, SMB_SIGNING_SUPPORTED,
+ SMB_SIGNING_REQUIRED, SMB_SIGNING_AUTO};
+
+
diff --git a/source4/include/includes.h b/source4/include/includes.h
index 849850daa6..dd4f19009a 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -84,9 +84,8 @@ struct ipv4_addr {
#include "structs.h"
#include "trans2.h"
#include "nterr.h"
+#include "charset/charset.h"
#include "core.h"
-#include "smb.h"
-#include "charset.h"
#include "debug.h"
#include "doserr.h"
#include "enums.h"
@@ -98,7 +97,6 @@ struct ipv4_addr {
#include "librpc/gen_ndr/orpc.h"
#include "librpc/rpc/dcerpc.h"
#include "smb_interfaces.h"
-#include "cli_context.h"
#include "auth/credentials/credentials.h"
#include "libcli/nbt/libnbt.h"
diff --git a/source4/include/messages.h b/source4/include/messages.h
deleted file mode 100644
index dcb20d69b1..0000000000
--- a/source4/include/messages.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
- messages.c header
- Copyright (C) Andrew Tridgell 2000
- Copyright (C) 2001, 2002 by Martin Pool
-
- 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 _MESSAGES_H_
-#define _MESSAGES_H_
-
-struct messaging_context;
-
-/* general messages */
-#define MSG_DEBUG 1
-#define MSG_PING 2
-#define MSG_PONG 3
-#define MSG_BRL_RETRY 4
-#define MSG_PVFS_RETRY_OPEN 5
-#define MSG_IRPC 6
-
-#endif
diff --git a/source4/include/secrets.h b/source4/include/secrets.h
deleted file mode 100644
index 429e955a8f..0000000000
--- a/source4/include/secrets.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Unix SMB/CIFS implementation.
- * secrets.tdb file format info
- * Copyright (C) Andrew Tridgell 2000
- *
- * 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 _SECRETS_H
-#define _SECRETS_H
-
-/* the first one is for the hashed password (NT4 style) the latter
- for plaintext (ADS)
-*/
-#define SECRETS_MACHINE_ACCT_PASS "SECRETS/$MACHINE.ACC"
-#define SECRETS_MACHINE_PASSWORD "SECRETS/MACHINE_PASSWORD"
-
-/* this one is for storing trusted domain account password */
-#define SECRETS_DOMTRUST_ACCT_PASS "SECRETS/$DOMTRUST.ACC"
-
-/* Store the principal name used for Kerberos DES key salt under this key name. */
-#define SECRETS_SALTING_PRINCIPAL "SECRETS/SALTING_PRINCIPAL"
-
-/* The domain sid and our sid are stored here even though they aren't
- really secret. */
-#define SECRETS_DOMAIN_SID "SECRETS/SID"
-#define SECRETS_SAM_SID "SAM/SID"
-
-/* The domain GUID and server GUID (NOT the same) are also not secret */
-#define SECRETS_DOMAIN_GUID "SECRETS/DOMGUID"
-#define SECRETS_SERVER_GUID "SECRETS/GUID"
-
-#define SECRETS_LDAP_BIND_PW "SECRETS/LDAP_BIND_PW"
-
-/* Authenticated user info is stored in secrets.tdb under these keys */
-
-#define SECRETS_AUTH_USER "SECRETS/AUTH_USER"
-#define SECRETS_AUTH_DOMAIN "SECRETS/AUTH_DOMAIN"
-#define SECRETS_AUTH_PASSWORD "SECRETS/AUTH_PASSWORD"
-
-/* structure for storing machine account password
- (ie. when samba server is member of a domain */
-struct machine_acct_pass {
- uint8_t hash[16];
- time_t mod_time;
-};
-
-#define SECRETS_PRIMARY_DOMAIN_DN "cn=Primary Domains"
-#define SECRETS_PRINCIPALS_DN "cn=Principals"
-#define SECRETS_PRIMARY_DOMAIN_FILTER "(&(flatname=%s)(objectclass=primaryDomain))"
-#define SECRETS_PRIMARY_REALM_FILTER "(&(realm=%s)(objectclass=primaryDomain))"
-#define SECRETS_KRBTGT_SEARCH "(&((|(realm=%s)(flatname=%s))(samAccountName=krbtgt)))"
-#define SECRETS_PRINCIPAL_SEARCH "(&(|(realm=%s)(flatname=%s))(servicePrincipalName=%s))"
-
-#endif /* _SECRETS_H */
diff --git a/source4/include/smb.h b/source4/include/smb.h
index f7a46e757d..5297ef9e27 100644
--- a/source4/include/smb.h
+++ b/source4/include/smb.h
@@ -29,9 +29,6 @@
#define SMB_PORTS "445 139"
-enum smb_signing_state {SMB_SIGNING_OFF, SMB_SIGNING_SUPPORTED,
- SMB_SIGNING_REQUIRED, SMB_SIGNING_AUTO};
-
/* deny modes */
#define DENY_DOS 0
#define DENY_ALL 1
@@ -557,20 +554,6 @@ enum smb_signing_state {SMB_SIGNING_OFF, SMB_SIGNING_SUPPORTED,
#define DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH 14
-/* passed to br lock code */
-enum brl_type {READ_LOCK, WRITE_LOCK, PENDING_READ_LOCK, PENDING_WRITE_LOCK};
-
-/* string manipulation flags - see clistr.c and srvstr.c */
-#define STR_TERMINATE 1
-#define STR_UPPER 2
-#define STR_ASCII 4
-#define STR_UNICODE 8
-#define STR_NOALIGN 16
-#define STR_NO_RANGE_CHECK 32
-#define STR_LEN8BIT 64
-#define STR_TERMINATE_ASCII 128 /* only terminate if ascii */
-#define STR_LEN_NOTERM 256 /* the length field is the unterminated length */
-
/*
filesystem attribute bits
@@ -590,4 +573,10 @@ enum brl_type {READ_LOCK, WRITE_LOCK, PENDING_READ_LOCK, PENDING_WRITE_LOCK};
#define FS_ATTR_ENCRYPTION 0x00020000
#define FS_ATTR_NAMED_STREAMS 0x00040000
+#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)
+#define _smb_setlen2(buf,len) do {(buf)[0] = 0; (buf)[1] = ((len)&0xFF0000)>>16; \
+ (buf)[2] = ((len)&0xFF00)>>8; (buf)[3] = (len)&0xFF;} while (0)
+
#endif /* _SMB_H */
diff --git a/source4/include/smb_macros.h b/source4/include/smb_macros.h
index afe31e00ba..356d968083 100644
--- a/source4/include/smb_macros.h
+++ b/source4/include/smb_macros.h
@@ -44,12 +44,6 @@
DEBUG(0,("PANIC: assert failed at %s(%d)\n", __FILE__, __LINE__)); \
smb_panic("assert failed"); }} while (0)
-#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)
-#define _smb_setlen2(buf,len) do {(buf)[0] = 0; (buf)[1] = ((len)&0xFF0000)>>16; \
- (buf)[2] = ((len)&0xFF00)>>8; (buf)[3] = (len)&0xFF;} while (0)
-
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif
diff --git a/source4/include/structs.h b/source4/include/structs.h
index b78d918417..83f742b30e 100644
--- a/source4/include/structs.h
+++ b/source4/include/structs.h
@@ -372,3 +372,6 @@ struct registry_context;
struct nbtd_interface;
struct nbtd_iface_name;
struct nbtd_server;
+struct smbcli_session;
+struct smbcli_state;
+struct substitute_context;