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

155 Commits

Author SHA1 Message Date
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
Volker Lendecke
03451a516a Fix coverity ID 525, 526, 527, 528, 529 and 530
Upon failure to allocate one of the arrays, further down the TALLOC_FREE would
have looked at the variables given to it without initizalizing.
(This used to be commit 6cac312731)
2008-03-05 22:36:18 +01:00
Günther Deschner
7269a504fd Add my copyright.
Guenther
(This used to be commit d078a87571)
2008-02-27 19:38:48 +01:00
Günther Deschner
d9a465b8df Use rpccli_lsa_LookupSids() in rpccli_lsa_lookup_sids_noalloc().
Guenther
(This used to be commit b62eddbc4e)
2008-02-18 10:03:49 +01:00
Günther Deschner
e655a10736 Use rpccli_lsa_LookupNames() inside of rpccli_lsa_lookup_names.
Guenther
(This used to be commit 5c0a2d697f)
2008-02-18 10:01:24 +01:00
Günther Deschner
ad5794ad5c Remove unused marshalling for LSA_REMOVE_ACCT_RIGHTS.
Guenther
(This used to be commit 80e39330bf)
2008-02-14 15:29:51 +01:00
Günther Deschner
d64ae7328a Remove unused marshalling for LSA_ENUM_ACCT_RIGHTS.
Guenther
(This used to be commit 34c0e64026)
2008-02-14 15:11:35 +01:00
Günther Deschner
25bc71f117 Remove unused marshalling for LSA_ADD_ACCT_RIGHTS.
Guenther
(This used to be commit 15b97d1aaf)
2008-02-14 14:40:27 +01:00
Günther Deschner
c6cd8ec909 Remove unused marshalling for LSA_LOOKUP_PRIV_VALUE.
Guenther
(This used to be commit 8125d8557f)
2008-02-14 13:53:27 +01:00
Günther Deschner
341e5ea3eb Remove unused marshalling for LSA_ENUMPRIVSACCOUNT.
Guenther
(This used to be commit 004598bc13)
2008-02-14 13:13:09 +01:00
Günther Deschner
8f7cc004ff Remove unused marshalling for LSA_ENUM_ACCOUNTS.
Guenther
(This used to be commit 8c476ad516)
2008-02-14 01:34:34 +01:00
Günther Deschner
2600cb6b9b Remove unused marshalling for LSA_ENUM_TRUST_DOM.
Guenther
(This used to be commit 90b07714dd)
2008-02-13 00:37:19 +01:00
Günther Deschner
76f654e21c Remove unused marshalling for LSA_PRIV_GET_DISPNAME.
Guenther
(This used to be commit d853f4f263)
2008-02-11 19:16:05 +01:00
Günther Deschner
0e4088e626 Let rpccli_lsa_open_policy[2] be convenience wrappers around their pidl equivalents.
Guenther
(This used to be commit 4ca3b1c02e)
2008-02-11 17:50:18 +01:00
Günther Deschner
1042b0ce37 Remove unused marshalling for LSA_ENUM_PRIVS.
Guenther
(This used to be commit 793e5a608b)
2008-02-11 10:49:35 +01:00
Günther Deschner
5c23f7d73c Remove unused marshalling for LSA_OPENACCOUNT.
Guenther
(This used to be commit bb8e77eb74)
2008-02-08 22:44:42 +01:00
Günther Deschner
ef01ceff89 Remove unused marshalling for LSA_CREATEACCOUNT.
Guenther
(This used to be commit c9a8baf507)
2008-02-08 22:38:34 +01:00
Günther Deschner
99a134a74e Remove unused marshalling for LSA_QUERY_INFO.
Guenther
(This used to be commit f193d7d944)
2008-02-08 10:26:37 +01:00
Günther Deschner
b13277ed4e Remove unused marshalling for LSA_QUERY_INFO2.
Guenther
(This used to be commit 0fac016d9d)
2008-02-08 10:16:08 +01:00
Günther Deschner
8a1f56a90e Remove rpccli_lsa_query_info_policy_new and rpccli_lsa_query_info_policy_new2.
Guenther
(This used to be commit 08888e3773)
2008-02-08 10:02:52 +01:00
Günther Deschner
a1c2242f3f Remove unused marshalling for LSA_QUERY_SEC_OBJ.
Guenther
(This used to be commit 9b2aeeb369)
2008-02-04 22:12:41 +01:00
Günther Deschner
c920764b19 Apply const to rpccli_lsa_query_info_policy() and rpccli_lsa_query_info_policy2().
Guenther
(This used to be commit 7a3fe68bef)
2008-01-15 16:40:22 +01:00
Günther Deschner
862e1685b8 Remove old lsa set info policy call.
Guenther
(This used to be commit b37b2b77ed)
2008-01-14 17:16:06 +01:00
Günther Deschner
08946cc546 Remove some more hand written LSA rpc.
(rpccli_lsa_open_trusted_domain,
rpccli_lsa_query_trusted_domain_info,
cli_lsa_query_domain_info_policy).

Guenther
(This used to be commit 5bfb33f1c5)
2008-01-14 15:29:52 +01:00
Günther Deschner
c939441411 Start removing hand-written lsa marshalling code (namely
rpccli_lsa_open_trusted_domain_by_name,
rpccli_lsa_query_trusted_domain_info_by_sid and
rpccli_lsa_query_trusted_domain_info_by_name).

Guenther
(This used to be commit f2fb347345)
2008-01-14 15:29:43 +01:00
Jeremy Allison
6b6655edd9 Remove pstrings from everything except srv_spoolss_nt.c.
Jeremy.
(This used to be commit 0002a9e96b)
2007-11-27 14:35:30 -08:00
Jeremy Allison
66298d8080 More pstring elimination.
Jeremy.
(This used to be commit 15074de938)
2007-11-20 17:18:16 -08:00
Jeremy Allison
922db25272 Fix a mismatched interface where we were using
uint32 instead of enum lsa_SidType.
Jeremy.
(This used to be commit 2df8252ff7)
2007-10-25 18:29:49 -07:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe9)
2007-10-10 15:34:30 -05:00
Michael Adam
88eda8245d r25254: Add my C - Michael
(This used to be commit 3246be8cf0)
2007-10-10 12:30:55 -05:00
Michael Adam
6f5869461c r25247: Rename the rpccli_lsa_lookup_sids_all() function to rpccli_lsa_lookup_sids()
and remove the old rpccli_lsa_lookup_sids() function. The old function would
fail due to server limits when requesting to resolve too many sids at once
(20480 for W2k3). The new version passes the list of sids in hunks to the
server. It has up to now been used (and tested) in the winbindd_ads
lookup_groupmem() function, and I think the time has come to replace the actual
function with this correct version.

Michael
(This used to be commit 1194d4f36e)
2007-10-10 12:30:54 -05:00
Michael Adam
0d1e7e97d3 r25226: Get rid of more red bars...
(This used to be commit aa603bcc6c)
2007-10-10 12:30:52 -05:00
Michael Adam
0ed9c5569a r25225: Add a debug message.
Michael
(This used to be commit 7238884c2c)
2007-10-10 12:30:52 -05:00
Michael Adam
c57da5d796 r25224: Fix a potential segfault in lsa_lookupsids client code due to
uninitialized data.

Michael
(This used to be commit b4fff6d09d)
2007-10-10 12:30:51 -05:00
Michael Adam
5bf7692997 r25223: Fix behaviour of rpccli_lsa_lookupsids_all() when
rpccli_lsa_lookupsids_noalloc() returns an error for one hunk
of SIDs: free all allocated arrays and return the error code
returned by the hunk lookup.

Michael
(This used to be commit 2c68ebd693)
2007-10-10 12:30:51 -05:00
Michael Adam
d86c441b46 r24784: Initialize uninitalized data to prevent segfaults.
Thanks to Volker for the hint!

Michael
(This used to be commit 3b7ed3ea88)
2007-10-10 12:30:21 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Günther Deschner
7eb828135b r23627: Allow to pass down the lookup-level to rpccli_lsa_lookup_names().
Guenther
(This used to be commit e9a7512a9f)
2007-10-10 12:23:38 -05:00
Jeremy Allison
2e6deee020 r23400: Fix lsa crash bug #4683. The "names" enum struct
in a lookup_sidX reply isn't optional - like the
lookup_sidX query it needs to be defined in the
struct.
All this will go away with PIDL (thank goodness....).
Jerry - I think this is a showstopper to be merged
for 3.0.25b.
I'll be watching the build farm to see if anything broke.
Jeremy.
(This used to be commit 9300b92f7a)
2007-10-10 12:23:13 -05:00
Michael Adam
cda3cf211b r23082: Ooops - that portion of the last checkin was by accident.
Before comitting that, I have to verify that it does not
break anything...

Michael
(This used to be commit 55ea93d47e)
2007-10-10 12:22:43 -05:00
Michael Adam
5d1755710a r23081: Reorder the lsa_lookup_sids functions so that the order makes more sense...
(This used to be commit 374dea8c6f)
2007-10-10 12:22:43 -05:00
Michael Adam
9d6fd22e27 r23073: In the internal rpccli_lsa_lookup_sids_noalloc(), use a temporary
talloc context for use with the actual rpc query and response.
So the the parent context does not get flooded by the posslibly
large amount of response data (when looking up a lot of sids).

Note: It not possible, to simply use the names and domains arrays
as talloc contexts for the talloc_strdup calls, because from
rpccli_lsa_lookup_sids_all, this is called with names + offset
and domains + offset where names and domains are talloced
arraye for the complete response.
(This used to be commit 8e60900c5c)
2007-10-10 12:22:18 -05:00
Michael Adam
87d30dc32d r23070: The lsa rpc lookup sids call has a maximum number of SIDS to be
looked up at one time. This limit is at 20480 for w2k3.
Our rpccli_lsa_lookup_sids function ignores this limit, so when
we give the server too long a list of SIDs, then we will get
nothing back. Since typically rpccli_lsa_lookup_sids is given
one SID  (or a small number of SIDS), this did not do harm
up to now. But since I want to use lsa_lookup_sids in a subsequent
modification to winbindd_ads.c:lookup_groupmem to get rid of
a vast number of dn_lookup calls to the server, I had to make
sure we do it correctly.

I have added a function rpccli_lsa_lookup_sids_all function
that has the same prototype but internally splits the list
of SIDs up into hunks of a (conservative, hard coded) 1000
SIDs each for a first go.

If this approach is agreed upon, the new function could replace
the original rpccli_lsa_lookup_sids function.

Michael
(This used to be commit 66ff0bc6c3)
2007-10-10 12:22:18 -05:00
Jeremy Allison
be8b0685a5 r22589: Make TALLOC_ARRAY consistent across all uses.
Jeremy.
(This used to be commit 8968808c3b)
2007-10-10 12:19:49 -05:00