1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-05 09:18:06 +03:00
Commit Graph

101 Commits

Author SHA1 Message Date
Andrew Bartlett
e905fed4e0 r17956: LSA Cleanup!
This commit cleans up a number of aspects of the LSA interface.

Firstly, we do 2 simple searches on opening the LSA policy, to obtain
the basic information we need.  This also avoids us searching for
dnsDomain (an invented attribute).

While I was at it, I added and tested new LSA calls, including the
enumTrustedDomainsEx call.  I have also merged the identical structures
lsa_DomainInformation and lsa_DomainList.

Also in this commit: Fix netlogon use of uninitialised variables.

Andrew Bartlett
(This used to be commit 3f3fa7f466)
2007-10-10 14:16:57 -05:00
Jelmer Vernooij
9727b061f3 r15776: Don't generate ref pointers in Samba4-generated code. There is no point
in having pointers for outgoing data when you can already modify the top-level
element.

This can be overridden (temporarily) by specifying the new "keepref"
attribute. Once we've removed keepref from all IDL files, I'll remove this
attribute as well.
(This used to be commit bdc6dd3750)
2007-10-10 14:08:18 -05:00
Andrew Tridgell
767ce19bf8 r12635: use the new [validate] value() checking to fix the string types for
the LSA pipe. Strangely, windows is not consistent for the LookupSids
call. Sometimes the name is terminated and sometimes not?! It might
depend on the type of rid (alias, group etc) ?
(This used to be commit c0b7e0619a)
2007-10-10 13:49:10 -05:00
Andrew Bartlett
c6f8330098 r11288: Fill out LSA LookupNames4 and LookupSids3, including a server-side
implementation.

Andrew Bartlett
(This used to be commit a6a615cc99)
2007-10-10 13:45:14 -05:00
Jelmer Vernooij
dc36f29476 r11104: Fix LOCAL-PAC test
(This used to be commit 22d0e4a9bf)
2007-10-10 13:44:50 -05:00
Jelmer Vernooij
3f3388a564 r11102: Remove unistr_noterm
(This used to be commit bb1ed44f45)
2007-10-10 13:44:49 -05:00
Jelmer Vernooij
98800eb41e r11100: Replace unistr with [string,charset(UTF16)]
(This used to be commit 48f45927ce)
2007-10-10 13:44:49 -05:00
Jelmer Vernooij
68d82998d2 r11096: Eliminate pointer_default_top()
(This used to be commit b773d848e8)
2007-10-10 13:44:48 -05:00
Günther Deschner
ad44611170 r9888: add IDL for lsa_QueryDomainInformationPolicy to query Kerberos Settings.
Guenther
(This used to be commit d717e878bd)
2007-10-10 13:36:20 -05:00
Andrew Tridgell
3eb52c6cd6 r9574: - made the sec_info fields in lsa and samr use a IDL bitmap
- fixed winreg_GetKeySecurity() to use a sec_info field correctly

- simplied the winreg torture code, removing the separate opens for
  each hive

- added torture cleanup code in winreg test

- added 'create with security descriptor' in the winreg torture test
(This used to be commit f20695decd)
2007-10-10 13:34:30 -05:00
Stefan Metzmacher
59d17eee38 r8375: - move from netr_StringLarge to lsa_StringLarge
- we need to use lsa_StringLarge in lsa_DnsDomainInfo, to make windows clients happy

metze
(This used to be commit 044d18f85f)
2007-10-10 13:20:13 -05:00
Andrew Tridgell
7efeb8f451 r8256: - allow rpc calls from non-command line ejs contexts by creating a set
of null credentials to use if cmdline_credentials is not setup

- hide the length and size elements of a lsa_String from js scripts,
  so you can use a lsa_String just as an ordinary string without
  knowing its a structure. We won't do this with all structures, just
  a few core ones that are used often enough to warrant it.

- make sure returned ldb arrays have a length property
(This used to be commit 12d2092dd8)
2007-10-10 13:19:26 -05:00
Stefan Metzmacher
0b92507760 r8232: remove samr_String and netr_String as they are the same as lsa_String
metze
(This used to be commit e601042c07)
2007-10-10 13:19:22 -05:00
Andrew Tridgell
7fc49243f3 r7870: fixed the RPC-SCHANNEL test. It turned out it was my const changes, as
they slightly changed the semantics of value() in pidl, which broke
a optimisation hack in some of our IDL files.

I've changed the idl files to remove the hack for now. Sometime we
need to find a better way to handle these :-)
(This used to be commit 765f75ea63)
2007-10-10 13:18:45 -05:00
Jelmer Vernooij
c420c5a4c4 r7552: Use ParseExpr() for [value] attributes; allows
us somewhat cleaner IDL.
(This used to be commit b7b01bccd1)
2007-10-10 13:18:07 -05:00
Günther Deschner
070a0631e1 r7394: rename LSA_TRUSTED_DOMAIN_INFO_5 to LSA_TRUSTED_DOMAIN_INFO_BASIC.
Guenther
(This used to be commit aec0d99da1)
2007-10-10 13:17:49 -05:00
Jelmer Vernooij
50d2bf0066 r7029: Make array support in pidl similar to that in other IDL compilers. We should
now able to use constructions like these:

[size_is(20)] int *x; -> Pointer to array of 20 ints
[size_is(20)] int x[]; -> Array of 20 ints
[size_is(20)] int *x[]; -> Array of 20 pointers to ints
[size_is(20,)] int *x[] -> Array of 20 pointers to ints
[size_is(,20)] int *x[]; -> Pointer to array of 20 ints
[size_is(,20)] int **x; -> Pointer to pointer to array of 20 ints
[size_is(20)] int x[][30]; -> 20 blocks of 30 ints
(This used to be commit ecf583da71)
2007-10-10 13:17:07 -05:00
Jelmer Vernooij
e427f58622 r6973: Merge new version of pidl into the main SAMBA_4_0 branch.
The main difference in this new version is the extra data structure generated
between the IDL data structure and the NDR parser:

IDL -> NDR -> { ndr_parser, ndr_header, eparser, etc }

This makes the ndr_parser.pm internals much more sane.

Other changes include:

- Remove unnecessary calls with NDR_BUFFERS (for example, GUID doesn't have any buffers, just scalars) as well as some (unnecessary) nested setting of flags.
- Parse array loops in the C code rather then calling ndr_pull_array(). This allows us to have, for example, arrays of pointers or arrays of pointers to arrays, etc..
- Use if() {} rather then if () goto foo; everywhere
- NDR_IN no longer implies LIBNDR_FLAG_REF_ALLOC
- By default, top level pointers are now "ref" (as is the default in
  most other IDL compilers). This can be overridden using the
  default_pointer_top() property.
- initial work on new ethereal parser generators by Alan DeKok and me
- pidl now writes errors in the standard format used by compilers, which
  is parsable by most editors
- ability to warn about the fact that pidl extension(s) have been used,
  useful for making sure IDL files work with other IDL compilers.

oh, and there's probably some other things I can't think of right now..
(This used to be commit 13cf227615)
2007-10-10 13:17:01 -05:00
Jelmer Vernooij
ffae01d432 r5672: Use switch_type() and the token storage mechanism for unions:
- Makes union handling less special
 - Allows unions in arrays, etc
 - Compatible with midl
 - Pidl will warn about switch_type() and the type of the switch_is() variable being different
(This used to be commit dc6b4ffc82)
2007-10-10 13:10:58 -05:00
Jelmer Vernooij
631aa1f0ef r5661: Be a little stricter on syntax regarding arrays. A pointer to an
array can now only be :

 type *name[];

rather then :

 type *name;

which was supported in the past. Warnings will be given when the first
syntax is used. Reasons for this change in behaviour include improved
readability and the fact that the second format makes dealing with multiple
levels of pointers harder.
(This used to be commit a416de5825)
2007-10-10 13:10:57 -05:00
Andrew Tridgell
1e42cacf6a r5036: changed HYPER_T to the more standard "hyper"
(This used to be commit 1d1a9c11ee)
2007-10-10 13:09:15 -05:00
Andrew Bartlett
4da8abcf0d r4768: Until I can prove it, we should not have these elements marked as
size_is() base arrays.

Andrew Bartlett
(This used to be commit 3d3063b1f6)
2007-10-10 13:08:52 -05:00
Andrew Bartlett
17725e5fd1 r4720: Reformat, rename, and convert to enums parts of the LSA IDL specification.
Andrew Bartlett
(This used to be commit d360f30948)
2007-10-10 13:08:48 -05:00
Andrew Bartlett
7ea2317e97 r4708: Comparing with LDAP, it is clear that these 'flags' are in fact the
POSIX offset for the trusted domain.

Andrew Bartlett
(This used to be commit cd9e795e40)
2007-10-10 13:08:46 -05:00
Andrew Bartlett
e54964c618 r4703: Add support for EnumTrustDomain, and expand the testsuite.
Add my copyright to the SAMR server.

Andrew Bartlett
(This used to be commit 51e94fa26c)
2007-10-10 13:08:45 -05:00
Andrew Bartlett
c0571f6234 r4698: - Initial implementation of trusted domains in LSA.
- Use templates for Secrets and the new trusted domains

 - Auto-add modifiedTime, createdTime and objectGUID to records in the
   samdb layer.

Andrew Bartlett
(This used to be commit 271c8faadf)
2007-10-10 13:08:44 -05:00
Andrew Bartlett
a249198d53 r4682: A LDB-based secrets implementation in Samba4.
This uses LDB (a local secrets.ldb and the global samdb) to fill out
the secrets from an LSA perspective.

Some small changes to come, but the bulk of the work is now done.

A re-provision is required after this change.

Andrew Bartlett
(This used to be commit ded3303352)
2007-10-10 13:08:42 -05:00
Andrew Bartlett
462ef44745 r4673: Fix the IDL for the QuerySecret LSA call.
This call uses a new IDL type, NTTIME_hyper.  This is 8-byte aligned,
as the name suggests.

Expand the QuerySecret LSA calls in RPC-SAMLOGON and RPC-LSA, to
validate the behaviour of times, and of the old secrets.

Thanks to tridge for spotting the use of HYPER!

Andrew Bartlett
(This used to be commit 1fed79cb0f)
2007-10-10 13:08:40 -05:00
Andrew Tridgell
0c75667594 r4638: expose lsa and drsuapi on ncalrpc
(This used to be commit 4e62bd2a34)
2007-10-10 13:08:37 -05:00
Stefan Metzmacher
1ec6416a35 r4568: make use of SidType and move it to lsa.idl
metze
(This used to be commit c2523adc0a)
2007-10-10 13:08:28 -05:00
Andrew Tridgell
8943299838 r4564: added a comment on lsa_EnumAccounts IDL
(This used to be commit 08d7b77efc)
2007-10-10 13:08:28 -05:00
Volker Lendecke
05720e4c17 r4456: NT4 usrmgr.exe asks for 4096 accounts, allow twice that.
Volker
(This used to be commit f8588a769c)
2007-10-10 13:07:52 -05:00
Andrew Tridgell
502490b467 r4449: fixed the helpstring for LSA IDL
(This used to be commit 40a68a160e)
2007-10-10 13:07:51 -05:00
Andrew Tridgell
6c8df6db8f r4442: fix lsa_TranslatedSid3 (its a dom_sid2 not a dom_sid)
(This used to be commit 0dd2587095)
2007-10-10 13:07:50 -05:00
Andrew Tridgell
835d231cee r4437: added IDL and test code for lsa_LookupSids3() and lsa_LookupNames3().
For some reason I am getting ACCESS_DENIED from w2k3 on
lsa_LookupSids3(). I will investigate.
(This used to be commit c759fa0000)
2007-10-10 13:07:50 -05:00
Andrew Tridgell
e046e9dd73 r4433: added the boilerplate for the new w2k3 LSA functions in preparation
for adding LookupSids3 (needed for ACL editing from w2k3)
(This used to be commit 745bbc0e17)
2007-10-10 13:07:49 -05:00
Andrew Tridgell
6bc971d8b5 r4310: fixed the authority_name field in lsa_GetUserName()
(This used to be commit f78506697a)
2007-10-10 13:07:33 -05:00
Stefan Metzmacher
c2f94222e9 r4309: idl and torture test for lsa_GetUserName()
why does samba3 return domain_name as in the unknown_name field in the code
and on the wire it returns DCERPC_FAULT_OP_RNG_ERROR?

all of my test machines NT4,W2K,W2K3,XP returned NULL

and if I file the string in the .in.* the server echos the strings back
and returns NT_STATUS_INVALID_PARAMETER

metze
(This used to be commit 67e765b7e9)
2007-10-10 13:07:33 -05:00
Andrew Tridgell
e52b216473 r4279: added IDL and test code for lsa_AddPrivilegesToAccount() and lsa_RemovePrivilegesFromAccount()
(This used to be commit 705b870c73)
2007-10-10 13:07:31 -05:00
Andrew Tridgell
02f7d260a2 r4195: added IDL, test suite and server side code for lsa_LookupPrivValue
(This used to be commit 7bddd47403)
2007-10-10 13:07:25 -05:00
Stefan Metzmacher
5ef59e9a0a r4003: run successful against a nt4 sp6 pdc with one nt4 sp6 trust and a w2k3 trust
metze
(This used to be commit 5101cd51a2)
2007-10-10 13:06:13 -05:00
Andrew Tridgell
b56d1c5cb7 r3978: added IDL and test code for lsa_LookupSids2() and lsa_LookupNames2()
(This used to be commit 9da455ed56)
2007-10-10 13:06:10 -05:00
Andrew Bartlett
587745e32d r3919: Add more info levels to the QueryTrustedDomainInfo structures, with
names and other assistance from the ethereal sources.

More work needs to be done to validate some of the levels, which do
not appear in the query - perhaps they are modification levels.

Andrew Bartlett
(This used to be commit 6363553369)
2007-10-10 13:06:05 -05:00
Andrew Bartlett
88baaee093 r3917: A few more LSA RPCs found in my wanderings (for trusted domains, these
seem to be 'shortcut' RPCs, that just avoid an open/query pair).

Rename a few others to give us a slightly sensible pattern.

Andrew Bartlett
(This used to be commit d6a7ab57e7)
2007-10-10 13:06:05 -05:00
Andrew Bartlett
b6b61cec79 r3907: * Rename lsa_Name to lsa_String
* Add new IDL to LSA, to query information about trusted domains (for
  cross-check with SamSync).

Andrew Bartlett
(This used to be commit 174c077842)
2007-10-10 13:06:04 -05:00
Andrew Bartlett
be7a3e3ce0 r3904: * Add new LSA calls to open trusted domains
* Add new tests for ACCOUNTs in SamSync

* Clean up names in NETLOGON and LSA

* Verify Security Descriptors against LSA, as well as SamR

Andrew Bartlett
(This used to be commit 7094502fe0)
2007-10-10 13:06:03 -05:00
Andrew Bartlett
5d35fe6f71 r3885: Add security descriptor comparison to our RPC-SAMSYNC test. We now
verify that the security descriptor found in the SamSync is the same
as what is available over SAMR.

Unfortunately, the administrator seems unable to retrieve the SACL on
the security descriptor, so I've added a new function to compare with
a mask.

Andrew Bartlett
(This used to be commit 39ae5e1dac)
2007-10-10 13:06:01 -05:00
Andrew Tridgell
9b6c08a0d1 r3837: added support for LsaLookupSids in the LSA rpc server. This allows the GUI ACL editor on w2k to
correctly display names instead of SIDs.
(This used to be commit fdaa753578)
2007-10-10 13:05:58 -05:00
Stefan Metzmacher
856ee66537 r3810: create a LIB_SECURITY subsystem
- move dom_sid, security_descriptor, security_* funtions to one place
  and rename some of them

metze
(This used to be commit b620bdd672)
2007-10-10 13:05:56 -05:00
Andrew Tridgell
2bf6dff983 r3283: converted to quoted uuid() defines in all our IDL. This should help
the build on systems like solaris with the SunPRO compiler
(This used to be commit fe913ad11b)
2007-10-10 13:04:50 -05:00