diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-04-15 22:08:49 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-04-15 22:08:49 +0200 |
commit | 038987543043346cdcd8a4b8fe2970cd1350a7a7 (patch) | |
tree | 63df88d6cc354bd766a4b9b3f36d3e43bf67872b /source4/libcli | |
parent | f01c377bc039b776ded213f455cdb79d682ae7b2 (diff) | |
parent | b708a3d1e7f8d98bc6cedad8d405b1434d32a22e (diff) | |
download | samba-038987543043346cdcd8a4b8fe2970cd1350a7a7.tar.gz samba-038987543043346cdcd8a4b8fe2970cd1350a7a7.tar.bz2 samba-038987543043346cdcd8a4b8fe2970cd1350a7a7.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into registry
(This used to be commit 70ebb22c3df178a26c26c0a25c5722ff9ccdb0b4)
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/auth/config.mk | 9 | ||||
-rw-r--r-- | source4/libcli/config.mk | 130 | ||||
-rw-r--r-- | source4/libcli/ldap/config.mk | 14 | ||||
-rw-r--r-- | source4/libcli/ldap/ldap_ndr.h | 2 | ||||
-rw-r--r-- | source4/libcli/raw/interfaces.h | 18 | ||||
-rw-r--r-- | source4/libcli/security/config.mk | 13 | ||||
-rw-r--r-- | source4/libcli/smb2/config.mk | 29 | ||||
-rw-r--r-- | source4/libcli/smb2/read.c | 13 | ||||
-rw-r--r-- | source4/libcli/wbclient/config.mk | 3 |
9 files changed, 111 insertions, 120 deletions
diff --git a/source4/libcli/auth/config.mk b/source4/libcli/auth/config.mk index f786c71469..85fc4ab527 100644 --- a/source4/libcli/auth/config.mk +++ b/source4/libcli/auth/config.mk @@ -2,15 +2,16 @@ # Start SUBSYSTEM LIBCLI_AUTH [SUBSYSTEM::LIBCLI_AUTH] PRIVATE_PROTO_HEADER = proto.h -OBJ_FILES = credentials.o \ - session.o \ - smbencrypt.o \ - smbdes.o PUBLIC_DEPENDENCIES = \ MSRPC_PARSE \ LIBSAMBA-HOSTCONFIG # End SUBSYSTEM LIBCLI_AUTH ################################# +LIBCLI_AUTH_OBJ_FILES = $(addprefix libcli/auth/, \ + credentials.o \ + session.o \ + smbencrypt.o \ + smbdes.o) PUBLIC_HEADERS += libcli/auth/credentials.h diff --git a/source4/libcli/config.mk b/source4/libcli/config.mk index 0c00fa2740..95b45003be 100644 --- a/source4/libcli/config.mk +++ b/source4/libcli/config.mk @@ -4,120 +4,125 @@ mkinclude security/config.mk mkinclude wbclient/config.mk [SUBSYSTEM::LIBSAMBA-ERRORS] -OBJ_FILES = util/doserr.o \ - util/errormap.o \ - util/nterr.o \ +LIBSAMBA-ERRORS_OBJ_FILES = $(addprefix libcli/util/, doserr.o errormap.o nterr.o) PUBLIC_HEADERS += $(addprefix libcli/, util/error.h util/ntstatus.h util/doserr.h util/werror.h) [SUBSYSTEM::LIBCLI_LSA] PRIVATE_PROTO_HEADER = util/clilsa.h -OBJ_FILES = util/clilsa.o PUBLIC_DEPENDENCIES = RPC_NDR_LSA PRIVATE_DEPENDENCIES = LIBSECURITY +LIBCLI_LSA_OBJ_FILES = libcli/util/clilsa.o + [SUBSYSTEM::LIBCLI_COMPOSITE] PRIVATE_PROTO_HEADER = composite/proto.h -OBJ_FILES = \ - composite/composite.o PUBLIC_DEPENDENCIES = LIBEVENTS +LIBCLI_COMPOSITE_OBJ_FILES = libcli/composite/composite.o + [SUBSYSTEM::LIBCLI_SMB_COMPOSITE] PRIVATE_PROTO_HEADER = smb_composite/proto.h -OBJ_FILES = \ - smb_composite/loadfile.o \ - smb_composite/savefile.o \ - smb_composite/connect.o \ - smb_composite/sesssetup.o \ - smb_composite/fetchfile.o \ - smb_composite/appendacl.o \ - smb_composite/fsinfo.o PUBLIC_DEPENDENCIES = LIBCLI_COMPOSITE CREDENTIALS gensec LIBCLI_RESOLVE +LIBCLI_SMB_COMPOSITE_OBJ_FILES = $(addprefix libcli/smb_composite/, \ + loadfile.o \ + savefile.o \ + connect.o \ + sesssetup.o \ + fetchfile.o \ + appendacl.o \ + fsinfo.o) + + [SUBSYSTEM::NDR_NBT_BUF] PRIVATE_PROTO_HEADER = nbt/nbtname.h -OBJ_FILES = nbt/nbtname.o + +NDR_NBT_BUF_OBJ_FILES = libcli/nbt/nbtname.o [SUBSYSTEM::LIBCLI_NBT] -#VERSION = 0.0.1 -#SO_VERSION = 0 PRIVATE_PROTO_HEADER = nbt/nbt_proto.h -OBJ_FILES = \ - nbt/nbtsocket.o \ - nbt/namequery.o \ - nbt/nameregister.o \ - nbt/namerefresh.o \ - nbt/namerelease.o PUBLIC_DEPENDENCIES = LIBNDR NDR_NBT LIBCLI_COMPOSITE LIBEVENTS \ NDR_SECURITY samba-socket LIBSAMBA-UTIL +LIBCLI_NBT_OBJ_FILES = $(addprefix libcli/nbt/, \ + nbtsocket.o \ + namequery.o \ + nameregister.o \ + namerefresh.o \ + namerelease.o) + [PYTHON::python_libcli_nbt] SWIG_FILE = swig/libcli_nbt.i PUBLIC_DEPENDENCIES = LIBCLI_NBT DYNCONFIG LIBSAMBA-HOSTCONFIG +python_libcli_nbt_OBJ_FILES = libcli/swig/libcli_nbt_wrap.o + [PYTHON::python_libcli_smb] SWIG_FILE = swig/libcli_smb.i PUBLIC_DEPENDENCIES = LIBCLI_SMB DYNCONFIG LIBSAMBA-HOSTCONFIG +python_libcli_smb_OBJ_FILES = libcli/swig/libcli_smb_wrap.o + [SUBSYSTEM::LIBCLI_DGRAM] -OBJ_FILES = \ - dgram/dgramsocket.o \ - dgram/mailslot.o \ - dgram/netlogon.o \ - dgram/ntlogon.o \ - dgram/browse.o PUBLIC_DEPENDENCIES = LIBCLI_NBT LIBNDR LIBCLI_RESOLVE +LIBCLI_DGRAM_OBJ_FILES = $(addprefix libcli/dgram/, \ + dgramsocket.o \ + mailslot.o \ + netlogon.o \ + ntlogon.o \ + browse.o) + [SUBSYSTEM::LIBCLI_CLDAP] -OBJ_FILES = cldap/cldap.o PUBLIC_DEPENDENCIES = LIBCLI_LDAP PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL LIBLDB +LIBCLI_CLDAP_OBJ_FILES = libcli/cldap/cldap.o # PUBLIC_HEADERS += libcli/cldap/cldap.h [SUBSYSTEM::LIBCLI_WREPL] PRIVATE_PROTO_HEADER = wrepl/winsrepl_proto.h -OBJ_FILES = \ - wrepl/winsrepl.o PUBLIC_DEPENDENCIES = NDR_WINSREPL samba-socket LIBCLI_RESOLVE LIBEVENTS \ LIBPACKET LIBNDR +LIBCLI_WREPL_OBJ_FILES = libcli/wrepl/winsrepl.o + [SUBSYSTEM::LIBCLI_RESOLVE] PRIVATE_PROTO_HEADER = resolve/proto.h -OBJ_FILES = \ - resolve/resolve.o PUBLIC_DEPENDENCIES = NDR_NBT +LIBCLI_RESOLVE_OBJ_FILES = libcli/resolve/resolve.o + [SUBSYSTEM::LP_RESOLVE] PRIVATE_PROTO_HEADER = resolve/lp_proto.h -OBJ_FILES = \ - resolve/bcast.o \ - resolve/nbtlist.o \ - resolve/wins.o \ - resolve/host.o \ - resolve/resolve_lp.o PRIVATE_DEPENDENCIES = LIBCLI_NBT LIBSAMBA-HOSTCONFIG LIBNETIF +LP_RESOLVE_OBJ_FILES = $(addprefix libcli/resolve/, \ + bcast.o nbtlist.o wins.o \ + host.o resolve_lp.o) + [SUBSYSTEM::LIBCLI_FINDDCS] PRIVATE_PROTO_HEADER = finddcs.h -OBJ_FILES = \ - finddcs.o PUBLIC_DEPENDENCIES = LIBCLI_NBT MESSAGING +LIBCLI_FINDDCS_OBJ_FILES = libcli/finddcs.o + [SUBSYSTEM::LIBCLI_SMB] PRIVATE_PROTO_HEADER = libcli_proto.h -OBJ_FILES = clireadwrite.o \ +PUBLIC_DEPENDENCIES = LIBCLI_RAW LIBSAMBA-ERRORS LIBCLI_AUTH \ + LIBCLI_SMB_COMPOSITE LIBCLI_NBT LIBSECURITY LIBCLI_RESOLVE \ + LIBCLI_DGRAM LIBCLI_SMB2 LIBCLI_FINDDCS samba-socket + +LIBCLI_SMB_OBJ_FILES = $(addprefix libcli/, \ + clireadwrite.o \ cliconnect.o \ clifile.o \ clilist.o \ clitrans2.o \ climessage.o \ - clideltree.o -PUBLIC_DEPENDENCIES = LIBCLI_RAW LIBSAMBA-ERRORS LIBCLI_AUTH \ - LIBCLI_SMB_COMPOSITE LIBCLI_NBT LIBSECURITY LIBCLI_RESOLVE \ - LIBCLI_DGRAM LIBCLI_SMB2 LIBCLI_FINDDCS samba-socket - + clideltree.o) # PUBLIC_HEADERS += libcli/libcli.h @@ -126,28 +131,11 @@ PRIVATE_PROTO_HEADER = raw/raw_proto.h PRIVATE_DEPENDENCIES = LIBCLI_COMPOSITE LP_RESOLVE gensec LIBCLI_RESOLVE LIBSECURITY LIBNDR #LDFLAGS = $(LIBCLI_SMB_COMPOSITE_OUTPUT) PUBLIC_DEPENDENCIES = samba-socket LIBPACKET gensec LIBCRYPTO CREDENTIALS -OBJ_FILES = raw/rawfile.o \ - raw/smb_signing.o \ - raw/clisocket.o \ - raw/clitransport.o \ - raw/clisession.o \ - raw/clitree.o \ - raw/clierror.o \ - raw/rawrequest.o \ - raw/rawreadwrite.o \ - raw/rawsearch.o \ - raw/rawsetfileinfo.o \ - raw/raweas.o \ - raw/rawtrans.o \ - raw/clioplock.o \ - raw/rawnegotiate.o \ - raw/rawfsinfo.o \ - raw/rawfileinfo.o \ - raw/rawnotify.o \ - raw/rawioctl.o \ - raw/rawacl.o \ - raw/rawdate.o \ - raw/rawlpq.o \ - raw/rawshadow.o + +LIBCLI_RAW_OBJ_FILES = $(addprefix libcli/raw/, rawfile.o smb_signing.o clisocket.o \ + clitransport.o clisession.o clitree.o clierror.o rawrequest.o \ + rawreadwrite.o rawsearch.o rawsetfileinfo.o raweas.o rawtrans.o \ + clioplock.o rawnegotiate.o rawfsinfo.o rawfileinfo.o rawnotify.o \ + rawioctl.o rawacl.o rawdate.o rawlpq.o rawshadow.o) mkinclude smb2/config.mk diff --git a/source4/libcli/ldap/config.mk b/source4/libcli/ldap/config.mk index 0c5236c138..33e32c7417 100644 --- a/source4/libcli/ldap/config.mk +++ b/source4/libcli/ldap/config.mk @@ -1,17 +1,17 @@ [SUBSYSTEM::LIBCLI_LDAP] PRIVATE_PROTO_HEADER = ldap_proto.h -OBJ_FILES = ldap.o \ - ldap_client.o \ - ldap_bind.o \ - ldap_msg.o \ - ldap_ildap.o \ - ldap_controls.o PUBLIC_DEPENDENCIES = LIBSAMBA-ERRORS LIBEVENTS LIBPACKET PRIVATE_DEPENDENCIES = LIBCLI_COMPOSITE samba-socket NDR_SAMR LIBTLS ASN1_UTIL \ LDAP_ENCODE LIBNDR LP_RESOLVE gensec +LIBCLI_LDAP_OBJ_FILES = $(addprefix libcli/ldap/, \ + ldap.o ldap_client.o ldap_bind.o \ + ldap_msg.o ldap_ildap.o ldap_controls.o) + + PUBLIC_HEADERS += libcli/ldap/ldap.h libcli/ldap/ldap_ndr.h [SUBSYSTEM::LDAP_ENCODE] -OBJ_FILES = ldap_ndr.o # FIXME PRIVATE_DEPENDENCIES = LIBLDB + +LDAP_ENCODE_OBJ_FILES = libcli/ldap/ldap_ndr.o diff --git a/source4/libcli/ldap/ldap_ndr.h b/source4/libcli/ldap/ldap_ndr.h index dfbb723c36..ee1f702c78 100644 --- a/source4/libcli/ldap/ldap_ndr.h +++ b/source4/libcli/ldap/ldap_ndr.h @@ -1,6 +1,8 @@ #ifndef __LIBCLI_LDAP_LDAP_NDR_H__ #define __LIBCLI_LDAP_LDAP_NDR_H__ +#include "librpc/gen_ndr/ndr_misc.h" + char *ldap_encode_ndr_uint32(TALLOC_CTX *mem_ctx, uint32_t value); char *ldap_encode_ndr_dom_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid); char *ldap_encode_ndr_GUID(TALLOC_CTX *mem_ctx, struct GUID *guid); diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h index 3965c58204..61441b2cdc 100644 --- a/source4/libcli/raw/interfaces.h +++ b/source4/libcli/raw/interfaces.h @@ -1706,19 +1706,27 @@ union smb_read { /* static body buffer 48 (0x30) bytes */ /* uint16_t buffer_code; 0x31 = 0x30 + 1 */ - uint16_t _pad; + uint8_t _pad; + uint8_t reserved; uint32_t length; uint64_t offset; /* struct smb2_handle handle; */ - uint64_t unknown1; /* 0x0000000000000000 */ - uint64_t unknown2; /* 0x0000000000000000 */ + uint32_t min_count; + uint32_t channel; + uint32_t remaining; + /* the docs give no indication of what + these channel variables are for */ + uint16_t channel_offset; + uint16_t channel_length; } in; struct { /* static body buffer 16 (0x10) bytes */ /* uint16_t buffer_code; 0x11 = 0x10 + 1 */ - /* uint16_t data_ofs; */ + /* uint8_t data_ofs; */ + /* uint8_t reserved; */ /* uint32_t data_size; */ - uint64_t unknown1; /* 0x0000000000000000 */ + uint32_t remaining; + uint32_t reserved; /* dynamic body */ DATA_BLOB data; diff --git a/source4/libcli/security/config.mk b/source4/libcli/security/config.mk index 8c66df0325..fde065aa34 100644 --- a/source4/libcli/security/config.mk +++ b/source4/libcli/security/config.mk @@ -1,13 +1,14 @@ [SUBSYSTEM::LIBSECURITY] PRIVATE_PROTO_HEADER = proto.h -OBJ_FILES = security_token.o \ - security_descriptor.o \ - dom_sid.o \ - access_check.o \ - privilege.o \ - sddl.o PUBLIC_DEPENDENCIES = NDR_MISC LIBNDR +LIBSECURITY_OBJ_FILES = $(addprefix libcli/security/, \ + security_token.o security_descriptor.o \ + dom_sid.o access_check.o privilege.o sddl.o) + + [PYTHON::swig_security] SWIG_FILE = security.i PRIVATE_DEPENDENCIES = LIBSECURITY + +swig_security_OBJ_FILES = libcli/security/security_wrap.o diff --git a/source4/libcli/smb2/config.mk b/source4/libcli/smb2/config.mk index ab079fefde..e95997db54 100644 --- a/source4/libcli/smb2/config.mk +++ b/source4/libcli/smb2/config.mk @@ -1,25 +1,10 @@ [SUBSYSTEM::LIBCLI_SMB2] PRIVATE_PROTO_HEADER = smb2_proto.h -OBJ_FILES = \ - transport.o \ - request.o \ - negprot.o \ - session.o \ - tcon.o \ - create.o \ - close.o \ - connect.o \ - getinfo.o \ - write.o \ - read.o \ - setinfo.o \ - find.o \ - ioctl.o \ - logoff.o \ - tdis.o \ - flush.o \ - lock.o \ - notify.o \ - cancel.o \ - keepalive.o PUBLIC_DEPENDENCIES = LIBCLI_RAW LIBPACKET gensec + +LIBCLI_SMB2_OBJ_FILES = $(addprefix libcli/smb2/, \ + transport.o request.o negprot.o session.o tcon.o \ + create.o close.o connect.o getinfo.o write.o read.o \ + setinfo.o find.o ioctl.o logoff.o tdis.o flush.o \ + lock.o notify.o cancel.o keepalive.o) + diff --git a/source4/libcli/smb2/read.c b/source4/libcli/smb2/read.c index b61f918481..9d40e32a4d 100644 --- a/source4/libcli/smb2/read.c +++ b/source4/libcli/smb2/read.c @@ -33,12 +33,16 @@ struct smb2_request *smb2_read_send(struct smb2_tree *tree, struct smb2_read *io req = smb2_request_init_tree(tree, SMB2_OP_READ, 0x30, true, 0); if (req == NULL) return NULL; - SSVAL(req->out.body, 0x02, 0); /* pad */ + SCVAL(req->out.body, 0x02, 0); /* pad */ + SCVAL(req->out.body, 0x03, 0); /* reserved */ SIVAL(req->out.body, 0x04, io->in.length); SBVAL(req->out.body, 0x08, io->in.offset); smb2_push_handle(req->out.body+0x10, &io->in.file.handle); - SBVAL(req->out.body, 0x20, io->in.unknown1); - SBVAL(req->out.body, 0x28, io->in.unknown2); + SIVAL(req->out.body, 0x20, io->in.min_count); + SIVAL(req->out.body, 0x24, io->in.channel); + SIVAL(req->out.body, 0x28, io->in.remaining); + SSVAL(req->out.body, 0x2C, io->in.channel_offset); + SSVAL(req->out.body, 0x2E, io->in.channel_length); smb2_transport_send(req); @@ -67,7 +71,8 @@ NTSTATUS smb2_read_recv(struct smb2_request *req, return status; } - io->out.unknown1 = BVAL(req->in.body, 0x08); + io->out.remaining = IVAL(req->in.body, 0x08); + io->out.reserved = IVAL(req->in.body, 0x0C); return smb2_request_destroy(req); } diff --git a/source4/libcli/wbclient/config.mk b/source4/libcli/wbclient/config.mk index 9384a172ff..94e30d44f1 100644 --- a/source4/libcli/wbclient/config.mk +++ b/source4/libcli/wbclient/config.mk @@ -1,4 +1,5 @@ [SUBSYSTEM::LIBWBCLIENT] -OBJ_FILES = wbclient.o PUBLIC_DEPENDENCIES = LIBSAMBA-ERRORS LIBEVENTS PRIVATE_DEPENDENCIES = NDR_WINBIND MESSAGING + +LIBWBCLIENT_OBJ_FILES = libcli/wbclient/wbclient.o |