summaryrefslogtreecommitdiff
path: root/source3/utils
AgeCommit message (Collapse)AuthorFilesLines
2013-10-02net: allow "net idmap get ranges" to list all rangesMichael Adam1-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
2013-10-02net: implement "net idmap delete ranges"Michael Adam1-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>
2013-10-02net: add "net idmap get ranges" operation for autoridMichael Adam1-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>
2013-10-02net: implement "net idmap delete range"Michael Adam1-0/+95
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02net: implement "net idmap get range"Michael Adam1-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>
2013-10-02net: add "net idmap set range" (for autorid backend)Michael Adam1-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>
2013-10-02net idmap: add utility function parse_uint32()Volker Lendecke1-0/+24
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-02net: add "net idmap get config" to read the autorid config from the databaseAtul Kulkarni1-0/+50
Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02net: add "net idmap get" commandMichael Adam1-0/+17
This has no subcommands yet and is added in preparation of adding some. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02net: add "net idmap set config" command to store the autorid global configAtul Kulkarni1-0/+47
Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02net: add new function net_idmap_opendb_autorid()Atul Kulkarni1-0/+51
This checks the backend is autorid, and opens the db if so. If readonly == true, the DB is simply opened for reading. If readonly == false, the DB is created if necessary and initialized with HWMs. Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02net: rename "idmap_dump_ctx" to "net_idmap_ctx".Michael Adam1-6/+6
This started specific, but is now generic. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02net: move the "net idmap delete" functionality to subcommand "net idmap ↵Michael Adam1-5/+24
delete mapping" This is in preparation of adding more types of entries to delete... Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02net: add the "net idmap set secret" subcommand as alias for "net idmap secret"Michael Adam1-1/+9
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02net: move the "net idmap set" functionality to subcommand "net idmap set ↵Michael Adam1-3/+21
mapping" This is in preparation of adding more "net idmap set" subcommands for the autorid backend. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02net: rename "net idmap setmap" to "net idmap set"Michael Adam1-2/+3
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02net: improve help text for "net idmap restore"Michael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02net: improve help text for "net idmap dump"Michael Adam1-1/+1
With idmap autorid "dump ID mappings" is not precise enough any more. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-09-27Stop use after freeAlistair Leslie-Hughes1-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
2013-09-24s3:net conf: add the same parameter checks to "setparm" as in "net rpc conf".Michael Adam1-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>
2013-09-24s3:net: check for GLOBAL_NAME net_conf_param_valid()Michael Adam1-1/+1
instead of checking for literal "global" Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24s3:net rpc conf: factor validation of parameter out for re-use.Michael Adam3-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>
2013-09-24s3:net rpc conf: rename canon_valname->canon_param_name for clarity in setparm.Michael Adam1-2/+2
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24s3:net rpc conf: setparm: introduce variables service_name, param_name, ↵Michael Adam1-20/+29
valstr for clarity Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24s3:net rpc conf: reorganize the validity check and canonicalization of the ↵Michael Adam1-17/+23
input in "setparm" Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24s3:net rpc conf: print the provided parameter name on error, not the ↵Michael Adam1-1/+1
canonicalized one Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24s3:net rpc conf: remove the (now) unused rpc_conf_reg_valname_forbidden()Michael Adam1-21/+0
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24s3:net rpc conf: use the published smbconf_reg_parameter_is_valid()Michael Adam1-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>
2013-09-05Add a talloc context to sitename_fetch().Jeremy Allison1-12/+5
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-09-05lib: Add "mem_ctx" to gencache_get_data_blobVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21smbtree: use the correct count variable from NetShareEnum result.Michael Adam1-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>
2013-08-19log2pcaphex: Fix nonempty line endingsVolker Lendecke1-16/+15
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-15s3:smbcacls: Add -m<MAX PROTOCOL> option to smbcacls.Jeremy Allison1-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>
2013-08-10libcli/auth: add more const to spnego_negTokenInit->mechTypesStefan Metzmacher1-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
2013-08-10auth/gensec: treat struct gensec_security_ops as const if possible.Stefan Metzmacher1-11/+11
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-10auth/gensec: introduce gensec_internal.hStefan Metzmacher1-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>
2013-08-05s3-net: avoid confusing output in net_rpc_oldjoin() if ↵Stefan Metzmacher3-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>
2013-08-05s3-net: use libnetjoin for "net rpc join" newstyle.Günther Deschner3-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>
2013-08-05s3-net: use libnetjoin for "net rpc testjoin".Günther Deschner3-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>
2013-08-05s3-libnetjoin: move "net rpc oldjoin" to use libnetjoin.Günther Deschner1-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>
2013-08-05s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().Günther Deschner10-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>
2013-08-05s3-rpc_cli: pass down ndr_interface_table to ↵Günther Deschner1-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>
2013-08-05s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_schannel().Günther Deschner1-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>
2013-08-05s3-net: pass down ndr_interface_table to connect_dst_pipe().Günther Deschner4-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>
2013-08-05s3:ntlm_auth: remove pointless credentials->priv_data = NULL;Stefan Metzmacher1-1/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-07-10s3-smbstatus: display [u|g]id of -1 as "-1" in connection listBjörn Baumbach1-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
2013-06-26sharesec: Implement --view-allVolker Lendecke1-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>
2013-06-21s3:utils/net_sam make use of pdb_create_builtin helper functionChristian Ambach1-1/+1
Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-06-21s3:utils/net_lookup fix a format-errorChristian Ambach1-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>
2013-06-04smbcquotas.c: fix a bug of -tPeng Haitao1-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