samba.git
10 years agoRevert "libwbclient4: Add wbc_sids_to_xids"
Volker Lendecke [Tue, 18 Feb 2014 08:50:44 +0000 (09:50 +0100)]
Revert "libwbclient4: Add wbc_sids_to_xids"

This reverts commit fefc59619b58cb0c38bf7e6ac2ebcc25a5ebbd6c.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "source4: Use wbc_sids_to_xids"
Volker Lendecke [Tue, 18 Feb 2014 08:50:37 +0000 (09:50 +0100)]
Revert "source4: Use wbc_sids_to_xids"

This reverts commit de7122ddc356697777cce95d22b3fab7697b30db.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "libwbclient4: Add wbc_xids_to_sids"
Volker Lendecke [Tue, 18 Feb 2014 08:50:30 +0000 (09:50 +0100)]
Revert "libwbclient4: Add wbc_xids_to_sids"

This reverts commit f275ce4e4367478b488810491c7bcd993c37caf1.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "source4: Use wbc_xids_to_sids"
Volker Lendecke [Tue, 18 Feb 2014 08:50:23 +0000 (09:50 +0100)]
Revert "source4: Use wbc_xids_to_sids"

This reverts commit d0932a1ae089fda0d41be21a9916caeca7c0c233.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "libwbclient4: Remove unused composite-based functions"
Volker Lendecke [Tue, 18 Feb 2014 08:50:16 +0000 (09:50 +0100)]
Revert "libwbclient4: Remove unused composite-based functions"

This reverts commit ba5f02739cb454d2312f73f643f2c119e090ac5e.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "auth4: security_token_to_unix_token only needs a tevent_context"
Volker Lendecke [Tue, 18 Feb 2014 08:50:10 +0000 (09:50 +0100)]
Revert "auth4: security_token_to_unix_token only needs a tevent_context"

This reverts commit 1de725c2926b526200032c4f46132c17533986c7.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "auth4: auth_session_info_fill_unix only needs a tevent_context"
Volker Lendecke [Tue, 18 Feb 2014 08:50:03 +0000 (09:50 +0100)]
Revert "auth4: auth_session_info_fill_unix only needs a tevent_context"

This reverts commit 75d7c4609c1c743f84ca9f2d0666aece9e5200d4.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "auth4: Do not generate just a temporary wbc_context"
Volker Lendecke [Tue, 18 Feb 2014 08:49:56 +0000 (09:49 +0100)]
Revert "auth4: Do not generate just a temporary wbc_context"

This reverts commit 5124a9e1183de990ca3146cd355152094495a779.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "pvfs: Use the tevent_context from the ntvfs_context"
Volker Lendecke [Tue, 18 Feb 2014 08:49:49 +0000 (09:49 +0100)]
Revert "pvfs: Use the tevent_context from the ntvfs_context"

This reverts commit 15700a9f6e5393cecf78052f510e015300c5bd85.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "unixuid: Use the tevent_context from the ntvfs_context"
Volker Lendecke [Tue, 18 Feb 2014 08:49:42 +0000 (09:49 +0100)]
Revert "unixuid: Use the tevent_context from the ntvfs_context"

This reverts commit 25e83a9b3e72cdb84c09ef8ada4784efd110f09a.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "dcesrv_unixinfo: No wbc_context required"
Volker Lendecke [Tue, 18 Feb 2014 08:49:35 +0000 (09:49 +0100)]
Revert "dcesrv_unixinfo: No wbc_context required"

This reverts commit 5a4252789b54b6b270b3083f6e0732ba1fdd774b.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "ntvfs_posix: No wbc_context required"
Volker Lendecke [Tue, 18 Feb 2014 08:49:28 +0000 (09:49 +0100)]
Revert "ntvfs_posix: No wbc_context required"

This reverts commit 55dd08c4e80827ffc4fe423f3e67aec499af06df.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "ntvfs_unixuid: No wbc_context required"
Volker Lendecke [Tue, 18 Feb 2014 08:49:21 +0000 (09:49 +0100)]
Revert "ntvfs_unixuid: No wbc_context required"

This reverts commit f35f88d741f1f896268649238d4ddbda4abb1585.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "auth4: Remove unused wbc_context"
Volker Lendecke [Tue, 18 Feb 2014 08:49:13 +0000 (09:49 +0100)]
Revert "auth4: Remove unused wbc_context"

This reverts commit 6b04558c5e0547a807ac0fcb5eeb1085cfe602ac.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "winbind4: Remove unused winbind_get_idmap irpc operation"
Volker Lendecke [Tue, 18 Feb 2014 09:12:28 +0000 (09:12 +0000)]
Revert "winbind4: Remove unused winbind_get_idmap irpc operation"

This reverts commit 41ff0f4454ef23d0ac3e31560d78a2b966769fea.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos4:pyrpc: let dcerpc_interface_new() use py_dcerpc_interface_init_helper()
Stefan Metzmacher [Sat, 15 Feb 2014 09:19:29 +0000 (10:19 +0100)]
s4:pyrpc: let dcerpc_interface_new() use py_dcerpc_interface_init_helper()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Feb 17 21:39:30 CET 2014 on sn-devel-104

10 years agos4:pyrpc: fix talloc hierachy in py_dcerpc_interface_init_helper()
Stefan Metzmacher [Sat, 15 Feb 2014 09:12:04 +0000 (10:12 +0100)]
s4:pyrpc: fix talloc hierachy in py_dcerpc_interface_init_helper()

The tevent_context is cached under the connection,
so we need to make sure it stays arround as long as the connection.

Otherwise it will segfault while dereferencing the tevent_context
on deallocation if a secondary connection is arround.

This completes commit 4cc3388c034fa43c855fba802a30bbd2e78122be,
which only fixed it in dcerpc_interface_new().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agotdb: always open internal databases with incompatible hash.
Michael Adam [Mon, 10 Feb 2014 15:23:48 +0000 (16:23 +0100)]
tdb: always open internal databases with incompatible hash.

This makes them more efficient due to better distribution
of keys across hash chains.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Feb 15 08:26:07 CET 2014 on sn-devel-104

10 years agotdb: in tdb_delete_hash, make lock/unlock bracket more obvious
Michael Adam [Thu, 13 Feb 2014 16:03:46 +0000 (17:03 +0100)]
tdb: in tdb_delete_hash, make lock/unlock bracket more obvious

by using the same variable as hash as in the lock.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Feb 15 03:21:07 CET 2014 on sn-devel-104

10 years agotdb: simplify tdb_delete_hash() a bit
Michael Adam [Thu, 13 Feb 2014 15:48:35 +0000 (16:48 +0100)]
tdb: simplify tdb_delete_hash() a bit

Make the lock/unlock bracket more obvious by extracting
locking (and finding) from the special cases to the top
of the function. This also lets us take lock and find
the record outside the special case branches (use dead
records or not).

There is a small semantic change implied:

In the dead records case, the record to delete is looked
up before the current dead records are potentially purged.
Hence, if the record to delete is not found, the dead
records are also not purge. This does not make a big
difference though, because purging is only delayed until
directly befor the next record to delete is in fact found.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotdb: tdbtool: dump record magic with fixed number of 8 hex digits
Michael Adam [Wed, 12 Feb 2014 10:14:26 +0000 (11:14 +0100)]
tdb: tdbtool: dump record magic with fixed number of 8 hex digits

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotdb: tdbtool: dump record hash with fixed number of 8 hex digits
Michael Adam [Wed, 12 Feb 2014 10:13:18 +0000 (11:13 +0100)]
tdb: tdbtool: dump record hash with fixed number of 8 hex digits

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agowinbindd: Use the right flags in dsgetdcname
Volker Lendecke [Fri, 14 Feb 2014 10:14:15 +0000 (10:14 +0000)]
winbindd: Use the right flags in dsgetdcname

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Feb 14 21:59:22 CET 2014 on sn-devel-104

10 years agoregedit_valuelist.c: Coverity fix; Initialize a variable.
Christopher R. Hertel (crh) [Fri, 14 Feb 2014 17:41:24 +0000 (11:41 -0600)]
regedit_valuelist.c: Coverity fix; Initialize a variable.

The <tmp> variable is tested at the end of the function to determine the
return value, but <tmp> is never initialized and there are conditions
under which it may be tested before a value is set.

This patch initializes <tmp> to NULL, which means that WERR_NOMEM will
be returned if the registry lookups fail.

CID:  1168007

Signed-off-by: Christopher R. Hertel (crh) <crh@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:smb2_notify: fix use after free on long living notify requests
Stefan Metzmacher [Thu, 30 Jan 2014 15:12:44 +0000 (16:12 +0100)]
s3:smb2_notify: fix use after free on long living notify requests

This is a hack, but it should fix the bug:

   change_notify_add_request() talloc moves smb_request away,
   which is not expected by the smb2_notify.c code...

   smbd_smb2_notify_reply() uses tevent_req_defer_callback()
   (in older versions an immediate event) to defer the response.
   This is needed as change_notify_reply() will do more things
   after calling reply_fn() (smbd_smb2_notify_reply is this case)
   and often change_notify_remove_request() is called after
   change_notify_reply().

   change_notify_remove_request() implicitly free's the smb_request
   that was passed to change_notify_add_request().

   smbd_smb2_fake_smb_request() added the smb_request as smb2req->smb1req,
   which is expected to be available after smbd_smb2_notify_recv() returned.

The long term solution would be the following interface:

struct tevent_req *change_notify_request_send(TALLOC_CTX *mem_ctx,
                                              struct tevent_context *ev,
                                              struct files_struct *fsp,
                                              uint32_t max_length,
                                              uint32_t filter,
                                              bool recursive);
NTSTATUS change_notify_request_recv(struct tevent_req *req,
                                    TALLOC_CTX *mem_ctx,
                                    DATA_BLOB *buffer);

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Feb 14 11:18:15 CET 2014 on sn-devel-104

10 years agoctdb:vacuum: move retrieval of freelist to after vacuum run
Michael Adam [Mon, 10 Feb 2014 01:44:56 +0000 (02:44 +0100)]
ctdb:vacuum: move retrieval of freelist to after vacuum run

The fast vacuum run may have increased the freelist size.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Feb 14 03:15:30 CET 2014 on sn-devel-104

10 years agoctdb:vacuum: fix debug message typo in add_record_to_delete_list()
Michael Adam [Thu, 13 Feb 2014 15:44:04 +0000 (16:44 +0100)]
ctdb:vacuum: fix debug message typo in add_record_to_delete_list()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agolibrpc/nbt: increase MAX_COMPONENTS limit for nbt_names.
Günther Deschner [Tue, 4 Feb 2014 15:38:46 +0000 (16:38 +0100)]
librpc/nbt: increase MAX_COMPONENTS limit for nbt_names.

domains with more then 10 subdomains are not so uncommon.

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

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Feb 13 16:30:50 CET 2014 on sn-devel-104

10 years agos3-dsgetdcname: print IP address for LDAP ping.
Günther Deschner [Thu, 30 Jan 2014 15:01:10 +0000 (16:01 +0100)]
s3-dsgetdcname: print IP address for LDAP ping.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agolibrpc/rpc: finaly make struct dcerpc_binding private
Stefan Metzmacher [Fri, 31 Jan 2014 20:13:54 +0000 (21:13 +0100)]
librpc/rpc: finaly make struct dcerpc_binding private

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Feb 13 13:55:47 CET 2014 on sn-devel-104

10 years agos4:librpc/rpc: make dcerpc_pipe->binding const
Stefan Metzmacher [Wed, 12 Feb 2014 11:24:29 +0000 (12:24 +0100)]
s4:librpc/rpc: make dcerpc_pipe->binding const

This should not be changed after the connection is
ready for requests.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: pass dcerpc_binding arround as 'const'
Stefan Metzmacher [Wed, 12 Feb 2014 11:19:48 +0000 (12:19 +0100)]
s4:librpc/rpc: pass dcerpc_binding arround as 'const'

This should only be modified by the owner.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: only pass down dcecli_connection to the low level connect functions
Stefan Metzmacher [Wed, 12 Feb 2014 09:48:52 +0000 (10:48 +0100)]
s4:librpc/rpc: only pass down dcecli_connection to the low level connect functions

They don't need dcerpc_pipe.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: don't create a ncacn_np: binding
Stefan Metzmacher [Wed, 12 Feb 2014 09:48:52 +0000 (10:48 +0100)]
s4:librpc/rpc: don't create a ncacn_np: binding

It's up to the caller to store the dcerpc_pipe->binding.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: use dcerpc_binding_get_string_option() for "host" and "target_hostname"
Stefan Metzmacher [Tue, 4 Feb 2014 09:03:09 +0000 (10:03 +0100)]
s4:librpc/rpc: use dcerpc_binding_get_string_option() for "host" and "target_hostname"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: use dcerpc_binding_get_string_option("target_principal")
Stefan Metzmacher [Tue, 4 Feb 2014 02:05:37 +0000 (03:05 +0100)]
s4:librpc/rpc: use dcerpc_binding_get_string_option("target_principal")

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: make use of dcerpc_binding_get_string_option("endpoint")
Stefan Metzmacher [Tue, 4 Feb 2014 10:30:38 +0000 (11:30 +0100)]
s4:librpc/rpc: make use of dcerpc_binding_get_string_option("endpoint")

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/libnet: make use of dcerpc_binding_get_string_option("host")
Stefan Metzmacher [Tue, 4 Feb 2014 11:14:37 +0000 (12:14 +0100)]
s4:torture/libnet: make use of dcerpc_binding_get_string_option("host")

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: make use of dcerpc_binding_get_string_option("host")
Stefan Metzmacher [Tue, 4 Feb 2014 11:14:37 +0000 (12:14 +0100)]
s4:torture/rpc: make use of dcerpc_binding_get_string_option("host")

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/drs: make use of dcerpc_binding_get_string_option("host")
Stefan Metzmacher [Tue, 4 Feb 2014 11:14:37 +0000 (12:14 +0100)]
s4:torture/drs: make use of dcerpc_binding_get_string_option("host")

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/drs: use make use of dcerpc_binding_get_string_option("host")
Stefan Metzmacher [Tue, 4 Feb 2014 09:07:15 +0000 (10:07 +0100)]
s4:torture/drs: use make use of dcerpc_binding_get_string_option("host")

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/drs: make use of dcerpc_binding_set_flags()
Stefan Metzmacher [Tue, 4 Feb 2014 09:05:29 +0000 (10:05 +0100)]
s4:torture/drs: make use of dcerpc_binding_set_flags()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: make use of dcerpc_binding_set_flags()
Stefan Metzmacher [Tue, 4 Feb 2014 09:05:29 +0000 (10:05 +0100)]
s4:torture/rpc: make use of dcerpc_binding_set_flags()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: make use of dcerpc_binding_get_flags()
Stefan Metzmacher [Tue, 4 Feb 2014 09:02:28 +0000 (10:02 +0100)]
s4:librpc/rpc: make use of dcerpc_binding_get_flags()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: use dcerpc_binding_set_abstract_syntax() in epmapper.c
Stefan Metzmacher [Thu, 30 Jan 2014 08:14:00 +0000 (09:14 +0100)]
s4:torture/rpc: use dcerpc_binding_set_abstract_syntax() in epmapper.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: make use of dcerpc_binding_set_abstract_syntax() in epmapper.c
Stefan Metzmacher [Tue, 4 Feb 2014 01:31:10 +0000 (02:31 +0100)]
s4:torture/rpc: make use of dcerpc_binding_set_abstract_syntax() in epmapper.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: make use of dcerpc_binding_set_flags()
Stefan Metzmacher [Thu, 30 Jan 2014 18:40:20 +0000 (19:40 +0100)]
s4:torture/rpc: make use of dcerpc_binding_set_flags()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: make use of dcerpc_binding_set_*() in torture_rpc_scanner()
Stefan Metzmacher [Thu, 30 Jan 2014 18:08:07 +0000 (19:08 +0100)]
s4:torture/rpc: make use of dcerpc_binding_set_*() in torture_rpc_scanner()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: make use of dcerpc_binding_[g|s]et_transport()
Stefan Metzmacher [Thu, 30 Jan 2014 18:05:06 +0000 (19:05 +0100)]
s4:torture/rpc: make use of dcerpc_binding_[g|s]et_transport()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture: use dcerpc_binding_get_string_option("host") in smbtorture.c
Stefan Metzmacher [Tue, 4 Feb 2014 11:14:37 +0000 (12:14 +0100)]
s4:torture: use dcerpc_binding_get_string_option("host") in smbtorture.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:winbind: make use of dcerpc_binding_[g|s]et_flags()
Stefan Metzmacher [Tue, 4 Feb 2014 08:55:11 +0000 (09:55 +0100)]
s4:winbind: make use of dcerpc_binding_[g|s]et_flags()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:winbind: don't access dcerpc_binding internals in init_domain_binding()
Stefan Metzmacher [Thu, 30 Jan 2014 08:11:48 +0000 (09:11 +0100)]
s4:winbind: don't access dcerpc_binding internals in init_domain_binding()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:dsdb/repl: make use of dcerpc_binding_get_string_option("host")
Stefan Metzmacher [Tue, 4 Feb 2014 11:14:37 +0000 (12:14 +0100)]
s4:dsdb/repl: make use of dcerpc_binding_get_string_option("host")

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:dsdb/repl: make dreplsrv_get_target_principal() static
Stefan Metzmacher [Tue, 4 Feb 2014 02:07:30 +0000 (03:07 +0100)]
s4:dsdb/repl: make dreplsrv_get_target_principal() static

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:dsdb/repl: make use of dcerpc_binding_set_string_option("target_principal")
Stefan Metzmacher [Tue, 4 Feb 2014 02:07:00 +0000 (03:07 +0100)]
s4:dsdb/repl: make use of dcerpc_binding_set_string_option("target_principal")

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:rpc_server/remote: use dcerpc_binding_set_*() in remote_op_bind()
Stefan Metzmacher [Tue, 4 Feb 2014 01:06:06 +0000 (02:06 +0100)]
s4:rpc_server/remote: use dcerpc_binding_set_*() in remote_op_bind()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:rpc_server/remote: use ndr_table_by_syntax() in remote_op_bind()
Stefan Metzmacher [Tue, 4 Feb 2014 01:05:20 +0000 (02:05 +0100)]
s4:rpc_server/remote: use ndr_table_by_syntax() in remote_op_bind()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:rpc_server/epmapper: make use of dcerpc_binding_set_abstract_syntax() in build_ep_...
Stefan Metzmacher [Tue, 4 Feb 2014 01:33:03 +0000 (02:33 +0100)]
s4:rpc_server/epmapper: make use of dcerpc_binding_set_abstract_syntax() in build_ep_list()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:rpc_server: make use of dcerpc_binding_get_transport()
Stefan Metzmacher [Thu, 30 Jan 2014 18:01:34 +0000 (19:01 +0100)]
s4:rpc_server: make use of dcerpc_binding_get_transport()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:rpc_server: make use of dcerpc_binding_get_string_option("endpoint")
Stefan Metzmacher [Tue, 4 Feb 2014 10:32:03 +0000 (11:32 +0100)]
s4:rpc_server: make use of dcerpc_binding_get_string_option("endpoint")

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:rpc_server: use dcerpc_binding_get_*() in endpoints_match()
Stefan Metzmacher [Thu, 30 Jan 2014 18:00:09 +0000 (19:00 +0100)]
s4:rpc_server: use dcerpc_binding_get_*() in endpoints_match()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:lib/com/dcom: use dcerpc_parse_binding() to create the binding
Stefan Metzmacher [Thu, 6 Feb 2014 17:58:52 +0000 (18:58 +0100)]
s4:lib/com/dcom: use dcerpc_parse_binding() to create the binding

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: add const to libnet_JoinDomain->out.samr_binding
Stefan Metzmacher [Wed, 12 Feb 2014 11:23:28 +0000 (12:23 +0100)]
s4:libnet: add const to libnet_JoinDomain->out.samr_binding

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: use helper functions to access dcerpc_binding->target_hostname
Stefan Metzmacher [Tue, 4 Feb 2014 08:59:54 +0000 (09:59 +0100)]
s4:libnet: use helper functions to access dcerpc_binding->target_hostname

If possible also specify the already known address as dcerpc_binding->host.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: make use of dcerpc_binding_get_string_option("host")
Stefan Metzmacher [Tue, 4 Feb 2014 11:14:37 +0000 (12:14 +0100)]
s4:libnet: make use of dcerpc_binding_get_string_option("host")

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: make use of dcerpc_binding_set_flags()
Stefan Metzmacher [Tue, 4 Feb 2014 08:57:07 +0000 (09:57 +0100)]
s4:libnet: make use of dcerpc_binding_set_flags()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: make use of dcerpc_binding_[g|s]et_*() in libnet_join.c
Stefan Metzmacher [Thu, 30 Jan 2014 21:04:11 +0000 (22:04 +0100)]
s4:libnet: make use of dcerpc_binding_[g|s]et_*() in libnet_join.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: use 'const struct dcerpc_binding' for local readonly variables
Stefan Metzmacher [Wed, 12 Feb 2014 11:22:11 +0000 (12:22 +0100)]
s4:libnet: use 'const struct dcerpc_binding' for local readonly variables

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet: make use of dcerpc_binding_get_*() in libnet_rpc.c
Stefan Metzmacher [Thu, 30 Jan 2014 21:02:49 +0000 (22:02 +0100)]
s4:libnet: make use of dcerpc_binding_get_*() in libnet_rpc.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:srv_epmapper: make use of dcerpc_binding_get_abstract_syntax()
Stefan Metzmacher [Tue, 4 Feb 2014 01:32:29 +0000 (02:32 +0100)]
s3:srv_epmapper: make use of dcerpc_binding_get_abstract_syntax()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:srv_epmapper: make use of dcerpc_binding_*() functions in build_ep_list()
Stefan Metzmacher [Fri, 31 Jan 2014 20:10:41 +0000 (21:10 +0100)]
s3:srv_epmapper: make use of dcerpc_binding_*() functions in build_ep_list()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:srv_epmapper: use dcerpc_binding_get_abstract_syntax() in _epm_Insert()
Stefan Metzmacher [Fri, 31 Jan 2014 20:10:41 +0000 (21:10 +0100)]
s3:srv_epmapper: use dcerpc_binding_get_abstract_syntax() in _epm_Insert()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:srv_epmapper: use dcerpc_binding_get_transport() in _epm_Insert() and _epm_Delete()
Stefan Metzmacher [Fri, 31 Jan 2014 20:10:41 +0000 (21:10 +0100)]
s3:srv_epmapper: use dcerpc_binding_get_transport() in _epm_Insert() and _epm_Delete()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:srv_epmapper: make use of dcerpc_binding_*() functions in endpoints_match()
Stefan Metzmacher [Fri, 31 Jan 2014 22:26:43 +0000 (23:26 +0100)]
s3:srv_epmapper: make use of dcerpc_binding_*() functions in endpoints_match()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:dcerpc_ep: make use of dcerpc_binding_set_abstract_syntax()
Stefan Metzmacher [Tue, 4 Feb 2014 01:31:44 +0000 (02:31 +0100)]
s3:dcerpc_ep: make use of dcerpc_binding_set_abstract_syntax()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:dcerpc_ep: make use of dcerpc_binding helper functions
Stefan Metzmacher [Thu, 30 Jan 2014 11:52:34 +0000 (12:52 +0100)]
s3:dcerpc_ep: make use of dcerpc_binding helper functions

We should not dereference 'struct dcerpc_binding'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpc_server: make use of dcerpc_binding_set_abstract_syntax()
Stefan Metzmacher [Thu, 30 Jan 2014 22:09:50 +0000 (23:09 +0100)]
s3:rpc_server: make use of dcerpc_binding_set_abstract_syntax()

This is better than accessing the dcerpc_binding internals.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpcclient: make use of dcerpc_binding_get_string_option("host")
Stefan Metzmacher [Tue, 4 Feb 2014 11:14:37 +0000 (12:14 +0100)]
s3:rpcclient: make use of dcerpc_binding_get_string_option("host")

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpcclient: make use of dcerpc_binding_set_abstract_syntax() in cmd_epmapper.c
Stefan Metzmacher [Thu, 30 Jan 2014 21:05:51 +0000 (22:05 +0100)]
s3:rpcclient: make use of dcerpc_binding_set_abstract_syntax() in cmd_epmapper.c

We should not use dcerpc_binding internals.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpcclient: make use of dcerpc_binding_[g|s]et_*() in rpcclient.c
Stefan Metzmacher [Thu, 30 Jan 2014 21:06:53 +0000 (22:06 +0100)]
s3:rpcclient: make use of dcerpc_binding_[g|s]et_*() in rpcclient.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos3:rpc_client: avoid using dcerpc_binding internals in rpc_pipe_get_tcp_port()
Stefan Metzmacher [Thu, 30 Jan 2014 08:26:26 +0000 (09:26 +0100)]
s3:rpc_client: avoid using dcerpc_binding internals in rpc_pipe_get_tcp_port()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: make use of dcerpc_binding_get_*() in dcerpc_connect.c
Stefan Metzmacher [Thu, 30 Jan 2014 21:00:44 +0000 (22:00 +0100)]
s4:librpc/rpc: make use of dcerpc_binding_get_*() in dcerpc_connect.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: remove unused dcerpc_pipe->assoc_group_id
Stefan Metzmacher [Tue, 4 Feb 2014 01:52:35 +0000 (02:52 +0100)]
s4:librpc/rpc: remove unused dcerpc_pipe->assoc_group_id

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:libnet_become_dc: make use of dcerpc_binding_[g|s]et_assoc_group_id()
Stefan Metzmacher [Tue, 4 Feb 2014 01:51:16 +0000 (02:51 +0100)]
s4:libnet_become_dc: make use of dcerpc_binding_[g|s]et_assoc_group_id()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:rpc_server/remote: make use of dcerpc_binding_get_assoc_group_id()
Stefan Metzmacher [Tue, 4 Feb 2014 01:50:18 +0000 (02:50 +0100)]
s4:rpc_server/remote: make use of dcerpc_binding_get_assoc_group_id()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: make use of dcerpc_binding_get_assoc_group_id() in handles.c
Stefan Metzmacher [Tue, 4 Feb 2014 01:49:58 +0000 (02:49 +0100)]
s4:torture/rpc: make use of dcerpc_binding_get_assoc_group_id() in handles.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:torture/rpc: make use of dcerpc_binding_set_*() in torture_rpc_connection_transport()
Stefan Metzmacher [Thu, 30 Jan 2014 18:06:28 +0000 (19:06 +0100)]
s4:torture/rpc: make use of dcerpc_binding_set_*() in torture_rpc_connection_transport()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: make use of dcerpc_binding_[g|s]et_assoc_group_id()
Stefan Metzmacher [Tue, 4 Feb 2014 01:51:16 +0000 (02:51 +0100)]
s4:librpc/rpc: make use of dcerpc_binding_[g|s]et_assoc_group_id()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: make use of dcerpc_binding_[g|s]et_* functions in dcerpc_epm_map_bindi...
Stefan Metzmacher [Sat, 25 Jan 2014 10:14:36 +0000 (11:14 +0100)]
s4:librpc/rpc: make use of dcerpc_binding_[g|s]et_* functions in dcerpc_epm_map_binding_send()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: always call dcerpc_binding_set_abstract_syntax() in dcerpc_epm_map_bin...
Stefan Metzmacher [Sat, 25 Jan 2014 10:14:36 +0000 (11:14 +0100)]
s4:librpc/rpc: always call dcerpc_binding_set_abstract_syntax() in dcerpc_epm_map_binding_send()

We should always set the abstract syntax even if we don't ask the endpoint
mapper.

By using dcerpc_binding_set_abstract_syntax() instead of calling
binding->object = table->syntax_id, we will be able to separate
the abstract_syntax from the object uuid in future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/rpc: the table argument to dcerpc_epm_map_binding_send() isn't optional
Stefan Metzmacher [Wed, 12 Feb 2014 07:58:08 +0000 (08:58 +0100)]
s4:librpc/rpc: the table argument to dcerpc_epm_map_binding_send() isn't optional

We already dereference it unchecked later, so we can avoid some indentation.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/rpc: make use of dcerpc_binding_set*() in dcerpc_binding_from_tower()
Stefan Metzmacher [Mon, 3 Feb 2014 08:11:32 +0000 (09:11 +0100)]
librpc/rpc: make use of dcerpc_binding_set*() in dcerpc_binding_from_tower()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/rpc: use dcerpc_binding_get_*() in dcerpc_default_transport_endpoint()
Stefan Metzmacher [Thu, 30 Jan 2014 08:09:04 +0000 (09:09 +0100)]
librpc/rpc: use dcerpc_binding_get_*() in dcerpc_default_transport_endpoint()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/tests: add dcerpc_binding assoc_group_id tests
Stefan Metzmacher [Tue, 11 Feb 2014 06:28:53 +0000 (07:28 +0100)]
s4:librpc/tests: add dcerpc_binding assoc_group_id tests

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/tests: add dcerpc_binding target_hostname/target_principal tests
Stefan Metzmacher [Tue, 11 Feb 2014 06:28:53 +0000 (07:28 +0100)]
s4:librpc/tests: add dcerpc_binding target_hostname/target_principal tests

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agos4:librpc/tests: use dcerpc_binding_get*() functions
Stefan Metzmacher [Fri, 7 Feb 2014 15:17:04 +0000 (16:17 +0100)]
s4:librpc/tests: use dcerpc_binding_get*() functions

We should not dereference struct dcerpc_binding.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/rpc: avoid loosing data with dcerpc_binding_string() -> dcerpc_parse_binding()
Stefan Metzmacher [Fri, 7 Feb 2014 13:50:11 +0000 (14:50 +0100)]
librpc/rpc: avoid loosing data with dcerpc_binding_string() -> dcerpc_parse_binding()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/rpc: add dcerpc_binding_[g|s]et_abstract_syntax()
Stefan Metzmacher [Sat, 25 Jan 2014 10:31:14 +0000 (11:31 +0100)]
librpc/rpc: add dcerpc_binding_[g|s]et_abstract_syntax()

For now this is just an alternate wrapper to
access binding->object.

Currently callers are reusing binding->object to store the
abstract syntax id instead of just the object uuid.

Some services on Windows use the same GUID for the
'object' and the 'abstract syntax', but they are completely
different things!

Most services use a null object guid, some reuse the
guid of the abstract syntax and use it like a 'class' object.

But the object guid is only really used by DCOM,
in order to call functions relative to an object instance,
which a dynamically allocated object guid.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/rpc: allow "assoc_group_id" in dcerpc_binding_[g|s]et_string()
Stefan Metzmacher [Tue, 11 Feb 2014 18:33:09 +0000 (19:33 +0100)]
librpc/rpc: allow "assoc_group_id" in dcerpc_binding_[g|s]et_string()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agolibrpc/rpc: add dcerpc_binding_[g|s]et_assoc_group_id()
Stefan Metzmacher [Sat, 25 Jan 2014 10:22:52 +0000 (11:22 +0100)]
librpc/rpc: add dcerpc_binding_[g|s]et_assoc_group_id()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>