summaryrefslogtreecommitdiffstats
path: root/source3/utils
Commit message (Collapse)AuthorAgeFilesLines
* locking: use correct conversion specifier for printing variablesRalph Boehme2014-06-131-2/+2
| | | | | | | | | | | | Fix several occurences of using printf conversion to fload when printing offset and count variables in locking debug messages and smbstatus. Conversion to float may lead to wrong results with very large values. Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* waf: fixup build with fake kaserver enabledChristian Ambach2014-06-041-0/+3
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:lib/afs move afs_settoken.c to common lib dirChristian Ambach2014-06-041-0/+1
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:lib/afs move afs.c to common lib dirChristian Ambach2014-06-041-0/+1
| | | | | | | | | | some of the code in afs.c is needed by wbinfo that lives in the toplevel nsswitch directory, so move the afs.c file to a new top-level lib/afs directory. Use the name afs_funcs to avoid collisions with the afs.h header from OpenAFS Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3/smbcacls: use security_ace_equal instead of sec_ace_equalDavid Disseldorp2014-05-291-4/+5
| | | | | | | Both offer the same functionality, sec_ace_equal() will be removed. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3/sharesec: use security_ace_equal instead of sec_ace_equalDavid Disseldorp2014-05-291-3/+5
| | | | | | | Both offer the same functionality, sec_ace_equal() will be removed. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3/profiles: improve copy_registry_tree() errorsDavid Disseldorp2014-05-281-4/+5
| | | | | | | | | | | | The current error logic doesn't distinguish between a NULL source security descriptor and ENOMEM. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed May 28 20:18:21 CEST 2014 on sn-devel-104
* s3/net_rpc_printer: replace dup_sec_desc() usageDavid Disseldorp2014-05-281-1/+11
| | | | | | | | | Use security_descriptor_copy() instead, which is also provided by libcli. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3/profiles: replace dup_sec_desc() usageDavid Disseldorp2014-05-281-2/+8
| | | | | | | | Use security_descriptor_copy() instead, which is also provided by libcli. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* sharesec: remove unused security descriptor print fnsDavid Disseldorp2014-05-281-85/+0
| | | | | | | | | IDL generated NDR routines are now used, so the old hand rolled functions can be removed. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* sharesec: use NDR security descriptor print fnsDavid Disseldorp2014-05-281-4/+12
| | | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* Add protocol version to smbstatus outputMathias Dietz2014-05-221-4/+4
| | | | | | | | | Signed-off-by: Mathias Dietz <mdietz@de.ibm.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu May 22 18:37:27 CEST 2014 on sn-devel-104
* s3: client : Add extra return parameter to all client open calls.Jeremy Allison2014-05-093-7/+9
| | | | | | | | | | | | | | | Add a return parameter of struct smb_create_returns *cr to cli_ntcreate() cli_ntcreate_recv() cli_nttrans_create() cli_nttrans_create_recv() Always pass in NULL for now. This fixes the create API to always fully return the data the server has given back to us on the open file to the caller. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbcontrol: Add dgm-cleanup commandVolker Lendecke2014-04-231-0/+20
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbcontrol: Clean up the msg_ctxVolker Lendecke2014-04-231-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-utils: Do not disable the root check in smbpasswd.Andreas Schneider2014-04-171-2/+0
| | | | | | | We will run uid_wrapper as root so that this succeeds. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Typo: Commiting -> CommittingJelmer Vernooij2014-04-141-1/+1
| | | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Change-Id: I9d71706ce6d6782da72a26fa37e33fe5b527788e Reviewed-on: https://gerrit.samba.org/217 Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Typo: speciefied -> specified.Jelmer Vernooij2014-04-131-1/+1
| | | | | | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Change-Id: I0357440cde2ef70945ff4a9ba87b62ab88b271a8 Reviewed-on: https://gerrit.samba.org/218 Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Sun Apr 13 19:12:22 CEST 2014 on sn-devel-104
* Typo: sucessfully -> successfullyJelmer Vernooij2014-04-132-3/+3
| | | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Change-Id: I23258edf9c197081c882ba85dedf833292e56e4e Reviewed-on: https://gerrit.samba.org/219 Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:utils: explicitly check the return value of fscanf() to avoid unused ↵Stefan Metzmacher2014-04-021-1/+1
| | | | | | | warnings in smbta-util.c Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:utils: check the status of open_socket_out() correctly in smbfilter.cStefan Metzmacher2014-04-021-3/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:utils: use char packet[] in smbfilter.c to avoid warningsStefan Metzmacher2014-04-021-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:utils: avoid argv related const warningsStefan Metzmacher2014-04-0210-22/+26
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* auth/gensec: remove tevent_context argument from gensec_update()Stefan Metzmacher2014-03-271-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3-net: add a new "net ads kerberos pac save" tool.Günther Deschner2014-03-121-0/+52
| | | | | | | | | | | | Use "filename=string" to define a file where to save the unencrypted PAC to. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Mar 12 13:02:59 CET 2014 on sn-devel-104
* s3-net: modify the current "net ads kerberos pac" command.Günther Deschner2014-03-121-38/+77
| | | | | | | | | | | Rename it to "net ads kerberos pac dump" and add a "type=num" option to allow dumping of individial pac buffer types. Ommitting type= or using type=0 will dump the whole PAC structure on stdout. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-kerberos: let kerberos_return_pac() return a PAC container.Günther Deschner2014-03-121-1/+4
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-kerberos: return a full PAC in kerberos_return_pac().Günther Deschner2014-03-121-1/+16
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-net: allow to provide custom local_service in "net ads kerberos pac".Günther Deschner2014-03-121-3/+11
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-net: change the way impersonation principals are used in "net ads ↵Günther Deschner2014-03-121-4/+10
| | | | | | | | | kerberos pac". Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-libads: pass down local_service to kerberos_return_pac().Günther Deschner2014-03-121-0/+8
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* CVE-2013-6442: s3:smbcacls - ensure we don't lose an existing ACL when ↵Jeremy Allison2014-03-111-1/+1
| | | | | | | | | | | | | setting owner or group owner. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10327 Bug 10327 - CVE-2013-6442: smbcacls --chown | --chgrp dacl regression Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Tue Mar 11 22:55:54 CET 2014 on sn-devel-104
* s3:utils/smbfilter: use a local variable for the packet bufferStefan Metzmacher2014-03-051-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* 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>