summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* lib: Enhance poll_funcs_tevent for multiple tevent_contextsVolker Lendecke2014-05-086-41/+398
| | | | | | | | | | | | | | | | | | With this patch it will be possible to use nested event contexts with messaging_filtered_read_send/recv. Before this patchset only the one and only event context a messaging_context is initialized with is able to receive datagrams from the unix domain socket. So if you want to code a synchronous RPC-like operation using a nested event context, you will not see the reply, because the nested event context does not have the required tevent_fd's. Unfortunately, this patchset has to add some advanced array voodoo. The idea is that state->watches[] contains what we hand out with watch_new, and state->contexts contains references to the tevent_contexts. For every watch we need a tevent_fd in every event context, and the routines make sure that the arrays are properly maintained. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging3: Add comments about not touching "waiters"Volker Lendecke2014-05-081-0/+16
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging3: Fix 80-char line limitVolker Lendecke2014-05-081-5/+9
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dbwrap: Use messaging_filtered_readVolker Lendecke2014-05-081-21/+21
| | | | | | | | | | This does not really save any code lines, but IMHO the code is simpler this way. Also, in case we have lots of watchers this will be slightly cheaper, because we don't have to re-establish a tevent_req. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* messaging3: Add messaging_filtered_readVolker Lendecke2014-05-082-25/+111
| | | | | | | | This delegates the decision whether to read a message to a callback Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* wbclient: ensure response struct is initializedAlexander Bokovoy2014-05-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to asking for a winbindd private pipe we need to initialize response structure to deal with a possible response failure. winbind_open_pipe_sock() issues two winbindd requests: - asks for interface version - asks for a private pipe The first call returns interface version in a response structure (which is a union). The second call might fail -- in this case response structure will not be initialized or filled in with any information. As result, if the second call failed, response structure will have data from an interface string interpreted as a pointer to a string during SAFE_FREE() at the end of the winbind_open_pipe_sock(). To avoid that, ensure response struct is initialized before asking for a private pipe. https://bugzilla.samba.org/show_bug.cgi?id=10596 Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 8 04:24:53 CEST 2014 on sn-devel-104
* s3-krb5: Limit search for old kvno to 8bitsChristof Schmitt2014-05-081-2/+5
| | | | | | | | | | | | Some keytab files store the kvno only in 8bits. Limit the compare to 8bits, so that we don't miss old keys and delete them. This fixes the problem that updates to the keytab file removed all previous keys. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Thu May 8 00:54:15 CEST 2014 on sn-devel-104
* param: Use an explicit talloc_stackframe() in lp_load_ex for clarity and ↵Andrew Bartlett2014-05-071-4/+9
| | | | | | | | | | certainty 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 May 7 22:14:21 CEST 2014 on sn-devel-104
* param: Use an explicit talloc_stackframe() in lp_do_parameter for clarity ↵Andrew Bartlett2014-05-071-3/+10
| | | | | | | and certainty. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: replace P_OCTAL variable setting with s3 version which uses sscanfGarming Sam2014-05-071-1/+5
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: change set_variable to be more consistent with s3 loadparmGarming Sam2014-05-071-1/+2
| | | | | | | | Correctly frees CMDLIST memory and uses lp_int instead of atoi. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: correctly return false when parsing invalid octal in lp_do_parameterGarming Sam2014-05-071-0/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: change a comment regarding helper parametric functionsGarming Sam2014-05-071-1/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: remove unnecessary get_parametric s3 helper functionGarming Sam2014-05-074-21/+0
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: use get_parametric_helper in lpcfg_get_parametricGarming Sam2014-05-071-33/+6
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: remove unused get_parametrics_by_serviceGarming Sam2014-05-071-51/+0
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: copy parametric option helper to lib/paramGarming Sam2014-05-072-4/+55
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: tidy up get_parametrics_by_serviceGarming Sam2014-05-071-24/+23
| | | | | | | | | Reorders the search to check the service first, then check the globals if it fails, or if none is specified, for better clarity. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: clean up lpcfg_get_parametricGarming Sam2014-05-071-13/+16
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: Provide a talloc_stackframe() to external users of lp_set_cmdline()Andrew Bartlett2014-05-071-0/+2
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: refactor lp_set_cmdline_helper to not call store_lp_set_cmdlineGarming Sam2014-05-071-10/+11
| | | | | | | | Currently worthless without a shared do_parameter. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: fix incorrect return on lp_set_cmdline_helperGarming Sam2014-05-071-1/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: Remove unused static variable defaults_savedAndrew Bartlett2014-05-071-1/+0
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: Make lpcfg_equal_parameter static (again)Andrew Bartlett2014-05-072-7/+1
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: Make and use lpcfg_dump_a_service() in commonAndrew Bartlett2014-05-072-48/+9
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Add a comment regarding strwicmp only being an ASCII string compareGarming Sam2014-05-071-1/+7
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: remove NUMPARAMETERS macro from lib/paramGarming Sam2014-05-071-8/+6
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: remove NUMPARAMETERS macro in s3Garming Sam2014-05-071-3/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* docs: enable checking of parametric options assignmentGarming Sam2014-05-071-4/+2
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: use strwicmp instead of strlower_tallocGarming Sam2014-05-071-7/+7
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: fix an error in the is_default method in lib/paramGarming Sam2014-05-071-1/+1
| | | | | | | | | This means that list values stored by s3 loadparm can still be detected as default or not. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: move parametric parameter dumping to lpcfg_dump_a_parameterGarming Sam2014-05-072-26/+26
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: remove fstring from dump_a_parameterGarming Sam2014-05-071-7/+12
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:loadparm: Fix dump a parameter to use the file indicatedGarming Sam2014-05-071-1/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: fix copy service to copy over cmdlistGarming Sam2014-05-071-0/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <abartlet@samba.org>
* param: correctly use param_table.c as a regular C fileGarming Sam2014-05-076-13/+23
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: use a single special handler for idmap parametersGarming Sam2014-05-072-37/+31
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: add lp_do_parameter to s3 helpersGarming Sam2014-05-072-0/+2
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: use a single handle_netbios_aliases functionGarming Sam2014-05-072-9/+12
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: include set_netbios_aliases in s3 helpersGarming Sam2014-05-072-0/+2
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: setup ctx variable in loadparm globalsGarming Sam2014-05-071-0/+2
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* move str_list_make_v3 out of s3 codeGarming Sam2014-05-074-69/+74
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: have a single handle_ldap_debug_level functionGarming Sam2014-05-072-9/+9
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: include init_ldap_debugging in the s3 helpersGarming Sam2014-05-072-0/+2
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: make lp_do_parameter_parametric use set_param_optGarming Sam2014-05-071-33/+4
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: move handle printing into lib/paramGarming Sam2014-05-075-29/+32
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: setup more variables in for the temporary loadparm context for the ↵Garming Sam2014-05-073-21/+20
| | | | | | | | | | | | | | special functions In doing so, the loadparm context definition is now also moved to the loadparm.h header. This means that the loadparm context is no longer private to the lib/param code and that the source3 code can now override the values within it. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: add extra default parameter to get_parametrics_by_serviceGarming Sam2014-05-074-5/+9
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: make init_printer_values use lpcfg functionsGarming Sam2014-05-072-36/+36
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: use lp_set_enum_parmGarming Sam2014-05-071-13/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>