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

25599 Commits

Author SHA1 Message Date
Andrew Bartlett
7048ad11f5 s4-dsdb Reorganise and clarify the LSA objectClass check (forbidden on LDAP)
This arranged the check to avoid talloc_strdup() (the schema pointers
are constant, and can be relied upon), and checks the untrusted bit
first (it is faster), before the ldb_attr_cmp().

The strcmp() here was valid, if unusual, because the ldapDisplayName
values are already in the correct case, but strcasecmp() is more
correct, as for the small extra cost, we avoid a difficult to diagnose
bug later.

Andrew Bartlett

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
2010-11-26 13:10:00 +01:00
Andrew Bartlett
439a2d6983 s4-objectclass Use a specific local variable name, not 'value'
This makes it clearer what the local variable in use here does.

Andrew Bartlett

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
2010-11-26 13:09:59 +01:00
Andrew Tridgell
bf52cffd25 s4-kcc: fixed valgrind errors in drs replicaInfo server side
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Nov 26 03:52:30 CET 2010 on sn-devel-104
2010-11-26 03:52:30 +01:00
Andrew Tridgell
5e8cb67605 s4-provision: fixed eadb automatic and manual setting in provision
we should not set posix:eadb in lp in the acl native test code

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-26 03:08:21 +01:00
Andrew Tridgell
eeb29b593a s4-provision: don't try to look for an IPv6 address when not specified
the getaddrinfo() method of finding an IPv6 address is incorrect. We
could do it via the Samba interfaces code, but until we have that it
is better to not try to auto-detect IPv6

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-26 03:08:21 +01:00
Andrew Bartlett
fab9d94006 s4-dsdb Remove rootDSE and anonymous checks from acl_read
The rootdse module handles rootDSE requests, and blocks anonymous
access, so we on't need to do it again here.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Nov 26 00:36:19 CET 2010 on sn-devel-104
2010-11-26 00:36:19 +01:00
Andrew Bartlett
d184da8065 s4-dsdb Add 'block anonymous' checks to the rootdse module
This ensures that one single point checks for and blocks anonymous
read access to the database over LDAP.

Andrew Bartlett
2010-11-26 08:50:42 +11:00
Andrew Bartlett
885ecd7b6b s4-dsdb Remove mem_ctx argument from dsdb_module_find_dsheuristics().
A function that does not return memory should not take a memory context.

Andrew Bartlett
2010-11-26 08:50:42 +11:00
Nadezhda Ivanova
fad57d8ad0 s4-tests: Made acl tests to reconnect if dSHeuristics is being manipulated
Also made password tests set dSHeuristics only once rather that once per test.

Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Thu Nov 25 20:48:38 CET 2010 on sn-devel-104
2010-11-25 20:48:38 +01:00
Nadezhda Ivanova
1e9a7882be s4-tests: Modified create_ou to only accept security.descriptor type for sd to avoid confusion
It used to work with sddl as well, but this is confusing and could lead to errors. It also caused a message about tallocing a security descriptor to appear.

Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Thu Nov 25 19:46:42 CET 2010 on sn-devel-104
2010-11-25 19:46:42 +01:00
Nadezhda Ivanova
db403ac35d s4-dsdb: Switched to using a dictionary in create_ou for consistency.
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Thu Nov 25 14:12:52 CET 2010 on sn-devel-104
2010-11-25 14:12:52 +01:00
Nadezhda Ivanova
05b8e078f4 s4-dsdb: Fixed wrong assignment of name attribute to description atribute in create_ou. 2010-11-25 14:25:43 +02:00
Matthias Dieter Wallnöfer
ae61408e2f s4:lsa RPC server / objectclass LDB module - fix the creation of trusted domain objects
Tridge pointed out that it is to dangerous to allow them to be created
with SYSTEM permissions. The solution using the "untrusted" flag should
be much more viable.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Thu Nov 25 13:05:56 CET 2010 on sn-devel-104
2010-11-25 13:05:56 +01:00
Nadezhda Ivanova
fc1da86d40 s4-tests: Modified speedtest.py to use samba.tests.delete_force
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Thu Nov 25 01:28:19 CET 2010 on sn-devel-104
2010-11-25 01:28:19 +01:00
Nadezhda Ivanova
21aceb1374 s4-tests: Modified sec_descriptor.py to use samba.tests.delete_force 2010-11-25 01:15:24 +02:00
Nadezhda Ivanova
9917525b96 s4-tests: Modified sam.py to use samba.tests.delete_force 2010-11-25 01:14:58 +02:00
Nadezhda Ivanova
0d99a5f27c s4-tests: Modified passwords.py to use samba.tests.delete_force 2010-11-25 01:13:47 +02:00
Nadezhda Ivanova
71af506950 s4-tests: delete_force was unused, removed it. 2010-11-25 01:13:24 +02:00
Nadezhda Ivanova
5e7d99a5d8 s4-tests: Modified ldap_schema.py to use samba.tests.delete_force 2010-11-25 01:12:42 +02:00
Nadezhda Ivanova
d21d3e7db8 s4-tests: Modified ldap.py to use samba.tests.delete_force 2010-11-25 01:12:18 +02:00
Nadezhda Ivanova
66aa40b9d9 s4-tests: Modified deletetest.py to use samba.tests.delete_force 2010-11-25 01:11:57 +02:00
Nadezhda Ivanova
f42802e22f s4-tests: Modified bind.py to use samba.tests.delete_force 2010-11-25 01:11:29 +02:00
Nadezhda Ivanova
d7731f6f39 s4-tests: Modified acly.py to use common delete_force instead of defining its own. 2010-11-25 01:09:27 +02:00
Nadezhda Ivanova
db5bcb7115 s4-tests: Added a common definition of delete_force. 2010-11-25 01:09:27 +02:00
Günther Deschner
64424bb1c3 s4-smbtorture: pick a better printer in RPC-SPOOLSS-ACCESS.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Nov 24 22:07:33 CET 2010 on sn-devel-104
2010-11-24 22:07:33 +01:00
Matthias Dieter Wallnöfer
1352a9406f s4:objectclass LDB module - LSA objects - allow them if the SYSTEM control is specified
This fits better than the RELAX one.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Wed Nov 24 18:23:01 CET 2010 on sn-devel-104
2010-11-24 18:23:01 +01:00
Matthias Dieter Wallnöfer
8c01d6a837 s4:objectclass LDB module - move one checks into the "objectclass derivation loop"
This denies objects created from possible derivated classes from the prohibited
ones.

Also small cosmetic improvements for another check.
2010-11-24 17:39:18 +01:00
Matthias Dieter Wallnöfer
0a6834e630 s4:objectclass LDB module - some more or less cosmetic return value macro changes
Sometimes "ldb_module_oom" fits better than "ldb_operr" or "ldb_oom".
2010-11-24 17:39:18 +01:00
Nadezhda Ivanova
dab4e008a0 s4-tests: Modified sec_descriptor to use samdb.newgroup instead of locally defined method.
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Wed Nov 24 17:38:28 CET 2010 on sn-devel-104
2010-11-24 17:38:28 +01:00
Nadezhda Ivanova
c89ecfc2ad s4-dsdb: Extended samdb.newgroup to set the group's security descriptor. 2010-11-24 16:54:18 +01:00
Andrew Bartlett
5d65025fde s4-setup correct the require BIND version for Dynamic DNS 2010-11-24 17:48:04 +11:00
Andrew Tridgell
1f478afe22 s4-devel: we don't need to override these scripts now
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov 24 01:02:43 CET 2010 on sn-devel-104
2010-11-24 01:02:43 +01:00
Andrew Tridgell
93d311c07e s4-dynconfig: override more paths when running from the build directory
this ensures consistency between binaries and scripts when testing as
a developer
2010-11-24 00:19:15 +01:00
Andrew Tridgell
5d014cad08 s4-kcc: disable the NDR printing of DRS getinfo requests 2010-11-24 00:19:15 +01:00
Jelmer Vernooij
df70a4a3b7 pyldb: Fix broken test.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Nov 23 23:20:38 CET 2010 on sn-devel-104
2010-11-23 23:20:38 +01:00
Nadezhda Ivanova
91b687d42b s4-tests: Modified acl.py to use samdb.newgroup instead of custom methods.
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Tue Nov 23 21:46:07 CET 2010 on sn-devel-104
2010-11-23 21:46:07 +01:00
Nadezhda Ivanova
e95a350682 s4-dsdb: Changed filter to find the account of a user by samAccountName
In newuser, a filter by dn was given to setpassword to find the account whose password is to be reset.
It appears however that if given filter of type (dn=CN=smth) Windows fails to return the entry, and the
tests that use newuser fail against it. Changed to use samAccountName instead.
2010-11-23 21:02:03 +01:00
Kamen Mazdrashki
58f6a37f64 s4-test/repl_schema: Refactor the test a little bit to
- Cleanup imports
- make sure we have testtools and subunit imported
- use dictionaries instead of LDIFs for schema modification
  so now callers for _make_class can easily add new attributes
  for created class
- simplify a little bit classSchema creation
- test attributeSchema replication

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Tue Nov 23 18:44:46 CET 2010 on sn-devel-104
2010-11-23 18:44:46 +01:00
Kamen Mazdrashki
1b58074557 s4-tests: Make all DRS python tests to start with samba4.drs.* prefix 2010-11-23 18:01:05 +01:00
Kamen Mazdrashki
9e24db1f2b s4-pfm_verify: Explicitly pass LoadParm() instance to system_session() function
Otherwise system_session() creates a LoadParm() instance
wich resets certain params to their defaults from smb.conf
("log level" for instance)
2010-11-23 18:01:05 +01:00
Nadezhda Ivanova
ff822209c1 s4-tests: Modified sec_descriptor.py to use samdb.newuser instead of custom methods.
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Tue Nov 23 17:58:38 CET 2010 on sn-devel-104
2010-11-23 17:58:38 +01:00
Nadezhda Ivanova
860ad87340 s4-tests: Modified acl.py to use samdb.newuser instead of custom methods. 2010-11-23 17:15:16 +01:00
Nadezhda Ivanova
3001a514dd s4-dsdb: Extended samdb.newuser to accept security descriptor for the object and optionally skip password reset
Sometimes for testing purposes we create users without any permissions on their objects and password reset
cannot be performed at that point, and is not necessary. For this purpose we can now optionally skip this step.
The default is still to reset the user password.
Also, a security.descriptor object can be specified during the user creation to override using the default one.
defaultSecurityDescriptor is still used by default.
2010-11-23 17:15:16 +01:00
Nadezhda Ivanova
5d27aee107 s4-tests: Modified sec_descriptor.py to use SamDB.create_ou()
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Tue Nov 23 14:19:34 CET 2010 on sn-devel-104
2010-11-23 14:19:33 +01:00
Nadezhda Ivanova
868dd26efd s4-tests: Modified acl.py to use SamDB.create_ou() 2010-11-23 14:33:27 +02:00
Nadezhda Ivanova
0c22316ccf s4-dsdb: Added a python method to SamDB for creating organizationalUnits 2010-11-23 14:33:27 +02:00
Andrew Tridgell
3a8b67d06c s4-ldb: added an environment varibale LDB_WARN_UNINDEXED
when LDB_WARN_UNINDEXED is set, we produce warnings about unindexed
searches. This makes it easier to find performance problems caused by
unindexed searches.
2010-11-23 22:14:58 +11:00
Nadezhda Ivanova
439ff8717d s4-tests: Ldap tests now use the get_dsheuristics and set_dsheuristics from SamDB.
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Tue Nov 23 11:08:37 CET 2010 on sn-devel-104
2010-11-23 11:08:36 +01:00
Nadezhda Ivanova
c252dac1b3 s4-tests: Password tests now use the get_dsheuristics and set_dsheuristics from SamDB. 2010-11-23 11:22:26 +02:00
Nadezhda Ivanova
d6679cb75a s4-tests: Acl tests now use the get_dsheuristics and set_dsheuristics from SamDB. 2010-11-23 11:22:26 +02:00