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

200 Commits

Author SHA1 Message Date
Noel Power
ae2e9ce5c3 s3/rpc_client: clang: Fix 'Value stored during initialization is never read'
Fixes:

source3/rpc_client/cli_lsarpc.c:182:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-26 18:41:27 +00:00
Stefan Metzmacher
569c910b95 s3:cli_lsarpc: use talloc_zero_array() in dcerpc_lsa_lookup_names_generic()
It just feels better for such a complex function.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13281

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2018-02-21 14:19:17 +01:00
Stefan Metzmacher
5cae7da1de s3:cli_lsarpc: use talloc_zero_array() in dcerpc_lsa_lookup_sids_generic()
It just feels better for such a complex function.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13281

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2018-02-21 14:19:17 +01:00
Stefan Metzmacher
7fc19747ef s3:rpc_client: pass down lsa_LookupNamesLevel to dcerpc_lsa_lookup_sids_generic()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13236

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2018-02-10 08:35:16 +01:00
Ralph Boehme
416c74e8c8 s3/rpc_client: lookupsids error handling of NT_STATUS_NONE_MAPPED
NT_STATUS_NONE_MAPPED is not a fatal error, it just means we must return
all lsa_TranslatedName's as type SID_NAME_UNKNOWN.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12728

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-04-07 22:52:24 +02:00
Ralph Boehme
0e7e4ebad3 s3/rpc_client: use NT_STATUS_LOOKUP_ERR
No change in behaviour.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12728

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-04-07 22:52:24 +02:00
Chris Lamb
a4ab7c73bd Correct "occured" typos.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-02-22 08:26:21 +01:00
Richard Sharpe
8bcdd677ce Convert all uses of uint32/16/8 to _t in source3/rpc_client.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-05-12 01:32:12 +02:00
Jeremy Allison
0dc6181894 CVE-2013-4408:s3:Ensure LookupNames replies arrays are range checked.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
2013-12-09 07:05:46 +01:00
Jeremy Allison
b0ba4a5621 CVE-2013-4408:s3:Ensure LookupSids replies arrays are range checked.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
2013-12-09 07:05:46 +01:00
Günther Deschner
3c486dfee4 s3-rpc_client: make dcerpc_lsa_lookup_names_generic() public.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2012-11-30 11:49:41 +01:00
Günther Deschner
2d38154f91 s3-rpc_cli: make dcerpc_lsa_lookup_sids_generic() public.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2012-11-30 11:49:38 +01:00
Günther Deschner
457c933ff0 s3-rpc_cli: Remove some unused wrapping code.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2012-11-30 11:49:21 +01:00
Christian Ambach
7936fb0ab8 Fix bug #8807 - dcerpc_lsa_lookup_sids_noalloc() crashes when groups has more than 1000 groups
Use correct talloc heirarchy.

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-03-13 12:17:31 -07:00
Volker Lendecke
1bf126c0b3 s3: Remove some superfluous () 2012-03-09 17:21:11 +01:00
Andrew Bartlett
3d15137653 s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Günther Deschner
9824e2e5ee s3-rpc_client: add and use rpc_client/rpc_client.h.
Guenther
2011-04-13 22:23:59 +02:00
Michael Adam
e0681441af s3:rpc_client: fix argument order of call to lsa_open_policy2 in rpccli_lsa_open_policy2
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Mar 29 01:34:28 CEST 2011 on sn-devel-104
2011-03-29 01:34:28 +02:00
Günther Deschner
d2d3ac66ec s3-rpc_client: actually call lsa_open_policy2() in rpccli_lsa_open_policy2().
Found by Sumit Bose <sbose@redhat.com>, thanks!

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Mar 23 20:12:38 CET 2011 on sn-devel-104
2011-03-23 20:12:38 +01:00
Volker Lendecke
70c75b9ddf s3: Fix a typo
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Mar 11 13:15:00 CET 2011 on sn-devel-104
2011-03-11 13:15:00 +01:00
Andreas Schneider
da9cd736d2 s3-rpc_client: Fixed an uninitialized variable.
Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Feb 10 18:32:08 CET 2011 on sn-devel-104
2011-02-10 18:32:08 +01:00
Günther Deschner
5efe6566a0 s3-rpc_client: no need to include ../librpc/gen_ndr/ndr_lsa_c.h anymore.
Guenther
2011-01-18 23:54:31 +01:00
Andreas Schneider
93da0aab97 s3-rpc_client: Fixed status check of dcerpc_lsa_lookup_sids_noalloc.
Autobuild-User: Andreas Schneider <asn@samba.org>
Autobuild-Date: Mon Jan 17 17:35:50 CET 2011 on sn-devel-104
2011-01-17 17:35:50 +01:00
Andreas Schneider
296a958c57 s3-rpc_client: Fixed return values of dcerpc_lsa_lookup_sids_generic. 2011-01-17 16:50:55 +01:00
Andreas Schneider
3f21b971a9 s3-rpc_client: Fixed the dcerpc_lsa_LookupNames4 client_revision.
The spec states that the ClientRevision value MUST be one of the
following: LSA_CLIENT_REVISION_1 or LSA_CLIENT_REVISION_2.

LSA_CLIENT_REVISION_2 means Windows 2000 and newer.

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Jan 10 19:05:31 CET 2011 on sn-devel-104
2011-01-10 19:05:31 +01:00
Andreas Schneider
b1df95cbc5 s3-rpc_client: Fixed the dcerpc_lsa_LookupNames4 lookup_options.
Use the enum value in dcerpc_lsa_LookupNames4 for _lookup_options.

Signed-off-by: Günther Deschner <gd@samba.org>
2011-01-10 18:20:55 +01:00
Andreas Schneider
e02916c453 s3-rpc_client: Fixed the dcerpc_lsa_LookupSids3 client_revision.
The spec states that the ClientRevision value MUST be one of the
following: LSA_CLIENT_REVISION_1 or LSA_CLIENT_REVISION_2.

LSA_CLIENT_REVISION_2 means Windows 2000 and newer.

Signed-off-by: Günther Deschner <gd@samba.org>
2011-01-10 18:20:55 +01:00
Andreas Schneider
a53e0831d2 s3-rpc_client: Fixed the dcerpc_lsa_LookupSids3 lookup_options.
Use the enum value in dcerpc_lsa_LookupSids3 for _lookup_options.

Signed-off-by: Günther Deschner <gd@samba.org>
2011-01-10 18:20:55 +01:00
Andreas Schneider
fd1fff608c s3-rpc_client: Added dcerpc_lsa_lookup_names.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-01-10 18:20:55 +01:00
Andreas Schneider
c91e756f8d s3-rpc_client: Added dcerpc_lsa_lookup_sids and dcerpc_lsa_lookup_sids3.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-01-10 18:20:55 +01:00
Andreas Schneider
8f14229b28 s3-rpc_client: Added dcerpc_lsa_open_policy2.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-01-10 18:20:55 +01:00
Andreas Schneider
2f819505af s3-rpc_client: Added dcerpc_lsa_open_policy.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-01-10 18:20:54 +01:00
Volker Lendecke
8d28ae10d2 s3: Correctly calculate the wbinfo -s result 2010-11-24 16:07:55 +01:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Günther Deschner
102a70e809 s3-util: use shared dom_sid_dup.
Guenther
2010-09-20 14:05:07 -07:00
Günther Deschner
e978a3d3f4 s3-lsa: separate out init_lsa headers.
Guenther
2010-08-25 22:50:39 +02:00
Andreas Schneider
30d25210a9 s3-rpc_client: Use the right memory context for array elements. 2010-07-05 15:59:05 +02:00
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Günther Deschner
230b880d14 s3-rpc_client: move protos to cli_lsarpc.h
Guenther
2010-05-18 21:42:41 +02:00
Günther Deschner
3d679a3b5f s3-rpc: Avoid including every pipe's client and server stubs everywhere in samba.
Guenther
2009-11-26 20:03:17 +01:00
Volker Lendecke
92a16b91e8 fix bogus "out of memory" winbind msg
Signed-off-by: Michael Adam <obnox@samba.org>
2009-11-13 11:36:06 +01:00
Günther Deschner
a4b5c792c5 s3-rpc_client: fix non initialized structure in rpccli_lsa_lookup_sids_noalloc.
Guenther
2009-09-18 21:32:45 +02:00
Günther Deschner
2f9adf04e4 s3-rpc_client: add rpccli_lsa_lookup_sids3 wrapper.
Guenther
2009-09-14 06:49:58 +02:00
Günther Deschner
ff968712ba s3-rpc_client: add rpccli_lsa_lookup_names4 wrapper.
Guenther
2009-09-14 06:49:58 +02:00
Günther Deschner
531af136f9 s3: remove POLICY_HND.
Guenther
2009-03-18 23:22:29 +01:00
Günther Deschner
e2fa47a04c s3-lsa: avoid all init_lsa* functions.
Guenther
2009-01-06 16:02:13 +01:00
Volker Lendecke
41525152f5 Remove some fully outdated sample code
(This used to be commit 0df0e81784)
2008-07-21 14:36:30 +02:00
Volker Lendecke
9048cafbea Move srv_name_slash from cli_state to rpc_pipe_client
(This used to be commit a9061e52e1)
2008-04-20 00:14:13 +02:00
Günther Deschner
dc2274819e Fix rpccli_lsa_lookup_sids_noalloc.
When looking up e.g. a trusted doamin account, there is just no name.

Michael, please check.

Guenther
(This used to be commit ea3cfadc25)
2008-04-03 00:27:02 +02:00
Günther Deschner
fd62e5688b Use existing srv_name_slash.
Guenther
(This used to be commit 5f2b3145fc)
2008-03-12 16:35:41 +01:00