1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

19392 Commits

Author SHA1 Message Date
Andrew Bartlett
f85e77c43f s4:provision Only delete SASL mappings with Fedora DS, not OpenLDAP
We need to be more careful to do the cleanup functions for the right
backend.  In future, these perhaps should be provided by the
ProvisionBackend class.

Andrew Bartlett
2009-09-10 19:47:51 +10:00
Andrew Tridgell
3e7a3bc9bd s4/drs: enable attribute encryption
This means we now get passwords vampired correctly for s4<->s4
replication.
2009-09-10 17:46:30 +10:00
Andrew Tridgell
9460427c24 s4: kludge_acl needs to be above repl_meta_data
We have to bypass kludge_acl in replication as otherwise we aren't
allowed access to the password entries
2009-09-10 17:45:25 +10:00
Andrew Tridgell
25b68701c1 s4/repl: give a useful error message if we can't decode an object 2009-09-10 17:42:36 +10:00
Andrew Tridgell
a08d17342d s4/drs: changed the UpdateRefs server to use the dn instead of the GUID
Our vampire code sends a zero GUID in the updaterefs calls. Windows
seems to ignore the GUID and use the DN in the naming context instead,
so I have changed our UpdateRefs server implementation to do the same.

With this change we can now vampire from s4<->s4 successfully! Now to
see if all the attributes came across correctly.
2009-09-10 14:28:24 +10:00
Andrew Tridgell
0c03232259 s4/drs: correctly fill in the GUID of DRS objects 2009-09-10 13:51:08 +10:00
Andrew Tridgell
78a5a5e665 s4: fix spelling 2009-09-10 13:50:46 +10:00
Andrew Tridgell
c0efa51929 s4/provision: another fix for breakage from b1dabb1133 2009-09-10 12:42:57 +10:00
Andrew Bartlett
22c4ffa398 s4:provision Don't reference provision_backend when using LDB
This broke in Endi's patch for Fedora DS support

Andrew Bartlett
2009-09-10 12:27:04 +10:00
Andrew Tridgell
a11bb148f7 s4/torture: don't mix declarations and code 2009-09-10 12:14:53 +10:00
Andrew Tridgell
0807251154 s4/schema: teach the schema_syntax code how to encode/decode more attributes
We were trying to encode strings like 'top' as integers, without first
looking them up in our schema. We need special handling for all the
attributes that contain attributeID_id or governsID_id fields that
should be translated first before encoding.
2009-09-10 12:12:49 +10:00
Andrew Tridgell
3671c9e991 s4/schema: don't crash if we don't have subClassOf 2009-09-10 12:12:49 +10:00
Endi Sukma Dewata
b1dabb1133 s4: Use SASL authentication against Fedora DS.
1. During instance creation the provisioning script will import the SASL
   mapping for samba-admin. It's done here due to missing config schema
   preventing adding the mapping via ldapi.

2. After that it will use ldif2db to import the cn=samba-admin user as
   the target of SASL mapping.

3. Then it will start FDS and continue to do provisioning using the
   Directory Manager with simple bind.

4. The SASL credentials will be stored in secrets.ldb, so when Samba
   server runs later it will use the SASL credentials.

5. After the provisioning is done (just before stopping the slapd)
   it will use the DM over direct ldapi to delete the default SASL
   mappings included automatically by FDS, leaving just the new
   samba-admin mapping.

6. Also before stopping slapd it will use the DM over direct ldapi to
   set the ACL on the root entries of the user, configuration, and
   schema partitions. The ACL will give samba-admin the full access
   to these partitions.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-09-10 09:52:22 +10:00
Aravind Srinivasan
4d7685c1d4 s4/torture: add new SMB oplock tests
* test if oplocks are granted when requesting delete-on-close
* test how oplocks are broken by byte-range-lock requests
2009-09-09 10:22:13 -07:00
Aravind Srinivasan
c091d4b08c s4/torture: convert printf to torture_comment()
Allows "make test" and other harnesses to print cleaner output.
2009-09-09 10:22:12 -07:00
Andrew Tridgell
b65d6cf013 s4/drs: when we don't find an attribute use zero values
thanks to metze for pointing this out
2009-09-10 01:27:12 +10:00
Andrew Tridgell
557cc460f2 s4/vampire: fixed i/j index mixup in vampire code 2009-09-10 01:26:34 +10:00
Andrew Tridgell
a84a82335c s4:drs match the meta_data and attributes array
These two arrays need to be in sync, as they are walked in sync by the
client
2009-09-09 23:38:51 +10:00
Andrew Tridgell
e595ba2105 s4/drs: broke out the core of the getncchanges code
It is easier to understand without the heavy nesting
2009-09-09 21:26:17 +10:00
Andrew Tridgell
9721b1b7c0 s4:drs level_out is a pointer
DsAddEntry now seems to work for simple tests
2009-09-09 21:06:36 +10:00
Andrew Tridgell
51baffab5f s4:drs split addentry and getncchanges into separate files
These will get quite complex eventually, I think we are better
separating them so the code is a bit easier to follow
2009-09-09 21:06:36 +10:00
Nadezhda Ivanova
269fe99a62 Added "admin_session" method.
The purpose of admin_session is to be able to execute parts of provisioning
as the user Administrator in order to have the correct group and owner in the
security descriptors. To be used for provisioning and tests only.
2009-09-09 18:57:50 +10:00
Andrew Tridgell
8640293fab s4/repl: implement DsReplicaSync
This patch implements DsReplicaSync by passing the call via irpc to
the repl server task. The repl server then triggers an immediate
replication of the specified partition.

This means we no longer need to set a small value for
dreplsrv:periodic_interval to force frequent DRS replication. We can
now wait for the DC to send us a ReplicaSync msg for any partition
that changes, and we immediately sync that partition.
2009-09-09 18:04:07 +10:00
Andrew Tridgell
939b936d1a s4/repl: added refresh of repsTo
I've found that w2k3 deletes the repsTo records we carefully created
in the vampire join if we don't refresh them frequently. After about
30mins all 3 repsTo records are gone.

This patch adds automatic refresh of the repsTo by calling
DSReplicaUpdateRefs every time we do a sync cycle with the server
2009-09-09 17:04:16 +10:00
Andrew Tridgell
dca7afb799 s4: fixed format of repsTo in samdb
Metze pointed out what the windows tool ldp.exe will examine repsTo
attributes on remote DCs, so we do in fact need to use the same format
that windows uses. This patch changes the server side implementation
of UpdateRefs to use the windows format
2009-09-09 12:36:51 +10:00
Andrew Tridgell
3cb1caf0ef s4: allow repl:RODC=true/false to set ourselves as a RODC
I think this is what windows DCs use to see that we are read-only, but
I am not sure. Needs more testing.
2009-09-09 12:36:51 +10:00
Jelmer Vernooij
08ce8a4752 Mark test_security_descriptor_add_neg as known failing (for now). 2009-09-08 23:58:52 +02:00
Zahari Zahariev
af0946c101 Basic tests for nTSceurityDescriptor both SDDL and BASE64 format
These are updated second eddition unittests using ldb.add_ldif()
and ldb.modify_ldif(). Unittests are found to work when using
the right local domain SID. Negative test separated.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-09-08 23:58:52 +02:00
Steven Danneman
d5643a08e9 s4/torture/smb2: removed SMB2-FIND test
This test has been wholly replaced by the SMB2-DIR-ONE test found
in dir.c.
2009-09-08 13:43:06 -07:00
Steven Danneman
a38409ee4c s4/torture/smb2: Fix several small bugs and style issues in SMB2 dir tests
* removed all uses of printf, replaced with torture_comment
* replaced custom CHECK macros with new torture_assert_*_todo() helpers
* switched string dir name generation to generate_unique_strs() helper,
  to avoid non-deterministic test behavior where generate_rand_str()
  would cause file colissions in the same directory.
2009-09-08 13:43:06 -07:00
Günther Deschner
2b16380a0e ntlmssp: add some void decode calls (useful for ndrdump).
Guenther
2009-09-08 22:27:41 +02:00
Stefan Metzmacher
2bc8e57201 s4:repl_meta_data: remove unused code
metze
2009-09-08 22:06:07 +02:00
Stefan Metzmacher
d04cca005c s3:drsuapi: add a simple DsRemoveDSServer() implementation
metze
2009-09-08 22:06:02 +02:00
Stefan Metzmacher
5ef601e5eb s4:drsuapi: add an incomplete DsAddEntry implementation
metze
2009-09-08 22:05:56 +02:00
Günther Deschner
4fd9a9d6de schannel: add NL_AUTH_MESSAGE and both NL_AUTH_SIGNATURE structs.
These actually belong netlogon but we for now want to keep netlogon as a security
providor separate.

Guenther
2009-09-08 14:55:10 +02:00
Matthieu Patou
a915575158 Return a correct value for Supported Encryption Type
Vista and upper version use this value to check wether they should ask the DC
 to change the msDS-SupportedEncryptionTypes attribute or not.
 Declare the different value as a bitmap in Netlogon idl
2009-09-08 22:44:50 +10:00
Kamen Mazdrashki
2904034410 tort: RPC-CRACKNAMES test case refactored 2009-09-08 22:44:50 +10:00
Kamen Mazdrashki
899fc0ddde tort: DsCrackNames - propagate torture context to all tests. 2009-09-08 22:44:49 +10:00
Kamen Mazdrashki
d078d2efe8 tort: Helper function to get DC info for testing 2009-09-08 22:44:49 +10:00
Kamen Mazdrashki
5e3759d122 tort: Implement 'setup' and 'teardown' for DRSUAPI test cases. 2009-09-08 22:44:48 +10:00
Andrew Tridgell
0ed467ac0c s4/ldb: support NDR printing for 2 more replication types
print replUpToDateVector and replPropertyMetaData using NDR format if
--show-binary is given.
2009-09-08 22:15:59 +10:00
Andrew Tridgell
27ff8f4e73 s4/ldb: allow prefixMap to be shown as NDR 2009-09-08 22:02:59 +10:00
Andrew Tridgell
a8e8a31611 s4/ldb: allow printing ntSecurityDescriptor in full
print security descriptors in NDR format if --show-binary is
given. This is easier to read than sddl format.
2009-09-08 21:56:31 +10:00
Andrew Tridgell
6d1d33319c s4/ldb: added ldif handler for repsFrom/repsTo
In normal usage this makes no difference, but if you add --show-binary
then you can see the NDR printed out in the usual ndr_print_*() format
2009-09-08 21:56:31 +10:00
Andrew Tridgell
237f720e6c s4/ldb: expose the ldb flags with ldb_get_flags() 2009-09-08 21:56:31 +10:00
Andrew Tridgell
206d79ac51 s4/ldb: don't line wrap ldif when --show-binary is used 2009-09-08 21:56:31 +10:00
Andrew Tridgell
29ba7765d9 s4/ldb: added --show-binary command line option
This add --show-binary to ldbsearch. When this flag is set, binary
blobs will be shown as-is, instead of base64 encoded. This is useful
for some XML encoded attributes, and will also be used as part of some
NDR print formatting for attributes like repsTo.
2009-09-08 21:56:31 +10:00
Matthias Dieter Wallnöfer
9c4827e433 s4:setpassword script - Passwords set by this script are set by the administrator not the user 2009-09-08 12:02:22 +02:00
Matthias Dieter Wallnöfer
51479feb20 s4:provision - Cosmetic: Indent the parameters better 2009-09-08 11:55:40 +02:00
Matthias Dieter Wallnöfer
076ca26cfe s4:templates - Remove the latest relics (in "dcesrv_lsa_CreateSecret") 2009-09-07 14:36:39 +02:00