metze/samba/wip.git
10 years agogit add -f bin/default/librpc/gen_ndr/packet-dcerpc-* master4-mat
Stefan Metzmacher [Mon, 4 Nov 2013 11:16:59 +0000 (12:16 +0100)]
git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*

10 years agopidl-wireshark: insure that we have an entire match for the variable name
Matthieu Patou [Thu, 3 Oct 2013 16:45:19 +0000 (09:45 -0700)]
pidl-wireshark: insure that we have an entire match for the variable name

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoRevert "WHY??? pidl-wireshark: clean case name as they can have no valid char for...
Stefan Metzmacher [Mon, 4 Nov 2013 11:12:24 +0000 (12:12 +0100)]
Revert "WHY??? pidl-wireshark: clean case name as they can have no valid char for variable names"

This reverts commit f4475af36e853041cd18d4f2218cf96c929b5cdc.

10 years agoRevert "WHY??? git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*"
Stefan Metzmacher [Mon, 4 Nov 2013 11:12:21 +0000 (12:12 +0100)]
Revert "WHY??? git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*"

This reverts commit bd7d7078f689eaa20c07640c826ae7880fb6b248.

10 years agoWHY??? git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*
Stefan Metzmacher [Mon, 4 Nov 2013 11:12:00 +0000 (12:12 +0100)]
WHY??? git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*

10 years agoWHY??? pidl-wireshark: clean case name as they can have no valid char for variable...
Matthieu Patou [Sat, 26 Oct 2013 08:12:05 +0000 (01:12 -0700)]
WHY??? pidl-wireshark: clean case name as they can have no valid char for variable names

For instance:
[case(1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))]16drsuapi_DsGetNCChangesMSZIPCtr1
mszip1;

Signed-off-by: Matthieu Patou <mat@matws.net>
WHY
drsuapi_dissect_element_DsGetNCChangesCompressedCtr_val1DRSUAPI_COMPRESSION_TYPE_MSZIP16_mszip1
instead of the simple
drsuapi_dissect_element_DsGetNCChangesCompressedCtr_mszip1
we had before?

10 years agogit add -f bin/default/librpc/gen_ndr/packet-dcerpc-*
Stefan Metzmacher [Mon, 4 Nov 2013 11:01:52 +0000 (12:01 +0100)]
git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*

10 years agopidl-wireshark: SWITCH_TYPE is not always defined use switch_dt->{DATA}->{NAME} when not
Matthieu Patou [Tue, 1 Oct 2013 19:10:18 +0000 (12:10 -0700)]
pidl-wireshark: SWITCH_TYPE is not always defined use switch_dt->{DATA}->{NAME} when not

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agopidl-wireshark: if the element is used as a switch store the value
Matthieu Patou [Sun, 27 Oct 2013 00:14:17 +0000 (17:14 -0700)]
pidl-wireshark: if the element is used as a switch store the value

We might need this value later on

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agogit add -f bin/default/librpc/gen_ndr/packet-dcerpc-*
Stefan Metzmacher [Mon, 4 Nov 2013 10:58:01 +0000 (11:58 +0100)]
git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*

10 years agopidl-wireshark: add the type dom_sid28 and call ad-hoc dissector
Matthieu Patou [Tue, 1 Oct 2013 19:04:02 +0000 (12:04 -0700)]
pidl-wireshark: add the type dom_sid28 and call ad-hoc dissector

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agopidl-wireshark: Do not add the signature of the dissector if it was manually defined
Matthieu Patou [Sun, 27 Oct 2013 00:37:30 +0000 (17:37 -0700)]
pidl-wireshark: Do not add the signature of the dissector if it was manually defined

The signature can be different and as manual dissectors are at the top
of the file they will be defined before being used

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agogit add -f bin/default/librpc/gen_ndr/packet-dcerpc-*
Stefan Metzmacher [Mon, 4 Nov 2013 10:49:09 +0000 (11:49 +0100)]
git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*

10 years agopidl-wireshark: Display Array as block instead of bytes by bytes
Matthieu Patou [Thu, 3 Oct 2013 08:33:43 +0000 (01:33 -0700)]
pidl-wireshark: Display Array as block instead of bytes by bytes

10 years agoRevert "WRONG! pidl-wireshark: generate NDR64 enabled code for enums"
Stefan Metzmacher [Mon, 4 Nov 2013 10:45:25 +0000 (11:45 +0100)]
Revert "WRONG! pidl-wireshark: generate NDR64 enabled code for enums"

This reverts commit 9ad3c406bf83ddf67d82e8971d47cd1f5340707b.

10 years agoRevert "WRONG! git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*"
Stefan Metzmacher [Mon, 4 Nov 2013 10:45:22 +0000 (11:45 +0100)]
Revert "WRONG! git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*"

This reverts commit 6ff2a976b5f7b302e9c0dcb17775331482295536.

10 years agoWRONG! git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*
Stefan Metzmacher [Mon, 4 Nov 2013 10:41:49 +0000 (11:41 +0100)]
WRONG! git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*

10 years agoWRONG! pidl-wireshark: generate NDR64 enabled code for enums
Matthieu Patou [Sun, 29 Sep 2013 09:00:17 +0000 (02:00 -0700)]
WRONG! pidl-wireshark: generate NDR64 enabled code for enums

Signed-off-by: Matthieu Patou <mat@matws.net>
10 years agogit add -f bin/default/librpc/gen_ndr/packet-dcerpc-*
Stefan Metzmacher [Mon, 4 Nov 2013 10:35:11 +0000 (11:35 +0100)]
git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*

10 years agospoolss.idl: make use of enums in spoolss_Field
Stefan Metzmacher [Mon, 4 Nov 2013 10:22:08 +0000 (11:22 +0100)]
spoolss.idl: make use of enums in spoolss_Field

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agogit add -f bin/default/librpc/gen_ndr/packet-dcerpc-*
Stefan Metzmacher [Mon, 4 Nov 2013 10:34:04 +0000 (11:34 +0100)]
git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*

10 years agospoolss.idl: use spoolss_NotifyTable as switch_type for spoolss_NotifyData
Stefan Metzmacher [Mon, 4 Nov 2013 10:12:07 +0000 (11:12 +0100)]
spoolss.idl: use spoolss_NotifyTable as switch_type for spoolss_NotifyData

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agogit add -f bin/default/librpc/gen_ndr/packet-dcerpc-*
Stefan Metzmacher [Mon, 4 Nov 2013 10:32:33 +0000 (11:32 +0100)]
git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*

10 years agodrsuapi.idl: drsuapi_DsGetNCChangesCompressionType is just an enum
Stefan Metzmacher [Mon, 4 Nov 2013 10:04:00 +0000 (11:04 +0100)]
drsuapi.idl: drsuapi_DsGetNCChangesCompressionType is just an enum

This is DRS_COMP_ALG_TYPE is [MS-DRSR].

Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agopidl-wireshark: add a function to change the type of a hf_field
Matthieu Patou [Thu, 3 Oct 2013 08:10:48 +0000 (01:10 -0700)]
pidl-wireshark: add a function to change the type of a hf_field

We can use this to change the type FT_BYTE when we realize that the
object dissected is an array of bytes

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agopidl-wireshark: cosmetic reformat
Matthieu Patou [Thu, 3 Oct 2013 08:07:55 +0000 (01:07 -0700)]
pidl-wireshark: cosmetic reformat

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agogit add -f bin/default/librpc/gen_ndr/packet-dcerpc-*
Stefan Metzmacher [Mon, 4 Nov 2013 09:33:57 +0000 (10:33 +0100)]
git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*

10 years agolibrpc: add idl for DFS-R (frsrtans) blobs
Matthieu Patou [Tue, 1 Oct 2013 18:37:19 +0000 (11:37 -0700)]
librpc: add idl for DFS-R (frsrtans) blobs

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agogit add -f bin/default/librpc/gen_ndr/packet-dcerpc-*
Stefan Metzmacher [Mon, 7 Oct 2013 06:26:42 +0000 (08:26 +0200)]
git add -f bin/default/librpc/gen_ndr/packet-dcerpc-*

10 years agopidl-wireshark: ignore the new Pipe type in typedef
Matthieu Patou [Sun, 29 Sep 2013 07:42:36 +0000 (00:42 -0700)]
pidl-wireshark: ignore the new Pipe type in typedef

Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
10 years agoHACK librpc/idl: --ws-parser
Stefan Metzmacher [Mon, 7 Oct 2013 06:41:49 +0000 (08:41 +0200)]
HACK librpc/idl: --ws-parser

10 years agoRevert "TODO s4-kcc: Sets the isRecyled attributes on deleted entries when needed"
Stefan Metzmacher [Thu, 23 May 2013 06:36:24 +0000 (08:36 +0200)]
Revert "TODO s4-kcc: Sets the isRecyled attributes on deleted entries when needed"

This reverts commit 5ed266d1b3eb6981ca0a4eef14a2139c3c5e63e5.

10 years agoTODO s4-kcc: Sets the isRecyled attributes on deleted entries when needed
Matthieu Patou [Thu, 3 Nov 2011 14:03:11 +0000 (15:03 +0100)]
TODO s4-kcc: Sets the isRecyled attributes on deleted entries when needed

The check-deleted task now checks if the object should have the
isRecycled=TRUE attribute and do have it.

TODO: I think before we add this commit, we should add the simple
isRecycled handling and transfer deleted objects into recycled objects,
instead of always delete records from the database...
NOTE: maybe this already happens by the interaction with the ldb module,
if so, we should add a comments...

10 years agos4-dsdb: instanceType NC_HEAD is only allowed combined with WRITE for an originating...
Nadezhda Ivanova [Tue, 29 Oct 2013 16:17:27 +0000 (18:17 +0200)]
s4-dsdb: instanceType NC_HEAD is only allowed combined with WRITE for an originating add operation

As described in MS-ATDS 3.1.1.5.2.8.

Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date(master): Sun Nov  3 16:17:30 CET 2013 on sn-devel-104

10 years agodoc/msdfs proxy: extend example for multi target config
Björn Jacke [Thu, 31 Oct 2013 11:01:22 +0000 (12:01 +0100)]
doc/msdfs proxy: extend example for multi target config

Signed-off-by: Björn Jacke <bj@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Nov  1 00:12:19 CET 2013 on sn-devel-104

10 years agosmbd: Support multiple dfs targets for msdfs proxy shares
Volker Lendecke [Wed, 30 Oct 2013 13:22:05 +0000 (13:22 +0000)]
smbd: Support multiple dfs targets for msdfs proxy shares

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>
10 years agolibcli/smb: fix smb2cli_ioctl*() against Windows 2008.
Stefan Metzmacher [Mon, 28 Oct 2013 14:43:03 +0000 (15:43 +0100)]
libcli/smb: fix smb2cli_ioctl*() against Windows 2008.

The subsections of [MS-SMB2] "3.2.5.14 Receiving an SMB2 IOCTL Response"
say the client should ignore the InputOffset/InputCount.

We do that only if we ask for max_input_length = 0.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10232

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct 31 01:16:10 CET 2013 on sn-devel-104

10 years agos3:libsmb: SMBC_getatr() if no method worked, try all methods again on next attempt
Gregor Beck [Fri, 18 Oct 2013 13:32:55 +0000 (15:32 +0200)]
s3:libsmb: SMBC_getatr() if no method worked, try all methods again on next attempt

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoclient: use cli_qpathinfo3 for allinfo
Gregor Beck [Mon, 14 Oct 2013 09:44:36 +0000 (11:44 +0200)]
client: use cli_qpathinfo3 for allinfo

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb: cli_qpathinfo3 use cli_qpathinfo2 for smb2
Gregor Beck [Mon, 14 Oct 2013 09:43:45 +0000 (11:43 +0200)]
s3:libsmb: cli_qpathinfo3 use cli_qpathinfo2 for smb2

cli_qpathinfo3 only works (and is only needed as fallback so far) for smb1.
Use cli_qpathinfo2 in the smb2 case to make it universally usable.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoclient: remove a write only variable
Gregor Beck [Fri, 11 Oct 2013 09:05:06 +0000 (11:05 +0200)]
client: remove a write only variable

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb: SMBC_getatr use pathinfo3 for second try
Gregor Beck [Fri, 11 Oct 2013 09:02:24 +0000 (11:02 +0200)]
s3:libsmb: SMBC_getatr use pathinfo3 for second try

The pathinfo2 call might fail against NetApp because it is sending broken
packages.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb: SMBC_getatr do not let ino undefined on success
Gregor Beck [Fri, 11 Oct 2013 09:00:48 +0000 (11:00 +0200)]
s3:libsmb: SMBC_getatr do not let ino undefined on success

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb: SMBC_getatr try pathinfo2 only once
Gregor Beck [Fri, 11 Oct 2013 08:59:59 +0000 (10:59 +0200)]
s3:libsmb: SMBC_getatr try pathinfo2 only once

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb: add function cli_qpathinfo3()
Gregor Beck [Fri, 11 Oct 2013 08:53:45 +0000 (10:53 +0200)]
s3:libsmb: add function cli_qpathinfo3()

This is a reimplemantation of cli_qpathinfo2 without the use of info level
SMB_QFILEINFO_ALL_INFO which leads to broken responses from NetApp.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb: add function cli_qpathinfo_standard()
Gregor Beck [Fri, 11 Oct 2013 08:52:21 +0000 (10:52 +0200)]
s3:libsmb: add function cli_qpathinfo_standard()

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb: pass creation or birth time in cli_qpathinfo_basic()
Gregor Beck [Fri, 11 Oct 2013 08:50:39 +0000 (10:50 +0200)]
s3:libsmb: pass creation or birth time in cli_qpathinfo_basic()

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:modules: nfs4_acls ACLs with zero entries are fine.
Alexander Werth [Thu, 22 Aug 2013 13:01:17 +0000 (15:01 +0200)]
s3:modules: nfs4_acls ACLs with zero entries are fine.

Signed-off-by: Alexander Werth <alexander.werth@de.ibm.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Oct 30 20:31:42 CET 2013 on sn-devel-104

10 years agos3:modules: Fix realloc with zero sized ACLs
Alexander Werth [Tue, 29 Oct 2013 15:20:04 +0000 (16:20 +0100)]
s3:modules: Fix realloc with zero sized ACLs

A realloc with size zero is similar to a free.
Since we return the number of acls that's not an error.

Signed-off-by: Alexander Werth <alexander.werth@de.ibm.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agorpc_server: Fix a typo
Volker Lendecke [Tue, 29 Oct 2013 08:50:01 +0000 (08:50 +0000)]
rpc_server: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agolibrpc-idl: change the drsuapi_DsBindInfoCtr so that it match what is on the wire...
Matthieu Patou [Sun, 20 Oct 2013 20:37:17 +0000 (13:37 -0700)]
librpc-idl: change the drsuapi_DsBindInfoCtr so that it match what is on the wire both in NDR32 and NDR64.

Previous implementation had a problem with NDR64 with uint32 and
uint3264 being in the wrong order

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Oct 30 10:16:02 CET 2013 on sn-devel-104

10 years agos3-rpc_client: Make data pointer const in trans_send().
Andreas Schneider [Thu, 24 Oct 2013 09:49:53 +0000 (11:49 +0200)]
s3-rpc_client: Make data pointer const in trans_send().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Oct 30 01:32:08 CET 2013 on sn-devel-104

10 years agos3-rpc_server: Remove obsolete make_internal_rpc_pipe().
Andreas Schneider [Thu, 24 Oct 2013 08:32:17 +0000 (10:32 +0200)]
s3-rpc_server: Remove obsolete make_internal_rpc_pipe().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Remove obsolete FAKE_FILE_TYPE_NAMED_PIPE handling.
Andreas Schneider [Wed, 23 Oct 2013 15:16:10 +0000 (17:16 +0200)]
s3-rpc_server: Remove obsolete FAKE_FILE_TYPE_NAMED_PIPE handling.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Use make_internal_rpc_pipe_socketpair().
Andreas Schneider [Wed, 23 Oct 2013 15:04:12 +0000 (17:04 +0200)]
s3-rpc_server: Use make_internal_rpc_pipe_socketpair().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Pass the server event context to np_open().
Andreas Schneider [Wed, 23 Oct 2013 15:03:37 +0000 (17:03 +0200)]
s3-rpc_server: Pass the server event context to np_open().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Add make_internal_rpc_pipe_socketpair().
Andreas Schneider [Wed, 25 Sep 2013 09:35:41 +0000 (11:35 +0200)]
s3-rpc_server: Add make_internal_rpc_pipe_socketpair().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-smbd: Do not declare change_to_root_user() twice.
Andreas Schneider [Wed, 23 Oct 2013 09:07:38 +0000 (11:07 +0200)]
s3-smbd: Do not declare change_to_root_user() twice.

This is already in include/proto.h for smbd_shim.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-smbd_shim: Add become_authenticated_pipe_user().
Andreas Schneider [Wed, 23 Oct 2013 09:02:39 +0000 (11:02 +0200)]
s3-smbd_shim: Add become_authenticated_pipe_user().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Add named_pipe_client_init() function.
Andreas Schneider [Wed, 25 Sep 2013 09:34:56 +0000 (11:34 +0200)]
s3-rpc_server: Add named_pipe_client_init() function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Make named_pipe_packet_process a shared functiion.
Andreas Schneider [Wed, 25 Sep 2013 08:25:39 +0000 (10:25 +0200)]
s3-rpc_server: Make named_pipe_packet_process a shared functiion.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Make make_server_pipes_struct a shared function.
Andreas Schneider [Wed, 25 Sep 2013 14:33:00 +0000 (16:33 +0200)]
s3-rpc_server: Make make_server_pipes_struct a shared function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-waf: Create a target for RPC_SOCK_HELPER.
Andreas Schneider [Wed, 23 Oct 2013 08:36:57 +0000 (10:36 +0200)]
s3-waf: Create a target for RPC_SOCK_HELPER.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-waf: Seperate rpc_server and rpc_service.
Andreas Schneider [Wed, 23 Oct 2013 08:24:13 +0000 (10:24 +0200)]
s3-waf: Seperate rpc_server and rpc_service.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-waf: Reorder rpc_server wscript_build file.
Andreas Schneider [Wed, 23 Oct 2013 08:14:01 +0000 (10:14 +0200)]
s3-waf: Reorder rpc_server wscript_build file.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Use new rpc named pipe functions.
Andreas Schneider [Tue, 24 Sep 2013 13:03:48 +0000 (15:03 +0200)]
s3-rpc_server: Use new rpc named pipe functions.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Add make_internal_rpc_pipe().
Andreas Schneider [Tue, 24 Sep 2013 09:28:39 +0000 (11:28 +0200)]
s3-rpc_server: Add make_internal_rpc_pipe().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Add make_external_rpc_pipe() function.
Andreas Schneider [Tue, 24 Sep 2013 09:28:29 +0000 (11:28 +0200)]
s3-rpc_server: Add make_external_rpc_pipe() function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Add npa_state_init() function.
Andreas Schneider [Tue, 24 Sep 2013 09:27:35 +0000 (11:27 +0200)]
s3-rpc_server: Add npa_state_init() function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agolibcli: Add tstream_npa_socketpair() function.
Andreas Schneider [Thu, 19 Sep 2013 12:52:22 +0000 (14:52 +0200)]
libcli: Add tstream_npa_socketpair() function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agorpc_server: Fix a memleak on error exit
Volker Lendecke [Sun, 27 Oct 2013 14:31:44 +0000 (15:31 +0100)]
rpc_server: Fix a memleak on error exit

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Oct 28 10:20:35 CET 2013 on sn-devel-104

10 years agorpc_server: Remove rpc_ep_register_state->mem_ctx
Volker Lendecke [Sun, 27 Oct 2013 14:29:43 +0000 (15:29 +0100)]
rpc_server: Remove rpc_ep_register_state->mem_ctx

We can use the state directly as a parent

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agorpc_server: Fix some uses of tevent_req_nomem
Volker Lendecke [Sun, 27 Oct 2013 14:27:45 +0000 (15:27 +0100)]
rpc_server: Fix some uses of tevent_req_nomem

tevent_req_nomem is to be used in a sequence of async actions where we
have one main request. This is a completely independent loop without one
central tevent_req. tevent_req_nomem is used as a simple way to signal
an out of memory condition to the main request representing the async
sequence. If we don't have such a tevent_req, we need to directly check
for NULL.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agorpc_server: fix a typo
Volker Lendecke [Sun, 27 Oct 2013 14:19:09 +0000 (15:19 +0100)]
rpc_server: fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoauth-kerberos: add the credentials.h so that enum credentials_obtained is defined
Matthieu Patou [Tue, 15 Oct 2013 22:06:57 +0000 (15:06 -0700)]
auth-kerberos: add the credentials.h so that enum credentials_obtained is defined

We had a warning about the enum being defined in the parameter list:
warning: ‘enum credentials_obtained’ declared inside parameter list

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Sun Oct 27 02:25:47 CET 2013 on sn-devel-104

10 years agolibrpc-idl: replace int32 by uint32 as the values are always > 0
Stefan Metzmacher [Mon, 21 Oct 2013 06:40:28 +0000 (08:40 +0200)]
librpc-idl: replace int32 by uint32 as the values are always > 0

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agolibrpc-idl: replace int32 by the enumeration as it's the type that we use in union...
Matthieu Patou [Mon, 21 Oct 2013 03:16:27 +0000 (20:16 -0700)]
librpc-idl: replace int32 by the enumeration as it's the type that we use in union's switch drsuapi_DsGetDCInfoCtrLevels

Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agotorture: add FSCTL_SRV_COPYCHUNK_WRITE access test
David Disseldorp [Sat, 19 Oct 2013 01:47:07 +0000 (03:47 +0200)]
torture: add FSCTL_SRV_COPYCHUNK_WRITE access test

Check that FSCTL_SRV_COPYCHUNK_WRITE succeeds when the copy-chunk target
is opened with SEC_RIGHTS_FILE_WRITE only.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct 25 22:48:59 CEST 2013 on sn-devel-104

10 years agosmb2_ioctl: add support for FSCTL_SRV_COPYCHUNK_WRITE
David Disseldorp [Sat, 19 Oct 2013 01:47:06 +0000 (03:47 +0200)]
smb2_ioctl: add support for FSCTL_SRV_COPYCHUNK_WRITE

FSCTL_SRV_COPYCHUNK can only be used when the client has the copy-chunk
target file open with FILE_WRITE_DATA and FILE_READ_DATA.
FSCTL_SRV_COPYCHUNK_WRITE requires only FILE_WRITE_DATA access on the
target, and is therefore suitable for cp --reflink, which opens the
target file O_WRONLY.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoRevert "smbd: Move oplock/sharemode ops into one place"
Volker Lendecke [Thu, 24 Oct 2013 18:53:36 +0000 (20:53 +0200)]
Revert "smbd: Move oplock/sharemode ops into one place"

This reverts commit 7b70fa18734d9ceb020fe3e5d4cc0c26cd27a484.

This is a change in behaviour which needs much further investigation
and testing.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Oct 25 14:22:20 CEST 2013 on sn-devel-104

10 years agoRevert "smbd: Move oplock handling together"
Volker Lendecke [Thu, 24 Oct 2013 18:53:32 +0000 (20:53 +0200)]
Revert "smbd: Move oplock handling together"

This reverts commit e689b7d51e6ffd848ab10e160dca2c3a03fc750b.

This is a change in behaviour which needs much further investigation
and testing.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agowaf: parse LDFLAGS from python
Steven Siloti [Thu, 24 Oct 2013 03:46:05 +0000 (20:46 -0700)]
waf: parse LDFLAGS from python

The LDFLAGS returned by get_python_variables may contain additional library
search paths. These need to be parsed out and placed in LIBPATH to maintain
correct ordering of search paths in the final link flags.

Specifically, appending LDFLAGS directly to LINKFLAGS on my system was causing
/usr/lib to be the first search path specified. This lead to linking against
installed libraries rather than the versions from the current build.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Oct 25 02:48:35 CEST 2013 on sn-devel-104

10 years agobuild: fix ordering problems with lib-provided and internal RPATHs
Michael Adam [Wed, 16 Oct 2013 13:17:18 +0000 (15:17 +0200)]
build: fix ordering problems with lib-provided and internal RPATHs

When a library or system (like cups) provides an RPATH,
e.g. with -Wl,-R or -Wl,-rpath, this was added by waf
to the LINKFLAGS, wich was later prepended to our RPATH.
But if the path by chance contains an older version of
one of our internal libraries like talloc, this would lead
to linking the too old talloc into our binaries.

This has been observed on, e.g., FreeBSD, but it is a general
problem.

This patch fixes the problem by specially parsing the RPATH
linker options from the pkg-config(, cups-config, ....) output
and putting the paths into the RPATH_<lib> container, which
is then later correctly appended to our internal RPATH.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4-dns: dlz_bind9: Create dns-HOSTNAME account disabled
Samuel Cabrero [Thu, 24 Oct 2013 15:37:06 +0000 (17:37 +0200)]
s4-dns: dlz_bind9: Create dns-HOSTNAME account disabled

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Oct 25 00:39:21 CEST 2013 on sn-devel-104

10 years agos4-openldap: Fixed a problem with provisioning with OpenLdap
Nadezhda Ivanova [Thu, 24 Oct 2013 20:30:05 +0000 (23:30 +0300)]
s4-openldap: Fixed a problem with provisioning with OpenLdap

Credentials are no longer used and there were too many arguments to the
constructor

Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4-dsacl: Fixed incorrect handling of privileges in sec_access_check_ds
Nadezhda Ivanova [Mon, 14 Oct 2013 23:06:38 +0000 (02:06 +0300)]
s4-dsacl: Fixed incorrect handling of privileges in sec_access_check_ds

Restore and backup privileges are not relevant to ldap
access checks, and the TakeOwnership privilege should
grant write_owner right

Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agotorture: Add smb2.oplock.levelII501 test
Volker Lendecke [Tue, 22 Oct 2013 09:18:01 +0000 (09:18 +0000)]
torture: Add smb2.oplock.levelII501 test

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Oct 24 16:15:50 CEST 2013 on sn-devel-104

10 years agosmbd: Move oplock handling together
Volker Lendecke [Thu, 26 Sep 2013 21:18:28 +0000 (14:18 -0700)]
smbd: Move oplock handling together

Later on we will have all the oplock/sharemode operations in one routine.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agosmbd: Move oplock/sharemode ops into one place
Volker Lendecke [Tue, 3 Sep 2013 14:02:09 +0000 (14:02 +0000)]
smbd: Move oplock/sharemode ops into one place

This makes the is_stat_open special case in grant_fsp_oplock_type
redundant because in open_file_ntcreate further up we have already set
oplock_request to NO_OPLOCK for stat opens.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agosmbd: Remove separate oplock_type parameter from set_file_oplock
Volker Lendecke [Tue, 3 Sep 2013 13:57:11 +0000 (13:57 +0000)]
smbd: Remove separate oplock_type parameter from set_file_oplock

This avoids the question where it could happen that something else but
fsp->oplock_type might be useful as an argument here.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agosmbd: Unify parameters to set_oplock_type
Volker Lendecke [Tue, 3 Sep 2013 13:27:49 +0000 (13:27 +0000)]
smbd: Unify parameters to set_oplock_type

Some lines above we set fsp->oplock_type = e->op_type. I don't see
how this might have changed. This change will unify both callers of
set_file_oplock. In the next step the second parameter to set_file_oplock
will be removed.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agosmbd: Make release_file_oplock static
Volker Lendecke [Fri, 13 Sep 2013 11:55:05 +0000 (13:55 +0200)]
smbd: Make release_file_oplock static

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agosmbd: Use remove_oplock() in close_normal_file
Volker Lendecke [Fri, 13 Sep 2013 11:49:20 +0000 (13:49 +0200)]
smbd: Use remove_oplock() in close_normal_file

remove_oplock is a wrapper around release_file_oplock. This streamlines
the exports of oplock.c a bit.

Reason for this patch: In a later patch I will add functionality to
remove_oplock that is required in close_normal_file as well.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agoFix comment showing how to print an ACL to allow debug.
Jeremy Allison [Wed, 23 Oct 2013 22:07:31 +0000 (15:07 -0700)]
Fix comment showing how to print an ACL to allow debug.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agoFix bug 10196 - RW Deny for a specific user is not overriding RW Allow for a group.
Jeremy Allison [Wed, 23 Oct 2013 22:06:40 +0000 (15:06 -0700)]
Fix bug 10196 - RW Deny for a specific user is not overriding RW Allow for a group.

Fix posix_acl tests to match the change in writing ACLs
with ID_TYPE_BOTH.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agoFix bug 10196 - RW Deny for a specific user is not overriding RW Allow for a group.
Jeremy Allison [Mon, 21 Oct 2013 23:59:11 +0000 (16:59 -0700)]
Fix bug 10196 - RW Deny for a specific user is not overriding RW Allow for a group.

When the ID returned is ID_TYPE_BOTH we must *always* add it as both
a user and a group, not just in the owning case. Otherwise DENY
entries are not correctly processed.

Confirmed by the reporter as fixing the problem.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10196

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agotorture: Extend the raw.oplock.level_ii_1 test
Volker Lendecke [Wed, 16 Oct 2013 19:34:15 +0000 (21:34 +0200)]
torture: Extend the raw.oplock.level_ii_1 test

smbd broke to none twice. Make sure this won't happen again :-)

This used to happen before the MSG_SMB_BREAK_RESPONSE merge. In
process_oplock_break_message we did not call remove_oplock, which would
have prevented this.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Oct 23 14:06:13 CEST 2013 on sn-devel-104

10 years agosmbd: Remove MSG_SMB_ASYNC_LEVEL2_BREAK
Volker Lendecke [Tue, 22 Oct 2013 11:37:45 +0000 (11:37 +0000)]
smbd: Remove MSG_SMB_ASYNC_LEVEL2_BREAK

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosmbd: Use MSG_SMB_BREAK_REQUEST for async l2 breaks
Volker Lendecke [Tue, 22 Oct 2013 11:33:42 +0000 (11:33 +0000)]
smbd: Use MSG_SMB_BREAK_REQUEST for async l2 breaks

Now that we transmit the level we want to break to via the msg.op_type
we can unify MSG_SMB_BREAK_REQUEST and MSG_SMB_ASYNC_LEVEL2_BREAK and
thus simplify the code a bit.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosmbd: Fix breaking level2 on OVERWRITE create_disposition
Volker Lendecke [Wed, 16 Oct 2013 19:21:56 +0000 (21:21 +0200)]
smbd: Fix breaking level2 on OVERWRITE create_disposition

This is shown by the new raw.oplock.level_ii_1 test

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>