1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

3856 Commits

Author SHA1 Message Date
Michael Adam
1be6c5787b net: add "net idmap get" command
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-02 00:06:34 +02:00
Atul Kulkarni
050fb746b3 net: add "net idmap set config" command to store the autorid global config
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-02 00:06:33 +02:00
Atul Kulkarni
d560cd11e4 net: add new function net_idmap_opendb_autorid()
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-02 00:06:31 +02:00
Michael Adam
f531c369eb net: rename "idmap_dump_ctx" to "net_idmap_ctx".
This started specific, but is now generic.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:06:31 +02:00
Michael Adam
29a94b0e1b net: move the "net idmap delete" functionality to subcommand "net idmap 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-02 00:06:30 +02:00
Michael Adam
68c4414fa5 net: add the "net idmap set secret" subcommand as alias for "net idmap secret"
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:06:30 +02:00
Michael Adam
a064119cf2 net: move the "net idmap set" functionality to subcommand "net idmap set 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-02 00:06:29 +02:00
Michael Adam
601b67bc57 net: rename "net idmap setmap" to "net idmap set"
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:06:29 +02:00
Michael Adam
873ae9c6b7 net: improve help text for "net idmap restore"
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-02 00:06:28 +02:00
Michael Adam
01e1794a11 net: improve help text for "net idmap dump"
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-10-02 00:06:28 +02:00
Alistair Leslie-Hughes
6bf9a77471 Stop use after free
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-27 14:29:43 +02:00
Michael Adam
1d9f281543 s3:net conf: add the same parameter checks to "setparm" as in "net rpc conf".
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-24 07:44:29 +02:00
Michael Adam
d16c2aabd7 s3:net: check for GLOBAL_NAME net_conf_param_valid()
instead of checking for literal "global"

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24 07:44:28 +02:00
Michael Adam
f7cf09e661 s3:net rpc conf: factor validation of parameter out for re-use.
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-24 07:44:28 +02:00
Michael Adam
349bcafe09 s3:net rpc conf: rename canon_valname->canon_param_name for clarity in setparm.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24 07:44:28 +02:00
Michael Adam
a00f97a392 s3:net rpc conf: setparm: introduce variables service_name, param_name, valstr for clarity
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24 07:44:28 +02:00
Michael Adam
3e53097689 s3:net rpc conf: reorganize the validity check and canonicalization of the input in "setparm"
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24 07:44:28 +02:00
Michael Adam
b7db29eb2a s3:net rpc conf: print the provided parameter name on error, not the canonicalized one
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24 07:44:28 +02:00
Michael Adam
bceb34543e s3:net rpc conf: remove the (now) unused rpc_conf_reg_valname_forbidden()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-09-24 07:44:28 +02:00
Michael Adam
0c4e5fcc53 s3:net rpc conf: use the published smbconf_reg_parameter_is_valid()
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-24 07:44:28 +02:00
Jeremy Allison
32037e0533 Add a talloc context to sitename_fetch().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-09-05 09:17:27 -07:00
Volker Lendecke
1173fed916 lib: Add "mem_ctx" to gencache_get_data_blob
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-05 09:16:22 -07:00
Michael Adam
122609affb smbtree: use the correct count variable from NetShareEnum result.
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-21 10:31:19 -07:00
Volker Lendecke
817e0ae687 log2pcaphex: Fix nonempty line endings
Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:08:13 +12:00
Jeremy Allison
f6ce50a8ac s3:smbcacls: Add -m<MAX PROTOCOL> option to smbcacls.
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-15 09:07:05 +02:00
Stefan Metzmacher
9177a0d1c1 libcli/auth: add more const to spnego_negTokenInit->mechTypes
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-10 11:11:53 +02:00
Stefan Metzmacher
966faef9c6 auth/gensec: treat struct gensec_security_ops as const if possible.
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-10 09:19:04 +02:00
Stefan Metzmacher
71c63e85e7 auth/gensec: introduce gensec_internal.h
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-10 09:19:02 +02:00
Stefan Metzmacher
05d9b4165a s3-net: avoid confusing output in net_rpc_oldjoin() if 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-05 10:30:01 +02:00
Günther Deschner
3e4ded48bb s3-net: use libnetjoin for "net rpc join" newstyle.
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-05 10:30:01 +02:00
Günther Deschner
9cfa625160 s3-net: use libnetjoin for "net rpc testjoin".
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-05 10:30:01 +02:00
Günther Deschner
d398a12f79 s3-libnetjoin: move "net rpc oldjoin" to use libnetjoin.
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-05 10:30:01 +02:00
Günther Deschner
9813fe2b04 s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().
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-05 10:30:00 +02:00
Günther Deschner
3dc3a6c848 s3-rpc_cli: pass down ndr_interface_table to 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-05 10:30:00 +02:00
Günther Deschner
f6d61b571d s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_schannel().
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-05 10:29:59 +02:00
Günther Deschner
93e92faca9 s3-net: pass down ndr_interface_table to connect_dst_pipe().
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-05 10:29:59 +02:00
Stefan Metzmacher
cfeeb3ce3d s3:ntlm_auth: remove pointless credentials->priv_data = NULL;
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-05 17:48:02 +12:00
Björn Baumbach
577cef82c7 s3-smbstatus: display [u|g]id of -1 as "-1" in connection list
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-07-10 01:18:30 +02:00
Volker Lendecke
780e2b092d sharesec: Implement --view-all
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-26 16:49:33 +02:00
Christian Ambach
212baedcd5 s3:utils/net_sam make use of pdb_create_builtin helper function
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-06-21 10:44:24 +02:00
Christian Ambach
e17bc56caf s3:utils/net_lookup fix a format-error
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-21 10:44:17 +02:00
Peng Haitao
55add52f42 smbcquotas.c: fix a bug of -t
'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
2013-06-04 13:06:52 +02:00
Michael Adam
89edff08db net: use smbconf_create_set_share() in "net conf import"
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
2013-05-28 20:01:12 +02:00
Peng Haitao
7174b2e18e When message-type is drvupgrade, MSG_DEBUG should be replaced with MSG_PRINTER_DRVUPGRADE.
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-05-22 17:00:47 -07:00
Peng Haitao
9a9949f92f When '--policies-reset' is success, the exit code should be 0.
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-05-22 17:00:41 -07:00
Karolin Seeger
8673d0d16b source3/utils/ntlm_auth.c: Fix typo in debug message.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-15 21:04:42 -07:00
Christian Ambach
e0a0280c4f s3:utils fix wrong usage of PRIu64 in sscanf
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-05-06 16:33:38 +02:00
Andreas Schneider
08d7caedf0 regedit: Use color only when available.
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
2013-04-29 15:02:19 +02:00
Andreas Schneider
92b6fc0ede regedit: Improve the while loop.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-04-29 13:08:24 +02:00
Andreas Schneider
7b970e930e regedit: Remove talloc leak report.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-04-29 13:08:23 +02:00