summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ctdb-daemon: Remove duplicate code from helper binariesAmitay Isaacs2014-06-123-16/+9
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-logging: Move controls handling functions from common to serverAmitay Isaacs2014-06-122-42/+40
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-logging: Split ringbuffer handling code from ctdb_collect_logAmitay Isaacs2014-06-122-7/+23
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: Move mkdir_p_or_die to system utilitiesAmitay Isaacs2014-06-122-14/+14
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Rename ctdb_mkdir_p_or_die to mkdir_p_or_dieAmitay Isaacs2014-06-123-5/+5
| | | | | | | This function does not require ctdb context. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: Move lockdown_memory to system utilitiesAmitay Isaacs2014-06-122-27/+28
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Rename ctdb_lockdown_memory to lockdown_memoryAmitay Isaacs2014-06-124-4/+4
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Instead of passing ctdb context, pass valgrinding booleanAmitay Isaacs2014-06-124-6/+6
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: Keep debug level related functions with logging codeAmitay Isaacs2014-06-122-40/+40
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Rename block_signal to ignore_signalAmitay Isaacs2014-06-121-2/+2
| | | | | | | This function does not block signals, but ignores them. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: Remove unused functionsAmitay Isaacs2014-06-122-18/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: No need to block SIGPIPE at startupAmitay Isaacs2014-06-121-1/+0
| | | | | | | Once CTDB is daemonized, it starts ignoring SIGPIPE anyway. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: Separate more system utilities that are independent of ctdbAmitay Isaacs2014-06-122-251/+252
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: Separate system utilties that are ctdb independentAmitay Isaacs2014-06-125-50/+74
| | | | | | | | Routines in system_common and system_<os> are supposed to be ctdb functions with OS specific implementations. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: No dynamic memory allocation in mkdir_p()Martin Schwenke2014-06-121-10/+27
| | | | | | | | | Allocate an array of size PATH_MAX on the stack instead. To stop unnecessary recursion, try to create the desired directory before creating ancestors and only create ancestors on ENOENT. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-common: Do not dynamically allocate memory when not necessaryMartin Schwenke2014-06-121-19/+17
| | | | | | | | Copy these values onto the stack instead. INET6_ADDRSTRLEN is 46, so 64 is plenty for an IP address and a port number. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-common: Drop ctdb prefix from utility functions independent of ctdbAmitay Isaacs2014-06-124-7/+7
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: Changing scheduler policy does not require ctdb contextAmitay Isaacs2014-06-124-6/+6
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: Do not abort if restoring scheduling policy failsAmitay Isaacs2014-06-121-3/+3
| | | | | | | | This code is only executed in child processes, so aborting does not really achieve much. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: No need to save previous scheduler priorityAmitay Isaacs2014-06-122-27/+8
| | | | | | | | When calling sched_setscheduler() with SCHED_OTHER, the only valid priority is 0. Nice value is "restored" anyway. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* libsmb: Put the "smb2_lease" struct into idlVolker Lendecke2014-06-127-20/+46
| | | | | | | | | | | | This will make it easier in the future to NDR_PRINT a lease and a lease key Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jun 12 03:34:41 CEST 2014 on sn-devel-104
* smbd: tevent_req_nterror already returns bool :-)Volker Lendecke2014-06-111-2/+1
| | | | | | | | 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): Wed Jun 11 21:13:06 CEST 2014 on sn-devel-104
* smbd: Use full_path_tos() where appropriateVolker Lendecke2014-06-111-7/+15
| | | | | | | | | Recently I've got reports that SMB2_FIND is slower than trans2 findfirst, so this tries to use recent performance-sensitive APIs right from the start :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: smbd : SMB2 - fix SMB2_SEARCH when searching non wildcard string with a ↵Jeremy Allison2014-06-111-3/+34
| | | | | | | | | | | | | | | | case-canonicalized share. We need to go through filename_convert() in order for the filename canonicalization to be done on a non-wildcard search string (as is done in the SMB1 findfirst code path). Fixes Bug #10650 - "case sensitive = True" option doesn't work with "max protocol = SMB2" or higher in large directories. https://bugzilla.samba.org/show_bug.cgi?id=10650 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Reviewed-by: Ira Cooper <ira@samba.org>
* s3: smbd - SMB[2|3]. Ensure a \ or / can't be found anywhere in a search ↵Jeremy Allison2014-06-111-2/+2
| | | | | | | | path, not just at the start. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Reviewed-by: Ira Cooper <ira@samba.org>
* s3-winbindd: Implement SamLogon IRPC callAndrew Bartlett2014-06-114-51/+150
| | | | | | | | | | | | | | We do this by lifting parts of the winbindd_dual_pam_auth_crap() code into a new helper function winbind_dual_SamLogon(). This allows us to implement the semantics we need for IRPC, without the artifacts of the winbindd pipe protocol. Change-Id: Idb169217e6d68d387c99765d0af7ed394cb5b93a Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jun 11 12:43:58 CEST 2014 on sn-devel-104
* s3-winbind: Transparently forward IRPC messages to the winbind_dual childAndrew Bartlett2014-06-111-37/+80
| | | | | | Change-Id: I8b336e2365e10ef9ea04d0957eb0829d3766b11e Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-winbind rename winbindd_update_rodc_dns to be for more generic irpcAndrew Bartlett2014-06-114-11/+17
| | | | | | Change-Id: I385ef8bd766848becc42e58694207dc94cd07a89 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc/idl: Merge wbint.idl with winbind.idl so we can forward IRPC requests ↵Andrew Bartlett2014-06-1146-81/+96
| | | | | | | | to internal winbind calls Change-Id: Iba3913d5a1c7f851b93f37e9beb6dbb20fbf7e55 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-winbindd: Listen on IRPC and do forwarded DNS updates on an RODCAndrew Bartlett2014-06-118-0/+423
| | | | | | Change-Id: Ib87933c318f510d95f7008e122216d73803ede68 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-winbindd: Register winbindd with irpcAndrew Bartlett2014-06-113-0/+34
| | | | | | Change-Id: Ie3c7109fef6982d95e8cad06870334565352e329 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* auth: Provide a way to use the auth stack for winbindd authenticationAndrew Bartlett2014-06-119-17/+89
| | | | | | | | | | | | | | This adds in flags that allow winbindd to request authentication without directly calling into the auth_sam module. That in turn will allow winbindd to call auth_samba4 and so permit winbindd operation in the AD DC. Andrew Bartlett Change-Id: I27d11075eb8e1a54f034ee2fdcb05360b4203567 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* winbindd: Call set_dc_type_and_flags on the internal domainAndrew Bartlett2014-06-115-113/+87
| | | | | | | | | | | | | | | | | | This allows the AD DC to be picked up correctly and gives the correct DNS name. To ensure no confusion, we also always init it with the full DNS name. It also means that, aside from the BUILTIN domain the initialized flag is set only in one place, which will help when we add more details to the domain structure in the future. This in turn allows kerberos authentication against winbindd on the AD DC. Andrew Bartlett Change-Id: Idc829cfe5f2e867c87107b49275b17f294821dcd Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* dsdb: Do not refresh the schema using the wrong event contextAndrew Bartlett2014-06-115-112/+191
| | | | | | | | | | | | | | | | What we now do is have the refresh function and module be on a seperate object to the schema, only referring to the data and not excuting on the original ldb and event loop. That is, we never use another ldb context when calling the refresh function, by binding the refresh handler to the ldb and not the schema. Andrew Bartlett Change-Id: I5c323dda743cf5858badd01147fda6227599bc16 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* dsdb: Do not store a struct ldb_dn in struct schema_dataAndrew Bartlett2014-06-119-48/+41
| | | | | | | | | | | | 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>
* passdb: Do not routinely clear the global memory returned by ↵Andrew Bartlett2014-06-112-15/+41
| | | | | | | | | | | | get_global_sam_sid() This avoids use-after-free errors and tdb database churn. Andrew Bartlett Change-Id: If7ab2e24556d9dffc7ad22c0489d665dd75a0cab Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* ctdb-eventscripts: New configuration variable CTDB_GANESHA_REC_SUBDIRMartin Schwenke2014-06-112-3/+20
| | | | | | | | | | | | | | Backup and restore of the cluster filesystem can upset the operation of 60.ganesha by changing the contents of this subdirectory. Allow this subdirectory to be configured to a subdirectory that is ignored by backup and restore processes. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Wed Jun 11 09:29:22 CEST 2014 on sn-devel-104
* libcli: Add a NULL check in dom_sid_stringVolker Lendecke2014-06-101-0/+3
| | | | | | | | 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 Jun 10 21:46:15 CEST 2014 on sn-devel-104
* Use GUID_equal in a few placesVolker Lendecke2014-06-108-17/+18
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libndr: Use GUID_compare in GUID_equalVolker Lendecke2014-06-101-9/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: libsmb: Change cli_disk_size() to use the ↵Jeremy Allison2014-06-071-0/+45
| | | | | | | | | | | | | trans2/SMB_FS_FULL_SIZE_INFORMATION call in preference to the old SMB1 call. Fallback to the old CORE protocol SMBdskattr if trans2/SMB_FS_FULL_SIZE_INFORMATION is not supported. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jun 7 05:41:44 CEST 2014 on sn-devel-104
* s3: libsmb: Make cli_smb2_dskattr() a 64-bit interface.Jeremy Allison2014-06-073-14/+10
| | | | | | | | Remove the fallback call from cli_dskattr() (now it's not called from external client code). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: libsmb : Move users of cli_dskattr to a 64-bit interface cli_disk_free().Jeremy Allison2014-06-074-6/+35
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* lib: tevent: make TEVENT_SIG_INCREMENT atomic.Jeremy Allison2014-06-073-0/+36
| | | | | | | | | | | | | | | | | | | | | | | On arm platforms incrementing a variable is not an atomic operation, so may be interrupted by signal processing (if a signal interrupts another signal handler). Use compiler built-ins to make this atomic. __sync_fetch_and_add() works on gcc, llvm, IBM xlC on AIX, and Intel icc (10.1 and above). atomic_add_32() works on Oracle Solaris. Based on an inital patch from kamei@osstech.co.jp. Bug #10640 - smbd is not responding - tevent_common_signal_handler() increments non-atomic variables https://bugzilla.samba.org/show_bug.cgi?id=10640 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3/s4: smbd, rpc, ldap, cldap, kdc services.Jeremy Allison2014-06-076-12/+49
| | | | | | | | | | | | | | Allow us to start if we bind to *either* :: or 0.0.0.0. Allows us to cope with systems configured as only IPv4 or only IPv6. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-By: Amitay Isaacs <amitay@gmail.com> Reviewed-By: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jun 7 01:01:44 CEST 2014 on sn-devel-104
* selftest: Add support for tmate.Andreas Schneider2014-06-061-1/+7
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Jun 6 02:25:52 CEST 2014 on sn-devel-104
* lib: Bump socket_wrapper version to 1.1.1.Michael Adam2014-06-051-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* swrap: Disable incomplete bind checks (and tests) for EADDRINUSE.Andreas Schneider2014-06-051-1/+6
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib: Bump socket_wrapper version to 1.1.0.Andreas Schneider2014-06-051-1/+1
|
* swrap: check whether an address:port is already in use in swrap_bind()Michael Adam2014-06-051-0/+7
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>