[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Thu Jan 16 10:22:04 MST 2014


The branch, master has been updated
       via  dc561b7 dcerpc.idl: make use of union dcerpc_bind_ack_reason and fix all callers.
       via  7a62a35 s4:librpc/rpc: change dcerpc_map_reason() into dcerpc_map_nak_reason()
       via  0648f6e s4:librpc/rpc: add dcerpc_map_ack_reason()
       via  572ea36 dcerpc.idl: make use of dcerpc_bind_nak_reason
       via  3d4a2be dcerpc.idl: make use of dcerpc_bind_ack_result
       via  2019e41 dcerpc.idl: add enums and bitmaps for dcerpc_bind_ack_result, dcerpc_bind_[ack|nak]_reason
       via  e6fc989 dcerpc.idl: add a bitmap for dcerpc_pfc_flags
       via  e891652 dcerpc.idl: use logical dcerpc_object ordering
       via  1a0eddb s4:torture/libnet: fix compiler warnings in libnet_lookup.c
       via  61a8525c s4:torture/libnet: check the result of libnet_LookupName()
       via  e5ac78e s4:torture/rpc: remove compiler warnings in ntsvcs.c
       via  6ad66f4 s4:torture/rpc: remove compiler warnings in spoolss_notify.c
       via  c5e9956 s4:torture/rpc: s/pipe/pipes/
       via  943e186 s4:torture/rpc: remove unused variables from alter_context.c
       via  7d201c0 s3:rpcclient: remove unused code from cmd_lsa_get_username()
       via  dd42daa s3:rpcclient: add support for DCERPC_AUTH_LEVEL_CONNECT
       via  9b2dc0e s4:librpc: remove dcerpc_event_context()
       via  0400025 s4:torture/rpc: avoid using dcerpc_event_context()
       via  095daba s4:torture/rpc: avoid usage of p->conn->event_ctx
       via  16f4f2f s4:torture/libnet: remove bogus usage of p->conn->event_ctx
       via  124a896 s4:winbind: let wb_samr_userdomgroups_send() take tevent_context/dcerpc_binding_handle
       via  ad14fb9 s4:winbind: let wb_lsa_lookupnames_send() take tevent_context/dcerpc_binding_handle
       via  5559cdf s4:winbind: let wb_lsa_lookupsids_send() take tevent_context/dcerpc_binding_handle
       via  59bc7cb s4:winbind: make clear that we use the global tevent_context
       via  00d616e s4:winbind: correctly fill the libnet_context lsa and samr binding handles
       via  d9573ae s4:libnet: let libnet_rpc_usermod() take tevent_context/dcerpc_binding_handle
       via  f33a558 s4:libnet: let libnet_rpc_usermod_send() take tevent_context/dcerpc_binding_handle
       via  5bbcec0 s4:libnet: let libnet_rpc_userdel() take tevent_context/dcerpc_binding_handle
       via  0fdf392 s4:libnet: let libnet_rpc_userdel_send() take tevent_context/dcerpc_binding_handle
       via  adef841 s4:libnet: let libnet_rpc_useradd() take tevent_context/dcerpc_binding_handle
       via  e3b8df2 s4:libnet: let libnet_rpc_useradd_send() take tevent_context/dcerpc_binding_handle
       via  208991e s4:libnet: let libnet_rpc_userinfo() take tevent_context/dcerpc_binding_handle
       via  59fb19e s4:libnet: let libnet_rpc_userinfo_send() take tevent_context/dcerpc_binding_handle
       via  3c02eab s4:libnet: remove unused libnet_rpc_groupdel* code
       via  7a97662 s4:libnet: let libnet_rpc_groupadd() take tevent_context/dcerpc_binding_handle
       via  1c6a2f8 s4:libnet: let libnet_rpc_groupadd_send() take tevent_context/dcerpc_binding_handle
       via  959d94b s4:libnet: let libnet_rpc_groupinfo() take tevent_context/dcerpc_binding_handle
       via  0b3b0d2 s4:libnet: let libnet_rpc_groupinfo_send() take tevent_context/dcerpc_binding_handle
       via  6e5943a s4:libnet: avoid using dcecli_connection->event_ctx
       via  c477850 s4:libnet: keep a dcerpc_binding_handle for samr and lsa
      from  55b431f s3:dbwrap: Use milliseconds for "Held tdb lock" message

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit dc561b7e2d92988adbcc390116f08e6b5266cccc
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jan 9 16:00:23 2014 +0100

    dcerpc.idl: make use of union dcerpc_bind_ack_reason and fix all callers.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>
    
    Autobuild-User(master): Günther Deschner <gd at samba.org>
    Autobuild-Date(master): Thu Jan 16 18:21:40 CET 2014 on sn-devel-104

commit 7a62a3557773133456d8c4521d9440cb1aaef273
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jan 9 16:22:03 2014 +0100

    s4:librpc/rpc: change dcerpc_map_reason() into dcerpc_map_nak_reason()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 0648f6e66e36fdfed96828cf41af87b9d99ede41
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jan 9 16:20:46 2014 +0100

    s4:librpc/rpc: add dcerpc_map_ack_reason()
    
    This is not the value as dcerpc_bind_ack_reason values are not the same
    as dcerpc_bind_nak_reason values.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 572ea36c79ffaca1950fc27303d665a283b5be96
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jan 9 15:59:56 2014 +0100

    dcerpc.idl: make use of dcerpc_bind_nak_reason
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 3d4a2be29f570263103d96f8fb32bfd019d34a1c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jan 9 15:58:46 2014 +0100

    dcerpc.idl: make use of dcerpc_bind_ack_result
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 2019e41d53b23b51fc610d08a787add6a2851dc1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jan 9 15:56:45 2014 +0100

    dcerpc.idl: add enums and bitmaps for dcerpc_bind_ack_result, dcerpc_bind_[ack|nak]_reason
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit e6fc98989a4c0d184ef310360d42741f61baa7db
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jan 11 11:52:37 2014 +0100

    dcerpc.idl: add a bitmap for dcerpc_pfc_flags
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit e891652339bbfa192f88c9d22d78c78ed0fc8511
Author: David Disseldorp <ddiss at samba.org>
Date:   Mon Jan 6 06:20:08 2014 +0100

    dcerpc.idl: use logical dcerpc_object ordering
    
    This IDL code:
    typedef [nodiscriminant] union {
    	[default] dcerpc_empty empty;
    	[case(LIBNDR_FLAG_OBJECT_PRESENT)] GUID object;
    } dcerpc_object;
    
    Compiles into the following default-before-case marshalling code:
    switch (level) {
    	default: {
    		NDR_CHECK(ndr_push_dcerpc_empty(ndr, NDR_SCALARS, &r->empty));
    	break; }
    
    	case LIBNDR_FLAG_OBJECT_PRESENT: {
    		NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->object));
    	break; }
    
    }
    
    The default entry before case does not change the flow of execution but
    is more logical when present at the end of the switch statement.
    
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 1a0eddbe6c3e89097ff35d5c38e411e09e3f4d30
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 16:38:38 2014 +0100

    s4:torture/libnet: fix compiler warnings in libnet_lookup.c
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 61a8525c8e6f7408d06c155cfc97dba5054a2a1d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 16:38:38 2014 +0100

    s4:torture/libnet: check the result of libnet_LookupName()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit e5ac78e8b54ac0d8b7070d47dfde278860902d76
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 16:37:36 2014 +0100

    s4:torture/rpc: remove compiler warnings in ntsvcs.c
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 6ad66f49a81530fc28b6f17fef6ffe84ae512533
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 16:37:36 2014 +0100

    s4:torture/rpc: remove compiler warnings in spoolss_notify.c
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit c5e9956b4c5f4eb9a89704f44e9cb145bbea3cfd
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Jan 10 13:46:34 2014 +0100

    s4:torture/rpc: s/pipe/pipes/
    
    pipe(2) is a system call.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 943e186b7a8fe82fdb80e87879dec29a990a99a2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Jan 10 13:44:51 2014 +0100

    s4:torture/rpc: remove unused variables from alter_context.c
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 7d201c096e215dd356ee94f19d137f4b24b56094
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Jan 13 10:18:02 2014 +0100

    s3:rpcclient: remove unused code from cmd_lsa_get_username()
    
    lsa_GetUserName() doesn't require a policy handle.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit dd42daa98dd0ba86116396a64d5e27826ffe2b49
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Jan 13 10:16:40 2014 +0100

    s3:rpcclient: add support for DCERPC_AUTH_LEVEL_CONNECT
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 9b2dc0e46c154dccdc2f567442bca86bd807b17b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 14:19:56 2014 +0100

    s4:librpc: remove dcerpc_event_context()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 040002523758e187d0485b07c87078bb3e371bed
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:34:58 2014 +0100

    s4:torture/rpc: avoid using dcerpc_event_context()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 095daba81d9799fa174e50b31d4e908ad2605786
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:30:44 2014 +0100

    s4:torture/rpc: avoid usage of p->conn->event_ctx
    
    torture_suite_add_rpc_iface_tcase() uses tctx->ev,
    which means p->conn->event_ctx and tctx->ev are the same.
    
    As we want to get rid of per connection tevent_context pointers,
    we should use tctx->ev.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 16f4f2f0c758c09d369c44ced60c68860431263a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:27:10 2014 +0100

    s4:torture/libnet: remove bogus usage of p->conn->event_ctx
    
    ctx->event_ctx and p->conn->event_ctx already have the same value
    as torture->ev.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 124a89698b9eb6d77405ba3ee51c52dad32f9f95
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:winbind: let wb_samr_userdomgroups_send() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit ad14fb95453a9c3a0902047520bb460eca181c31
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:winbind: let wb_lsa_lookupnames_send() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 5559cdf5c2d3569f4e365f39c8515fe2917221f3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:winbind: let wb_lsa_lookupsids_send() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 59bc7cb0df59c0030ff404e845b3fda048c6ef73
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 11:55:19 2014 +0100

    s4:winbind: make clear that we use the global tevent_context
    
    We should avoid using the tevent_context pointer on a
    dcecli_connection, it's the same as the global per task one
    anyway.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 00d616e104b4828a157492fa0c8c09b981bcdfb9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jan 16 01:00:18 2014 +0100

    s4:winbind: correctly fill the libnet_context lsa and samr binding handles
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit d9573ae076cec193e5970ddb393452a0f2d98c08
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:libnet: let libnet_rpc_usermod() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit f33a558750435600ab63f26abd71de9f4f0a30f6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:libnet: let libnet_rpc_usermod_send() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 5bbcec0c2a626f005ae71490a4530fdb6b7088ad
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:libnet: let libnet_rpc_userdel() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 0fdf392e6ace8deb14b5b12faaf27deb5545ac1b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:libnet: let libnet_rpc_userdel_send() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit adef841a59d50badc8e5d357a24c617303705f5b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:libnet: let libnet_rpc_useradd() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit e3b8df2b09457746464ac919d04b8e57ebd643e9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:libnet: let libnet_rpc_useradd_send() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 208991e497d137d27bc5afb33d4cbf32de67ddee
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:libnet: let libnet_rpc_userinfo() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 59fb19ebc475c50cb50c4d6ff41a68a9c7414b3b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:libnet: let libnet_rpc_userinfo_send() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 3c02eab24850d8fe1bf88783f3350442b113ab1f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:libnet: remove unused libnet_rpc_groupdel* code
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 7a97662bb53e8b048a02fec79d167f2466f4233f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:libnet: let libnet_rpc_groupadd() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 1c6a2f8bca06d34fd14f498a09948875ad049d7c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:libnet: let libnet_rpc_groupadd_send() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 959d94b153aa1add5caeac528e966e79298ce7ca
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:libnet: let libnet_rpc_groupinfo() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 0b3b0d225f8485ab0cf392b26f72f7dd5d9c180f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 12:11:17 2014 +0100

    s4:libnet: let libnet_rpc_groupinfo_send() take tevent_context/dcerpc_binding_handle
    
    This avoids usage/dereferencing 'struct dcerpc_pipe'.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 6e5943af941c2fa2f435b88a52e80d61d9ed3772
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 14 11:58:15 2014 +0100

    s4:libnet: avoid using dcecli_connection->event_ctx
    
    We should avoid per connection tevent_contexts,
    the one per libnet_context isn't much better, but a start.
    
    Note the pointers have the same value.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit c4778504677429457af26957c7c1daec44d1096b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jan 16 13:31:43 2014 +0100

    s4:libnet: keep a dcerpc_binding_handle for samr and lsa
    
    This completes commit a3ae9802d47f7a39030be089d15fc42f8e8917e6.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 librpc/idl/dcerpc.idl                  |   84 ++++++++++---
 selftest/knownfail                     |    9 --
 source3/rpc_client/cli_pipe.c          |    2 +-
 source3/rpc_server/srv_pipe.c          |    8 +-
 source3/rpcclient/cmd_lsarpc.c         |   10 --
 source3/rpcclient/rpcclient.c          |   23 ++--
 source4/libnet/groupinfo.c             |   29 +++--
 source4/libnet/groupman.c              |  216 ++------------------------------
 source4/libnet/groupman.h              |   11 --
 source4/libnet/libnet_group.c          |   21 +++-
 source4/libnet/libnet_rpc.c            |    7 +-
 source4/libnet/libnet_user.c           |   40 ++++--
 source4/libnet/userinfo.c              |   28 +++--
 source4/libnet/userman.c               |   68 ++++++-----
 source4/librpc/rpc/dcerpc.c            |   60 ++++++---
 source4/librpc/rpc/dcerpc.h            |    1 -
 source4/rpc_server/dcerpc_server.c     |    4 +-
 source4/torture/libnet/groupinfo.c     |    6 +-
 source4/torture/libnet/groupman.c      |   10 +-
 source4/torture/libnet/libnet_domain.c |    7 -
 source4/torture/libnet/libnet_lookup.c |    7 +-
 source4/torture/libnet/userinfo.c      |   12 ++-
 source4/torture/libnet/userman.c       |   13 ++-
 source4/torture/rpc/alter_context.c    |    5 -
 source4/torture/rpc/async_bind.c       |    8 +-
 source4/torture/rpc/echo.c             |    4 +-
 source4/torture/rpc/netlogon.c         |    2 +-
 source4/torture/rpc/ntsvcs.c           |   17 ++--
 source4/torture/rpc/spoolss_notify.c   |    7 +-
 source4/winbind/wb_async_helpers.c     |   37 +++---
 source4/winbind/wb_async_helpers.h     |    1 +
 source4/winbind/wb_cmd_lookupname.c    |    3 +-
 source4/winbind/wb_cmd_lookupsid.c     |    3 +-
 source4/winbind/wb_cmd_userdomgroups.c |    3 +-
 source4/winbind/wb_connect_lsa.c       |    3 +-
 source4/winbind/wb_connect_sam.c       |    3 +-
 source4/winbind/wb_init_domain.c       |    8 ++
 source4/winbind/wb_server.h            |    2 +
 38 files changed, 343 insertions(+), 439 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/dcerpc.idl b/librpc/idl/dcerpc.idl
index 32f9514..1ffa784 100644
--- a/librpc/idl/dcerpc.idl
+++ b/librpc/idl/dcerpc.idl
@@ -48,8 +48,8 @@ interface dcerpc
 	} dcerpc_empty;
 
 	typedef [nodiscriminant] union {
-		[default] dcerpc_empty empty;
 		[case(LIBNDR_FLAG_OBJECT_PRESENT)] GUID object;
+		[default] dcerpc_empty empty;
 	} dcerpc_object;
 
 	typedef struct {
@@ -61,14 +61,40 @@ interface dcerpc
 		[flag(NDR_REMAINING)] DATA_BLOB stub_and_verifier;
 	} dcerpc_request;
 
-	const int DCERPC_BIND_REASON_ASYNTAX                 = 1;
-	const int DCERPC_BIND_PROVIDER_REJECT                = 2;
-	const int DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED = 4;
-	const int DCERPC_BIND_REASON_INVALID_AUTH_TYPE       = 8;
+	typedef [enum16bit] enum {
+		DCERPC_BIND_ACK_RESULT_ACCEPTANCE          = 0,
+		DCERPC_BIND_ACK_RESULT_USER_REJECTION      = 1,
+		DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION  = 2,
+		DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK       = 3
+	} dcerpc_bind_ack_result;
+
+	const int DCERPC_BIND_PROVIDER_REJECT =
+		DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION;
+
+	typedef [enum16bit] enum {
+		DCERPC_BIND_ACK_REASON_NOT_SPECIFIED                   = 0,
+		DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED   = 1,
+		DCERPC_BIND_ACK_REASON_TRANSFER_SYNTAXES_NOT_SUPPORTED = 2,
+		DCERPC_BIND_ACK_REASON_LOCAL_LIMIT_EXCEEDED            = 3
+	} dcerpc_bind_ack_reason_values;
+
+	const int DCERPC_BIND_REASON_ASYNTAX =
+		DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED;
+
+	typedef [bitmap16bit] bitmap {
+		DCERPC_BIND_TIME_SECURITY_CONTEXT_MULTIPLEXING = 0x0001,
+		DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN     = 0x0002
+	} dcerpc_bind_time_features;
+
+	typedef [nodiscriminant] union {
+		[case(DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK)]
+			dcerpc_bind_time_features negotiate;
+		[default] dcerpc_bind_ack_reason_values value;
+	} dcerpc_bind_ack_reason;
 
 	typedef struct {
-		uint16 result;
-		uint16 reason;
+		dcerpc_bind_ack_result result;
+		[switch_is(result)] dcerpc_bind_ack_reason reason;
 		ndr_syntax_id syntax;
 	} dcerpc_ack_ctx;
 
@@ -84,18 +110,33 @@ interface dcerpc
 		[flag(NDR_REMAINING)] DATA_BLOB auth_info;
 	} dcerpc_bind_ack;
 
+	typedef [enum16bit] enum {
+		DCERPC_BIND_NAK_REASON_NOT_SPECIFIED                  = 0,
+		DCERPC_BIND_NAK_REASON_TEMPORARY_CONGESTION           = 1,
+		DCERPC_BIND_NAK_REASON_LOCAL_LIMIT_EXCEEDED           = 2,
+		DCERPC_BIND_NAK_REASON_PROTOCOL_VERSION_NOT_SUPPORTED = 4,
+		DCERPC_BIND_NAK_REASON_INVALID_AUTH_TYPE              = 8,
+		DCERPC_BIND_NAK_REASON_INVALID_CHECKSUM               = 9
+	} dcerpc_bind_nak_reason;
+
+	const int DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED =
+		DCERPC_BIND_NAK_REASON_PROTOCOL_VERSION_NOT_SUPPORTED;
+	const int DCERPC_BIND_REASON_INVALID_AUTH_TYPE =
+		DCERPC_BIND_NAK_REASON_INVALID_AUTH_TYPE;
+
 	typedef struct {
 		uint32 num_versions;
 		uint32 versions[num_versions];
 	} dcerpc_bind_nak_versions;
 
 	typedef [nodiscriminant] union {
-		[case(DECRPC_BIND_PROTOCOL_VERSION_NOT_SUPPORTED)] dcerpc_bind_nak_versions v;
+		[case(DCERPC_BIND_NAK_REASON_PROTOCOL_VERSION_NOT_SUPPORTED)]
+			dcerpc_bind_nak_versions v;
 		[default] ;
 	} dcerpc_bind_nak_versions_ctr;
 
 	typedef struct {
-		uint16 reject_reason;
+		dcerpc_bind_nak_reason reject_reason;
 		[switch_is(reject_reason)] dcerpc_bind_nak_versions_ctr versions;
 	} dcerpc_bind_nak;
 
@@ -467,14 +508,21 @@ interface dcerpc
 	} dcerpc_payload;
 
 	/* pfc_flags values */
-	const uint8 DCERPC_PFC_FLAG_FIRST		= 0x01; /* First fragment */
-	const uint8 DCERPC_PFC_FLAG_LAST		= 0x02; /* Last fragment */
-	const uint8 DCERPC_PFC_FLAG_PENDING_CANCEL	= 0x04; /* Cancel was pending at sender */
-	const uint8 DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN	= DCERPC_PFC_FLAG_PENDING_CANCEL; /* depends on the pdu type */
-	const uint8 DCERPC_PFC_FLAG_CONC_MPX		= 0x10; /* supports concurrent multiplexing of a single connection. */
-	const uint8 DCERPC_PFC_FLAG_DID_NOT_EXECUTE	= 0x20; /* on a fault it means the server hasn't done anything */
-	const uint8 DCERPC_PFC_FLAG_MAYBE		= 0x40; /* `maybe' call semantics requested */
-	const uint8 DCERPC_PFC_FLAG_OBJECT_UUID		= 0x80; /* on valid guid is in the optional object field */
+	typedef [bitmap8bit] bitmap {
+		DCERPC_PFC_FLAG_FIRST		= 0x01, /* First fragment */
+		DCERPC_PFC_FLAG_LAST		= 0x02, /* Last fragment */
+		DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING = 0x04, /* depends on the pdu type */
+		DCERPC_PFC_FLAG_CONC_MPX	= 0x10, /* supports concurrent multiplexing of a single connection. */
+		DCERPC_PFC_FLAG_DID_NOT_EXECUTE	= 0x20, /* on a fault it means the server hasn't done anything */
+		DCERPC_PFC_FLAG_MAYBE		= 0x40, /* `maybe' call semantics requested */
+		DCERPC_PFC_FLAG_OBJECT_UUID	= 0x80 /* on valid guid is in the optional object field */
+	} dcerpc_pfc_flags;
+
+	/* Cancel was pending at sender */
+	const int DCERPC_PFC_FLAG_PENDING_CANCEL =
+		DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING;
+	const ist DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN =
+		DCERPC_PFC_FLAG_PENDING_CANCEL_OR_HDR_SIGNING;
 
 	/* these offsets are needed by the signing code */
 	const uint8 DCERPC_PFC_OFFSET      =  3;
@@ -490,7 +538,7 @@ interface dcerpc
 		uint8 rpc_vers;	        /* RPC version */
 		uint8 rpc_vers_minor;   /* Minor version */
 		dcerpc_pkt_type ptype;  /* Packet type */
-		uint8 pfc_flags;        /* Fragmentation flags */
+		dcerpc_pfc_flags pfc_flags; /* Fragmentation flags */
 		uint8 drep[4];	        /* NDR data representation */
 		uint16 frag_length;     /* Total length of fragment */
 		uint16 auth_length;     /* authenticator length */
diff --git a/selftest/knownfail b/selftest/knownfail
index 52fecfb..81f737a 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -33,15 +33,6 @@
 # see bug 8412
 ^samba3.smb2.rename.*.simple_nodelete
 ^samba3.smb2.rename.*.no_share_delete_no_delete_access
-#These rpcclient combinations (pipe-level authentication but without sign or seal) need fixing in s3
-^samba3.blackbox.rpcclient over ncacn_np with \[spnego\]
-^samba3.blackbox.rpcclient over ncacn_np with \[spnego,bigendian\]
-^samba3.blackbox.rpcclient over ncacn_np with \[spnego,connect\]
-^samba3.blackbox.rpcclient over ncacn_np with \[spnego,connect,bigendian\]
-^samba3.blackbox.rpcclient over ncacn_np with \[spnego,smb2\]
-^samba3.blackbox.rpcclient over ncacn_np with \[spnego,smb2,bigendian\]
-^samba3.blackbox.rpcclient over ncacn_np with \[spnego,connect,smb2\]
-^samba3.blackbox.rpcclient over ncacn_np with \[spnego,connect,smb2,bigendian\]
 ^samba3.blackbox.smbclient_machine_auth.plain \(s3dc:local\)# the S3dc does not currently set up a self-join
 ^samba3.raw.samba3hide.samba3hide\((s3dc|plugin_s4_dc)\) # This test fails against an smbd environment with NT ACLs enabled
 ^samba3.raw.samba3closeerr.samba3closeerr\(s3dc\) # This test fails against an smbd environment with NT ACLs enabled
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 1b049de..e4e2bfe 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -1620,7 +1620,7 @@ static bool check_bind_response(const struct dcerpc_bind_ack *r,
 
 	if (r->num_results != 0x1 || ctx.result != 0) {
 		DEBUG(2,("bind_rpc_pipe: bind denied results: %d reason: %x\n",
-		          r->num_results, ctx.reason));
+		          r->num_results, ctx.reason.value));
 	}
 
 	DEBUG(5,("check_bind_response: accepted!\n"));
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index b219ee9..3f6f3dc 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -651,13 +651,13 @@ static bool api_pipe_bind_req(struct pipes_struct *p,
 			pkt->u.bind.ctx_list[0].context_id)) {
 
 		bind_ack_ctx.result = 0;
-		bind_ack_ctx.reason = 0;
+		bind_ack_ctx.reason.value = 0;
 		bind_ack_ctx.syntax = pkt->u.bind.ctx_list[0].transfer_syntaxes[0];
 	} else {
 		p->pipe_bound = False;
 		/* Rejection reason: abstract syntax not supported */
 		bind_ack_ctx.result = DCERPC_BIND_PROVIDER_REJECT;
-		bind_ack_ctx.reason = DCERPC_BIND_REASON_ASYNTAX;
+		bind_ack_ctx.reason.value = DCERPC_BIND_REASON_ASYNTAX;
 		bind_ack_ctx.syntax = ndr_syntax_id_null;
 	}
 
@@ -1009,13 +1009,13 @@ static bool api_pipe_alter_context(struct pipes_struct *p,
 			pkt->u.bind.ctx_list[0].context_id)) {
 
 		bind_ack_ctx.result = 0;
-		bind_ack_ctx.reason = 0;
+		bind_ack_ctx.reason.value = 0;
 		bind_ack_ctx.syntax = pkt->u.bind.ctx_list[0].transfer_syntaxes[0];
 	} else {
 		p->pipe_bound = False;
 		/* Rejection reason: abstract syntax not supported */
 		bind_ack_ctx.result = DCERPC_BIND_PROVIDER_REJECT;
-		bind_ack_ctx.reason = DCERPC_BIND_REASON_ASYNTAX;
+		bind_ack_ctx.reason.value = DCERPC_BIND_REASON_ASYNTAX;
 		bind_ack_ctx.syntax = ndr_syntax_id_null;
 	}
 
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index 9117ce6..a6c3280 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -1469,7 +1469,6 @@ static NTSTATUS cmd_lsa_get_username(struct rpc_pipe_client *cli,
                                      TALLOC_CTX *mem_ctx, int argc,
                                      const char **argv)
 {
-	struct policy_handle pol;
 	NTSTATUS status, result;
 	const char *servername = cli->desthost;
 	struct lsa_String *account_name = NULL;
@@ -1481,14 +1480,6 @@ static NTSTATUS cmd_lsa_get_username(struct rpc_pipe_client *cli,
 		return NT_STATUS_OK;
 	}
 
-	status = rpccli_lsa_open_policy(cli, mem_ctx, true,
-					SEC_FLAG_MAXIMUM_ALLOWED,
-					&pol);
-
-	if (!NT_STATUS_IS_OK(status)) {
-		goto done;
-	}
-
 	status = dcerpc_lsa_GetUserName(b, mem_ctx,
 					servername,
 					&account_name,
@@ -1508,7 +1499,6 @@ static NTSTATUS cmd_lsa_get_username(struct rpc_pipe_client *cli,
 		account_name->string, authority_name ? authority_name->string :
 		"");
 
-	dcerpc_lsa_Close(b, mem_ctx, &pol, &result);
  done:
 	return status;
 }
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 9429e26..c47c150 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -1065,6 +1065,10 @@ out_free:
 		binding->transport = NCACN_NP;
 	}
 
+	if (binding->flags & DCERPC_CONNECT) {
+		pipe_default_auth_level = DCERPC_AUTH_LEVEL_CONNECT;
+		pipe_default_auth_type = DCERPC_AUTH_TYPE_NTLMSSP;
+	}
 	if (binding->flags & DCERPC_SIGN) {
 		pipe_default_auth_level = DCERPC_AUTH_LEVEL_INTEGRITY;
 		pipe_default_auth_type = DCERPC_AUTH_TYPE_NTLMSSP;
@@ -1078,12 +1082,6 @@ out_free:
 		pipe_default_auth_spnego_type = PIPE_AUTH_TYPE_SPNEGO_NTLMSSP;
 	}
 	if (binding->flags & DCERPC_AUTH_NTLM) {
-		/* If neither Integrity or Privacy are requested then
-		 * Use just Connect level */
-		if (pipe_default_auth_level == DCERPC_AUTH_LEVEL_NONE) {
-			pipe_default_auth_level = DCERPC_AUTH_LEVEL_CONNECT;
-		}
-
 		if (pipe_default_auth_type == DCERPC_AUTH_TYPE_SPNEGO) {
 			pipe_default_auth_spnego_type = PIPE_AUTH_TYPE_SPNEGO_NTLMSSP;
 		} else {
@@ -1091,18 +1089,19 @@ out_free:
 		}
 	}
 	if (binding->flags & DCERPC_AUTH_KRB5) {
-		/* If neither Integrity or Privacy are requested then
-		 * Use just Connect level */
-		if (pipe_default_auth_level == DCERPC_AUTH_LEVEL_NONE) {
-			pipe_default_auth_level = DCERPC_AUTH_LEVEL_CONNECT;
-		}
-
 		if (pipe_default_auth_type == DCERPC_AUTH_TYPE_SPNEGO) {
 			pipe_default_auth_spnego_type = PIPE_AUTH_TYPE_SPNEGO_KRB5;
 		} else {
 			pipe_default_auth_type = DCERPC_AUTH_TYPE_KRB5;
 		}
 	}
+	if (pipe_default_auth_type != DCERPC_AUTH_TYPE_NONE) {
+		/* If neither Integrity or Privacy are requested then
+		 * Use just Connect level */
+		if (pipe_default_auth_level == DCERPC_AUTH_LEVEL_NONE) {
+			pipe_default_auth_level = DCERPC_AUTH_LEVEL_CONNECT;
+		}
+	}
 
 	if (get_cmdline_auth_info_use_kerberos(rpcclient_auth_info)) {
 		flags |= CLI_FULL_CONNECTION_USE_KERBEROS |
diff --git a/source4/libnet/groupinfo.c b/source4/libnet/groupinfo.c
index 5c8b0f7..3d2968b 100644
--- a/source4/libnet/groupinfo.c
+++ b/source4/libnet/groupinfo.c
@@ -31,7 +31,7 @@
 
 
 struct groupinfo_state {
-	struct dcerpc_pipe         *pipe;
+	struct dcerpc_binding_handle *binding_handle;
 	struct policy_handle       domain_handle;
 	struct policy_handle       group_handle;
 	uint16_t                   level;
@@ -109,7 +109,7 @@ static void continue_groupinfo_lookup(struct tevent_req *subreq)
 
 	/* send request */
 	subreq = dcerpc_samr_OpenGroup_r_send(s, c->event_ctx,
-					      s->pipe->binding_handle,
+					      s->binding_handle,
 					      &s->opengroup);
 	if (composite_nomem(subreq, c)) return;
 
@@ -161,7 +161,7 @@ static void continue_groupinfo_opengroup(struct tevent_req *subreq)
 	/* queue rpc call, set event handling and new state */
 	subreq = dcerpc_samr_QueryGroupInfo_r_send(s,
 						   c->event_ctx,
-						   s->pipe->binding_handle,
+						   s->binding_handle,
 						   &s->querygroupinfo);
 	if (composite_nomem(subreq, c)) return;
 	
@@ -212,7 +212,7 @@ static void continue_groupinfo_getgroup(struct tevent_req *subreq)
 	
 	/* queue rpc call, set event handling and new state */
 	subreq = dcerpc_samr_Close_r_send(s, c->event_ctx,
-					  s->pipe->binding_handle,
+					  s->binding_handle,
 					  &s->samrclose);
 	if (composite_nomem(subreq, c)) return;
 	
@@ -264,8 +264,9 @@ static void continue_groupinfo_closegroup(struct tevent_req *subreq)
  * @param p dce/rpc call pipe 
  * @param io arguments and results of the call
  */
-struct composite_context *libnet_rpc_groupinfo_send(struct dcerpc_pipe *p,
-						    TALLOC_CTX *mem_ctx,
+struct composite_context *libnet_rpc_groupinfo_send(TALLOC_CTX *mem_ctx,
+						    struct tevent_context *ev,
+						    struct dcerpc_binding_handle *b,
 						    struct libnet_rpc_groupinfo *io,
 						    void (*monitor)(struct monitor_msg*))
 {
@@ -274,9 +275,9 @@ struct composite_context *libnet_rpc_groupinfo_send(struct dcerpc_pipe *p,
 	struct dom_sid *sid;
 	struct tevent_req *subreq;
 
-	if (!p || !io) return NULL;
+	if (!b || !io) return NULL;
 	
-	c = composite_create(mem_ctx, dcerpc_event_context(p));
+	c = composite_create(mem_ctx, ev);
 	if (c == NULL) return c;
 	
 	s = talloc_zero(c, struct groupinfo_state);
@@ -285,7 +286,7 @@ struct composite_context *libnet_rpc_groupinfo_send(struct dcerpc_pipe *p,
 	c->private_data = s;
 
 	s->level         = io->in.level;
-	s->pipe          = p;
+	s->binding_handle= b;
 	s->domain_handle = io->in.domain_handle;
 	s->monitor_fn    = monitor;
 
@@ -300,7 +301,7 @@ struct composite_context *libnet_rpc_groupinfo_send(struct dcerpc_pipe *p,
 		
 		/* send request */
 		subreq = dcerpc_samr_OpenGroup_r_send(s, c->event_ctx,
-						      p->binding_handle,
+						      s->binding_handle,
 						      &s->opengroup);
 		if (composite_nomem(subreq, c)) return c;
 
@@ -322,7 +323,7 @@ struct composite_context *libnet_rpc_groupinfo_send(struct dcerpc_pipe *p,
 
 		/* send request */
 		subreq = dcerpc_samr_LookupNames_r_send(s, c->event_ctx,
-							p->binding_handle,
+							s->binding_handle,
 							&s->lookup);
 		if (composite_nomem(subreq, c)) return c;
 		
@@ -372,10 +373,12 @@ NTSTATUS libnet_rpc_groupinfo_recv(struct composite_context *c, TALLOC_CTX *mem_
  * @return nt status code of execution
  */
 
-NTSTATUS libnet_rpc_groupinfo(struct dcerpc_pipe *p,
+NTSTATUS libnet_rpc_groupinfo(struct tevent_context *ev,
+			      struct dcerpc_binding_handle *b,
 			      TALLOC_CTX *mem_ctx,
 			      struct libnet_rpc_groupinfo *io)
 {
-	struct composite_context *c = libnet_rpc_groupinfo_send(p, mem_ctx, io, NULL);
+	struct composite_context *c = libnet_rpc_groupinfo_send(mem_ctx, ev, b,
+								io, NULL);
 	return libnet_rpc_groupinfo_recv(c, mem_ctx, io);
 }
diff --git a/source4/libnet/groupman.c b/source4/libnet/groupman.c
index 59a3f35..c91eff3 100644
--- a/source4/libnet/groupman.c
+++ b/source4/libnet/groupman.c
@@ -28,7 +28,7 @@
 
 
 struct groupadd_state {
-	struct dcerpc_pipe *pipe;
+	struct dcerpc_binding_handle *binding_handle;
 	struct policy_handle domain_handle;
 	struct samr_CreateDomainGroup creategroup;
 	struct policy_handle group_handle;
@@ -41,8 +41,9 @@ struct groupadd_state {
 static void continue_groupadd_created(struct tevent_req *subreq);
 
 
-struct composite_context* libnet_rpc_groupadd_send(struct dcerpc_pipe *p,
-						   TALLOC_CTX *mem_ctx,
+struct composite_context* libnet_rpc_groupadd_send(TALLOC_CTX *mem_ctx,
+						   struct tevent_context *ev,
+						   struct dcerpc_binding_handle *b,
 						   struct libnet_rpc_groupadd *io,
 						   void (*monitor)(struct monitor_msg*))
 {
@@ -50,9 +51,9 @@ struct composite_context* libnet_rpc_groupadd_send(struct dcerpc_pipe *p,
 	struct groupadd_state *s;
 	struct tevent_req *subreq;
 
-	if (!p || !io) return NULL;
+	if (!b || !io) return NULL;
 
-	c = composite_create(mem_ctx, dcerpc_event_context(p));
+	c = composite_create(mem_ctx, ev);
 	if (c == NULL) return NULL;
 
 	s = talloc_zero(c, struct groupadd_state);
@@ -61,7 +62,7 @@ struct composite_context* libnet_rpc_groupadd_send(struct dcerpc_pipe *p,
 	c->private_data = s;
 
 	s->domain_handle = io->in.domain_handle;
-	s->pipe          = p;
+	s->binding_handle= b;
 	s->monitor_fn    = monitor;
 
 	s->creategroup.in.domain_handle  = &s->domain_handle;
@@ -78,7 +79,7 @@ struct composite_context* libnet_rpc_groupadd_send(struct dcerpc_pipe *p,
 	s->creategroup.out.rid           = &s->group_rid;
  	
 	subreq = dcerpc_samr_CreateDomainGroup_r_send(s, c->event_ctx,
-						      s->pipe->binding_handle,
+						      s->binding_handle,
 						      &s->creategroup);
 	if (composite_nomem(subreq, c)) return c;
 
@@ -126,206 +127,13 @@ static void continue_groupadd_created(struct tevent_req *subreq)
 }
 
 
-NTSTATUS libnet_rpc_groupadd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+NTSTATUS libnet_rpc_groupadd(struct tevent_context *ev,
+			     struct dcerpc_binding_handle *b,
+			     TALLOC_CTX *mem_ctx,
 			     struct libnet_rpc_groupadd *io)
 {
 	struct composite_context *c;
 
-	c = libnet_rpc_groupadd_send(p, mem_ctx, io, NULL);
+	c = libnet_rpc_groupadd_send(mem_ctx, ev, b, io, NULL);
 	return libnet_rpc_groupadd_recv(c, mem_ctx, io);
 }
-
-
-struct groupdel_state {
-	struct dcerpc_pipe             *pipe;
-	struct policy_handle           domain_handle;
-	struct policy_handle           group_handle;
-	struct samr_LookupNames        lookupname;
-	struct samr_OpenGroup          opengroup;
-	struct samr_DeleteDomainGroup  deletegroup;
-
-	/* information about the progress */
-	void (*monitor_fn)(struct monitor_msg *);
-};
-
-
-static void continue_groupdel_name_found(struct tevent_req *subreq);
-static void continue_groupdel_group_opened(struct tevent_req *subreq);
-static void continue_groupdel_deleted(struct tevent_req *subreq);
-
-
-struct composite_context* libnet_rpc_groupdel_send(struct dcerpc_pipe *p,
-						   TALLOC_CTX *mem_ctx,
-						   struct libnet_rpc_groupdel *io,
-						   void (*monitor)(struct monitor_msg*))
-{
-	struct composite_context *c;
-	struct groupdel_state *s;
-	struct tevent_req *subreq;
-


-- 
Samba Shared Repository


More information about the samba-cvs mailing list