summaryrefslogtreecommitdiffstats
path: root/source3/utils
Commit message (Collapse)AuthorAgeFilesLines
* Stop use after freeAlistair Leslie-Hughes2013-09-271-1/+5
| | | | | | | | | | | | Fixes bug #10087 Thanks to Man Min Yan for their analysis and providing a solution to the issue. Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep 27 14:29:46 CEST 2013 on sn-devel-104
* s3:net conf: add the same parameter checks to "setparm" as in "net rpc conf".Michael Adam2013-09-241-0/+5
| | | | | | | | | | | | | | | | In "net rpc conf" these checks are necessary, since the that command uses the plain rpc-registry interface at this moment, and so unfortunately it has to duplicate the checks from the smbconf library. Since "net conf" uses the registry, these checks are not necessary in this command. I add them nonetheless to make the output more similar to "net rpc conf". It is also a little more user friendy than just printing "INVALID_PARAMETER" as handed back from libsmbconf. Implement these checks by calling the new net_conf_param_valid() function. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:net: check for GLOBAL_NAME net_conf_param_valid()Michael Adam2013-09-241-1/+1
| | | | | | | instead of checking for literal "global" Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:net rpc conf: factor validation of parameter out for re-use.Michael Adam2013-09-243-36/+104
| | | | | | | | This goes into a new module net_conf_util to be shared between net conf and net rpc conf. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:net rpc conf: rename canon_valname->canon_param_name for clarity in setparm.Michael Adam2013-09-241-2/+2
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:net rpc conf: setparm: introduce variables service_name, param_name, ↵Michael Adam2013-09-241-20/+29
| | | | | | | valstr for clarity Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:net rpc conf: reorganize the validity check and canonicalization of the ↵Michael Adam2013-09-241-17/+23
| | | | | | | input in "setparm" Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:net rpc conf: print the provided parameter name on error, not the ↵Michael Adam2013-09-241-1/+1
| | | | | | | canonicalized one Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:net rpc conf: remove the (now) unused rpc_conf_reg_valname_forbidden()Michael Adam2013-09-241-21/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:net rpc conf: use the published smbconf_reg_parameter_is_valid()Michael Adam2013-09-241-1/+1
| | | | | | | Instead of the duplicated rpc_conf_reg_valname_forbidden() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Add a talloc context to sitename_fetch().Jeremy Allison2013-09-051-12/+5
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* lib: Add "mem_ctx" to gencache_get_data_blobVolker Lendecke2013-09-051-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbtree: use the correct count variable from NetShareEnum result.Michael Adam2013-08-211-1/+1
| | | | | | | Fixes potential segfault, as for rpcclient from bug #10100 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* log2pcaphex: Fix nonempty line endingsVolker Lendecke2013-08-191-16/+15
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:smbcacls: Add -m<MAX PROTOCOL> option to smbcacls.Jeremy Allison2013-08-151-0/+4
| | | | | | | | https://bugzilla.samba.org/show_bug.cgi?id=9514 Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* libcli/auth: add more const to spnego_negTokenInit->mechTypesStefan Metzmacher2013-08-101-1/+1
| | | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Aug 10 11:11:54 CEST 2013 on sn-devel-104
* auth/gensec: treat struct gensec_security_ops as const if possible.Stefan Metzmacher2013-08-101-11/+11
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* auth/gensec: introduce gensec_internal.hStefan Metzmacher2013-08-101-0/+1
| | | | | | | | | | We should treat most gensec related structures private. It's a long way, but this is a start. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3-net: avoid confusing output in net_rpc_oldjoin() if ↵Stefan Metzmacher2013-08-053-3/+14
| | | | | | | | | | | NET_FLAGS_EXPECT_FALLBACK is passed "net rpc join" tries net_rpc_oldjoin() first and falls back to net_rpc_join_newstyle(). We should not print the join failed if just net_rpc_oldjoin() failed. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-net: use libnetjoin for "net rpc join" newstyle.Günther Deschner2013-08-053-561/+107
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-net: use libnetjoin for "net rpc testjoin".Günther Deschner2013-08-053-30/+67
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-libnetjoin: move "net rpc oldjoin" to use libnetjoin.Günther Deschner2013-08-051-98/+84
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().Günther Deschner2013-08-0510-27/+26
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpc_cli: pass down ndr_interface_table to ↵Günther Deschner2013-08-051-2/+2
| | | | | | | | | | cli_rpc_pipe_open_schannel_with_key(). Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_schannel().Günther Deschner2013-08-051-1/+1
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-net: pass down ndr_interface_table to connect_dst_pipe().Günther Deschner2013-08-054-10/+10
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:ntlm_auth: remove pointless credentials->priv_data = NULL;Stefan Metzmacher2013-08-051-1/+0
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3-smbstatus: display [u|g]id of -1 as "-1" in connection listBjörn Baumbach2013-07-101-4/+20
| | | | | | | | | | | | | In order to avoid displayed uid or gid of "4294967295" instead of "-1", we need to fetch the special case -1. The id can be -1 if we are reading e.g. incomplete session information. Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jul 10 01:18:30 CEST 2013 on sn-devel-104
* sharesec: Implement --view-allVolker Lendecke2013-06-261-1/+34
| | | | | | | | | | | | | | | | | | | | Listing individual shares can be quite slow when you have a lot of shares. This implements a --view-all option that prints something like [share1] REVISION:1 OWNER:(NULL SID) GROUP:(NULL SID) ACL:S-1-1-0:ALLOWED/0/FULL [share2] REVISION:1 OWNER:(NULL SID) GROUP:(NULL SID) ACL:S-1-1-0:ALLOWED/0/FULL Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:utils/net_sam make use of pdb_create_builtin helper functionChristian Ambach2013-06-211-1/+1
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:utils/net_lookup fix a format-errorChristian Ambach2013-06-211-1/+1
| | | | | | | clang complains about short being used for unsigned as format-error Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbcquotas.c: fix a bug of -tPeng Haitao2013-06-041-1/+1
| | | | | | | | | | | 'r' should be replaced with 't'. Signed-off-by: Peng Haitao <penght@cn.fujitsu.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Jun 4 13:06:52 CEST 2013 on sn-devel-104
* net: use smbconf_create_set_share() in "net conf import"Michael Adam2013-05-281-47/+2
| | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue May 28 20:01:12 CEST 2013 on sn-devel-104
* When message-type is drvupgrade, MSG_DEBUG should be replaced with ↵Peng Haitao2013-05-221-1/+1
| | | | | | | MSG_PRINTER_DRVUPGRADE. Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* When '--policies-reset' is success, the exit code should be 0.Peng Haitao2013-05-221-1/+1
| | | | | Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* source3/utils/ntlm_auth.c: Fix typo in debug message.Karolin Seeger2013-05-151-1/+1
| | | | | Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:utils fix wrong usage of PRIu64 in sscanfChristian Ambach2013-05-061-1/+3
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Use color only when available.Andreas Schneider2013-04-291-1/+8
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Apr 29 15:02:19 CEST 2013 on sn-devel-104
* regedit: Improve the while loop.Andreas Schneider2013-04-291-8/+7
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Remove talloc leak report.Andreas Schneider2013-04-291-4/+0
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Mark string values if they contain unprintable chars.C. Davis2013-04-293-3/+31
| | | | | | | Also, edit the values in bin mode to avoid screen glitches. Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Add an edit binary command.C. Davis2013-04-293-12/+27
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Handle zero-length buffers better with hexedit.C. Davis2013-04-292-2/+19
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Load values on startup.C. Davis2013-04-291-4/+12
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Simplify the editor dialog input loop.C. Davis2013-04-291-47/+56
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Fix white space and wrap long lines.C. Davis2013-04-294-16/+25
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Add missing copyright headers to hexedit code.C. Davis2013-04-292-0/+38
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Enable using tab to cycle thru dialog buttons.C. Davis2013-04-291-13/+65
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Restore cursor position when user tabs to a field.C. Davis2013-04-291-0/+5
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Add a general help section.C. Davis2013-04-291-7/+16
| | | | | Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>