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

26101 Commits

Author SHA1 Message Date
Andrew Bartlett
147f075c47 s4-pygensec Add bindings for server_start() and update() 2011-01-18 10:55:05 +01:00
Andrew Bartlett
969c1b58eb s4-pyauth Add bindings for auth_context_create() as AuthContext() 2011-01-18 10:55:05 +01:00
Andrew Bartlett
017fbcdd10 s4-pyauth Use py_talloc_get_type() for greater talloc binding safety
This does a talloc check of the returned pointer before casting it.

Andrew Bartlett
2011-01-18 10:55:05 +01:00
Andrew Bartlett
9b643c8c83 s4-gensec Don't steal the auth_context, reference it.
We don't want to steal this pointer away from the caller if it's been
set up from python.

Andrew Bartlett
2011-01-18 10:55:05 +01:00
Kamen Mazdrashki
1667ff79ca s4-ldb_ldif: Take into account LDB_FLG_SHOW_BINARY
when user requires binary data to be displayed
using samba user-friendly ldif handlers

Found using following test search:
bin/ldbsearch -H st/dc/private/sam.ldb -b "CN=Deleted Objects,DC=samba,DC=example,DC=com" \
 "(objectGUID=97b52eac-6d89-434d-b935-1e5f2e086ffc)" replPropertyMetaData --show-deleted --show-binary

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Tue Jan 18 00:40:01 CET 2011 on sn-devel-104
2011-01-18 00:40:01 +01:00
Kamen Mazdrashki
fb0df534f4 s4-ldb_ldif: Don't check for LDB_FLG_SHOW_BINARY in ldb_should_b64_encode
LDB_FLG_SHOW_BINARY is data representation flag and should
not modify behavior of data checking functions.

This lead to a bug in lib/ldb/ldb_tdb/ldb_index.c as ltdb_index_key()
function relies on ldb_should_b64_encode function to determine
how to process index keys.

Found using following test search:
bin/ldbsearch -H st/dc/private/sam.ldb -b "CN=Deleted Objects,DC=samba,DC=example,DC=com" \
 "(objectGUID=97b52eac-6d89-434d-b935-1e5f2e086ffc)" replPropertyMetaData --show-deleted --show-binary
2011-01-18 00:57:05 +02:00
Nadezhda Ivanova
622ef6aed8 s4-provision: Fixed owner/group for hard-coded Sites descriptor.
We must not specify explicitly owner and group. As there is a difference between WIN_2003 and WIN_2008, we should let descriptor
module compute the correct default ones. Also removed inherited ACEs, they are ignored during SD creation anyway.

Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Mon Jan 17 18:23:24 CET 2011 on sn-devel-104
2011-01-17 18:23:24 +01:00
Nadezhda Ivanova
35d8b80800 s4-tools: Fixed a bug in ldapcmp - DACL was not retrieved correctly if the object had no SACL.
--Pair-Programmed-With: Zahari Zahariev
2011-01-17 17:38:04 +01:00
Nadezhda Ivanova
3ecce7f2ee s4-tools: Added a --sort-aces option to ldapcmp
This option sorts the ACE lists during SD comparison in collision view to make it easier to
determine of a difference is only in ACE order, and if not, where do differences start.

Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Mon Jan 17 14:09:09 CET 2011 on sn-devel-104
2011-01-17 14:09:09 +01:00
Andrew Tridgell
7320f1988c ldb: new ABI sigs file
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Jan 17 06:09:23 CET 2011 on sn-devel-104
2011-01-17 06:09:23 +01:00
Andrew Tridgell
8794e6dad9 s4-dsdb: replaced the calls to ldb_search() in dsdb modules with dsdb_module_search()
this ensures we follow the module stack, and set the parent on child
requests
2011-01-17 05:23:04 +01:00
Andrew Tridgell
87f3151047 s4-dsdb: pass parent request to dsdb_module_*() functions
this preserves the request hierarchy for dsdb_module_*() calls inside
dsdb ldb modules

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-17 05:23:04 +01:00
Andrew Tridgell
633c3e8da5 ldb: added ldb_req_mark_trusted()
this is used to mark a ldb child request trusted, if the caller has
validated all inputs. This will be used when creating new child
requests with trusted inputs.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-17 05:23:04 +01:00
Matthias Dieter Wallnöfer
f334cd2210 ldb: inherit parent flags on child requests in modules 2011-01-17 05:23:04 +01:00
Jelmer Vernooij
e665fce31c web_server: Display trivial placeholder page if SWAT could not be found.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Jan 17 01:27:10 CET 2011 on sn-devel-104
2011-01-17 01:27:10 +01:00
Jelmer Vernooij
7982f683ee web_server: Fix initialization. 2011-01-17 00:30:49 +01:00
Jelmer Vernooij
04abf2cc8d web_server: Avoid references to swat. Load samba.web_server instead. 2011-01-17 00:25:42 +01:00
Jelmer Vernooij
2f7d4a4190 param: Load web service by default. 2011-01-17 00:25:29 +01:00
Matthias Dieter Wallnöfer
93d96414be s4:dsdb_find_nc_root - fix it up to let the provisioning work correctly
Use the temporary list unless we have at least the three main
"namingContexts" from the rootDSE available (Default, Configuration, Schema -
these are mandatory on all AD deployments!).

This bug has been discovered by Nadya in relation with her SD work.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Jan 15 19:01:11 CET 2011 on sn-devel-104
2011-01-15 19:01:11 +01:00
Matthias Dieter Wallnöfer
32e7d7654f s4:auth/ntlm/auth_sam.c - fix call to "get_server_info_principal"
This should obviously point to the wrapper not the call itself.

Found out by Tru64 host build warning.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Jan 15 18:05:59 CET 2011 on sn-devel-104
2011-01-15 18:05:59 +01:00
Matthias Dieter Wallnöfer
3f6ae9422b s4:samr RPC server - always interpret filter integer values as signed
To prevent platform-dependant problems.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Jan 15 14:54:14 CET 2011 on sn-devel-104
2011-01-15 14:54:13 +01:00
Matthias Dieter Wallnöfer
fef1174ba8 s4:web_server - immeditately assign "wdata" as private data for the stream socket
This fixes bug #7887.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Jan 14 22:33:13 CET 2011 on sn-devel-104
2011-01-14 22:33:13 +01:00
Matthias Dieter Wallnöfer
a87b2f9ec0 s4:urgent_replication.py - remove a now superflous RELAX control
The LSA object creation protection changed to the trusted/untrusted
connection model.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Jan 14 19:30:52 CET 2011 on sn-devel-104
2011-01-14 19:30:52 +01:00
Matthias Dieter Wallnöfer
39eea5ca43 s4:samldb LDB module - fix "userAccountControl" handling
"UF_ACCOUNTDISABLE" is only added automatically if no "userAccountControl" flags
are set on LDAP add operations.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Jan 14 18:29:07 CET 2011 on sn-devel-104
2011-01-14 18:29:07 +01:00
Matthias Dieter Wallnöfer
6737231d90 ldb:ldb_dn.c - fix counter type in "ldb_dn_minimise"
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Jan 14 10:43:29 CET 2011 on sn-devel-104
2011-01-14 10:43:29 +01:00
Andrew Tridgell
46a3588d3f waf: use PYTHONARCHDIR for installing python shared libs
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Jan 14 08:19:40 CET 2011 on sn-devel-104
2011-01-14 08:19:39 +01:00
Andrew Tridgell
ad8965c364 s4-dsdb: only enforce the extended dn rules over ldap
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Jan 14 07:23:31 CET 2011 on sn-devel-104
2011-01-14 07:23:31 +01:00
Andrew Tridgell
74674e782e s4-dsdb: removed the last use of samdb_search_*() from the dsdb ldb modules
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:33 +11:00
Andrew Tridgell
90110a0bbc s4-dsdb: removed some more samdb_search_*() calls from samldb.c
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:33 +11:00
Andrew Tridgell
3b7c498437 s4-dsdb: replaced another use of samdb_search in a ldb module
we should be using the dsdb_module_search*() calls

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:33 +11:00
Andrew Tridgell
15c8107868 s4-dsdb: fixed primaryGroupID to use dsdb_module_search_dn()
this avoids using a multi-part extended DN in a search that hits the
check in extended_dn_in

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:33 +11:00
Andrew Tridgell
31d644c7f9 s4-dsdb: fixed filtering of tokengroups
builtin groups are shown in user tokenGroups searches

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:33 +11:00
Andrew Tridgell
f33ce4101e ldb: new ABI file for 0.9.23 2011-01-14 16:39:33 +11:00
Andrew Tridgell
60be4a4c37 s4-kdc: don't ask for an extended DN for krbtgt_dn
otherwise msg->dn would be non-minimal and would fail in searches

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:33 +11:00
Andrew Tridgell
197f4b098b s4-test: added a tokengroups test
this tests that the remote tokenGroups match the internally calculated
ones

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:33 +11:00
Andrew Tridgell
0450ab9536 s4-samdb: give a more useful debug when we can't open the privileges db
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:33 +11:00
Andrew Tridgell
8df6504ffe s4-auth: fixed status return
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:33 +11:00
Andrew Tridgell
a0bc538a8f s4-samba-tool: fixed the gpo command to use the right DN for access checks 2011-01-14 16:39:33 +11:00
Andrew Tridgell
a38854f74b s4-dsdb: minimise the DN in group expansion
this DN we have came from an extended DN search, which means it may
have multiple extended components. We need to minimise the DN before
AD will accept it

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:33 +11:00
Andrew Tridgell
504a3cc6b3 ldb: added ldb_dn_minimise()
this removes any extraneous components from a DN. For an extended DN,
this means removing the string DN and all but the first extended
component.

This is needed as AD returns "invalid syntax" if you don't use
a minimal DN as the base DN for a search. A non-minimal DN also
doesn't ever match in a search expression.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:32 +11:00
Andrew Tridgell
74493af86f s4-dns: renamed DNS_TYPE_ZERO to DNS_TYPE_TOMBSTONE
we now know that these are tombstone records, with a timestamp

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:32 +11:00
Andrew Tridgell
27d7f6a312 s4-dsdb: validate number of extended components
this checks that the number of extended components in a DN is valid,
to match MS AD behaviour. We need to do this to ensure that our tools
don't try to do operations that will be invalid when used against MS
servers

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:32 +11:00
Andrew Tridgell
fb704d7fc1 ldb: added ldb_dn_get_extended_comp_num()
this returns the number of extended components. We need this to
validate a DN in the extended_dn_in module

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-14 16:39:32 +11:00
Andrew Bartlett
29fb42a48b s4-samba_tool Added ACL checking to python GPO management tool 2011-01-14 16:39:32 +11:00
Andrew Bartlett
5322567530 pyldb Simplify python wrappers for struct ldb_val (LdbValue)
Andrew Bartlett
2011-01-14 16:39:32 +11:00
Andrew Bartlett
edd3b033b8 s4-auth Add get and set methods for auth_session_info python wrapper
This allows the session key, security_token and credentials to be
manipulated from python.

Andrew Bartlett

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2011-01-14 16:39:32 +11:00
Andrew Bartlett
ece6eae4d8 s4-auth Add function to obtain any user's session_info from a given LDB
This will be a building block for a tokenGroups test, which can
compare against a remote server (in particular the rootDSE) against
what we would calculate the tokenGroups to be.

(this meant moving some parts out of the auth_sam code into the
containing library)

Andrew Bartlett
2011-01-14 16:39:32 +11:00
Andrew Bartlett
c82269cf86 s4-auth use new dsdb_expand_nested_groups()
This isn't quite as good as using tokenGroups, but that is only
available for BASE searches, and this isn't how the all the callers
work at the moment.

Andrew Bartlett
2011-01-14 16:39:32 +11:00
Andrew Bartlett
cbffc51313 s4-dsdb Implement tokenGroups expansion directly in ldb operational module
This removes a silly cross-dependency between the ldb moudle stack and auth/

Andrew Bartlett
2011-01-14 16:39:32 +11:00
Matthias Dieter Wallnöfer
3b78fcff5a s4:torture/nbench/nbench.c - initialise "n"
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Wed Jan 12 20:38:02 CET 2011 on sn-devel-104
2011-01-12 20:38:02 +01:00