summaryrefslogtreecommitdiffstats
path: root/source4
Commit message (Collapse)AuthorAgeFilesLines
...
* lib/krb5_wrap: provide krb5_warnx() replacement.Günther Deschner2014-08-081-0/+1
| | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Aug 8 08:30:50 CEST 2014 on sn-devel-104
* lib/krb5_wrap: add smb_krb5_principal_get_type().Günther Deschner2014-08-081-0/+1
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/krb5_wrap: add smb_krb5_principal_set_realm().Günther Deschner2014-08-081-0/+1
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-gensec_krb5: fix memleak in gensec_krb5_session_info().Günther Deschner2014-08-081-0/+1
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/krb5_wrap: add krb5_copy_data_contents.Günther Deschner2014-08-081-0/+1
| | | | | | | | | | | This reuses krb5_data_copy() if available, choosed not to call it krb5_data_copy as that is easily mixed up with krb5_copy_data (which allocs the krb5_data pointer). Thanks Simo for proposing the better name. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-heimdal: fix krb5_get_init_creds_opt_set_process_last_req().Günther Deschner2014-08-081-1/+1
| | | | | | | | | Most probably just a copy/paste error. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-auth/kerberos: add a note how to implement ↵Günther Deschner2014-08-081-0/+2
| | | | | | | | | krb5_get_init_creds_opt_set_win2k() with MIT. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-kerberos: remove duplicate macros.Günther Deschner2014-08-081-10/+0
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-dsdb/samdb: use smb_krb5_principal_get_comp_string in ldb ACL module.Günther Deschner2014-08-082-6/+9
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/krb5_wrap: move krb5_princ_size replacement code to ↵Günther Deschner2014-08-081-8/+0
| | | | | | | | | lib/krb5_wrap/krb5_samba.c. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-torture: use smb_krb5_get_allowed_weak_crypto() in remote PAC test.Günther Deschner2014-08-081-8/+1
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Andreas Schneider <asn@samba.org>
* lib/krb5_wrap: add smb_krb5_get_allowed_weak_crypto().Günther Deschner2014-08-081-0/+1
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Andreas Schneider <asn@samba.org>
* samba: use smb_krb5_create_key_from_string() in some places.Günther Deschner2014-08-081-4/+6
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Andreas Schneider <asn@samba.org>
* s4-dsdb/samdb: use smb_krb5_make_principal for compatibility reasons with MIT.Günther Deschner2014-08-081-4/+5
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture: use torture_assert instead of torture_comment and return in ↵Michael Adam2014-08-071-4/+5
| | | | | | | defer_open test Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture: consistently log "pid %u: ..." in the defer_open testMichael Adam2014-08-071-3/+5
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture: remove an unused variable and bogus check from the defer_open testMichael Adam2014-08-071-6/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli: Fix a typoVolker Lendecke2014-07-311-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd4: Remove process_model_threadVolker Lendecke2014-07-312-585/+0
| | | | | | | | | | | | | | | | | | | | This code has not seen any use or development for a while. While probably being a good source of inspiration, it will inevitably bit-rot. To really get to a multi-threaded process model, many of the Samba libraries have to be made thread-safe. Why this patch? Right now I am trying to clean up our debug system, and process_thread.c is the only reference to the _suspicious_ functions in debug.c. The alternative would be to factor those out of debug, but as this code is unused for so long, the alternative approach is to just remove it. If someone wants to restart development on a threaded process model, the code is still around in the git history and can be resurrected easily. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-rpc: dnsserver: Allow . to be specified for @ recordAmitay Isaacs2014-07-291-1/+3
| | | | | | | | | Windows allow both . and @ to be specified with modifying @ record. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10742 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Simplify imessaging_pathVolker Lendecke2014-07-291-9/+4
| | | | | | | | | | Use server_id_str_buf 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): Tue Jul 29 00:30:55 CEST 2014 on sn-devel-104
* lib: directory_create_or_exist() does not use "uid" parameterVolker Lendecke2014-07-282-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging4: Simplify ping_message with server_id_str_buf()Volker Lendecke2014-07-241-3/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture: Add FSCTL_QUERY_NETWORK_INTERFACE_INFO torture test case to ↵Anubhav Rakshit2014-07-241-0/+47
| | | | | | | | | source4/torture/smb2/ioctl.c Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Anubhav Rakshit <anubhav.rakshit@gmail.com> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* torture4: Use sizeof(char-array) instead of constantVolker Lendecke2014-07-241-12/+12
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture/smb2: add smb2.session.bind1Stefan Metzmacher2014-07-241-0/+132
| | | | | | | This is a very simple multi-channel test Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:libcli/smb2: add smb2_session_channel()Stefan Metzmacher2014-07-242-10/+74
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:libcli/smb2: remove unused 'primary' argument of smb2_session_init()Stefan Metzmacher2014-07-243-8/+4
| | | | | | | This also gets rid of a talloc_reference() usage. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* messaging4: Fix a just-introduced error memleakVolker Lendecke2014-07-221-0/+5
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Jul 22 15:31:38 CEST 2014 on sn-devel-104
* messaging4: Change irpc_servers_by_name to NTSTATUSVolker Lendecke2014-07-214-35/+43
| | | | | | | | | | | | For me, counted arrays are easier to deal with than NULL-terminated ones. Here we also had a "server_id_is_disconnection" convention, which was not really obvious. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jul 21 20:28:53 CEST 2014 on sn-devel-104
* messaging4: Fix a memleak in an error pathVolker Lendecke2014-07-211-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Remove unnecessary lockingVolker Lendecke2014-07-211-6/+0
| | | | | | | | We don't do any modifying operations on the database, so locking is not needed here Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Remove an unused NTSTATUS varVolker Lendecke2014-07-211-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Move str_list_addVolker Lendecke2014-07-211-6/+7
| | | | | | | | If this fails, we'd have to revert the tdb_append. str_list_remove is simpler :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Add NULL check to irpc_add_nameVolker Lendecke2014-07-211-0/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Use tdb_append in irpc_add_nameVolker Lendecke2014-07-211-19/+11
| | | | | | | This makes the custom locking code unnecessary here Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture/rpc: add rpc.netlogon.ServerReqChallengeGlobalStefan Metzmacher2014-07-191-0/+73
| | | | | | | | | | | | This demonstrates that the challenge table should be global. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10723 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Jul 19 12:51:39 CEST 2014 on sn-devel-104
* s4:rpc_server/netlogon: keep a global challenge tableStefan Metzmacher2014-07-191-4/+87
| | | | | | | | | | | | | | | | | Some clients call netr_ServerReqChallenge() and netr_ServerAuthenticate3() on different connections. This works against Windows DCs as they have a global challenge table. A VMware provisioning task for Windows VMs seemy to rely on this behavior. As a fallback we're storing the challenge in a global memcache with a fixed size. This should allow these strange clients to work against a Samba AD DC. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10723 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:dsdb/samldb: don't allow 'userParameters' to be modified over LDAP for nowStefan Metzmacher2014-07-091-0/+18
| | | | | | | | | | | | | | | | | For now it's safer to reject setting 'userParameters' via LDAP, as we'll not provide the same behavior as a Windows Server. If someone requires that feature please report this in the following bug reports! Bug: https://bugzilla.samba.org/show_bug.cgi?id=8077 Bug: https://bugzilla.samba.org/show_bug.cgi?id=10130 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Jul 9 11:07:51 CEST 2014 on sn-devel-104
* dsdb: Always store and return the userParameters as a array of LE 16-bit valuesAndrew Bartlett2014-07-092-18/+58
| | | | | | | | | | | | | | | This is not allowed to be odd length, as otherwise we can not send it over the SAMR transport correctly. Allocating one byte less memory than required causes malloc() heap corruption and then a crash or lockup of the SAMR server. Andrew Bartlett Bug: https://bugzilla.samba.org/show_bug.cgi?id=10130 Change-Id: I5c0c531c1d660141e07f884a4789ebe11c1716f6 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* dsdb: Set syntax of userParameters to binary string, not unicode stringAndrew Bartlett2014-07-092-0/+12
| | | | | | | | | | | | | | | | | | This means we continue to store the values as given on SAMR, assuming that the SAMR buffer is little endian. The syntax for this specific object is forced to be a binary blob, so that it is not converted on DRSUAPI. This commit does not fix existing databases, nor pdb_samba_dsdb (used by classicupgrade). Andrew Bartlett Bug: https://bugzilla.samba.org/show_bug.cgi?id=8077 Change-Id: I10bb6aaecc381194e3c0ce6b9163f961acbdcee1 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s4:dsdb/repl_meta_data: make sure objectGUID can't be deletedStefan Metzmacher2014-07-091-3/+3
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=9763 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dsdb/extended_dn_in: don't force DSDB_SEARCH_SHOW_RECYCLEDStefan Metzmacher2014-07-091-17/+20
| | | | | | | | | | | | | We should take the controls the caller provided when we search for existing objects. A search with a basedn of '<GUID=....>' should result in LDB_ERR_NO_SUCH_OBJECT is the object has isDeleted=TRUE. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10694 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dsdb/kcc: use SHOW_RECYCLED instead of SHOW_DELETED in when deleting ↵Stefan Metzmacher2014-07-091-1/+1
| | | | | | | | | | | tombstone/deleted objects SHOW_RECYCLED implies SHOW_DELETED. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10694 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:dsdb/schema_load: make error message more verboseStefan Metzmacher2014-07-091-1/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-auth-krb: Fix talloc access after free in smb_krb5_update_keytabSamuel Cabrero2014-07-081-1/+6
| | | | | | | | | | Change-Id: Iaa168d520f124e0c43c7edd649318f0b8ee25020 Signed-off-by: Samuel Cabrero <scabrero@zentyal.com> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Kamen Mazdrashki <kamenim@samba.org> Autobuild-Date(master): Tue Jul 8 16:51:09 CEST 2014 on sn-devel-104
* s4: torture: Add a new lock test to show that the Samba SMB1 multi-lock ↵Jeremy Allison2014-07-081-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implementation is (currently) correct. Needed as there was a proposal to re-architect our multi-lock to dispense with lock order precedence, which isn't how Windows does it (unfortunately, as the new code would have been cleaner :-). Tested against the Win2k12 SMB1 implementation. This test is designed to show that lock precedence on the server is based on the order received, not on the ability to grant. For example: A blocked lock request containing 2 locks will be satified before a subsequent blocked lock request over one of the same regions, even if that region is then unlocked. E.g. (a) lock 100->109, 120->129 (granted) (b) lock 100->109, 120-129 (blocks) (c) lock 100->109 (blocks) (d) unlock 100->109 lock (c) will not be granted as lock (b) will take precedence. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Jul 8 10:16:59 CEST 2014 on sn-devel-104
* torture4: Add trivial epoch testVolker Lendecke2014-07-071-0/+54
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jul 7 18:36:37 CEST 2014 on sn-devel-104
* torture4: Add smb2.lease.nobreakselfVolker Lendecke2014-07-071-0/+87
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture4: Add a test to break a handle twiceVolker Lendecke2014-07-071-0/+66
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>