summaryrefslogtreecommitdiffstats
path: root/source4/libnet
Commit message (Collapse)AuthorAgeFilesLines
* dsdb: Do not store a struct ldb_dn in struct schema_dataAndrew Bartlett2014-06-111-5/+0
| | | | | | | | | | | | The issue is that the DN contains a pointer to the ldb it belongs to, and if this is not kept around long enough, we might reference memory after it is de-allocated. Andrew Bartlett Change-Id: I040a6c37a3164b3309f370e32e598dd56b1a1bbb Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Fix an empty if statement.Jose A. Rivera2014-05-051-1/+1
| | | | | | | | | | Primarily following the precedent set by other uses of composite_is_ok(), but also making sure nothing tries to use c after this point if it is in fact not ok. Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* kerberos: Remove un-used event context argument from smb_krb5_init_context()Andrew Bartlett2014-04-281-1/+1
| | | | | | | | | | | | | | | | | The event context here was only specified in the server or admin-tool context, which does not do network communication, so this only caused a talloc_reference() and never any useful result. The actual network communication code sets an event context directly before making the network call. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Apr 28 02:24:57 CEST 2014 on sn-devel-104
* Remove a number of NT_STATUS_HAVE_NO_MEMORY_AND_FREE macros from the codebase.Garming Sam2014-03-051-3/+12
| | | | | | | | | | | Following the current coding guidelines, it is considered bad practice to return from within a macro and change control flow as they look like normal function calls. Change-Id: I133eb5a699757ae57b87d3bd3ebbcf5b556b0268 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:libnet: add const to libnet_JoinDomain->out.samr_bindingStefan Metzmacher2014-02-132-2/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: use helper functions to access dcerpc_binding->target_hostnameStefan Metzmacher2014-02-134-13/+10
| | | | | | | 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>
* s4:libnet: make use of dcerpc_binding_get_string_option("host")Stefan Metzmacher2014-02-132-2/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: make use of dcerpc_binding_set_flags()Stefan Metzmacher2014-02-133-7/+24
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: make use of dcerpc_binding_[g|s]et_*() in libnet_join.cStefan Metzmacher2014-02-131-4/+29
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: use 'const struct dcerpc_binding' for local readonly variablesStefan Metzmacher2014-02-131-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: make use of dcerpc_binding_get_*() in libnet_rpc.cStefan Metzmacher2014-02-131-26/+28
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet_become_dc: make use of dcerpc_binding_[g|s]et_assoc_group_id()Stefan Metzmacher2014-02-131-2/+8
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: avoid compiler warnings in libnet_lookup.cStefan Metzmacher2014-02-131-2/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: use dcerpc_binding_dup() in continue_epm_map_binding_send()Stefan Metzmacher2014-02-111-5/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: make use of dcerpc_binding_dup() in libnet_join.cStefan Metzmacher2014-02-111-4/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_usermod() take tevent_context/dcerpc_binding_handleStefan Metzmacher2014-01-161-3/+3
| | | | | | | This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_usermod_send() take ↵Stefan Metzmacher2014-01-162-12/+16
| | | | | | | | | tevent_context/dcerpc_binding_handle This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_userdel() take tevent_context/dcerpc_binding_handleStefan Metzmacher2014-01-161-3/+3
| | | | | | | This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_userdel_send() take ↵Stefan Metzmacher2014-01-162-11/+17
| | | | | | | | | tevent_context/dcerpc_binding_handle This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_useradd() take tevent_context/dcerpc_binding_handleStefan Metzmacher2014-01-161-3/+3
| | | | | | | This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_useradd_send() take ↵Stefan Metzmacher2014-01-162-10/+16
| | | | | | | | | tevent_context/dcerpc_binding_handle This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_userinfo() take tevent_context/dcerpc_binding_handleStefan Metzmacher2014-01-161-3/+3
| | | | | | | This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_userinfo_send() take ↵Stefan Metzmacher2014-01-162-19/+27
| | | | | | | | | tevent_context/dcerpc_binding_handle This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: remove unused libnet_rpc_groupdel* codeStefan Metzmacher2014-01-162-206/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_groupadd() take tevent_context/dcerpc_binding_handleStefan Metzmacher2014-01-161-3/+4
| | | | | | | This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_groupadd_send() take ↵Stefan Metzmacher2014-01-162-11/+16
| | | | | | | | | tevent_context/dcerpc_binding_handle This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_groupinfo() take tevent_context/dcerpc_binding_handleStefan Metzmacher2014-01-161-4/+3
| | | | | | | This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: let libnet_rpc_groupinfo_send() take ↵Stefan Metzmacher2014-01-162-15/+25
| | | | | | | | | tevent_context/dcerpc_binding_handle This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: avoid using dcecli_connection->event_ctxStefan Metzmacher2014-01-161-1/+1
| | | | | | | | | | 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@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:libnet: keep a dcerpc_binding_handle for samr and lsaStefan Metzmacher2014-01-161-1/+4
| | | | | | | This completes commit a3ae9802d47f7a39030be089d15fc42f8e8917e6. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* CVE-2013-4408:s3:Ensure LookupNames replies arrays are range checked.Jeremy Allison2013-12-097-27/+51
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* python/drs: Ensure to pass in the local invocationID during the domain joinAndrew Bartlett2013-09-191-4/+13
| | | | | | | | | | This ensures (and asserts) that we never write an all-zero GUID as an invocationID to the database in replPropertyMetaData. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Free memory on errorAlistair Leslie-Hughes2013-09-181-0/+1
| | | | | | | | Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Sep 18 19:46:41 CEST 2013 on sn-devel-104
* s4:libnet: avoid usage of dcerpc_schannel_creds()Stefan Metzmacher2013-08-101-4/+3
| | | | | | | | | | We use cli_credentials_get_netlogon_creds() which returns the same value. dcerpc_schannel_creds() is a layer violation. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* build: Build with system md5.h on OpenIndianaAndrew Bartlett2013-06-191-2/+2
| | | | | | | | | | | | | | | | | | | | This changes (again...) our system md5 detection to cope with how OpenIndiana does md5. I'm becoming increasingly convinced this isn't worth our while (we should have just done samba_md5...), but for now this change seems to work on FreeBSD, OpenIndiana and Linux with libbsd. This needs us to rename struct MD5Context -> MD5_CTX, but we provide a config.h define to rename the type bad if MD5_CTX does not exist (it does however exist in the md5.h from libbsd). Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 19 21:32:36 CEST 2013 on sn-devel-104
* libnet-vampire: make use of dsdb_repl_resolve_working_schema()Stefan Metzmacher2013-05-231-210/+17
| | | | | | | | | | | Pair-Programmed-With: Matthieu Patou <mat@matws.net> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu May 23 14:18:03 CEST 2013 on sn-devel-104
* libnet-vampire: add attributes and classes from the replicated schema to the ↵Matthieu Patou2013-05-231-7/+119
| | | | | | | | | | | | | | | | | | | | | | bootstrap schema (bug #8680) Replicated schema might have attributes and auxilary classes on some critical classes (ie. top, user, computer ) that are not in the bootstrap schema. Without those new attributes and classes, bootstrap schema is unable to translate those critical classes in the schema constructed from the replicated data. Without thoses classes new schema is useless and can't be indexed properly. In order to overcome this problem, we put all new attributes and classes definitions into the bootstrap schema so that foundations classes can be translated. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Matthieu Patou <mat@matws.net> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Fix warnings about set but unused variablesMatthieu Patou2013-05-201-2/+0
| | | | | | Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Fix a warning about a shadowed variable by renaming the shadowing varMatthieu Patou2013-05-201-3/+3
| | | | | | Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libnet-vampire: reports Exops as they rather than sync on some partitionsMatthieu Patou2013-01-091-6/+27
| | | | | | | | | | | | | | | Instead of showing: Partition[CN=RODC,OU=Domain Controllers,DC=samba,DC=example,DC=com] objects[1] linked_values[8] Report a exop based on CN=RODC,OU=Domain Controllers,DC=samba,DC=example,DC=com as Exop on CN=RODC,OU=Domain Controllers,DC=samba,DC=example,DC=com, ... Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-By: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Matthieu Patou <mat@samba.org> Autobuild-Date(master): Wed Jan 9 09:01:30 CET 2013 on sn-devel-104
* libnet: set the invocation_id earlier in order to avoid annoying messagesMatthieu Patou2013-01-091-13/+13
| | | | | | | | | At that moment we have all the information to set the invocation id so let's set it, it will avoid useless messages about missing invocation id. Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-By: Andrew Bartlett <abartlet@samba.org>
* s4-libnet: Checkr return codes in samsync_ldb_handle_domain().Andreas Schneider2012-12-211-3/+15
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s4-libnet: Fix setting the group handle and return codes.Andreas Schneider2012-12-131-4/+9
| | | | | | | | | | Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Thu Dec 13 01:01:14 CET 2012 on sn-devel-104
* s4-libnet: Don't call talloc_get_type() for the same struct twice.Andreas Schneider2012-12-121-2/+2
| | | | | | | Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* libnet: Fix a typo in dbsync error message.Michael Adam2012-11-301-1/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* libnet: Fix copy and paste error in dbsync error message.Andreas Schneider2012-11-301-1/+1
|
* s4-drs: Remove unused varMatthieu Patou2012-11-091-3/+0
| | | | Signed-off-by: Matthieu Patou <mat@matws.net>
* s4-libnet: Fix memory leak of lsa_RefDomainList and lsa_String onto libnet_ctxAndrew Bartlett2012-08-311-2/+2
| | | | | | | | | | These are only needed for as long as the call, and should be children of the private context. This was found based on a log provided by Ricky Nance <ricky.nance@weaubleau.k12.mo.us>. Thanks Ricky! Andrew Bartlett
* s4-libnet: Fix passing samba_all_enctypes as a fn rather than the encrypt ↵Andrew Bartlett2012-08-291-1/+1
| | | | | | | array it returns Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Aug 29 09:56:27 CEST 2012 on sn-devel-104
* lib/krb5_wrap: Bring list of all enc types into krb5_wrapAndrew Bartlett2012-08-281-10/+1
|