summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-09-30 13:02:09 -0700
committerAndrew Tridgell <tridge@samba.org>2008-09-30 13:02:09 -0700
commitf84093df863eb00238a6be1caba59d926f18e7a5 (patch)
treef72c5aa9bfae972a5a376767a271eac5d5ded085 /source4/libcli
parentef6fc37add1fd9164eb143c953fde0d5a9fc584a (diff)
parent687ce0b60a3913b0f2eca2365a5ab56e78523ab5 (diff)
downloadsamba-f84093df863eb00238a6be1caba59d926f18e7a5.tar.gz
samba-f84093df863eb00238a6be1caba59d926f18e7a5.tar.bz2
samba-f84093df863eb00238a6be1caba59d926f18e7a5.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/cliconnect.c12
-rw-r--r--source4/libcli/config.mk8
-rw-r--r--source4/libcli/drsblobs.c179
-rw-r--r--source4/libcli/drsblobs.h28
-rw-r--r--source4/libcli/raw/clisession.c7
-rw-r--r--source4/libcli/raw/clitree.c4
-rw-r--r--source4/libcli/security/security.i6
-rw-r--r--source4/libcli/security/security.py4
-rw-r--r--source4/libcli/security/security_wrap.c118
-rw-r--r--source4/libcli/smb_composite/connect.c2
-rw-r--r--source4/libcli/smb_composite/fetchfile.c1
-rw-r--r--source4/libcli/smb_composite/fsinfo.c11
-rw-r--r--source4/libcli/smb_composite/smb_composite.h2
13 files changed, 153 insertions, 229 deletions
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index c20a7fd935..e42b04cdc5 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -69,12 +69,14 @@ NTSTATUS smbcli_negprot(struct smbcli_state *cli, bool unicode, int maxprotocol)
/* wrapper around smb_raw_sesssetup() */
NTSTATUS smbcli_session_setup(struct smbcli_state *cli,
struct cli_credentials *credentials,
- const char *workgroup)
+ const char *workgroup,
+ struct smbcli_session_options options)
{
struct smb_composite_sesssetup setup;
NTSTATUS status;
- cli->session = smbcli_session_init(cli->transport, cli, true);
+ cli->session = smbcli_session_init(cli->transport, cli, true,
+ options);
if (!cli->session) return NT_STATUS_UNSUCCESSFUL;
setup.in.sesskey = cli->transport->negotiate.sesskey;
@@ -144,7 +146,8 @@ NTSTATUS smbcli_full_connection(TALLOC_CTX *parent_ctx,
struct cli_credentials *credentials,
struct resolve_context *resolve_ctx,
struct event_context *ev,
- struct smbcli_options *options)
+ struct smbcli_options *options,
+ struct smbcli_session_options *session_options)
{
struct smbcli_tree *tree;
NTSTATUS status;
@@ -155,7 +158,8 @@ NTSTATUS smbcli_full_connection(TALLOC_CTX *parent_ctx,
&tree, host, ports,
sharename, devtype,
credentials, resolve_ctx, ev,
- options);
+ options,
+ session_options);
if (!NT_STATUS_IS_OK(status)) {
goto done;
}
diff --git a/source4/libcli/config.mk b/source4/libcli/config.mk
index 2f81d7cff0..d68a2a2ce3 100644
--- a/source4/libcli/config.mk
+++ b/source4/libcli/config.mk
@@ -67,14 +67,6 @@ PUBLIC_DEPENDENCIES = LIBSAMBA-UTIL LIBCLI_NDR_NETLOGON
LIBCLI_NETLOGON_OBJ_FILES = $(addprefix $(libclinbtsrcdir)/, \
netlogon.o)
-[SUBSYSTEM::LIBCLI_DRSBLOBS]
-PUBLIC_DEPENDENCIES = LIBNDR
-
-LIBCLI_DRSBLOBS_OBJ_FILES = $(addprefix $(libclisrcdir)/, \
- drsblobs.o)
-
-$(eval $(call proto_header_template,$(libclisrcdir)/drsblobs_proto.h,$(LIBCLI_DRSBLOBS_OBJ_FILES:.o=.c)))
-
[PYTHON::python_netbios]
LIBRARY_REALNAME = samba/netbios.$(SHLIBEXT)
PUBLIC_DEPENDENCIES = LIBCLI_NBT DYNCONFIG LIBSAMBA-HOSTCONFIG
diff --git a/source4/libcli/drsblobs.c b/source4/libcli/drsblobs.c
deleted file mode 100644
index 126f2ccc40..0000000000
--- a/source4/libcli/drsblobs.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
-
- Manually parsed structures found in the DRS protocol
-
- Copyright (C) Andrew Bartlett <abartlet@samba.org> 2008
-
- 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 3 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, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-#include "libcli/drsblobs.h"
-
-/* parser auto-generated by pidl, then hand-modified by abartlet */
-
-/* Modified to have 'count' specified */
-static enum ndr_err_code ndr_push_AuthenticationInformationArray_with_count(struct ndr_push *ndr, int ndr_flags, int count,
- const struct AuthenticationInformationArray *r)
-{
- uint32_t cntr_array_0;
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- for (cntr_array_0 = 0; cntr_array_0 < count; cntr_array_0++) {
- NDR_CHECK(ndr_push_AuthenticationInformation(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
- }
- }
- if (ndr_flags & NDR_BUFFERS) {
- for (cntr_array_0 = 0; cntr_array_0 < count; cntr_array_0++) {
- NDR_CHECK(ndr_push_AuthenticationInformation(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-/* Modified to have 'count' specified, and to allocate the array */
-static enum ndr_err_code ndr_pull_AuthenticationInformationArray_with_count(struct ndr_pull *ndr, int ndr_flags, int count, struct AuthenticationInformationArray *r)
-{
- uint32_t cntr_array_0;
- TALLOC_CTX *_mem_save_array_0;
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_PULL_ALLOC_N(ndr, r->array, count);
- _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
- for (cntr_array_0 = 0; cntr_array_0 < count; cntr_array_0++) {
- NDR_CHECK(ndr_pull_AuthenticationInformation(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
- }
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
- }
- if (ndr_flags & NDR_BUFFERS) {
- for (cntr_array_0 = 0; cntr_array_0 < count; cntr_array_0++) {
- NDR_CHECK(ndr_pull_AuthenticationInformation(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-/* Modified to have 'count' specified */
-_PUBLIC_ void ndr_print_AuthenticationInformationArray_with_count(struct ndr_print *ndr, const char *name, int count, const struct AuthenticationInformationArray *r)
-{
- uint32_t cntr_array_0;
- ndr_print_struct(ndr, name, "AuthenticationInformationArray");
- ndr->depth++;
- ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)1);
- ndr->depth++;
- for (cntr_array_0=0;cntr_array_0<count;cntr_array_0++) {
- char *idx_0=NULL;
- if (asprintf(&idx_0, "[%d]", cntr_array_0) != -1) {
- ndr_print_AuthenticationInformation(ndr, "array", &r->array[cntr_array_0]);
- free(idx_0);
- }
- }
- ndr->depth--;
- ndr->depth--;
-}
-
-/* Modified to call AuthenticationInformationArray with 'count' specified */
-_PUBLIC_ enum ndr_err_code ndr_push_trustAuthInOutBlob(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutBlob *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
- NDR_CHECK(ndr_push_relative_ptr1(ndr, r->current));
- NDR_CHECK(ndr_push_relative_ptr1(ndr, r->previous));
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->current) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->current));
- NDR_CHECK(ndr_push_AuthenticationInformationArray_with_count(ndr, NDR_SCALARS|NDR_BUFFERS, r->count, r->current));
- }
- if (r->previous) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->previous));
- NDR_CHECK(ndr_push_AuthenticationInformationArray_with_count(ndr, NDR_SCALARS|NDR_BUFFERS, r->count, r->previous));
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r)
-{
- uint32_t _ptr_current;
- TALLOC_CTX *_mem_save_current_0;
- uint32_t _ptr_previous;
- TALLOC_CTX *_mem_save_previous_0;
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_current));
- if (_ptr_current) {
- NDR_PULL_ALLOC(ndr, r->current);
- NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->current, _ptr_current));
- } else {
- r->current = NULL;
- }
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_previous));
- if (_ptr_previous) {
- NDR_PULL_ALLOC(ndr, r->previous);
- NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->previous, _ptr_previous));
- } else {
- r->previous = NULL;
- }
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->current) {
- uint32_t _relative_save_offset;
- _relative_save_offset = ndr->offset;
- NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->current));
- _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
- NDR_CHECK(ndr_pull_AuthenticationInformationArray_with_count(ndr, NDR_SCALARS|NDR_BUFFERS, r->count, r->current));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
- ndr->offset = _relative_save_offset;
- }
- if (r->previous) {
- uint32_t _relative_save_offset;
- _relative_save_offset = ndr->offset;
- NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->previous));
- _mem_save_previous_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->previous, 0);
- NDR_CHECK(ndr_pull_AuthenticationInformationArray_with_count(ndr, NDR_SCALARS|NDR_BUFFERS, r->count, r->previous));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_0, 0);
- ndr->offset = _relative_save_offset;
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r)
-{
- ndr_print_struct(ndr, name, "trustAuthInOutBlob");
- ndr->depth++;
- ndr_print_uint32(ndr, "count", r->count);
- ndr_print_ptr(ndr, "current", r->current);
- ndr->depth++;
- if (r->current) {
- ndr_print_AuthenticationInformationArray_with_count(ndr, "current", r->count, r->current);
- }
- ndr->depth--;
- ndr_print_ptr(ndr, "previous", r->previous);
- ndr->depth++;
- if (r->previous) {
- ndr_print_AuthenticationInformationArray_with_count(ndr, "previous", r->count, r->previous);
- }
- ndr->depth--;
- ndr->depth--;
-}
-
-
diff --git a/source4/libcli/drsblobs.h b/source4/libcli/drsblobs.h
deleted file mode 100644
index 8fee4114be..0000000000
--- a/source4/libcli/drsblobs.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
-
- Manually parsed structures found in the DRS protocol
-
- Copyright (C) Andrew Bartlett <abartlet@samba.org> 2008
-
- 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 3 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, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef __LIBCLI_DRSBLOBS_H__
-#define __LIBCLI_DRSBLOBS_H__
-
-#include "librpc/gen_ndr/ndr_drsblobs.h"
-
-#include "libcli/drsblobs_proto.h"
-#endif /* __CLDAP_SERVER_PROTO_H__ */
diff --git a/source4/libcli/raw/clisession.c b/source4/libcli/raw/clisession.c
index ad4ca7b471..38d8f700f2 100644
--- a/source4/libcli/raw/clisession.c
+++ b/source4/libcli/raw/clisession.c
@@ -35,7 +35,8 @@
Initialize the session context
****************************************************************************/
struct smbcli_session *smbcli_session_init(struct smbcli_transport *transport,
- TALLOC_CTX *parent_ctx, bool primary)
+ TALLOC_CTX *parent_ctx, bool primary,
+ struct smbcli_session_options options)
{
struct smbcli_session *session;
uint16_t flags2;
@@ -53,9 +54,7 @@ struct smbcli_session *smbcli_session_init(struct smbcli_transport *transport,
}
session->pid = (uint16_t)getpid();
session->vuid = UID_FIELD_INVALID;
- session->options.lanman_auth = lp_client_lanman_auth(global_loadparm);
- session->options.ntlmv2_auth = lp_client_ntlmv2_auth(global_loadparm);
- session->options.plaintext_auth = lp_client_plaintext_auth(global_loadparm);
+ session->options = options;
capabilities = transport->negotiate.capabilities;
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c
index 15cd70833c..4b5d2dc397 100644
--- a/source4/libcli/raw/clitree.c
+++ b/source4/libcli/raw/clitree.c
@@ -177,7 +177,8 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
struct cli_credentials *credentials,
struct resolve_context *resolve_ctx,
struct event_context *ev,
- struct smbcli_options *options)
+ struct smbcli_options *options,
+ struct smbcli_session_options *session_options)
{
struct smb_composite_connect io;
NTSTATUS status;
@@ -200,6 +201,7 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
* is complete -- abartlet 2008-04-28 */
io.in.workgroup = lp_workgroup(global_loadparm);
io.in.options = *options;
+ io.in.session_options = *session_options;
status = smb_composite_connect(&io, parent_ctx, resolve_ctx, ev);
if (NT_STATUS_IS_OK(status)) {
diff --git a/source4/libcli/security/security.i b/source4/libcli/security/security.i
index 6ba106bb5f..420439d147 100644
--- a/source4/libcli/security/security.i
+++ b/source4/libcli/security/security.i
@@ -105,6 +105,12 @@ typedef struct security_descriptor {
%talloctype(dom_sid);
typedef struct dom_sid {
+ %immutable;
+ uint8_t sid_rev_num;
+ int8_t num_auths;/* [range(0,15)] */
+ uint8_t id_auth[6];
+ uint32_t *sub_auths;
+ %mutable;
%extend {
dom_sid(TALLOC_CTX *mem_ctx, const char *text) {
return dom_sid_parse_talloc(mem_ctx, text);
diff --git a/source4/libcli/security/security.py b/source4/libcli/security/security.py
index c310dde56b..8afb3eda61 100644
--- a/source4/libcli/security/security.py
+++ b/source4/libcli/security/security.py
@@ -147,6 +147,10 @@ security_descriptor_swigregister(security_descriptor)
class Sid(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
+ sid_rev_num = _swig_property(_security.Sid_sid_rev_num_get)
+ num_auths = _swig_property(_security.Sid_num_auths_get)
+ id_auth = _swig_property(_security.Sid_id_auth_get)
+ sub_auths = _swig_property(_security.Sid_sub_auths_get)
def __init__(self, *args, **kwargs):
_security.Sid_swiginit(self,_security.new_Sid(*args, **kwargs))
def __repr__(self):
diff --git a/source4/libcli/security/security_wrap.c b/source4/libcli/security/security_wrap.c
index b7d66b5aec..f7e3c2fb21 100644
--- a/source4/libcli/security/security_wrap.c
+++ b/source4/libcli/security/security_wrap.c
@@ -2712,6 +2712,28 @@ SWIGINTERN void delete_security_token(security_token *self){ talloc_free(self);
SWIGINTERN security_descriptor *new_security_descriptor(TALLOC_CTX *mem_ctx){ return security_descriptor_initialise(mem_ctx); }
SWIGINTERN void delete_security_descriptor(security_descriptor *self){ talloc_free(self); }
+SWIGINTERNINLINE PyObject*
+SWIG_From_unsigned_SS_long (unsigned long value)
+{
+ return (value > LONG_MAX) ?
+ PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value));
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_unsigned_SS_char (unsigned char value)
+{
+ return SWIG_From_unsigned_SS_long (value);
+}
+
+
+SWIGINTERNINLINE PyObject *
+SWIG_From_signed_SS_char (signed char value)
+{
+ return SWIG_From_long (value);
+}
+
+
SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)
{
@@ -3337,6 +3359,98 @@ SWIGINTERN PyObject *security_descriptor_swiginit(PyObject *SWIGUNUSEDPARM(self)
return SWIG_Python_InitShadowInstance(args);
}
+SWIGINTERN PyObject *_wrap_Sid_sid_rev_num_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ dom_sid *arg1 = (dom_sid *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject *swig_obj[1] ;
+ uint8_t result;
+
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_dom_sid, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sid_sid_rev_num_get" "', argument " "1"" of type '" "dom_sid *""'");
+ }
+ arg1 = (dom_sid *)(argp1);
+ result = (uint8_t) ((arg1)->sid_rev_num);
+ resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Sid_num_auths_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ dom_sid *arg1 = (dom_sid *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject *swig_obj[1] ;
+ int8_t result;
+
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_dom_sid, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sid_num_auths_get" "', argument " "1"" of type '" "dom_sid *""'");
+ }
+ arg1 = (dom_sid *)(argp1);
+ result = (int8_t) ((arg1)->num_auths);
+ resultobj = SWIG_From_signed_SS_char((signed char)(result));
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Sid_id_auth_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ dom_sid *arg1 = (dom_sid *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject *swig_obj[1] ;
+ uint8_t *result = 0 ;
+
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_dom_sid, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sid_id_auth_get" "', argument " "1"" of type '" "dom_sid *""'");
+ }
+ arg1 = (dom_sid *)(argp1);
+ result = (uint8_t *)(uint8_t *) ((arg1)->id_auth);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_Sid_sub_auths_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ dom_sid *arg1 = (dom_sid *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ PyObject *swig_obj[1] ;
+ uint32_t *result = 0 ;
+
+ if (!args) SWIG_fail;
+ swig_obj[0] = args;
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_dom_sid, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Sid_sub_auths_get" "', argument " "1"" of type '" "dom_sid *""'");
+ }
+ arg1 = (dom_sid *)(argp1);
+ result = (uint32_t *) ((arg1)->sub_auths);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 );
+ return resultobj;
+fail:
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_new_Sid(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
TALLOC_CTX *arg1 = (TALLOC_CTX *) 0 ;
@@ -3561,6 +3675,10 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"delete_security_descriptor", (PyCFunction)_wrap_delete_security_descriptor, METH_O, NULL},
{ (char *)"security_descriptor_swigregister", security_descriptor_swigregister, METH_VARARGS, NULL},
{ (char *)"security_descriptor_swiginit", security_descriptor_swiginit, METH_VARARGS, NULL},
+ { (char *)"Sid_sid_rev_num_get", (PyCFunction)_wrap_Sid_sid_rev_num_get, METH_O, NULL},
+ { (char *)"Sid_num_auths_get", (PyCFunction)_wrap_Sid_num_auths_get, METH_O, NULL},
+ { (char *)"Sid_id_auth_get", (PyCFunction)_wrap_Sid_id_auth_get, METH_O, NULL},
+ { (char *)"Sid_sub_auths_get", (PyCFunction)_wrap_Sid_sub_auths_get, METH_O, NULL},
{ (char *)"new_Sid", (PyCFunction) _wrap_new_Sid, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Sid___str__", (PyCFunction)_wrap_Sid___str__, METH_O, NULL},
{ (char *)"Sid___eq__", (PyCFunction) _wrap_Sid___eq__, METH_VARARGS | METH_KEYWORDS, NULL},
diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c
index e56339f96b..a4137290bb 100644
--- a/source4/libcli/smb_composite/connect.c
+++ b/source4/libcli/smb_composite/connect.c
@@ -234,7 +234,7 @@ static NTSTATUS connect_negprot(struct composite_context *c,
NT_STATUS_NOT_OK_RETURN(status);
/* next step is a session setup */
- state->session = smbcli_session_init(state->transport, state, true);
+ state->session = smbcli_session_init(state->transport, state, true, io->in.session_options);
NT_STATUS_HAVE_NO_MEMORY(state->session);
/* setup for a tconx (or at least have the structure ready to
diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c
index 9cd02a51f4..ff4f0e7930 100644
--- a/source4/libcli/smb_composite/fetchfile.c
+++ b/source4/libcli/smb_composite/fetchfile.c
@@ -147,6 +147,7 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc
state->connect->in.workgroup = io->in.workgroup;
state->connect->in.options = io->in.options;
+ state->connect->in.session_options = io->in.session_options;
state->creq = smb_composite_connect_send(state->connect, state,
io->in.resolve_ctx, event_ctx);
diff --git a/source4/libcli/smb_composite/fsinfo.c b/source4/libcli/smb_composite/fsinfo.c
index 270d71f518..dc5327a29c 100644
--- a/source4/libcli/smb_composite/fsinfo.c
+++ b/source4/libcli/smb_composite/fsinfo.c
@@ -127,7 +127,8 @@ static void fsinfo_composite_handler(struct composite_context *creq)
composite fsinfo call - connects to a tree and queries a file system information
*/
struct composite_context *smb_composite_fsinfo_send(struct smbcli_tree *tree,
- struct smb_composite_fsinfo *io)
+ struct smb_composite_fsinfo *io,
+ struct resolve_context *resolve_ctx)
{
struct composite_context *c;
struct fsinfo_state *state;
@@ -154,13 +155,14 @@ struct composite_context *smb_composite_fsinfo_send(struct smbcli_tree *tree,
state->connect->in.workgroup = io->in.workgroup;
state->connect->in.options = tree->session->transport->options;
+ state->connect->in.session_options = tree->session->options;
c->state = COMPOSITE_STATE_IN_PROGRESS;
state->stage = FSINFO_CONNECT;
c->private_data = state;
state->creq = smb_composite_connect_send(state->connect, state,
- lp_resolve_context(global_loadparm), c->event_ctx);
+ resolve_ctx, c->event_ctx);
if (state->creq == NULL) goto failed;
@@ -197,9 +199,10 @@ NTSTATUS smb_composite_fsinfo_recv(struct composite_context *c, TALLOC_CTX *mem_
*/
NTSTATUS smb_composite_fsinfo(struct smbcli_tree *tree,
TALLOC_CTX *mem_ctx,
- struct smb_composite_fsinfo *io)
+ struct smb_composite_fsinfo *io,
+ struct resolve_context *resolve_ctx)
{
- struct composite_context *c = smb_composite_fsinfo_send(tree, io);
+ struct composite_context *c = smb_composite_fsinfo_send(tree, io, resolve_ctx);
return smb_composite_fsinfo_recv(c, mem_ctx);
}
diff --git a/source4/libcli/smb_composite/smb_composite.h b/source4/libcli/smb_composite/smb_composite.h
index 7f4b9d73e4..08ca40c833 100644
--- a/source4/libcli/smb_composite/smb_composite.h
+++ b/source4/libcli/smb_composite/smb_composite.h
@@ -57,6 +57,7 @@ struct smb_composite_fetchfile {
const char *workgroup;
const char *filename;
struct smbcli_options options;
+ struct smbcli_session_options session_options;
struct resolve_context *resolve_ctx;
} in;
struct {
@@ -98,6 +99,7 @@ struct smb_composite_connect {
bool fallback_to_anonymous;
const char *workgroup;
struct smbcli_options options;
+ struct smbcli_session_options session_options;
} in;
struct {
struct smbcli_tree *tree;