summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/auth/smbencrypt.c1
-rw-r--r--source4/libcli/cldap/cldap.h2
-rw-r--r--source4/libcli/cliconnect.c1
-rw-r--r--source4/libcli/clideltree.c3
-rw-r--r--source4/libcli/clilist.c2
-rw-r--r--source4/libcli/config.mk1
-rw-r--r--source4/libcli/ldap/ldap.c2
-rw-r--r--source4/libcli/ldap/ldap_client.c2
-rw-r--r--source4/libcli/libcli.h45
-rw-r--r--source4/libcli/raw/libcliraw.h1
-rw-r--r--source4/libcli/raw/rawfile.c1
-rw-r--r--source4/libcli/raw/smb_signing.c1
-rw-r--r--source4/libcli/smb2/smb2.h2
-rw-r--r--source4/libcli/util/asn1.c2
-rw-r--r--source4/libcli/util/asn_1.h53
-rw-r--r--source4/libcli/util/clilsa.c1
16 files changed, 114 insertions, 6 deletions
diff --git a/source4/libcli/auth/smbencrypt.c b/source4/libcli/auth/smbencrypt.c
index b031bf4886..6bc9de2f2b 100644
--- a/source4/libcli/auth/smbencrypt.c
+++ b/source4/libcli/auth/smbencrypt.c
@@ -24,6 +24,7 @@
#include "includes.h"
#include "system/time.h"
+#include "smb.h"
#include "auth/ntlmssp/ntlmssp.h"
#include "lib/crypto/crypto.h"
#include "pstring.h"
diff --git a/source4/libcli/cldap/cldap.h b/source4/libcli/cldap/cldap.h
index 632dbd1f65..e1f59464e5 100644
--- a/source4/libcli/cldap/cldap.h
+++ b/source4/libcli/cldap/cldap.h
@@ -20,7 +20,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "asn_1.h"
+#include "libcli/util/asn_1.h"
#include "librpc/gen_ndr/ndr_nbt.h"
enum cldap_request_state {CLDAP_REQUEST_SEND,
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index 220b5a3898..fe0ad9c9f5 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "libcli/libcli.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/smb_composite/smb_composite.h"
diff --git a/source4/libcli/clideltree.c b/source4/libcli/clideltree.c
index 30369b977f..0c65d993c8 100644
--- a/source4/libcli/clideltree.c
+++ b/source4/libcli/clideltree.c
@@ -19,7 +19,8 @@
*/
#include "includes.h"
-#include "clilist.h"
+#include "libcli/raw/libcliraw.h"
+#include "libcli/libcli.h"
struct delete_state {
struct smbcli_tree *tree;
diff --git a/source4/libcli/clilist.c b/source4/libcli/clilist.c
index 0d69a386eb..f18ec84db9 100644
--- a/source4/libcli/clilist.c
+++ b/source4/libcli/clilist.c
@@ -20,7 +20,7 @@
*/
#include "includes.h"
-#include "clilist.h"
+#include "libcli/libcli.h"
#include "libcli/raw/libcliraw.h"
struct search_private {
diff --git a/source4/libcli/config.mk b/source4/libcli/config.mk
index fb04c32d85..20219be0f4 100644
--- a/source4/libcli/config.mk
+++ b/source4/libcli/config.mk
@@ -98,6 +98,7 @@ REQUIRED_SUBSYSTEMS = LIBCLI_RAW LIBCLI_UTILS LIBCLI_AUTH \
[SUBSYSTEM::LIBSMB]
REQUIRED_SUBSYSTEMS = LIBCLI SOCKET
+PRIVATE_PROTO_HEADER = libcli_proto.h
OBJ_FILES = clireadwrite.o \
cliconnect.o \
clifile.o \
diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c
index 3cfbe3a1e1..c699820cea 100644
--- a/source4/libcli/ldap/ldap.c
+++ b/source4/libcli/ldap/ldap.c
@@ -25,7 +25,7 @@
#include "includes.h"
#include "system/iconv.h"
-#include "asn_1.h"
+#include "libcli/util/asn_1.h"
#include "libcli/ldap/ldap.h"
diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c
index 77fc7db049..9b1a4ef9d5 100644
--- a/source4/libcli/ldap/ldap_client.c
+++ b/source4/libcli/ldap/ldap_client.c
@@ -24,7 +24,7 @@
*/
#include "includes.h"
-#include "asn_1.h"
+#include "libcli/util/asn_1.h"
#include "dlinklist.h"
#include "lib/events/events.h"
#include "lib/socket/socket.h"
diff --git a/source4/libcli/libcli.h b/source4/libcli/libcli.h
new file mode 100644
index 0000000000..917ab27519
--- /dev/null
+++ b/source4/libcli/libcli.h
@@ -0,0 +1,45 @@
+/*
+ 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.
+*/
+
+#include "smb.h"
+
+/*
+ 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;
+};
+
+struct clilist_file_info {
+ uint64_t size;
+ uint16_t attrib;
+ time_t mtime;
+ const char *name;
+ const char *short_name;
+};
+
+
+#include "libcli/libcli_proto.h"
diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h
index b09361b5ff..7eb0694bd2 100644
--- a/source4/libcli/raw/libcliraw.h
+++ b/source4/libcli/raw/libcliraw.h
@@ -21,6 +21,7 @@
*/
#include "request.h"
+#include "smb.h"
#include "librpc/gen_ndr/ndr_nbt.h"
struct smbcli_tree; /* forward declare */
diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c
index 6981a76800..0cc7385cee 100644
--- a/source4/libcli/raw/rawfile.c
+++ b/source4/libcli/raw/rawfile.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "smb.h"
#include "libcli/raw/libcliraw.h"
#define SETUP_REQUEST(cmd, wct, buflen) do { \
diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c
index df63c33cb9..a73db78f7b 100644
--- a/source4/libcli/raw/smb_signing.c
+++ b/source4/libcli/raw/smb_signing.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "smb.h"
#include "libcli/raw/libcliraw.h"
#include "lib/crypto/crypto.h"
diff --git a/source4/libcli/smb2/smb2.h b/source4/libcli/smb2/smb2.h
index eb7c10ed9d..cf84f34442 100644
--- a/source4/libcli/smb2/smb2.h
+++ b/source4/libcli/smb2/smb2.h
@@ -20,6 +20,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "smb.h"
+
struct smb2_options {
uint32_t timeout;
};
diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c
index 0dceb1bba6..db3f7823fa 100644
--- a/source4/libcli/util/asn1.c
+++ b/source4/libcli/util/asn1.c
@@ -19,7 +19,7 @@
*/
#include "includes.h"
-#include "asn_1.h"
+#include "libcli/util/asn_1.h"
/* free an asn1 structure */
void asn1_free(struct asn1_data *data)
diff --git a/source4/libcli/util/asn_1.h b/source4/libcli/util/asn_1.h
new file mode 100644
index 0000000000..2dc9bef06d
--- /dev/null
+++ b/source4/libcli/util/asn_1.h
@@ -0,0 +1,53 @@
+/*
+ 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/libcli/util/clilsa.c b/source4/libcli/util/clilsa.c
index 3c7850b7fd..bf5048b02a 100644
--- a/source4/libcli/util/clilsa.c
+++ b/source4/libcli/util/clilsa.c
@@ -28,6 +28,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
+#include "libcli/libcli.h"
#include "librpc/gen_ndr/ndr_lsa.h"
struct smblsa_state {