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

18877 Commits

Author SHA1 Message Date
Andrew Bartlett
d7af80fc2e s4:param use talloc_unlink() to free iconv context holding references 2009-07-02 14:34:07 +10:00
Matthias Dieter Wallnöfer
5049f61f39 [SAMBA 4 directory] Changes "forceLogoff" and corrects the "subRefs"
- This changes the attribute "forceLogoff" to its' default
  values according to Windows Server 2003 R2
- Also this corrects the "subRefs" attribute of the base-DN which only refers
  to direct child partitions (and therefore not to the complete transitive closure)
2009-07-02 11:21:02 +10:00
Andrew Tridgell
826ee307fc removed a generated file 2009-07-01 15:15:38 +10:00
Andrew Tridgell
27620c85e7 use a talloc_reparent in a very ugly way
this works around some terrible use of talloc in the libnet code
2009-07-01 15:15:37 +10:00
Andrew Tridgell
0534ae012b use the new talloc_reparent in two places 2009-07-01 15:15:37 +10:00
Andrew Tridgell
6a192020a2 gensec_start now steals the auth_context 2009-07-01 15:15:37 +10:00
Andrew Tridgell
386211a81c A rather strange varient of talloc_unlink
A dcerpc request may have a reference from a still completing async
callback, but we now consider the request to be complete. We want to
lose the main parent, leaving just the reference, if any.
2009-07-01 15:15:37 +10:00
Andrew Tridgell
08ed6a2281 another case that should use py_talloc_reference 2009-07-01 15:15:37 +10:00
Andrew Tridgell
269b16212a use py_talloc_reference instead of py_talloc_import
This is one of the few cases where we want the object to be owned by
both the python object and C code
2009-07-01 15:15:37 +10:00
Andrew Tridgell
1251032921 py_talloc_import now uses a steal, so this free is incorrect 2009-07-01 15:15:37 +10:00
Andrew Tridgell
2d981919b8 use a talloc_unlink() as ops may have a reference 2009-07-01 15:15:37 +10:00
Andrew Tridgell
45ba09457e fixed the reference to the global_schema 2009-07-01 15:15:36 +10:00
Andrew Tridgell
f7a6206b55 removed a redundent talloc_steal 2009-07-01 15:15:36 +10:00
Andrew Tridgell
b2c3c08b46 fixed the use of talloc_steal in ntlmssp_server
The previous use of talloc_steal could cause a steal of a pointer that
had references. This ensures that doesn't happen
2009-07-01 15:15:36 +10:00
Andrew Tridgell
9faa0745e9 fixed rpc smb code to not reply on talloc_free being a function pointer
The upcoming talloc_free/talloc_reference changes change talloc_free
to be a macro. These two bits of code relied on it being a function
pointer
2009-07-01 15:15:36 +10:00
Matthias Dieter Wallnöfer
b31f1e6d5b [SAMBA 4 directory] Corrects the "systemFlags" attributes
Set the values like Windows Server 2003 R2.
2009-07-01 14:50:42 +10:00
Matthias Dieter Wallnöfer
d4a969530d [SAMBA 4 directory] Adds the complete "objectclass path" to our self-created DC object
Found after some comparisons against Windows Server 2003 R2.
2009-07-01 14:50:42 +10:00
Matthias Dieter Wallnöfer
3e3c08c7a6 [SAMBA 4 directory] Adds the object version and "systemFlags" attribute to the display specifiers
The object version showed up in the Windows 2003 Server R2 AD.
The "systemFlags" attribute has been set to the right value.
2009-07-01 14:50:42 +10:00
Günther Deschner
e7d72b585a s4-smbtorture: Test for newly added form with enum call in RPC-SPOOLSS.
Guenther
2009-06-30 13:34:41 +02:00
Günther Deschner
66780e016b s4-smbtorture: remove trailing whitespace from RPC-SPOOLSS.
Guenther
2009-06-30 11:38:41 +02:00
Don Davis
9aff7b0b59 Rework the kerberos-notes.txt in order and format
This reworks the notes file to be less stream-of-consciousness and more
task for porting, with a very particular focus on a potential port of
Samba4 to use MIT Kerberos.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-06-30 18:12:02 +10:00
Andrew Bartlett
4e58c7881e s4:ldb Allow rootdse module to build without ldb_private.h
It seems quite reasonable to allow modules to re-initialise the set of
cached DNs on the ldb context.

Andrew Bartlett
2009-06-30 15:30:13 +10:00
Andrew Bartlett
49e5b83aa9 s4: dsdb Avoid using the internal ldb_private.h header
This job is not complete (the partition module remains a unfinished
task), but now we do use the private ldb headers much less.

Andrew Bartlett
2009-06-30 15:12:29 +10:00
Andrew Bartlett
89a074b784 s4:heimdal Allow KRB5_NT_ENTERPRISE names in all DB lookups
The previous code only allowed an KRB5_NT_ENTERPRISE name (an e-mail
list user principal name) in an AS-REQ.  Evidence from the wild
(Win2k8 reportadely) indicates that this is instead valid for all
types of requests.

While this is now handled in heimdal/kdc/misc.c, a flag is now defined
in Heimdal's hdb so that we can take over this handling in future (once we start
using a system Heimdal, and if we find out there is more to be done
here).

Andrew Bartlett
2009-06-30 12:11:14 +10:00
Andrew Bartlett
6ba0e7f7b2 s4:kdc Only get the lp_ctx once for a LDB_fetch() 2009-06-30 12:06:38 +10:00
Andrew Bartlett
684a03e7f9 Rework hdb-samba4 to remove useless abstractions.
The function LDB_lookup_principal() has been eliminated, and it's
contents spread back to it's callers.  Removing the abstraction makes
the code clearer.

Also ensure we never pass unescaped user input to a LDB search
function.

Andrew Bartlett
2009-06-30 10:29:30 +10:00
Andrew Bartlett
db89b42c3b s4:dsdb Explain the parsing steps for userPrincipalName cracknames calls 2009-06-30 10:19:19 +10:00
Günther Deschner
0b2b9fdeda s4-smbtorture: use torture_comment & torture_warning in RPC samr tests.
Guenther
2009-06-29 23:47:47 +02:00
Günther Deschner
772d5dea30 s4-smbtorture: correctly test comment behaviour in RPC-SAMR-USERS against s3.
Guenther
2009-06-29 22:36:12 +02:00
Günther Deschner
50bb4bcc5b s4-smbtorture: add RPC-SAMR-MACHINE-AUTH test.
This test talks to a DC as a joined workstation member - in the same way
winbindd does, in particular the calls used in this test's query pattern
will all request for SEC_FLAG_MAXIMUM_ALLOWED access_mask
(which pretty much all of samba's client code does as well).

In fact this test verifies that winbind can correctly talk to a samba dc using
samr dcerpc calls.

Guenther
2009-06-29 14:40:08 +02:00
Günther Deschner
ec5c83c0db s4-smbtorture: add torture_suite_add_machine_workstation_rpc_iface_tcase.
Unlike torture_suite_add_machine_bdc_rpc_iface_tcase() which joins as a BDC
(ACB_SRVTRUST) this joins as a member workstation (ACB_WSTRUST).

Guenther
2009-06-29 12:43:32 +02:00
Matthias Dieter Wallnöfer
15013090df Adds the impersonation level in ntcreatex requests to SAMBA 3 misc torture test
Specifies the impersonation level according to the reporter commit in bug #6283
2009-06-29 18:04:24 +10:00
Matthias Dieter Wallnöfer
c5a1aa5224 Correct some typos in the LDB partition module 2009-06-29 13:40:52 +10:00
Matthias Dieter Wallnöfer
4aa335be11 SAMDB: Don't check for "sAMAccountName" twice 2009-06-29 13:40:45 +10:00
Matthias Dieter Wallnöfer
077898b158 Enhancement of "simple ldap map" with "systemFlags" attribute
Enhance the simple ldap map to support also the "systemFlags" attribute in the
correct way.
2009-06-29 13:40:41 +10:00
Andrew Kroeger
994506ae2e ldb: Properly handle NULL when copying attr lists.
When copying an attribute list, ensure the list itself is not NULL before
attempting to access elements of the list.
2009-06-29 13:40:08 +10:00
Matthias Dieter Wallnöfer
2d9b51c2a8 Correct the headers of some SAMBA 4 setup python scripts 2009-06-29 13:39:55 +10:00
Nathaniel McCallum
1e21adaaf6 Two patches which fix issues on cross compiling/building 2009-06-29 13:39:52 +10:00
Matthias Dieter Wallnöfer
bc7b608625 Fixes for SAMBA3RPC torture test
On calls where both NT_STATUS and WERROR results are returned and consulted
we have to make sure to form function results considering both.
This errors have been found through a run against SAMBA 4.
2009-06-29 13:39:33 +10:00
Matthias Dieter Wallnöfer
b08beed0db Small patch for SPOOLSS pipe
Prevents a crash of the SAMBA 4 daemon on the torture SPOOLSS test due to not
initialised structures.
2009-06-29 13:38:59 +10:00
Sam Liddicott
131c95edda Upgrade ntvfs_map_*info to ntvfs_map_async_setup/ntvfs_map_async_finish
ntvfs_map_fsinfo, ntvfs_map_qpathinfo, ntvfs_map_qfileinfo used an
old synchronous mapping technique, acceptable on the grounds that
they were only used by the simple vfs which was synchronous.

Other vfs may/do use these functions, and by upgrading them to use the
ntvfs_map_async_setup/ntvfs_map_async_finish framework, they can now be
used asynchronously.

Signed-off-by: Sam Liddicott <sam@liddicott.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-06-26 14:39:44 +02:00
Kai Blin
4250eab4b5 s4 auth_winbind: Internally, info3 has utf8 buffers, not utf16 buffers.
Thanks to gd for the catch.
2009-06-25 21:36:49 +02:00
Kai Blin
309924e5c1 s4 auth_winbind: Don't allocate the rids for the info3 structure within the loop 2009-06-25 19:38:51 +02:00
Kai Blin
946beae010 s4: Add libwbclient backend to auth_winbind 2009-06-25 19:18:40 +02:00
Volker Lendecke
17a65541bd Reenable the LDAPI socket for the merged build
It seems that the samba4 part of the merged build does not pick up the
DEVELOPER flag from the s3 configure.

Jelmer, can you fix that properly?

Thanks,

Volker
2009-06-24 16:30:55 +02:00
Günther Deschner
46167c1d1b s4-smbtorture: more paranoid checks while testing group membership in RPC-SAMR.
Guenther
2009-06-24 00:37:51 +02:00
Günther Deschner
e6cb82a7da s4-smbtorture: fix test_GetInfoLevel crash bug in RPC-DFS.
Guenther
2009-06-19 11:14:51 +02:00
Andrew Bartlett
ec47444a7e Allow developers access the the privilaged ldapi socket for the moment
This allows us some time to get the EXTERNAL bind working
2009-06-19 15:31:54 +10:00
Andrew Bartlett
c0d681a73f On our way to alpha9! 2009-06-19 14:43:51 +10:00
Andrew Bartlett
4ceae35d7e Mark as release version 2009-06-19 14:36:48 +10:00
Andrew Bartlett
dcc9ae6995 s4:ldapsrv Place the 'privilaged' ldapi socket under an #ifdef
This makes it clear to our users that this particular implementation
isn't final (all parties are agreed that an EXTERNAL bind is the right
way to do this, but it has not been implemented yet).

Andrew Bartlett
2009-06-19 14:36:06 +10:00
Andrew Bartlett
5c19c60c57 s4:ldb Add test for integer normalisation behaviour
This uses groupType as the example, but this actually applies to all
integer types in AD.

Andrew Bartlett
2009-06-19 11:32:01 +10:00
Matthias Dieter Wallnöfer
2627c6c0c2 Fixed some uninitialised variables
I tried hard to not change the program logic. Should fix bug #6439.
2009-06-19 11:32:01 +10:00
Matthias Dieter Wallnöfer
0376d056e5 Correct handling of 32-bit integer attributes in SAMBA 4
- LDB handles now all 32-bit integer attributes correctly (also with overflows)
  according to the schema
- LDAP backends handle the attributes "groupType", "userAccountControl" and
  "sAMAccountType" correctly. This handling doesn't yet use the schema but
  the conversion file "simple_ldap.map.c" which contains them hardcoded.
  Did also a refactoring of the conversion function there.
- Bug #6136 should be gone
2009-06-19 11:32:01 +10:00
Andrew Bartlett
6620489e7f Remove unused variable 2009-06-18 14:02:13 +10:00
Andrew Bartlett
79454b50fc Bump the ldb version and the version Samba4 requires.
We have made a lot of useful changes to LDB since the last realese,
that Samba4 now relies on.  This ensures that a build against a system
LDB will only succeed against the right version.

Andrew Bartlett
2009-06-18 13:50:36 +10:00
Andrew Bartlett
1e6fb7d730 s4: Add tests and 'must change password' flags in setpassword and newuser
In particular, ensure that we can acutally change the password under
these circumstances.

Andrew Bartlett
2009-06-18 13:49:30 +10:00
Andrew Bartlett
58e8db912d s4:libnet Allow 'net password change' to work on expired passwords
We need to pass down flags to the DCE/RPC layer to allow fallback to
anonymous connections, as we can't log in with an expired password.

The anonymous connection can then change the password with SAMR.

Andrew Bartlett
2009-06-18 13:49:30 +10:00
Andrew Bartlett
19413c5249 s4:kdc Allow a password change when the password is expired
This requires a rework on Heimdal's windc plugin layer, as we want
full control over what tickets Heimdal will issue.  (In particular, in
case our requirements become more complex in future).

The original problem was that Heimdal's check would permit the ticket,
but Samba would then deny it, not knowing it was for kadmin/changepw

Also (in hdb-samba4) be a bit more careful on what entries we will
make the 'change_pw' service mark that this depends on.

Andrew Bartlett
2009-06-18 13:49:30 +10:00
Andrew Bartlett
2afc6df9b4 s4:setup Add an option to 'setpassword' to force password change at next login 2009-06-18 13:49:30 +10:00
Andrew Bartlett
0ac46b00ab s4:gensec Print GSSAPI error message when unable to find PAC 2009-06-18 13:49:30 +10:00
Andrew Bartlett
95345986e8 Require the new tdb 1.1.5 (for performance reasons)
While tdb has not changed ABI in a way that requires this, we don't
want Samba4 somehow built against the old version with
performance problems on large, growing databases.

Andrew Bartlett
2009-06-18 13:49:29 +10:00
Matthias Dieter Wallnöfer
b250c8de39 Fixes for the "cldap" tests
- Insert a check after the "tsocket" library call to make sure that the call
  terminated correctly
- Add a comment to explain why on further calls of "cldap_socket_init" the
  destination address hasn't to be specified
2009-06-18 13:49:26 +10:00
Slava Semushin
ef45b31886 source4/client/client.c: Possible memory leaks
Patch for bug #6446

cppcheck found 2 possible memory leaks:

    [./source4/client/client.c:3305]: (error) Memory leak: base_directory
    [./source4/client/client.c:3305]: (error) Memory leak: desthost

Patch in attach.
2009-06-18 13:49:26 +10:00
Slava Semushin
89e979fe99 Fix resource leak in lib/ldb/tools/ldbmodify.c
Patch for bug #6389
2009-06-18 13:49:26 +10:00
Slava Semushin
e0caf399e1 Fix syntax error in lib/ldb/ldb_sqlite3/base160.c
Patch for bug #6388
2009-06-18 13:49:26 +10:00
Eric Sandall
68fd09e24a LDB: Link against both tevent and talloc
Patch for bug #6269

When linking against tevent you also need to link against talloc. This patch
fixes external/libevent.m4 to do so.
2009-06-18 13:49:26 +10:00
Andrew Kroeger
71515ba190 s4: Call va_end() after all va_start()/va_copy() calls.
This corrects the issues reaised in bug #6129, and some others that were not
originally identified.  It also accounts for some code that was in the original
bug report but appears to have since been made common between S3 and S4.

Thanks to Erik Hovland <erik@hovland.org> for the original bug report.
2009-06-18 13:49:25 +10:00
Matthias Dieter Wallnöfer
efe6552f0c NETLOGON pipe improvements
Patch for bug #4939

This refactors the NETLOGON code related to this bug:

- Introduces a new "SYNCSTATE" enum required by the "DatabaseSync2" call (acc.
to WSPP)
- Make "DatabaseSync" dependant from "DatabaseSync2" (acc. to WSPP)
- Let "DatabaseSync2" return NT_STATUS_NOT_IMPLEMENTED (I'm not sure if this is
also true when a domain is running in mixed mode)
- Make "LogonControl" and "LogonControl2" dependant form "LogonControl2Ex"
(acc. to WSPP)
- Let "LogonControl2Ex" return WERR_NOT_SUPPORTED for now
2009-06-18 13:49:25 +10:00
Jelmer Vernooij
78e316ddbc Use system Python LDB bindings, if present. 2009-06-18 04:20:46 +02:00
Jelmer Vernooij
8178a40dcd Use system LDB by default if the right version was found. 2009-06-18 03:09:36 +02:00
Jelmer Vernooij
edbbbff7ec dsdb: Fix build against system ldb. 2009-06-18 03:09:14 +02:00
Jelmer Vernooij
a5563d2925 selftest: Use common function when skipping testsuites based on run-time
conditions.
2009-06-18 03:08:21 +02:00
Jelmer Vernooij
4e293e3780 smb_build: Always build modules for system-libraries as shared libraries,
since they can't be included in the static library.
2009-06-18 02:32:26 +02:00
Jelmer Vernooij
4657f52c06 Fix build with system LDB. 2009-06-18 01:21:35 +02:00
Jelmer Vernooij
76bf5a4ede configure: Use Python tdb bindings from the system, if found. 2009-06-18 00:54:18 +02:00
Jelmer Vernooij
57c514afec Remove outdated Python status file. 2009-06-18 00:54:17 +02:00
Jelmer Vernooij
2dd921c774 Only install an explicit set of scripts during "make install", rather than
whatever happens to be in the source tree.
2009-06-17 21:00:22 +02:00
Jelmer Vernooij
8b82e3b1e3 Make fullschema script executable. 2009-06-17 20:52:43 +02:00
Jelmer Vernooij
832b929dde pyldb: Fix three more (minor) memory leaks. 2009-06-17 20:45:40 +02:00
Jelmer Vernooij
4d2baca7be pyldb: Fix memory leak in Dn.get_parent(). 2009-06-17 20:45:39 +02:00
Jelmer Vernooij
0c3769e181 pyldb: Fix memory leak in Dn.concat. 2009-06-17 20:45:39 +02:00
Jelmer Vernooij
f1561cd72b pyldb/tests: Use different dn's everywhere, to easily spot which test is
breaking in gdb.
2009-06-17 20:45:39 +02:00
Jelmer Vernooij
a61e11468a pyldb: Fix another memory leak and reference counting error. 2009-06-17 20:45:39 +02:00
Jelmer Vernooij
28a2c262ac param/python: Fix memory leak of LoadParm objects. 2009-06-17 20:45:38 +02:00
Jelmer Vernooij
7b8fcacda2 pycredentials: Raise MemoryError when unable to create objects. 2009-06-17 20:45:38 +02:00
Jelmer Vernooij
0c16676642 pyldb: Fix memory leak of LdbMessage's created from Python. 2009-06-17 20:45:38 +02:00
Jelmer Vernooij
d4172bbcc5 pycredentials: Fix memory leak. 2009-06-17 20:45:38 +02:00
Jelmer Vernooij
d558d8ab94 pyldb: Fix two memory leaks of attribute lists. 2009-06-17 20:45:37 +02:00
Jelmer Vernooij
c3770f1dc0 pyldb: Fix segfault, freeing memory too early in search. 2009-06-17 20:45:37 +02:00
Jelmer Vernooij
2f27d0c762 pyldb: Support getting the parent of special DNs without segfaulting.
Found by: Андрей Григорьев <andrew@ei-grad.ru>
2009-06-17 20:45:37 +02:00
Günther Deschner
fbe85c70ef s4-smbtorture: add test for NetUserSetInfo level 0 (user rename).
Guenther
2009-06-17 01:30:22 +02:00
Günther Deschner
bdd214b38c s4-smbtorture: use torture_comment in RPC-SAMR-USERS-PRIVILEGES test.
Guenther
2009-06-17 01:29:22 +02:00
Günther Deschner
823681bc99 s4-smbtorture: use TORTURE_TEST_USER define in libnetapi user test.
Guenther
2009-06-17 01:29:19 +02:00
Jelmer Vernooij
308de544f4 python: Provide way to iterate over available shares. 2009-06-16 02:28:10 +02:00
Jelmer Vernooij
f7ada51c29 python: Add API for accessing available shares. 2009-06-16 02:28:10 +02:00
Volker Lendecke
3014753ebe Fix the posixtimedlock test
The previous version depended on the fact that smb_raw_lock_send just queued
stuff. This changed with ebf5523b6e.
2009-06-15 17:26:56 +02:00
Jelmer Vernooij
478503694a smbtorture: Output subunit by default. 2009-06-13 16:16:01 +02:00
Jelmer Vernooij
afe7949313 smbtorture: Remove unused 'quiet' output format. 2009-06-13 16:16:01 +02:00
Jelmer Vernooij
4bef8acc47 selftest: Fix references to filenames with knownfailures and slow tests. 2009-06-12 17:54:47 +02:00