summaryrefslogtreecommitdiffstats
path: root/source3/utils
Commit message (Collapse)AuthorAgeFilesLines
* regedit_valuelist.c: Coverity fix; Initialize a variable.Christopher R. Hertel (crh)2014-02-141-1/+1
| | | | | | | | | | | | | | The <tmp> variable is tested at the end of the function to determine the return value, but <tmp> is never initialized and there are conditions under which it may be tested before a value is set. This patch initializes <tmp> to NULL, which means that WERR_NOMEM will be returned if the registry lookups fail. CID: 1168007 Signed-off-by: Christopher R. Hertel (crh) <crh@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/param: Remove special handling for 'state dir' and 'cache dir'Andrew Bartlett2014-02-121-6/+6
| | | | | | | | | | | | | | | The build system gives these two parameters different defaults (compared with lock dir) in both the --enable-fhs and default mode, so the logic to use lock dir no longer applies unless the build has been very specially constructed. Therefore, remove the special case handling and make these normal parameters again. Reviewed-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: rename lp function and variable from "encrypted_passwords" to ↵Garming Sam2014-02-071-2/+2
| | | | | | | | "encrypt_passwords" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from "printcommand" to "print_command"Garming Sam2014-02-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: rename lp function and variable from 'piddir' to 'pid_directory'Garming Sam2014-02-072-3/+3
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from 'passwordserver' to ↵Garming Sam2014-02-071-2/+2
| | | | | | | | 'password_server' Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from 'lockdir' to 'lock_directory'Garming Sam2014-02-071-3/+3
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from 'guestaccount' to 'guest_account'Garming Sam2014-02-071-5/+5
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dbwrap: add a dbwrap_flags argument to db_open()Michael Adam2014-02-076-10/+10
| | | | | | | | | | This is in preparation to support handing flags to backends, in particular activating read only record support for ctdb databases. For a start, this does nothing but adding the parameter, and all databases use DBWRAP_FLAG_NONE. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* loadparm: rename lp[cfg]_hostsdeny to lp[cfg]_hosts_deny for consistency ↵Michael Adam2014-02-031-3/+3
| | | | | | | | | with docs Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* loadparm: rename lp[cfg]_hostsallow to lp[cfg]_hosts_allow for consistency ↵Michael Adam2014-02-031-3/+3
| | | | | | | | | with docs Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* dbwrap_tool: add option "--non-persistent" and force excatly one of ↵Michael Adam2014-01-301-5/+18
| | | | | | | | | | | | | "--[non-]persistent" We want to force users of dbwrap_tool to explicitly specify persistent or non-persistent. Otherwise, one could easily by accident wipe a whole database that is actually persistent but not currently opened by a samba process, just by openeing the DB with the default non-persistent mode... Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dbwrap_tool: remove the short form "-p" of "--persistent"Michael Adam2014-01-301-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbcontrol: fix NUM_CHILDREN message deregisterDavid Disseldorp2014-01-141-1/+1
| | | | | | | | | | smbcontrol registers for MSG_SMB_NUM_CHILDREN response messages before sending a MSG_SMB_TELL_NUM_CHILDREN request. The same MSG_SMB_NUM_CHILDREN response message should be deregistered. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Christof Schmit <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libgpo: allow to pass down a list of deleted GPOs in gpo_process_gpo_list().Günther Deschner2014-01-071-1/+1
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libgpo: remove ads reference from dump calls and make them take const structs.Günther Deschner2014-01-071-6/+6
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:rpc_client: make cli_rpc_pipe_open_schannel() more flexibleStefan Metzmacher2014-01-071-3/+3
| | | | | | | | | | It expects a messaging_context now and returns a netlogon_creds_cli_context. This way we can finally avoid having a rpc_pipe_client->netlogon_creds. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:libnet: pass in struct netlogon_creds_cli_context from the caller.Stefan Metzmacher2014-01-071-0/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:net_rpc: make use of trust_pw_change()Stefan Metzmacher2014-01-071-1/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:net_rpc: add net_context->netlogon_credsStefan Metzmacher2014-01-072-0/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:libnet_join: make use of rpccli_{create,setup}_netlogon_creds()Stefan Metzmacher2014-01-071-1/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbd: Make "num_children" available by smbcontrolVolker Lendecke2014-01-061-0/+49
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmit <cs@samba.org>
* libgpo: remove some unnecessary usage of ADS_STATUS.Günther Deschner2013-12-181-2/+2
| | | | | | | | | Use NTSTATUS instead. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libgpo: remove unrequired references to ads_struct.Günther Deschner2013-12-181-1/+1
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: smbpasswd - fix crashes on invalid input.Jeremy Allison2013-12-163-5/+28
| | | | | | | | | | | | | | | | get_pass can return NULL on error. Ensure that this is always the case and fix all callers to cope (some already did). Reported by Joonas Kuorilehto <joneskoo@codenomicon.com> BUG: https://bugzilla.samba.org/show_bug.cgi?id=10320 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Dec 16 15:17:58 CET 2013 on sn-devel-104
* s3:utils/smbcontrol implement kill-client-ip in smbcontrolChristian Ambach2013-12-121-0/+23
| | | | | | | | allows the admin to forcefully shutdown the connection of a specified client by IP address Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libgpo: remove unused loadparm_context from functions.Günther Deschner2013-12-121-4/+3
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* CVE-2013-4408:s3:Ensure LookupRids() replies arrays are range checked.Jeremy Allison2013-12-091-1/+6
| | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Mon Dec 9 09:00:41 CET 2013 on sn-devel-104
* CVE-2013-4408:s3:Ensure LookupNames replies arrays are range checked.Jeremy Allison2013-12-091-1/+39
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* s3-utils: Fix a memory leak in smbget.Andreas Schneider2013-12-061-0/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:utils remove orphaned codeChristian Ambach2013-12-021-96/+0
| | | | | | | this does not even compile at all.. looks like a real orphan Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
* Rename the profile enums with a SAMBA_ prefix to avoid conflict with system ↵Jeremy Allison2013-11-221-8/+8
| | | | | | | | | files. WRITE_FLUSH is defined in fs.h in Linux. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-lib: Add grpname to talloc_sub_specified().Andreas Schneider2013-11-211-0/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=2191 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* testparm: don't warn for TCP_NODELAY in socket options.Michael Adam2013-11-201-3/+3
| | | | | | | TCP_NODELAY is set by default, so we should not warn. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* testparm: Warnings should not cause failureMartin Schwenke2013-11-201-4/+0
| | | | | | | | | | | | | Remove the return code of 1 associated with some warnings. Warnings should not cause failure. If any of these cases should cause a failure then they should be changed to errors. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Nov 20 12:19:59 CET 2013 on sn-devel-104
* s3-utils: Fix scanf format in sharesec.Andreas Schneider2013-11-151-3/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-utils: Fix scanf format in smbacls.Andreas Schneider2013-11-151-3/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* autorid: Correctly init range_index for "delete range"Volker Lendecke2013-11-141-0/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Nov 14 15:55:54 CET 2013 on sn-devel-104
* net: Fix CID 1035403 Unchecked return valueVolker Lendecke2013-11-111-1/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* net: remove net idmap secretAtul Kulkarni2013-11-081-8/+0
| | | | | | | | | | | This is moved to net idmap set secret for consistency. Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Nov 8 01:03:25 CET 2013 on sn-devel-104
* net: correct typos in net idmap delete ranges help messageAtul Kulkarni2013-11-071-2/+2
| | | | | | Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* testparm: Add warning for socket options.Andreas Schneider2013-11-041-0/+33
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Nov 4 16:52:25 CET 2013 on sn-devel-104
* testparm: Reformat text and add a newline.Andreas Schneider2013-11-041-54/+110
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-net: do not use rpc_pipe_np_smb_conn()Gregor Beck2013-10-171-23/+26
| | | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* net: allow "net idmap get ranges" to list all rangesMichael Adam2013-10-021-5/+7
| | | | | | | | | | Omission of SID parameter lists ranges for all domains. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Oct 2 12:23:33 CEST 2013 on sn-devel-104
* net: implement "net idmap delete ranges"Michael Adam2013-10-021-0/+67
| | | | | | | Inspired by a patch by Atul Kulkarni <atul.kulkarni@in.ibm.com>. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* net: add "net idmap get ranges" operation for autoridMichael Adam2013-10-021-0/+78
| | | | | | | | Implemented using the idmap_autorid_iterate_domain_ranges_read() function. Based on earlier patch by Atul Kulkarni <atul.kulkarni@in.ibm.com>. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* net: implement "net idmap delete range"Michael Adam2013-10-021-0/+95
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* net: implement "net idmap get range"Michael Adam2013-10-021-0/+86
| | | | | | | get the range for a domain sid and range index. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* net: add "net idmap set range" (for autorid backend)Michael Adam2013-10-021-0/+83
| | | | | | | | | | | | | | | This lets the admin store a range for a domain/index pair. Call syntax is: net idmap set range <RANGE> <DOMSID> [<INDEX>] INDEX defaults to 0. Pair-Programmed-With: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>