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

216 Commits

Author SHA1 Message Date
Stefan Metzmacher
5ca59a1772 s3:libsmb: don't pass 'passlen' to cli_tree_connect[_send]() and allow pass=NULL
There're no callers which try to pass a raw lm_response directly anymore.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Dec  9 13:09:37 CET 2016 on sn-devel-144
2016-12-09 13:09:37 +01:00
Stefan Metzmacher
d6d8893d56 s3:popt_common: simplify popt_common_credentials handling
This offers a global 'struct user_auth_info *cmdline_auth_info',
similar to the 'cmdline_credentials' we have in
source4/lib/cmdline/popt_common.c.

And we create that in the POPT_CALLBACK_REASON_PRE stage
and finalize it in the POPT_CALLBACK_REASON_POST stage.

That means much less boring work for the callers
and more freedom to change the user_auth_info internals
in future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-15 11:00:26 +01:00
Christof Schmitt
e2642da130 smbcacls: Do not read old ACL for 'set' operation
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-04-30 01:01:42 +02:00
Uri Simchoni
6cff009547 smbcacls: fix uninitialized variable
An uninitialized variable causes "numeric" mode to be
used without the -n option.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11682

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Jan 20 12:12:12 CET 2016 on sn-devel-144
2016-01-20 12:12:12 +01:00
Richard Sharpe
57941aa044 s3: utils: Convert all uses of uint32/16/8 to _t.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May  7 04:53:39 CEST 2015 on sn-devel-104
2015-05-07 04:53:39 +02:00
Christof Schmitt
42c46ab642 smbcacls: Move sec_desc_print to common file
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11237

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:24 +02:00
Christof Schmitt
541ddde872 smbcacls: Move print_ace and parse_ace to common file
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11237

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:24 +02:00
Christof Schmitt
a519b3e6c6 smbcacls: Move StringToSid to common file
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11237

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:24 +02:00
Christof Schmitt
7eeca44f03 smbcacls: Move SidToString to common file
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11237

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:23 +02:00
Christof Schmitt
9e1ebdc7ec smbcacls: Use defines for security flags
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11237

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:23 +02:00
Christof Schmitt
d0c4969581 smbcacls: Make 'numeric' a local variable
This will allow moving code to a shared file without relying on a global
variable.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11237

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-25 00:04:23 +02:00
Volker Lendecke
c51300ad89 lib: load_case_tables() -> smb_init_locale()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-24 00:00:20 +01:00
David Disseldorp
49b500a61f smbcacls: parse config file argument prior to load
Fixes usage with the common "-s|--configfile" parameter.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jul  7 23:30:50 CEST 2014 on sn-devel-104
2014-07-07 23:30:50 +02:00
David Disseldorp
bc70d58cbc s3/smbcacls: use security_ace_equal instead of sec_ace_equal
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>
2014-05-29 01:08:25 +02:00
Jeremy Allison
69e24b4e8b s3: client : Add extra return parameter to all client open calls.
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>
2014-05-09 23:10:07 +02:00
Stefan Metzmacher
c2a26fe5e7 s3:utils: avoid argv related const warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:43 +02:00
Jeremy Allison
41d8d99d8a CVE-2013-6442: s3:smbcacls - ensure we don't lose an existing ACL when 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
2014-03-11 22:55:53 +01:00
Andreas Schneider
4c98b9ce8f s3-utils: Fix scanf format in smbacls.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-15 11:07:43 -08: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
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
Stefan Metzmacher
0e2e3ff5e8 s3:smbcacls: add --query-security-info and --set-security-info options
This allows the caller to specify the security_information flags.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2012-12-02 23:08:23 +01:00
Stefan Metzmacher
3101fcccff s3:util: fix usage of popt_burn_cmdline_password()
We should only call popt_burn_cmdline_password() after poptFreeContext(),
otherwise we remove the password to early.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2012-11-30 11:50:03 +01:00
Andreas Schneider
50d47fc081 s3fs-client: Burn commandline password of client utils.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov  8 21:24:21 CET 2012 on sn-devel-104
2012-11-08 21:24:21 +01:00
Andreas Schneider
39e58d6845 s3fs-utils: Free the popt context in smbcacls and smbquotas.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 30 20:22:46 CET 2012 on sn-devel-104
2012-10-30 20:22:46 +01:00
Stefan Metzmacher
9cae92b485 s3:utils: use cli_tree_connect() instead of cli_tcon_andx()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed May 30 12:54:05 CEST 2012 on sn-devel-104
2012-05-30 12:54:05 +02:00
Jeremy Allison
571ee0b1ff Only ask for specific permissions required when setting an ACL.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Feb  3 03:07:33 CET 2012 on sn-devel-104
2012-02-03 03:07:32 +01:00
Stefan Metzmacher
c6ed8e3211 s3:utils: make use of cli_tree_connect()
metze
2011-11-24 19:02:32 +01:00
Gregor Beck
89b76b5611 s3:smbcacls: fix violation of coding conventions
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Michael Adam
b8eec18e39 s3:smbcacls: make get_domain_sid() static 2011-10-12 22:45:52 +02:00
Gregor Beck
9d688cd7be s3:smbcacls fix leaking talloc stackframce on tcon failure
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Gregor Beck
858e4cb1b6 s3:smbcacls fix possible SEGFAULT
sddl_encode returns NULL on failure

Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Gregor Beck
724b48bc08 s3:smbcacls add option domain-sid
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Gregor Beck
61631f427a s3:smbcacls get_domain_sid for sddl parsing/formating from lsarpc
get_global_sid panics if we are not root and may give the wrong answer anyway.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Gregor Beck
2c78d4c89d s3:smbcacls pretty print acl control field
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Michael Adam
b608cfc8ec s3:smbcacls: use lp_load_global() 2011-07-28 11:17:38 +02:00
Björn Baumbach
eacd555f70 s3-utils/smbcacls.c: replace cli_query_secdesc_old()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:31:02 +02:00
Björn Baumbach
768646c9a2 s3-libsmb: rename cli_query_secdesc() to cli_query_secdesc_old()
Will introduce new cli_query_secdesc() function

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:56 +02:00
Stefan Metzmacher
d60a1b4bb0 s3:smbcacls: pass down NULL instead of a zero sockaddr_storage
metze
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
8f41e54d53 s3:libsmb: move cli->cnum to cli->smb1.tid and hide it behind cli_state_[g|s]et_tid()
metze
2011-07-20 15:56:27 +02:00
Andrew Bartlett
74eed8f3ed s3-param Remove special case for global_myname(), rename to lp_netbios_name()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Gregor Beck
c967e8fae5 s3:smbcacls: fix parsing of multiple flags
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-30 17:42:27 +02:00
Günther Deschner
27022587e3 s3-libsmb: move protos to libsmb/proto.h
Guenther
2011-05-06 16:37:18 +02:00
Andrew Bartlett
0eca33bbf6 s3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIR
This means we use just one constant for this file attribute.

Andrew Bartlett
2011-04-29 16:38:13 +10:00
Günther Deschner
235f148590 s3-passdb: use passdb headers where needed.
Guenther
2011-03-30 01:13:08 +02:00
Volker Lendecke
e88b9df78b s3: Fix Coverity ID 2202, NULL_RETURNS 2011-03-23 12:19:57 +01:00
Günther Deschner
7a91282c9f s3-libsmb: only include rap client when needed.
Guenther
2011-03-15 21:16:35 +01:00
Andreas Schneider
bf18403c81 s3-rpc_client: Move client pipe functions to own header. 2011-02-28 18:15:04 +01:00
Volker Lendecke
bc5554bdcc s3: Fix some nonempty blank lines 2011-01-17 08:03:40 +01:00
Volker Lendecke
77f8b004dc s3: Avoid some calls to cli_errstr
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Jan 15 17:18:54 CET 2011 on sn-devel-104
2011-01-15 17:18:54 +01:00
Volker Lendecke
50b3458261 s3: Convert cli_set_secdesc to cli_trans 2011-01-15 16:34:35 +01:00