summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* s4: tidy up vfs cifs in regards to using share_string_optionGarming Sam2014-02-241-21/+22
| | | | | | | | Change-Id: I014bce667d3f875a913dbccf269b514f7ffbab7b Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* s4: tidy up some null checks in ntvfsGarming Sam2014-02-242-4/+4
| | | | | | | | Change-Id: I629a299bea10b063de4525020a4c6b838260cd67 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* libcli: Overflow array index read possible, in auth code.Ira Cooper2014-02-241-1/+1
| | | | | | | | | | | Changed the if condtion to detect when we'd improperly overflow. Coverity-Id: 1167990 Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Ira Cooper <ira@samba.org> Autobuild-Date(master): Mon Feb 24 11:56:38 CET 2014 on sn-devel-104
* Revert "libcli: Overflow array index read possible, in auth code."Ira Cooper2014-02-241-2/+2
| | | | | | This reverts commit 538cbfe0e90b7c7ed0f8421b323cac4dacd83f04. Signed-off-by: Ira Cooper <ira@samba.org>
* libcli: Overflow array index read possible, in auth code.Ira Cooper2014-02-241-2/+2
| | | | | | | | | | | | The values have to be signed here to allow for the values to go negative, to prevent the overflow. Coverity-Id: 1167990 Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Ira Cooper <ira@samba.org> Autobuild-Date(master): Mon Feb 24 07:23:03 CET 2014 on sn-devel-104
* 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>
* testprogs: Fix pkinit test with system ldb.Andreas Schneider2014-02-211-2/+10
| | | | | | | Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Feb 21 17:58:24 CET 2014 on sn-devel-104
* testprogs: Fix kinit test with system ldb.Andreas Schneider2014-02-211-2/+10
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* nsswitch: Fix idmap rfc2307 test with system ldb.Andreas Schneider2014-02-211-2/+11
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* selftest: Use the absolute path to the ldb modules.Andreas Schneider2014-02-211-1/+1
| | | | | | | This fixes 'make test' on Fedora with external ldb. Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* heimdal: Use krb5_free_default_realm() for free()Santosh Kumar Pradhan2014-02-211-3/+3
| | | | | | | | | | The resource allocated by krb5_default_default_realm() should be free()'d by krb5_free_default_realm() instead of plain free() for better readability. Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* kdc: Free the resource which is not used anymoreSantosh Kumar Pradhan2014-02-211-0/+1
| | | | | | | | | | | In samba_kdc_firstkey() routine, krb5_get_default_realm() allocates memory for "realm" but never used afterwards. Free() the leaked memory. CID: 1107223 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@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>
* krb5_locator: Slightly simplify codeVolker Lendecke2014-02-201-2/+1
| | | | | | | This makes it a bit easier to read for me 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>
* heimdal_build: only enable libintl functions if everything was foundChristian Ambach2014-02-201-1/+2
| | | | | | | | | | | | | | do not rely on intl.h being available but also on the functions being usable This should fix the build on HP-UX Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach <ambi@samba.org> Change-Id: I5dd88d2d5216b778624778455cca99b32d0be58f Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Feb 20 01:28:24 CET 2014 on sn-devel-104
* 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-204-4/+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-204-38/+24
| | | | | | | 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-203-34/+16
| | | | | | | 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-205-54/+19
| | | | | | | 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>
* lib/param: rename lp_string to lpcfg_stringGarming Sam2014-02-201-9/+9
| | | | | | | | | This avoids the confusion with lp_string in source3. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Change-Id: Ic6df23b9e5986f7d1fd6253e30ebfdc1a3a45a41 Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* lib/param: handle non-constant strings properly by passing in a memory contextGarming Sam2014-02-205-26/+45
| | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Change-Id: Ic6bb1c709defd2b0f35fc7b877da0badca385776 Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* s4: pass down a memory context when performing share_string_option, to allow ↵Garming Sam2014-02-2017-72/+151
| | | | | | | | | substitutions Signed-off-by: Garming Sam <garming@catalyst.net.nz> Change-Id: I24b36db3ac11834c3268b2da929e214c10268b16 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>