1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

724 Commits

Author SHA1 Message Date
Michael Adam
1194d4f36e 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
2007-10-10 12:30:54 -05:00
Michael Adam
aa603bcc6c r25226: Get rid of more red bars... 2007-10-10 12:30:52 -05:00
Michael Adam
7238884c2c r25225: Add a debug message.
Michael
2007-10-10 12:30:52 -05:00
Michael Adam
b4fff6d09d r25224: Fix a potential segfault in lsa_lookupsids client code due to
uninitialized data.

Michael
2007-10-10 12:30:51 -05:00
Michael Adam
2c68ebd693 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
2007-10-10 12:30:51 -05:00
Volker Lendecke
df648d47ff r24949: Remove some static buffers 2007-10-10 12:30:29 -05:00
Michael Adam
3b7ed3ea88 r24784: Initialize uninitalized data to prevent segfaults.
Thanks to Volker for the hint!

Michael
2007-10-10 12:30:21 -05:00
Stefan Metzmacher
5e3d4df9bc r24594: pass down the ndr_interface_table in the samba3 client bindings
instead of the pull and push functions

metze
2007-10-10 12:30:08 -05:00
Michael Adam
918aad0d8b r23850: Fix whitespacing in DEBUG output. 2007-10-10 12:28:34 -05:00
Andrew Tridgell
87c91e4362 r23801: The FSF has moved around a lot. This fixes their Mass Ave address. 2007-10-10 12:28:27 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Günther Deschner
e9a7512a9f r23627: Allow to pass down the lookup-level to rpccli_lsa_lookup_names().
Guenther
2007-10-10 12:23:38 -05:00
Jeremy Allison
9300b92f7a 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.
2007-10-10 12:23:13 -05:00
Günther Deschner
5e75ea7f2b r23380: netr_getdcname returns WERROR not NTSTATUS.
Guenther
2007-10-10 12:23:12 -05:00
Gerald Carter
0b1bc3521f r23271: merge service control pidl change for CloseServiceHandle() from SAMBA_3_0_26 2007-10-10 12:23:01 -05:00
Volker Lendecke
eccd50abda r23219: Two warnings 2007-10-10 12:22:54 -05:00
Günther Deschner
def6464c87 r23210: Very funny, we thought to use netr_GetDcName (e.g. in winbind) but were using
netr_GetDcAnyName all the time (which is the correct thing to do).

Fix the naming and opcode mixup in all branches.

Guenther
2007-10-10 12:22:54 -05:00
Günther Deschner
37ae7f4197 r23127: Fill in some more netlogon dsgetdcname flavours (netr_DsRGetDCNameEx,
netr_DsRGetDCNameEx2) and add new ds request and reply flags, also add some
more WERROR codes.

Guenther
2007-10-10 12:22:48 -05:00
Volker Lendecke
123290d094 r23091: Add rpccli_netlogon_sam_network_logon_ex, fix its parsing. This does not
use the credential chain and only works over netlogon, but it would
allow multiple outstanding auth requests for a single workstation
account.
2007-10-10 12:22:44 -05:00
Michael Adam
55ea93d47e 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
2007-10-10 12:22:43 -05:00
Michael Adam
374dea8c6f r23081: Reorder the lsa_lookup_sids functions so that the order makes more sense... 2007-10-10 12:22:43 -05:00
Michael Adam
8e60900c5c 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.
2007-10-10 12:22:18 -05:00
Michael Adam
66ff0bc6c3 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
2007-10-10 12:22:18 -05:00
Volker Lendecke
3d3d61687e r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; and
replace all data_blob(NULL, 0) calls.
2007-10-10 12:22:01 -05:00
Jeremy Allison
80d981265c r22675: Simo's patch for 0 size allocation. Still need
to examine parse_misc.c fix.
Jeremy.
2007-10-10 12:19:54 -05:00
Jeremy Allison
8968808c3b r22589: Make TALLOC_ARRAY consistent across all uses.
Jeremy.
2007-10-10 12:19:49 -05:00
Jeremy Allison
8ad13718af r22588: Make all uses of TALLOC_MEMDUP consistent.
Jeremy.
2007-10-10 12:19:48 -05:00
Michael Adam
2eec760154 r22537: Use a (more speaking) macro when there is one. 2007-10-10 12:19:43 -05:00
Stefan Metzmacher
aa28bcc466 r22464: remove double code and use a function
metze
2007-10-10 12:19:35 -05:00
Stefan Metzmacher
e9f2aa22f9 r22092: - make spnego_parse_auth_response() more generic and
not specific for NTLMSSP
- it's possible that the server sends a mechOID and authdata
  if negResult != SPNEGO_NEG_RESULT_INCOMPLETE, but we still
  force the mechOID to be present if negResult == SPNEGO_NEG_RESULT_INCOMPLETE

metze
2007-10-10 12:19:10 -05:00
Stefan Metzmacher
fa322f0cc9 r22001: change prototype of dump_data(), so that it takes unsigned char * now,
which matches what samba4 has.

also fix all the callers to prevent compiler warnings

metze
2007-10-10 12:18:59 -05:00
Jelmer Vernooij
e73a418b5b r21462: Fix EnumValue (?) 2007-10-10 12:18:06 -05:00
Günther Deschner
c6f63a08f5 r21382: Important fix for winbind when using non-AD domains.
Jeremy, I'm afraid you removed the "domain->initialized" from the
set_dc_types_and_flags() call when the connect to PI_LSARPC_DS failed
(with rev. 19148).

This causes now that init_dc_connection_network is called again and
again which in turn rescans the DC each time (which of course fails each
time with NT_STATUS_BUFFER_TOO_SMALL). Just continue with the
non-PI_LSARPC_DS scan so that the domain is initialized properly.

Guenther
2007-10-10 12:17:59 -05:00
Günther Deschner
7e1a84b722 r21240: Fix longstanding Bug #4009.
For the winbind cached ADS LDAP connection handling
(ads_cached_connection()) we were (incorrectly) assuming that the
service ticket lifetime equaled the tgt lifetime. For setups where the
service ticket just lives 10 minutes, we were leaving hundreds of LDAP
connections in CLOSE_WAIT state, until we fail to service entirely with
"Too many open files".

Also sequence_number() in winbindd_ads.c needs to delete the cached LDAP
connection after the ads_do_search_retry() has failed to submit the
search request (although the bind succeeded (returning an expired
service ticket that we cannot delete from the memory cred cache - this
will get fixed later)).

Guenther
2007-10-10 12:17:50 -05:00
Günther Deschner
5d4747fdf2 r20970: Allow to define workstation for samlogon in rpcclient (for testing).
Guenther
2007-10-10 12:17:22 -05:00
Volker Lendecke
7fd1578a90 r19818: Remove reg_split_hive, make use of registry_openkey 2007-10-10 12:15:58 -05:00
Günther Deschner
27c35848eb r19355: Add getdispenumindex2 wrapper for rpcclient.
Guenther
2007-10-10 12:15:31 -05:00
Günther Deschner
6091c8152a r19161: Add NET_GETANYDCNAME (getdcname only gives the PDC while getanydcname
gives just any DC), also make sure to set timeouts in rpcclient
accordingly so that we actually get the DC's reply.

Guenther
2007-10-10 12:15:18 -05:00
Günther Deschner
44e228ac79 r19143: getdcname on the NETLOGON pipe returns WERROR, not NTSTATUS.
Guenther
2007-10-10 12:15:16 -05:00
Gerald Carter
5d843612a1 r18981: * cleanup some vestiges of old cli_reg.c code and mark some TODO
items in cac_winreg.c
* Get 'net rpc registry enumerate' to list values again
* Fix winreg.idl QueryInfoKey().  The max_subkeysize is the
  max_classlen (we previously had this correct in Samba3")
* fix valgrind error about uninitialized memory and use-before-set
  on size value inmemset() call
* Fix key enumeration in 'net rpc registry enumerate'
* regenerate gen_dir files based on local pidl patches

Please note that the generated ndr files are from my local
copy of pidl.  If you need to regenerate, please apply the
patch that I posted to the samba-technical list earlier today.
2007-10-10 12:14:53 -05:00
Gerald Carter
f520a9d0fb r18931: * Fix the IDL for QueryInfoKey. teh Classname in an
in,out ref pointer
* Clarify variable names in EnumValue IDL
* Fix server code for _winreg_EnumValue() and _winreg_QueryInfoKe()
2007-10-10 12:14:48 -05:00
Gerald Carter
cbfe1a4b49 r18919: * Get the new rpccli_winreg_XXXX() functions into the tree
There some broken functionality here that I'm still working on.
* remove unneeded parsing routines
2007-10-10 12:14:46 -05:00
Gerald Carter
964d95bce6 r18803: remove unused function 2007-10-10 12:00:59 -05:00
Jelmer Vernooij
ef10672399 r18802: Use the pidl-generated code for the srvsvc interface, both client and server code.
This has had some basic testing. I'll do more during the next couple of days and hopefully also
make RPC-SRVSVC from Samba4 pass against it.
2007-10-10 12:00:59 -05:00
Günther Deschner
138a921f82 r18799: Prepare query_disp_info to use the next idx from the last result entry
for the enumeration loop (following msdn docs of that call).

Guenther
2007-10-10 12:00:59 -05:00
Gerald Carter
50d74ce048 r18747: replace rpccli_lsa_close() with rpccli_lsa_Close() 2007-10-10 12:00:54 -05:00
Jelmer Vernooij
b41c52b9db r18745: Use the Samba4 data structures for security descriptors and security descriptor
buffers.

Make security access masks simply a uint32 rather than a structure
with a uint32 in it.
2007-10-10 12:00:54 -05:00
Gerald Carter
0cb79ee13f r18739: * Get the wkssvc patch right this time.
* Remove the old wkssvc server, client, & parsing code.
* Update srv_wkssvc_nt.c with stubs for the remaining
  stubs
2007-10-10 12:00:53 -05:00
Gerald Carter
a2d61ca85c r18729: readd missing files 2007-10-10 12:00:53 -05:00