summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* s3:printing: Fix a possible NULL dereference.Poornima Gurusiddaiah2014-02-241-1/+1
| | | | | | | | Coverity-Id: 710708 Signed-off-by: Poornima Gurusiddaiah <pgurusid@redhat.com> Reviewed-by: Ira Cooper <ira@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:passdb: Fix the use of uninitialized scalar variable.Poornima Gurusiddaiah2014-02-241-8/+2
| | | | | | | | Coverity-id: 1107228,1107227 Signed-off-by: Poornima Gurusiddaiah <pgurusid@redhat.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* s3/libsmb: Free memdup'd local variableJose A. Rivera2014-02-221-0/+1
| | | | | | | | | | | | | | secrets_fetch_machine_password() sets pwd to point to memdup()'d (and thus malloc()'d) memory. This memory should be freed before we go out of scope. Change-Id: I07e575819c309fa5b85627dce2eb969bc720ce4e Coverity-Id: 1168001 Reviewed-by: Ira Cooper <ira@samba.org> Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Simo Sorce <idra@samba.org> Autobuild-Date(master): Sat Feb 22 00:58:23 CET 2014 on sn-devel-104
* passdb: Patch memory leak in pdb_ldap.cJose A. Rivera2014-02-211-4/+6
| | | | | | | | | | | | | Moved the call to the talloc autofree function to as early a point as possible. init_ldap_from_sam() already calls smbldap_set_mod(), and there's a chance that the init will fail after having already allocated memory for &mods. Coverity-Id: 1167997 Change-Id: Ic26bfb3c530f90aa885e447b8409deba49708d64 Reviewed-by: Ira Cooper <ira@samba.org> Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Simo Sorce <idra@samba.org>
* s3:winbindd: avoid directly asking a trusted domain in wb_lookupsids*()Gregor Beck2014-02-211-1/+1
| | | | | | | | | | | | | | As a domain member we should always use a DC of our own domain. It would be possible to pass all sids in one single dcerpc_wbint_LookupSids() call. For now we just fix bug. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Bug: https://bugzilla.samba.org/show_bug.cgi?id=10458 Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:winbindd: fix _wbint_LookupSids() on errorGregor Beck2014-02-211-1/+7
| | | | | | | | | | | | | | | We need to make sure that r->out.domains remains valid, otherwise we're not able to marshall the response. Note that wbint_LookupSids() has [out,ref] lsa_RefDomainList *domains, while lsa_LookupSids() has [out,ref] lsa_RefDomainList **domains. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Bug: https://bugzilla.samba.org/show_bug.cgi?id=10458 Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:smbd: avoid invalid lock_order panic triggered by "CTDB_SRVID_RELEASE_IP"Stefan Metzmacher2014-02-211-2/+39
| | | | | | | | | | | | | If smbd_server_connection_terminate("CTDB_SRVID_RELEASE_IP") is triggered from within ctdbd_migrate(), we got a smb_panic complaining about invalid lock_order, as ctdbd_migrate is called from dbwrap_fetch_locked(). Bug: https://bugzilla.samba.org/show_bug.cgi?id=10444 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Feb 21 14:51:51 CET 2014 on sn-devel-104
* s3:lib/ctdbd_conn: let release_ip_handler return boolStefan Metzmacher2014-02-213-9/+35
| | | | | | | | If it returns true the passed ip address matched and we let a nested ctdb operation fail with NT_STATUS_ADDRESS_CLOSED. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:smbd: maintain smbd_server_connection->statusStefan Metzmacher2014-02-214-0/+53
| | | | | | | | | If this isn't NT_STATUS_OK, we skip any io on the socket. This avoids possible problems during shutdown. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:smbd: simplify exit_server_common()Stefan Metzmacher2014-02-211-4/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* clitar: don't panic, propagate talloc errors upwardsDavid Disseldorp2014-02-211-53/+136
| | | | | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Feb 21 02:49:36 CET 2014 on sn-devel-104
* clitar: propagate make_remote_path() talloc errorsDavid Disseldorp2014-02-211-3/+14
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* clitar: return allocation errors from is_subpath()David Disseldorp2014-02-211-16/+45
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* clitar: add error return to tar_path_in_list()David Disseldorp2014-02-211-12/+23
| | | | | | | | In preparation for propagation of memory allocation errors from is_subpath(). Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* clitar: add error return to tar_extract_skip_path()David Disseldorp2014-02-211-10/+22
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* clitar: add error return to tar_create_skip_path()David Disseldorp2014-02-211-20/+34
| | | | | | | | In preparation for propagation of memory allocation errors from tar_path_in_list() and friends. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* clitar: check for path_base_name() allocation errorsDavid Disseldorp2014-02-211-8/+22
| | | | | | | | Add a separate NTSTATUS return code, as base string may be NULL on successful return. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib: Fix a typoVolker Lendecke2014-02-201-2/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Kai Blin <kai@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Feb 20 22:58:59 CET 2014 on sn-devel-104
* messaging: Fix a memleak on error in messaging_tdb_initVolker Lendecke2014-02-201-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Kai Blin <kai@samba.org>
* lib: Avoid a strlen call in xx_path()Volker Lendecke2014-02-201-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Kai Blin <kai@samba.org>
* winbindd: Avoid using deallocated memorySantosh Kumar Pradhan2014-02-201-1/+1
| | | | | | | | | | | Failure in ads_search_retry() deallocates the memory occupied by "ads" which should not be used after. CID: 242096 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* messaging: Enforce just one messaging contextVolker Lendecke2014-02-191-0/+20
| | | | | | | | | | The current messaging implementation is based on a tdb indexed by server_id. If we have more than one messaging context in a process, messages might not arrive at the right context and be dropped, depending on which signal handler is triggered first. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfstext: Use just one messaging_context in vfstestVolker Lendecke2014-02-191-2/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* spoolssd: Use only one messaging_context per processVolker Lendecke2014-02-191-1/+1
| | | | | | | | | After the fork, the code created a fresh messaging_context before doing the reinit_after_fork. This means to have two initialized messaging contexts in that process. This patch aligns spoolssd with lsad. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: add const to a local variable to prevent a warning about lp_fstypeGarming Sam2014-02-201-1/+1
| | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Change-Id: Idc9217eb812b018fed933f84c2c4f1818f8f9372 Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: remove lp_dnsdomain from s3Garming Sam2014-02-203-3/+0
| | | | | | | | | With the use of the shared globals structure, lp_dnsdomain is no longer used in the code and removing it would remove a notable special case Signed-off-by: Garming Sam <garming@catalyst.net.nz> Change-Id: I59526c40c58e132a134d67fa7944dfeacd05f4c6 Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: change s3_param.h from a generated file to a static oneGarming Sam2014-02-201-1/+1
| | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Change-Id: I131e37ec92f7a826caec382023915c5e4b4c52be Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: remove generated loadparm ctx table file and include it directlyGarming Sam2014-02-202-7/+14
| | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Change-Id: I5f1d42e3ae6495accf7a711938cc28c03ab2cd62 Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: use loadparm_globals struct instead of lp function pointers in s3_helpersGarming Sam2014-02-202-2/+11
| | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Change-Id: I4507cdbf111b7f9dca3ca18ee2bf242ffdfeb4e7 Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* build: check for libarchive version via pkgconfigDavid Disseldorp2014-02-191-4/+4
| | | | | | | | | | | | The previous libarchive linker and header file check was not suitible for older libarchive versions that do not provide the function archive_read_support_filter_all(). Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Feb 19 20:19:07 CET 2014 on sn-devel-104
* cli: do not dump libarchive absence warning on startupDavid Disseldorp2014-02-191-1/+0
| | | | | | | | tar_parse_args() already prints the warning if a tarmode argument is provided. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-clitar: Fix identation.Andreas Schneider2014-02-191-1221/+1222
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Simplify is_subpath().Andreas Schneider2014-02-191-23/+36
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of fix_unix_path().Andreas Schneider2014-02-191-10/+13
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of max_token().Andreas Schneider2014-02-191-4/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of make_remote_path().Andreas Schneider2014-02-191-3/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of tar_path_in_list().Andreas Schneider2014-02-191-9/+11
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of tar_read_inclusion_file().Andreas Schneider2014-02-191-2/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of tar_set_newer_than().Andreas Schneider2014-02-191-1/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of tar_send_file().Andreas Schneider2014-02-191-1/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of tar_extract().Andreas Schneider2014-02-191-2/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of get_file_callback().Andreas Schneider2014-02-191-6/+8
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of tar_create_from_list().Andreas Schneider2014-02-191-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of tar_parse_args().Andreas Schneider2014-02-191-6/+10
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of cmd_setmode().Andreas Schneider2014-02-191-2/+4
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of cmd_tar().Andreas Schneider2014-02-191-3/+8
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of cmd_block().Andreas Schneider2014-02-191-2/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Use ARRAY_SIZE macro.Andreas Schneider2014-02-191-5/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* build: use configure var for libarchive depenencyDavid Disseldorp2014-02-192-3/+4
| | | | | | | | Avoid CONFIG_SET('HAVE_LIBARCHIVE') checks in wscript_build, by using a simple archive_lib variable. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar: get tar context handle via helper functionDavid Disseldorp2014-02-193-17/+37
| | | | | | | | | Add and use tar_get_ctx() to get the tarmode context handle in client.c, rather than declaring an extern. Also, add checks for NULL context pointer arguments. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>