1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

20784 Commits

Author SHA1 Message Date
Andrew Tridgell
bb009412d3 heimdal: work around differences between GNU and XSI strerror_r()
This is a fairly ugly workaround, but then again, strerror_r() is a
very ugly mess.
2009-12-14 22:29:57 +11:00
Andrew Tridgell
665e57f956 s4-dsdb: use the reveal control to hide/show extended DN components
When reveal is set, then we show deleted linked attributes and all
linkked attribute components. When not set we show a normal extended
DN.
2009-12-14 22:29:57 +11:00
Andrew Tridgell
e3c2309dcd s4-ldb: added new ldb_dn extended components for linked attributes
These will store linked attribute replication meta data
2009-12-14 22:29:57 +11:00
Andrew Tridgell
0d76df9953 s4-ldb: added a function to filter extended components of a ldb_dn
We need to be able to filter out components that should not be exposed
to users
2009-12-14 22:29:57 +11:00
Andrew Tridgell
725e25a206 s4-ldb: added a new "reveal" control
This control will allow inspection of internal ldb values, which would
normally be stripped before being presented to users. The first use
will be stripping linked attribute meta data extended components.
2009-12-14 22:29:57 +11:00
Andrew Tridgell
56b90acbf6 s4-ldb: sort the linearized extended DN by component name
This will make life easier when handling deleted linked attributes
2009-12-14 22:29:57 +11:00
Matthieu Patou
155bdea7b2 torture: add new tests for dfsblobs
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-12-14 10:58:32 +01:00
Günther Deschner
801fbd0569 s4-smbtorture: check whether a returned buffer size is a multiple of 4 in RPC-SPOOLSS.
This gives a good indication where our IDL (and the s3 spoolss implementation) is still wrong.

Guenther
2009-12-14 10:37:41 +01:00
Matthias Dieter Wallnöfer
f8c34c4df1 s4:"samdb_set_password_sid" - clean up created objects correctly
- We should clean up such "helper" objects created in this function to don't
  have them around until "mem_ctx" is destroyed
- Remove a from my view pointless comment "This is a password set, not change"
  since an external argument "user_change" decides this ("modify" or "(re)set")
2009-12-13 16:13:34 +01:00
Matthias Dieter Wallnöfer
1788abba14 s4:operational LDB module - cosmetic - reorder an attribute list
This matches the default handling order in the "password_hash" module (it's nice
to have this consistent).
2009-12-12 17:59:05 +01:00
Matthias Dieter Wallnöfer
5767b1dacc s4:utils/oLschema2ldif.c - remove (now) unused variables 2009-12-11 20:20:02 +01:00
Matthias Dieter Wallnöfer
31321ac868 s4:libnet/libnet_become_dc - Fix a small glitch in "becomeDC_drsuapi1_add_entry_send"
We shouldn't use the now uninitialised "status" variable anymore.
2009-12-11 11:19:32 +01:00
Günther Deschner
dc71d1c29d s4-smbtorture: add more spoolss_EnumPrinterKey tests for local NDR test.
Guenther
2009-12-10 22:49:15 +01:00
Günther Deschner
ce33967f4a s4-smbtorture: fix and extend enum printerkey test.
Guenther
2009-12-10 17:48:50 +01:00
Nadezhda Ivanova
56b754e09a Implementation of sDRightsEffective, allowedAttributesEffective and allowedChildClassesEffective.
Behavior as documented in WSPP and tested. Needs optimisation though.
2009-12-10 15:49:53 +02:00
Andrew Tridgell
c59372b0b8 s4-ldb: fixed 2 bugs in ldb_dn_set_extended_component()
The first bug was that setting a component twice could cause it to
appear twice in the DN.

The second bug was that using an existing ldb_val from a previous call
of ldb_dn_get_extended_component() as an argument to
ldb_dn_set_extended_component() would cause a valgrind error (as the
array the val pointed into will change).
2009-12-10 17:51:30 +11:00
Andrew Tridgell
62dc7f6b2d s4-libcli: GUID_from_ndr_blob() is strict about the blob size
We need to create a blob of the right length
2009-12-10 17:51:30 +11:00
Andrew Tridgell
c7c97b61ae s4-schema: use GUID_to_ndr_blob() 2009-12-10 17:51:29 +11:00
Andrew Tridgell
d35b7d0aa4 s4-schema: use binsearch.h 2009-12-10 17:51:29 +11:00
Andrew Tridgell
261ba40e77 s4-dsdb: use GUID_to_ndr_blob() 2009-12-10 17:51:29 +11:00
Andrew Tridgell
215cc5a9ed s4-ldb: use GUID_to_ndr_blob() 2009-12-10 17:51:29 +11:00
Andrew Tridgell
982228605f s4-libnet: use GUID_to_ndr_blob() 2009-12-10 17:51:28 +11:00
Andrew Tridgell
b4ea96ecd9 s4-libcli: use GUID_to_ndr_blob() 2009-12-10 17:51:28 +11:00
Andrew Tridgell
33cbe9c631 s4-server: use GUID_to_ndr_blob() in cldap and smb servers 2009-12-10 17:51:28 +11:00
Andrew Tridgell
2493776f59 s4-ldb: simplify ldif handlers using new GUID functions 2009-12-10 17:51:27 +11:00
Andrew Tridgell
d337cefa92 s4-dsdb: simplify samdb_result_guid() 2009-12-10 17:51:27 +11:00
Andrew Tridgell
56b887e5b9 s4-dsdb: simplify linked attributes code using GUID functions 2009-12-10 17:51:27 +11:00
Andrew Tridgell
81bc561330 s4-dsdb: simplify schema code using new GUID functions 2009-12-10 17:51:27 +11:00
Andrew Tridgell
f01ea8bf58 s4-smb2: use new GUID function in smb2 negprot 2009-12-10 17:51:27 +11:00
Andrew Tridgell
498f2b879a s4-libcli: use new GUID functions in libcli 2009-12-10 17:51:26 +11:00
Andrew Tridgell
08e8988bd8 s4-dsdb: use GUID_from_ndr_blob() to create dsdb_get_extended_dn_guid() 2009-12-10 17:51:26 +11:00
Günther Deschner
d2f13dd688 s4-smbtorture: enhance spoolss_EnumPrinterKey torture test.
This demonstrates that s3 still does not have that call implemented correctly.

Guenther
2009-12-09 15:34:45 +01:00
Andrew Tridgell
0fca76e577 s4-dsdb: added dsdb_functional_level() helper function 2009-12-09 18:18:26 +11:00
Andrew Tridgell
732c701c52 s4-drs: ensure we fill in ncRoot_dn in getncchanges
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-09 18:18:26 +11:00
Andrew Tridgell
16eb25b35b s4-drs: use parentGUID attribute in getncchanges
Now that parentGUID is reliable again, use it instead
of building our own

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-09 18:18:25 +11:00
Andrew Tridgell
4bb2958f16 s4-ldb: fixed nested searches inside ldb modules
We need to keep a search count in ltdb to allow for nesting
of searches inside a module

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-09 18:18:25 +11:00
Andrew Tridgell
e5a478d3a2 s4-ldb: added a missing ltdb_unlock_read() 2009-12-09 18:18:25 +11:00
Andrew Tridgell
33976711e3 s4-dsdb: use dsdb_module_search_dn in repl_meta_data
This allows us to search below the current module. That
will be important when we start using the results of this
search to get the linked attributes meta data right
2009-12-09 18:18:25 +11:00
Andrew Tridgell
707cd30cda s4-dsdb: fixed steal of parentGUID for empty msg
msg->elements could be NULL before we add parentGUID
2009-12-09 18:18:25 +11:00
Andrew Bartlett
18530985ec s4: On the way to alpha11 2009-12-09 11:52:41 +11:00
Andrew Bartlett
100e249c79 This is alpha10 2009-12-09 00:16:17 +11:00
Stefan Metzmacher
dd650edff2 s4:selftest: skip SMB2-ACLS for now
metze
2009-12-08 13:50:16 +01:00
Stefan Metzmacher
33ecfb05a4 s4:selftest: run RAW-STREAMS again
metze
2009-12-08 13:50:16 +01:00
Stefan Metzmacher
d3d2e3988f RAW-STREAMS: convert failing tests to torture api
This is needed as we want to mark failing tests as
known failures.

metze
2009-12-08 13:50:15 +01:00
Günther Deschner
5e8e5dfe88 s4-smbtorture: make level 8 the reference for PrinterDriverEnum test.
Guenther
2009-12-08 11:51:09 +01:00
Günther Deschner
35c067782b s4-smbtorture: fill in COMPARE_STRING_ARRAY macro in spoolss driver test.
Guenther
2009-12-08 10:37:13 +01:00
Stefan Metzmacher
ed5c3372de s4:selftest: use ${selftest_prefix} instead of hardcoded st/
metze
2009-12-08 09:19:35 +01:00
Andrew Tridgell
52083a8547 s4-selftest: show the test summary at the end of 'make test' in the build farm
This should make it easier to see what tests are failing with what
parameters
2009-12-08 15:59:10 +11:00
Andrew Tridgell
29c87ef830 s4-heimdal: fixed a use-after-free heimdal bug
This caused samba4kinit to segfault on some systems
2009-12-08 15:16:13 +11:00
Andrew Tridgell
cc9d4d5181 s4-drs: use -r to ldbdel in unvampire devel script
This ensures we delete any nTDSConnection objects
2009-12-08 14:43:50 +11:00
Andrew Tridgell
ff984cdfac s4-ldb: fixed ldbdel with -r (recursive deletion)
We need to delete the deepest DNs first
2009-12-08 14:43:50 +11:00
Andrew Bartlett
b2d8e1118d s4:build Bump ldb and tdb required versions.
Hopefully this will ensure we don't get an older version from the system.
2009-12-08 14:07:45 +11:00
Tim Prouty
1bf825b6f8 s4 torture: Cleanup RAW-ACLS a bit
Don't check SEC_DESC_DACL_AUTO_INHERITED right now
Disable RAW-ACLS-INHERITFLAGS for the short term
Update samba4's knownfail accordingly
2009-12-07 17:59:28 -08:00
Andrew Tridgell
978dc61b56 s4-selftest: don't consider spoolss failures to be an error in s4 2009-12-08 12:39:11 +11:00
Kamen Mazdrashki
f1d9382b18 s4/smbstreams: Fix memory use after free.
The bug is that sometimes 'streams' is parent for 'new_name'.
With this said, 'new_name' must be dupped before 'streams'
pointer is freed.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-08 12:39:11 +11:00
Kamen Mazdrashki
bf7cc3262e krb5: Fix leaked hx509_context pointer
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-08 12:39:10 +11:00
Tim Prouty
105eb95a57 s4 quicktest: exclude raw-streams from quicktest until bug is fixed 2009-12-07 16:54:17 -08:00
Tim Prouty
f717a79eff s4 torture: Add a new torture:hide_on_access_denied parameter
It appears some newer versions of windows return
NT_STATUS_OBJECT_NAME_NOT_FOUND on a createfile when access is denied
rather than NT_STATUS_ACCESS_DENIED.  I'm not sure how this translates
to directory enumeration yet, but for now make this a parameter that
can be checked in the various torture tests.

This also gets RAW-ACLS and SMB2-CREATE passing against win7.
2009-12-07 16:54:17 -08:00
Tim Prouty
f4aa47b5ab s4 torture: win 7 doesn't like the sequential_only flag for directories
Remove it for now
2009-12-07 16:54:16 -08:00
Zack Kirsch
d252d23ff1 s4 torture: Port RAW-ACLS tests to SMB2
- The smblsa calls had to be commented out for now and should be fixed
  later, but they aren't crucial to the test.
- The first two tests from RAW-ACLS were already ported to
  torture_smb2_setinfo() and test_create_acl(). Modifications were
  made similar to the RAW-ACLS changes.
- test_sd_get_set() was ported, but does not pass against XP or Vista;
  it is not added to the SMB2-ACLS test suite.
- printf -> torture_comment / torture_warning / torture_result
2009-12-07 16:54:16 -08:00
Zack Kirsch
8ceb428c55 s4 torure: Add SMB2 utility functions
- Add a torture_setup_dir() equivalent in SMB2, called smb2_util_setup_dir().
- Add verify_sd() and verify_attrib() helper functions for SMB2.
2009-12-07 16:54:16 -08:00
Zack Kirsch
1724273ab9 s4 torture: RAW-ACL Improvements
- Change RAW-ACLS test suite so each test can be run individually.
- Add verify_sd() and verify_attrib() helper functions.
- Change test_nttrans_create() to work for both files and directories.
- Fix a segfault in test_inheritance() when the test errors out early.
- test_sd_get_set() does not pass against XP or Vista, so it is no longer added
  to the RAW-ACLS test suite.
- Minor fixes to test_inheritance().
- New INHERITFLAGS test, which tests the auto inheritance flags a bit more.
- printf -> torture_comment / torture_warning / torture_result
2009-12-07 16:54:16 -08:00
Tim Prouty
919440a2aa s4 torture: Convert RAW-STREAMS to a set of test suites rather than a monolithic test 2009-12-07 16:52:16 -08:00
Tim Prouty
6bc8a2bf0a s4 torture: Update RAW-RENAME to pass against win7 2009-12-07 16:52:15 -08:00
Tim Prouty
cd72301efa s4 torture: Add a new RAW-STREAMS test to simulate the summary tab 2009-12-07 16:52:15 -08:00
Tim Prouty
5d66d43667 s4 torture: Fix the streams create disposition tests to actually return an error on failure 2009-12-07 16:52:15 -08:00
Steven Danneman
47f5aac39d s4/torture: add test for zero byte read contention with byte range locks 2009-12-07 16:10:25 -08:00
Steven Danneman
995b4800f8 s4/libcli: add define for exclusive lock mode 2009-12-07 16:10:24 -08:00
Steven Danneman
b4c72e44a8 s4/torture: fix >80 column spacing issues 2009-12-07 16:10:24 -08:00
Aravind Srinivasan
0c42d65d7c s4/torture: add delete-on-close test for directories
This test opens a directory with delete on close, opens it again,
and checks to make sure that the second open returned with
NT_STATUS_DELETE_PENDING.
2009-12-07 16:10:24 -08:00
Günther Deschner
8de6f7178c s4-smbtorture: disable some spoolss printerdata tests which s3 does not pass at the moment.
Guenther
2009-12-07 14:42:13 +01:00
Günther Deschner
123d8d1c2c s4-smbtorture: fix RPC-SPOOLSS after _spoolss_SetPrinterDataEx IDL change.
Guenther
2009-12-07 14:42:13 +01:00
Andrew Bartlett
9b0780cf00 s4:dsdb Use ldb_match_msg_objectclass in operational.c
This avoids not only a possibly non-portable compiler expression, but
also the need to look up the schema each time.

Andrew Bartlett
2009-12-07 15:28:51 +11:00
Andrew Bartlett
54ea4b17f0 s4:ldb Add a function to match a message against an objectClass
(as objectClass will always be a case insensitive ascii string, we can
make a much simpler match function here than for the general case).

Andrew Bartlett
2009-12-07 15:27:43 +11:00
Andrew Bartlett
b2db28b634 s4:ldap.py Improve testsuite for primaryGroupToken behaviour
This tries to show that the domain object should not have a
primaryGroupToken, for example.  (This passes against the old and new
code, as the failure case requires an object with an objectSid, and
exactly one group in it's subtree.  Sadly I don't know of a valid structure
that I can construct to test this).

Andrew Bartlett
2009-12-07 13:08:06 +11:00
Andrew Bartlett
354b80b3ae s4:dsdb Make primaryGroupToken calculation more efficient and correct
The original code here would do a subtree search under each object,
attempting to determine if it was a group.  This was incorrect, and
inefficient - we just need to ask for the objectClass attribute, and
check that value before returning the group's RID.

(Much of this patch reworks operational.c to allow a search for 2
attributes for this calculation).

Andrew Bartlett
2009-12-07 13:07:56 +11:00
Andrew Bartlett
45cd4c93fb s4:dsdb Make parentGUID handler use dsdb_module_search_dn()
This avoids doing a new search from the top of the module stack.

This also removes the helper function dsdb_find_parentguid_by_dn()
which is now unused.

Andrew Bartlett
2009-12-07 13:07:03 +11:00
Andrew Bartlett
a4725f5880 s4:build torturedir and -DTORTUREDIR is unused
(And made building RPMs much more difficult for JHT)
2009-12-07 13:07:03 +11:00
Andrew Bartlett
972ee4b97b s4:dsdb Hide the LM password by default too 2009-12-07 13:07:03 +11:00
Kamen Mazdrashki
9b265a68cc s4-ldif: Fix memory leek in ldb_ldif_write() 2009-12-05 16:57:40 -05:00
Jeremy Allison
1d3942c534 Make smbtorture4 match Windows behavior.
Jeremy.
2009-12-04 14:02:52 -08:00
Günther Deschner
02fe863039 s4-smbtorture: heavily expand printerdata tests in RPC-SPOOLSS.
Including new tests for:
- spoolss_SetPrinterDataEx
- spoolss_DeletePrinterDataEx
- spoolss_DeletePrinterKey

Guenther
2009-12-04 12:55:52 +01:00
Andrew Tridgell
be78d4a70d s4-ldb: fixed show_deleted module not to corrupt parse trees
The show_deleted module was using a static private ptr in the module
to hold a parse tree to save on parsing. The code caused this
static ptr to change with each search, which caused incorrect
searches and numerous valgrind errors.

This patch replaces it with a hand-built parse tree.
2009-12-04 17:49:19 +11:00
Andrew Tridgell
ced3eef776 s4-drsutil: fixed a memory leak in samdb_search_count
In general functions that don't return any memory should not take a memory context.
Otherwise it is too easy to have a bug like this where memory is leaked
2009-12-04 17:49:19 +11:00
Zachary Loafman
4f6d5d0b86 s4 torture: Convert create_complex_file to use BASIC_INFO instead of deprecated command
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-03 20:46:29 -08:00
Zachary Loafman
3507350ad2 s4 torture: Fix call to smbcli_open
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-03 20:46:29 -08:00
Zachary Loafman
a3df55b26f s4 torture: Make RAW-SEARCH pass against win7
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-03 20:46:25 -08:00
Zachary Loafman
2dc5bd19d4 s4 torture: Parameterize WRITE_AND_CLOSE support
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-03 20:21:22 -08:00
Zachary Loafman
f26a500d9f s4 torture: Add lockread_supported based off of CAP_LOCK_AND_READ
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-03 20:21:22 -08:00
Zachary Loafman
5882282dea s4 torture: Allow READ to be parameterized, add more readx tests
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-03 20:21:22 -08:00
Zachary Loafman
60d9828ade s4-torture: Allow the legacy DENY_FCB/DENY_DOS share modes to be ignored
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-12-03 19:07:54 -08:00
Tim Prouty
5c857768d1 s4 selftest/quicktest: Update known failures for the sfileinfo and oplock changes
Two new samba4 bugs have been filed for the two corresponding known
failures.  For the short term raw.sfileinfo had to be removed from
quicktest.  It is no longer an individual test, but a test-suite and
quicktest can only run top level tests.
2009-12-03 18:54:52 -08:00
Tim Prouty
15e1c61027 s4 torture: Add a new RAW-OPLOCK test: BATCH26
Try a rename with a wide-open share mode on an already open file
and the there is still share mode contention.  For the reason why
see:

http://social.msdn.microsoft.com/Forums/en-US/os_fileservices/thread/3ca14dc9-da1f-4786-a8f7-a86e9903db0c

Msft's anser:

   After further review, The reason for server to fail with sharing
   violation is that the windows server that executes a path-based
   rename request opens the file for DELETE access, but only with
   FILE_SHARED_READ as ShareAccess .  Therefore, the existing
   open(frame 76), which has shared read/write/delete , is compatible
   with the Windows servers access mode (DELETE), but Windows servers
   open is not compatible with access mode in existing open.

   Note that it is correct to state that the logic in Windows server
   could have been written to allow shared read/write/delete in which
   case it would succeed as you mention. The behavior here is
   historical based on the existing implementation.
2009-12-03 18:54:52 -08:00
Tim Prouty
8f7e5732ef s4 torture: Close the third handle in RAW-OPLOCK-BATCH22 2009-12-03 18:54:52 -08:00
Tim Prouty
522d6bc588 s4 torture: Convert an error to a warning in RAW-OPLOCK-BATCH22
Some servers choose to mark a client as bad if they fail an oplock
break request by timing out (win7 is an example).  Once the client is
marked as bad, future oplock requests will timeout instantly.  This
causes subsequent runs of this test to fail, so rather than erroring
out as a failure, a warning is printed instead.

There is also a bug in w2k3 where it was incorrectly returning
contending a share mode lock.  It worked in XP and has been re-fixed
in win7.

This can also now be run against samba3.
2009-12-03 18:54:52 -08:00
Tim Prouty
b14da4f7c5 s4 torture: Add a few more windows target types 2009-12-03 18:54:52 -08:00
Tim Prouty
fc7832602d s4 torture: Convert to a more modern version of read in RAW-OPLOCK-BATCH4 2009-12-03 18:54:52 -08:00
Tim Prouty
af8b7857ca s4 torture: Allow some implementations to break from level1 to none with two breaks 2009-12-03 18:54:52 -08:00
Günther Deschner
2f0548fd98 s4-smbtorture: check more WERRORs in RPC-SPOOLSS.
Guenther
2009-12-03 23:48:59 +01:00
Günther Deschner
4e20a6f83b s4-smbtorture: call test_EnumPrinterDrivers with architecture in RPC-SPOOLSS.
Guenther
2009-12-03 22:16:24 +01:00
Matthias Dieter Wallnöfer
80e066112c s4:operational LDB module - Fix usage of LDB constants 2009-12-03 12:51:16 +01:00
Matthias Dieter Wallnöfer
fed6ac05d0 s4:ntvfs/posix/pvfs_streams - Fix "discard const" warning
I removed one "const" in front of a string declaration to achieve this.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-03 21:46:31 +11:00
Matthias Dieter Wallnöfer
1a855eb741 s4:ntvfs/posix/pvfs_resolve - Fix "discard const" warning
I removed two "const"s in front of string declarations to achieve this.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-03 21:46:31 +11:00
Steven Danneman
76be0f6a11 s4/selftest: knownfail some locking tests until bugs are fixed 2009-12-02 17:55:34 -08:00
Steven Danneman
48358b3eaa s4/torture: add multiple lock cancel test
See what happens when we have multiple outstanding lock requests and
we try to cancel both of them within a single LockingAndX.

On Windows, it seems only the first lock in the array is cancelled,
and the second is left pending.  Though, this behavior goes against
the MS-CIFS spec.
2009-12-02 17:28:52 -08:00
Steven Danneman
ad9c5a7b88 s4/torture: add addition multiple lock tests
* test that 2 locks in a single LockAndX are transactional
* test that 1 unlock and 1 lock in a single LockAndX are not
  transactional
* test that SMB2 doesn't like mixed lock/unlock in a single
  PDU
2009-12-02 17:28:52 -08:00
Steven Danneman
dfbb92e2a1 s4/torture: fix build warnings by removing unecessary const 2009-12-02 17:28:51 -08:00
Steven Danneman
438b7c41ae s4/torture: Add target functionality parameters to SMBv1 BRL tests
Abstract the server requirements to pass some BRL tests.

* The new default for >64bit lock tests, is that the server should
  return STATUS_INVALID_LOCK_RANGE.
* Add parameter for targets that don't implement DENY_DOS
2009-12-02 17:28:51 -08:00
Günther Deschner
450211b610 s4-smbtorture: be very strict in checking spools_EnumPrinterKey results.
Guenther
2009-12-03 01:04:02 +01:00
Andrew Tridgell
8d7a43fed7 s4-drs: fixed UDV and overlapping sync calls in DRS
When windows abandons a DRS sync, it will sometimes re-use the same bind handle for
a new sync. This means we need to check the DN of the sync and blank the getnc_state
if the DN has changed.

This also fixes the UDV to use the highest uSN for the partition, not for
the whole SAM.
2009-12-03 10:27:59 +11:00
Andrew Tridgell
b65b88740c s4-drs: fixed updating of uSNChanged in replmd_modify
Updating of uSNChanged broke in a recent change
2009-12-03 10:27:59 +11:00
Günther Deschner
5f60855ba2 samba-spoolss: use spoolss_StringArray2 in spoolss_EnumPrinterKey.
This should finally resolve the endian issues we were seeing on sparc and is
much cleaner for spoolss clients and servers.

Guenther
2009-12-02 14:56:17 +01:00
Tim Prouty
4e8b6c5992 s4 torture: Change oplock to use passthrough for exclusive3/batch11
In light of the INVALID_LEVEL that is seen for RAW_SFILEINFO_END_OF_FILE_INFO
requests on a path, I'm changing these back to using the passthrough
RAW_SFILEINFO_END_OF_FILE_INFORMATION to test the oplock break behavior as
originally intended
2009-12-01 11:12:51 -08:00
Tim Prouty
5035a90005 s4 torture: Update RAW-SFILEINFO-END-OF-FILE to test some additional corner cases
It turns out setting the end-of-file with Trans2SetPathInfo using the
snia spec's info level will attempt to open the file, enforcing share
modes, but then subsequentlys fail the setpathinfo with a dos error of
INVALID_LEVEL.  Doing a Trans2SetFileInfo with either end-of-file info
level succeeds as expected.
2009-12-01 11:12:51 -08:00
Tim Prouty
5a934fd8da Revert "s4 torture: Allow onefs to be checked like samba3 and samba4"
This reverts commit 98f595036e.

No longer necessary
2009-12-01 11:12:51 -08:00
Tim Prouty
66bf780e6e s4 torture: Change RAW-SFILEINFO-END-OF-FILE to check for share modes by default
Since the windows behavior appears to be a bug, only check for
the windows-style share mode bug if target=<windows variant> is
specified
2009-12-01 11:12:51 -08:00
Tim Prouty
2738e31674 s4 torture: Move target macros to a common header instead of redefining them in multiple files 2009-12-01 11:12:51 -08:00
Matthias Dieter Wallnöfer
2d1bd87f73 s4:torture/raw/lock - Fix "discard const" warnings by introducing "discard_const_p"s 2009-12-01 16:48:47 +11:00
Matthias Dieter Wallnöfer
262d26d05a s4:torture/nbt/wins - Add more casts 2009-12-01 16:48:38 +11:00
Matthias Dieter Wallnöfer
58a5e764a9 s4:torture/nbench/nbench - Add a cast before "str_list_make_shell" 2009-12-01 16:48:22 +11:00
Matthias Dieter Wallnöfer
8b4499942e s4:torture/ldap/ldap_sort - Add some casts to suppress warnings 2009-12-01 16:48:14 +11:00
Matthias Dieter Wallnöfer
7be99d3735 s4:schema - Make some more (result) variables const and fix up warnings with "discard_const_p" 2009-12-01 16:48:02 +11:00
Endi S. Dewata
9ce7e9ab84 s4:kdc - Merged kdc_tcp_accept() and kpasswdd_tcp_accept().
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-12-01 16:41:02 +11:00
Endi S. Dewata
0c89a6f2aa s4:kdc - Merged kdc_add_kdc_socket() and kdc_add_kpasswd_socket().
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-12-01 16:40:57 +11:00
Endi S. Dewata
bd17df71b5 s4 - Create default modules directory.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-12-01 16:40:52 +11:00
Endi S. Dewata
c93fc3a10a s4:kdc - Disable KDC port when it's set to 0.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-12-01 16:40:44 +11:00
Andrew Bartlett
183ea8220a Merge commit 'origin/master' into abartlet-devel 2009-12-01 16:12:53 +11:00
Andrew Bartlett
d58413d331 On our way to Samba4 alpha10! 2009-12-01 16:06:59 +11:00
Andrew Bartlett
ca2c645156 Fix build of Samba4 from tarball generated by mkrelease.sh
Revert "Remove RFC's from the release tarballs to make the lives of the Debian"

This reverts commit eda7f35bc8.

These files are essential to the Samba4 build.

Andrew Bartlett
2009-12-01 14:43:55 +11:00
Andrew Tridgell
83c106e084 s4-ldb: the '1' form of extended_dn search is easier to read
The '1' form gives GUIDs and SIDs in the ascii form as normally used
for display.
2009-12-01 12:36:23 +11:00
Andrew Bartlett
5203128130 This is alpha9 2009-12-01 12:27:09 +11:00
Andrew Bartlett
a88f086d96 s4:setup Adjust upgradeprovision blackbox test now we don't have --targetdir 2009-12-01 12:17:56 +11:00
Matthieu Patou
1d0d78ab3d s4: Remove targetdir as it can cause some trouble and can be replaced by an adapted -s smb.conf
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-12-01 12:17:52 +11:00
Matthieu Patou
fe1291227f s4: Handle the case in secrets.ldb without name attribute
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-12-01 12:17:46 +11:00
Matthieu Patou
4861ad57fb s4: don't forget to update defaultSecurityDescriptor
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-12-01 12:17:41 +11:00
Matthieu Patou
bf2c1e9c4f s4: load the domain level of the current provision and create a provision with the same domain level
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-12-01 12:17:32 +11:00
Andrew Bartlett
f65360840a s4:ldap.py Add test of namingContext behaviour after tridge found a bug
Tridge found that the partitions.c module was being initialised twice,
and setting the partitions into the rootDSE twice.

Andrew Bartlett
2009-12-01 12:17:00 +11:00
Volker Lendecke
6aef5e591f Fix bug 6546: Avoid accessing buf[-1] if NUL byte comes from fgets 2009-11-30 21:48:59 +01:00
Fernando J V da Silva
7399c04fd0 s4-drs: Test situations for runtime constructed parentGUID
Includes the following verifications for the constructed parentGUID:
- Checks if it returns nothing when there is no parent object
- Ensures that attributes mentioned after the parentGUID
are returned correctly (this avoid a bug pointed out by Tridge
during sync constructed parentGUID development)

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-30 21:17:28 +11:00
Fernando J V da Silva
71e29cbf56 s4-drs: Using dsdb_msg_add_guid() utility function
Uses the dsdb_msg_add_guid() to add any kind of GUID attribute
to a ldb_message in several places of samba4 code.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-30 21:17:27 +11:00
Crístian Deives
1cf48022af s4-drs: add deletion of old connections
the nTDSConnection objects that are not needed anymore will be deleted.
the function kccsrv_delete_connection wasn't tested yet.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-30 20:22:13 +11:00
Crístian Deives
bed9efa6cd s4-ldb: changed ldb_msg_add_dn() to ldb_msg_add_linearized_dn()
this makes the usage clearer

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-30 20:22:13 +11:00
Crístian Deives
7ca2ceb333 s4-drs: Create connection obejct (nTDSConnection)
create nTDSConnection objects to match the list of servers

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-30 20:22:13 +11:00
Andrew Tridgell
8331b4c4f8 s4-ldb: check for -ve value for page size
This comes from a tip from Howard Chu. Apparently some clients
will send a -ve page size value.
2009-11-30 18:15:31 +11:00
Andrew Tridgell
a5e0f433de s4-dsdb: don't call ldb_next_init() twice in objectclass module 2009-11-30 16:49:36 +11:00
Matthias Dieter Wallnöfer
51bedf9395 lib/registry/util.c - Reorder the registry datatypes of the conversion functions
This is absolutely cosmetic and makes the code easier to comprehend.
2009-11-29 14:58:41 +01:00
Matthias Dieter Wallnöfer
df1d42fc1b Revert "s4:registry/util - Don't include the trailing '\0' in the internal data format but add it on the back-conversion to a string"
This reverts commit 7d400715e9.

"convert_string_talloc_convenience" does always add the NULL termination. Didn't
know that. Thanks Jelmer for pointing out!
2009-11-29 14:51:50 +01:00
Matthias Dieter Wallnöfer
b973c50836 s4:upgrade_from_s3 - Move it back to "setup"
Suggested by Jelmer
2009-11-28 19:25:12 +01:00
Matthias Dieter Wallnöfer
f0686645a9 s4:setup/provision - Rework
- Revert change in "ask" - was previously correct
- Readd accidentally removed checks for non-null realm and domainname
- On interactive mode perform only one "ask" call per question
- Inform the user about the unset administrator password
2009-11-28 18:59:33 +01:00
Matthias Dieter Wallnöfer
3ca61d9a01 s4:upgrade.py - remove my copyright
First I wanted to add also other changes but then I didn't introduce them.
Therefore remove my copyright again.
2009-11-28 18:50:27 +01:00
Matthias Dieter Wallnöfer
68f7b84140 s4:upgrade.py - readd accidentally removed empty lines
Jelmer pointed out that this is against the PEP8 norm
2009-11-28 18:29:49 +01:00
Matthias Dieter Wallnöfer
ecfd1dfcbd s4:samba3.py/upgrade.py: Revert
This reverts commit 2175c0ed06.
This reverts commit 6c3e2417a0.
This reverts commit dbb8989e05.
This reverts commit 82adfa39b7.
This reverts commit f299efa8f0.

After a small discussion with Jelmer we agreed that this isn't the right way
to fix the problem. We should wait for a real patch rather to rely on temporal
hacks.
2009-11-28 15:34:43 +01:00
Andrew Tridgell
8a34cf6f51 s4-ldb: make it much easier to use common ldb controls 2009-11-28 21:58:04 +11:00
Andrew Tridgell
1287c1d115 s4-drs: cope with bogus empty attributes from w2k8-r2
w2k8-r2 sometimes sends empty attributes with completely bogus attrid
values in a DRS replication response. This allows us to continue with
the vampire operation despite these broken elements.
2009-11-28 13:28:34 +11:00
Matthieu Patou
db41a0afc6 s4: fix SD update and password change in upgrade script
- reserve a new Samba OID for recalculate SD control
- fix the update SD function
- fix handling of kvno in the update_machine_account_password function
- fix handling of handles in RPC winreg server

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-28 09:56:06 +11:00
Matthias Dieter Wallnöfer
f7c28db475 s4:WINREG RPC server - add another "talloc_unlink" in "DeleteKey"
Also here we waste memory - therefore free the pointless handle after the delete.
2009-11-27 23:23:32 +01:00
Matthias Dieter Wallnöfer
6f7cfb0e10 s4:WINREG RPC server - Reintroduce the free operation on "CloseKey"
Better use "talloc_unlink" here Since we could have more than one reference.
2009-11-27 23:23:31 +01:00
Günther Deschner
8f6df5d3ec s4-smbtorture: more and stricter tests for printer and data keys in RPC-SPOOLSS.
Guenther
2009-11-27 23:16:21 +01:00
Matthias Dieter Wallnöfer
f749e22cca s4:provision.py - remove hardcoded SIDs and RIDs
After rework of the SDDL modules this is possible. In future: Never hardcode
them anymore! Always use the abbreviations.
2009-11-27 22:46:05 +01:00
Matthias Dieter Wallnöfer
207067d1a8 s4:security/sddl - rework of the security descriptor abbreviations
- Reoder them
- Add some new ones (needed for the security descriptor in the provision script)
2009-11-27 22:45:43 +01:00
Matthias Dieter Wallnöfer
7d400715e9 s4:registry/util - Don't include the trailing '\0' in the internal data format but add it on the back-conversion to a string
As far as I know the registry library saves all data (including) strings without
the null termination. So do it also here in a similar way.
2009-11-27 21:17:59 +01:00
Matthias Dieter Wallnöfer
e79dd2ef7d s4:net utility - add a notice for the "help" operation and format it's output of the command list better 2009-11-27 21:17:59 +01:00
Matthias Dieter Wallnöfer
2175c0ed06 s4:samba3.py - deactivate also the assertion on line 599 2009-11-27 20:03:36 +01:00
Matthias Dieter Wallnöfer
663a1f599a s4:winbind - Fix it another time up
The first fix attempt did break some configurations (incl. "make test").
This now is the right fix with the right comment.
2009-11-27 17:45:20 +01:00
Matthias Dieter Wallnöfer
33188999b5 s4:provision.py - cosmetic 2009-11-27 17:39:02 +01:00
Matthias Dieter Wallnöfer
6c3e2417a0 s4:samba3.py (and test) - deactivate the tests until those parameters are fixed 2009-11-27 16:42:11 +01:00
Matthias Dieter Wallnöfer
08b3c396d7 s4:upgrade.py - Umlaut problem 2009-11-27 16:42:11 +01:00
Matthias Dieter Wallnöfer
1af31aed0b s4:tests.sh - Make also here the change from "upgrade" to "upgrade_from_s3" 2009-11-27 16:42:11 +01:00
Matthias Dieter Wallnöfer
0cc45b47dc s4:upgrade.py - rework to make the upgrade s3 -> s4 possible again
Able to read basic settings "workgroup", "realm", "netbios name" and the
function mode from the s3 "smb.conf" and use them for the provision of s4.
2009-11-27 16:06:07 +01:00
Matthias Dieter Wallnöfer
bd6c133e50 s4:upgrade_from_s3 - Fix message outputs
The quiet parameter was interpreted in the reverse manner.
2009-11-27 15:49:18 +01:00
Matthias Dieter Wallnöfer
dbb8989e05 s4:upgrade.py - the import of WINS databases don't seem to work always
Disable it for now until the cause has been found
2009-11-27 15:02:18 +01:00
Matthias Dieter Wallnöfer
70b3161090 s4:samba3.py - ignore comments in "smb.conf" files 2009-11-27 15:00:41 +01:00
Matthias Dieter Wallnöfer
82adfa39b7 s4:samba3.py - don't read those informations out from the TDB
At the moment those three calls are broken
2009-11-27 14:59:12 +01:00
Matthias Dieter Wallnöfer
f299efa8f0 s4:samba3.py - support the TDB version 3 2009-11-27 14:58:37 +01:00
Matthias Dieter Wallnöfer
a5d854afbc s4:provision - Fix up the provision of "standalone" and "member" mode
Both modes weren't possible anymore since 1.) the secrets entry wasn't created,
2.) a lookup in winbindd was done using "lp_workgroup()" rather than
"lp_sam_name()" (since on the mentioned two configurations we use the netbios
name as domainname - and not the workgroup).
2009-11-27 14:51:14 +01:00
Matthias Dieter Wallnöfer
a7fa3a9703 s4:provision.py - cosmetic output correction 2009-11-27 13:07:52 +01:00
Matthias Dieter Wallnöfer
6b835b0691 s4:setup/provision - make the interactive mode work again 2009-11-27 13:02:31 +01:00
Matthias Dieter Wallnöfer
fd313282a2 s4:upgrade script - rename it to "upgrade_from_s3" and do some rework
- Give a better name to the script
- Move it to the location where also "upgradeprovision" resides
- Fix up trailing whitespaces and tabs
2009-11-27 12:26:11 +01:00
Andrew Tridgell
e96f9a40ad s4-install: old systems don't have sed -i
surprisingly, this failure came from SLES8. I didn't realise that the
-i option was so new!
2009-11-27 19:58:29 +11:00
Andrew Tridgell
d5240822a5 s4-selftest: s4 passes all the SMB2-LOCK tests now 2009-11-27 19:42:11 +11:00
Andrew Tridgell
9f3ac810a6 s4-torture: fixed error code for s4 in SMB2-LOCK test
s4 returns NETWORK_NAME_DELETED if you attempt to use an invalid tree connection
for a lock. This test (correctly I think) happens before we validate the file handle.
That implies that when you pass both a closed handle and a invalid tree you
should get NT_STATUS_NETWORK_NAME_DELETED.
2009-11-27 19:42:11 +11:00
Andrew Tridgell
b3115f5cdc s4-ntvfs: win7 does not check for the NONE smb2 lock flag on unlock 2009-11-27 19:42:10 +11:00
Andrew Tridgell
af087f98ab s4-selftest: s4 passes this test now 2009-11-27 19:42:10 +11:00
Andrew Tridgell
7359a22219 s4-torture: mark s4 as doing valid lock range tests on SMB 2009-11-27 19:42:10 +11:00
Andrew Tridgell
186ea099c5 s4-ntvfs: move valid lock range test from smb2 layer to generic code
win7 also fails invalid lock ranges on SMB
2009-11-27 19:42:10 +11:00
Stefan Metzmacher
b62964d6fe s4:smb_server/smb2: don't reset highest_smb2_seqnum on SMB2 Cancel
metze
2009-11-27 08:19:46 +01:00
Andrew Tridgell
f6ecb4efb0 s4-torture: fixed expected error codes for s4 in SMB2-LOCK
I think the error/success codes returned by windows for these tests
are quite bogus. The ones s4 gives are much more reasonable. The
locking ones returning NT_STATUS_SUCCESS could lead to data loss, as
an application thinks it has a file locked correctly when it fact it
doesn't, so it could do an unsafe modify.
2009-11-27 16:05:06 +11:00
Andrew Tridgell
0920e0b63b s4-drstest: don't use getenv("LDB_URL") in test suites
I was stumped for a while as to why the drs test suite was failing for
me. It turned out that it looked for LDB_URL in the environment, and
used it if set. I had it set in my terminal, and it was happily
munching on my sam.ldb while testing. Quite a cute bug really :-)
2009-11-27 16:05:06 +11:00
Andrew Tridgell
d78921d78c s4-pvfs: fixed access check failure in SFILEINFO test
matching windows behaviour is not always the right thing to do!
2009-11-27 16:05:06 +11:00
Andrew Tridgell
d5387edb88 s4-ldb: improve detection of whether the server has a GC port
We were trying to open $SERVER:3268 regardless, which could result in
creating a file called "localdc1:3268", which led to subsequent test
failures
2009-11-27 16:05:06 +11:00
Andrew Tridgell
7ea485a1d2 s4-ldb: better to test for valid arguments in ldb library than commandline
We were testing for valid DNs in ldbrename in the command line
tool. This hid a bug in the ldb library where we caught a bad DN in
the objectclass module rather than in the main ldb code. It is better
to do validation of the DNs passed on the command line in the library
code, as this gives us more consistent error handling between the
programming APIs for ldb and the command line.
2009-11-27 16:05:06 +11:00
Andrew Tridgell
d3d7ca8eea s4-smb2: SMB2 uses NT_STATUS_CANCELLED for cancelled locks 2009-11-27 16:05:06 +11:00
Andrew Tridgell
7c158bdb1d s4-smb2: sequence numbers are not checked in SMB2_OP_CANCEL 2009-11-27 16:05:06 +11:00
Andrew Tridgell
056473d588 torture: fixed SMB2-LOCK valgrind error 2009-11-27 16:05:05 +11:00
Andrew Tridgell
04f235a9eb s4-smb2: check for invalid SMB2 lock ranges 2009-11-27 16:05:05 +11:00
Andrew Tridgell
aa4c516023 s4-smb2: check for an invalid lock flags combination
UNLOCK with FAIL_IMMEDIATELY is not allowed
2009-11-27 16:05:05 +11:00
Andrew Tridgell
61a278fd8a s4-install: fixed install path for python scripts
when we install python scripts we need to fix the internal path used
to find modules. We also need to install the scripts in the right
place. Most of them should go in $SBINDIR not share/setup/
2009-11-27 16:05:05 +11:00
Andrew Bartlett
8455a76516 s4:upgradeprovision Rework update_machine_account_password() tranactions
This balances the transaction_begin() and transactin_prepare_commit() calls

Andrew Bartlett
2009-11-27 16:05:05 +11:00
Andrew Bartlett
e6c1608e90 s4:dsdb Don't segfault with ldb_transaction_prepare_commit() without begin()
It is up to other modules to complain if
ldb_transaction_prepare_commit() is called before
ldb_transaction_begin_transaction()

Andrew Bartlett
2009-11-27 16:05:05 +11:00
Andrew Bartlett
731f560ecb s4:upgradeprovision add 'exit $failed' to blackbox test 2009-11-27 16:05:05 +11:00
Andrew Bartlett
d1faf7c90c s4:upgradeprovision Use mkdtemp to create unique tempoary directory names 2009-11-27 16:05:05 +11:00
Andrew Bartlett
6f0f82f7ed s4:selftest Add tests for upgradeprovision 2009-11-27 16:05:05 +11:00
Andrew Bartlett
b9f95882f0 s4:upgradeprovision Rework script, and reset machine account pw
The rework corrects some duplication and errors in the original
script, found when preparing an automated test of the script.

The code to reset the machine account password avoids issues with AES
keys and salting, which may not otherwise be solved by the upgrade.

Andrew Bartlett
2009-11-27 16:05:04 +11:00
Andrew Bartlett
2fd831407d s4:ldb Provide bindings for ldb_transaction_prepare_commit() 2009-11-27 16:05:04 +11:00
Andrew Bartlett
09338e60bc s4:provision Make setting the domain SID in the self join optional 2009-11-27 16:05:04 +11:00
Matthieu Patou
44bc8ac22c s4: Improve updateprovision
* Define a simple upgrade process mode (module storage change, file name change, copy of new file)
  * Move the schema, configuration and current object upgrade into full upgrade mode
  * Added the --full switch to select the full upgrade mode, and made simple upgrade mode the default
  * Make updateprovision works without any switch (update the provision in the default location)
  * Cleanup the messages
  * Create the reference provision in a subdirectory of the updated provision
2009-11-27 16:05:04 +11:00
Matthieu Patou
b25a42d907 s4: Rename the script 2009-11-27 16:05:03 +11:00
Stefan Metzmacher
49553d066b librpc: rerun "make idl"
metze
2009-11-26 11:47:42 +01:00
Matthias Dieter Wallnöfer
97553373d1 s4:ldap.py - add a test for the enhanced operational attributes check
(Deny creation of entries with operational attributes specified)
2009-11-26 11:21:02 +01:00
Matthias Dieter Wallnöfer
b6efbd5b4c s4:objectclass LDB module - Prevent write operations on constructed attributes 2009-11-26 11:21:01 +01:00
Matthias Dieter Wallnöfer
393b83979d s4:operational LDB module - Don't do the write checks here
Let this perform the schema in the "objectclass" module.
2009-11-26 11:21:01 +01:00
Günther Deschner
60419a0eb7 s4-smbtorture: refactor RPC-SAMR-LARGE-DC test a little more.
Guenther
2009-11-26 01:45:35 +01:00
Günther Deschner
d22eb75a13 s4-smbtorture: add torture_samr_context to carry some RPC-SAMR-X specifics.
Guenther
2009-11-26 01:45:35 +01:00
Steven Danneman
f66612f62e s4/torture: port SMBv1 RAW-LOCK tests to SMBv2
RAW-LOCK ported as:

RAW-LOCK-LOCK, RAW-LOCK-LOCKX -> SMB2-LOCK-LOCK
RAW-PIDHIGH -> removed, no longer relevant
RAW-ASYNC -> SMB2-LOCK-ASYNC, SMB2-LOCK-CANCEL, SMB2-LOCK-CANCEL-TDIS, SMB2-LOCK-CANCEL-LOGOFF
RAW-ERRORCODE -> SMB2-LOCK-ERRORCODE
RAW-CHANGETYPE -> removed, no longer relevant
RAW-ZEROBYTELOCKS -> SMB2-LOCK->ZEROBYTELENGTH
RAW-UNLOCK -> SMB2-LOCK-UNLOCK
RAW-MULTIPLE_UNLOCK -> SMB2-LOCK-MULTIPLE-UNLOCK
RAW-STACKING -> SMB2-LOCK-STACKING

BASE-LOCK ported as:

BASE-LOCK-LOCK1 -> SMB2-LOCK-ERRORCODE, timeout is no longer relevant
BASE-LOCK-LOCK2 -> SMB2-LOCK-CONTEND, SMB2-LOCK-LOCK, SMB2-LOCK-CONTEXT
BASE-LOCK-LOCK3 -> SMB2-LOCK-RANGE
BASE-LOCK-LOCK4 -> SMB2-LOCK-OVERLAP
BASE-LOCK-LOCK5 -> SMB2-LOCK-STACKING
BASE-LOCK-LOCK6 -> SMB2-LOCK-CANCEL, change_locktype no longer relevant
BASE-LOCK-LOCK7 -> SMB2-LOCK-RW-SHARED, SMB2-LOCK-RW-EXCLUSIVE
2009-11-25 12:55:48 -08:00
Steven Danneman
7f14388721 s4/libcli: rename previously reserved field in SMB2 LOCK struct
The lock.in.reserved field has been renamed lock_sequence in the
SMB 2.1 dialect.  See MS-SMB 2.2.26.
2009-11-25 12:55:48 -08:00
Steven Danneman
65a611ec72 s4/libcli: Initialize client PID for SMB2 connections
Set the SMB pid to the Unix pid of the client process.
2009-11-25 12:55:47 -08:00
Tim Prouty
b6f972222f s4 torture: Change RAW-OPLOCK to use the documented version of SET_END_OF_FILE_INFO
The passtrhough version of SET_END_OF_FILE_INFO is tested in
RAW-SFILEINFO-END-OF-FILE.

Additionally, the first opener is changed to use SHARE_WRITE for the
share mode since SET_END_OF_FILE_INFO actually writes data to the file
via truncating/extending.
2009-11-25 08:45:58 -08:00
Tim Prouty
98f595036e s4 torture: Allow onefs to be checked like samba3 and samba4
This is needed for the new RAW-SFILEINFO-END-OF-FILE test to
differentiate what appears to be a windows bug.
2009-11-25 08:45:15 -08:00
Tim Prouty
6074a058df s4 torture: Add two new setfileinfo tests
These tests expose a potential bug in winXP, win7, and likely others.
There is also a bug in samba where share modes aren't being enforced
where they should.

For more details see:
http://lists.samba.org/archive/cifs-protocol/2009-November/001130.html
2009-11-25 08:45:14 -08:00
Tim Prouty
ce9ac3a685 s4 torture: Split up the torture suite setup for RAW-SFILEINFO
A side effect of this change is that RAW-SFILEINFO now runs the whole
suite instead of just the first test.  I changed the name of the first
test to RAW-SFILEINFO-BASE and changed all of the selftest scripts
that call it.
2009-11-25 08:45:14 -08:00
Andrew Bartlett
c16e96e46f s4:dsdb Make samba_dsdb easier to use in upgrades - assume default values 2009-11-25 19:19:32 +11:00
Andrew Bartlett
7de2a49f28 s4: update valgrind suppressions for use on build farm 2009-11-25 17:54:06 +11:00
Matthieu Patou
fed8b652bf s4:upgradeschema.py Update to reflect recent change in provision
- define which modules we want to use when loading the ldb
- move partition in sam.ldb.d dir

Changes have been suggested by Andrew Bartlett.

(commit message clarified by Andrew Bartlett)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-11-25 13:34:11 +11:00
Matthieu Patou
604c291bdd s4:upgradeschema.py Cleanup
- remove some useless comments
- remove hardcoded paths

(commit message clarified by Andrew Bartlett)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-11-25 13:33:52 +11:00
Matthias Dieter Wallnöfer
a6e8e87c55 s4:installmisc - install also the new "domainlevel" tool from the setup dir 2009-11-24 22:24:00 +01:00
Brian Lu
f299c19aa8 s4: Check SUN compiler and remove "-fullwarn" when using it
This option is only supported by "gcc".
For details consider https://bugzilla.samba.org/show_bug.cgi?id=6905

Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2009-11-24 22:12:56 +01:00
Matthias Dieter Wallnöfer
9e852a1759 Revert "s4-netlogon: always set the dNSHostName in GetDomainInfo"
This reverts commit 87b6f2e863.

This was the cause of the breakage of the "LogonGetDomainInfo" testsuite. I
think my behaviour is more correct to Windows Server since the test works
against it (at least release 2003 R2).

One problem I discovered is that freshly joined workstations don't get their
DNS name into the directory. Therefore I think also another part (maybe another
RPC call) is able to do this.
2009-11-24 20:30:07 +01:00
Matthias Dieter Wallnöfer
4825df8323 s4:ldap.py - fix the schema update test on Windows Server
Apparently Windows Server (2003) doesn't like the comma delimiter here. I got
always error 16 ("LDB_NO_SUCH_ATTRIBUTE"). With this change the test works
again.
2009-11-24 19:44:18 +01:00
Matthias Dieter Wallnöfer
e77c0f1b50 s4:libnet_become_dc - fix typo 2009-11-24 19:17:08 +01:00
Stefan Metzmacher
23d81904eb RAW-PING-PONG: use timeval_current/timeval_elapsed instead of start_timer/end_timer
metze
2009-11-24 11:47:31 +01:00
Brad Hards
840cdfa2fa s4:param remove reference to private header from source4/param/param.h
source4/param/param.h has a

param.h is a public header (and parmlist isn't, even if the relative path
could work), so I suggest making it a forward declaration in the header, and
including parmlist.h in the implementation.

(commit message included from e-mail by Andrew Bartlett)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-11-24 15:21:57 +11:00
Matthieu Patou
3ed0cae14b s4: Fix missing TLS dir when targetdir is not the default one 2009-11-24 15:21:56 +11:00
Andrew Bartlett
4f64bc7125 heimdal Fix invalid format string 2009-11-24 11:38:41 +11:00
Andrew Bartlett
4062d2b376 s4:dsdb Handle LDAP backends correctly with new samba_dsdb system
The original code had the wrong module names, and use strcasecmp()
incorrectly.

Andrew Bartlett
2009-11-24 11:36:34 +11:00
Andrew Bartlett
fdb5914b27 s4:provision Move exceptions into a new file
This allows provisionbackend and provision to both raise ProvisionException
2009-11-24 11:09:30 +11:00
Andrew Bartlett
5ea6f79775 s4:provision Don't bother with a template for the LDAP backend startup script. 2009-11-24 11:04:31 +11:00
Andrew Bartlett
625856f2cf s4:provision Move secrets.ldb over to .c file module lists, like sam.ldb 2009-11-24 10:41:45 +11:00
Matthias Dieter Wallnöfer
9aeaf31cfe s4:ldap.py - activate test for operational attributes
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-11-24 10:41:36 +11:00
Andrew Bartlett
dcee196f3e s4:operational LDB module - Prevent the modification of operational attributes
(merged by Andrew Bartlett)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-11-24 10:41:15 +11:00
Andrew Bartlett
cec473e728 s4:ldap.py Add tests for subSchemaSubEntry 2009-11-24 10:39:10 +11:00
Andrew Bartlett
cfad782c9e s4:dsdb Use new helper function to obtain CN=Aggregate schema DN in schema_data 2009-11-24 10:39:10 +11:00
Andrew Bartlett
e0b1edf013 s4:dsdb Return the subSchemaSubEntry operational attribute on every object 2009-11-24 10:39:09 +11:00
Andrew Bartlett
7b2bd93635 s4:dsdb Add function to return the CN=Aggregate schema DN 2009-11-24 10:39:09 +11:00
Andrew Bartlett
90d739990a s4:provision Remove 'operational' from secrets.ldb module list 2009-11-24 10:39:09 +11:00
Matthias Dieter Wallnöfer
81c46686db s4:ldap.py - Add a check for the generated "schemaIDGUID"
I've forgotten to add this when checking in the reworked SAMLDB module
2009-11-23 16:21:10 +01:00
Andrew Bartlett
401ba9c9cf s4:dsdb Move module configuration from each ldb into samba_dsdb.c
This makes getting the module order correct, the obligation of Samba4
developers, and not system administrators.  In particular, once an ldb
is updated to use only the 'samba_dsdb' module, no further changes to the
ldb should be required when upgrading to later Samba4 versions.

(thanks to metze for the suggestion of samba_dsdb as a long-term
stable name for the module)

Andrew Bartlett
2009-11-23 14:15:07 +01:00
Andrew Bartlett
e297af00fa s4:provision Simplify the module list
This makes the member server much more like the DC, the objectGUID
module replaces the repl_meta_data module.

We also generally rework the construction of the list, building a full
list in python, and then transforming it into a string, rather than
playing string concatonation games

Andrew Bartlett
2009-11-23 14:15:06 +01:00
Kamen Mazdrashki
83b41aa959 s4/schema(tort): Refactor DSDB-SYNTAX test for better performance
Test was implemented as a test fixture so that setup/teardown
occurs only once.
This should impact test performace as long as provision_get_schema()
is a slow function (especially when debugging)
2009-11-23 14:15:06 +01:00
Kamen Mazdrashki
cf2bb28014 s4/schema: Handle Object(OR-Name) syntax in extended_dn_out module
Windows displays attribute values with Object(OR-Name) syntax
in plain DN format when queried through LDAP.
Hence, we need to post-process such values specially
in extended_dn_out.c module so they are always shown as plain DN,
no matter what controls are passed for search request.
2009-11-23 14:15:06 +01:00
Kamen Mazdrashki
1bf31f343c s4/schema: Object(OR-Name) syntax handling for DRS calls
OR-Name syntax through DRS calls looks like DN-Binary syntax
2009-11-23 14:15:05 +01:00
Kamen Mazdrashki
bef4e25b1f s4/schema(tort): Inject authOrig attribute into schema loaded for tests 2009-11-23 14:15:05 +01:00
Kamen Mazdrashki
d03d15d0cb s4/schema(tort): Add test for Object(OR-Name) syntax 2009-11-23 14:15:05 +01:00
Kamen Mazdrashki
aa238ff6ea s4/schema(tort): Test LDB_SYNTAX_DN with extended_dn in [GUID;SID;DN] form 2009-11-23 14:15:05 +01:00
Kamen Mazdrashki
65e95b8aa9 s4/drs(tort): DSSYNC test to print what is different in drs_msg also 2009-11-23 14:15:05 +01:00
Günther Deschner
0608d6b125 s4-smbtorture: fix spoolss_EnumPrinterKey client in RPC-SPOOLSS-WIN.
Guenther
2009-11-23 13:35:32 +01:00
Günther Deschner
d66b7d80d5 s4-smbtorture: add tests for spoolss_EnumPrinterKey to RPC-SPOOLSS-PRINTER.
Guenther
2009-11-23 12:17:54 +01:00
Matthias Dieter Wallnöfer
03b6e6e525 s4:netlogon RPC - Remove trailing whitespace 2009-11-22 15:54:16 +01:00
Matthias Dieter Wallnöfer
8b345ef19e s4:netlogon RPC - Fix up the error handling 2009-11-22 15:51:18 +01:00
Matthias Dieter Wallnöfer
1fb28b0204 s4:netlogon RPC - Fix up a comment
Now we have Windows 7 released so don't refer to a beta anymore.
2009-11-22 15:50:36 +01:00
Nadezhda Ivanova
54991cd2e1 Fixed incorrect indentation. 2009-11-22 13:36:35 +02:00
Matthias Dieter Wallnöfer
ae1e949810 s4:lsa RPC - Fix type of variable "atype"
This is an unsigned 32bit integer.
2009-11-21 19:53:37 +01:00
Matthias Dieter Wallnöfer
7d5367fc99 s4:samr RPC - Use more LDB constants 2009-11-21 19:53:37 +01:00
Matthias Dieter Wallnöfer
e8e76eb83a s4:lsa RPC - Use more LDB constants
And fix an obvious bug (call of "samdb_msg_add_delete")
2009-11-21 19:53:29 +01:00
Nadezhda Ivanova
e00281d1f1 Implemented LDAP_SERVER_SD_FLAGS_OID on search requests. 2009-11-21 18:40:51 +02:00
Matthias Dieter Wallnöfer
e406c17b2f s4:torture/smb2/oplock - Remove unneeded "status" redeclarations 2009-11-21 17:37:42 +01:00
Matthias Dieter Wallnöfer
ec49360778 s4:torture/smb2/notify - Rename nested "fname" variable to prevent warnings 2009-11-21 17:37:41 +01:00
Matthias Dieter Wallnöfer
5dc478e390 s4:torture/raw/unlink - Remove unused variable and label 2009-11-21 17:37:40 +01:00
Matthias Dieter Wallnöfer
28423114ec s4:torture/rpc/netlogon - Fix uninitialised variable 2009-11-21 17:37:39 +01:00
Matthias Dieter Wallnöfer
bda1c701f4 s4:WINREG RPC server - Cosmetic 2009-11-21 11:38:20 +01:00
Nadezhda Ivanova
4abd85898d Cosmetic patch - fixed case of attribute name. 2009-11-20 14:55:31 +02:00
Stefan Metzmacher
aafbe63954 s4:min_versions: require ldb 0.9.9
metze
2009-11-20 13:49:15 +01:00
Stefan Metzmacher
e53e23a7dd s4:lib/ldb: change version to 0.9.9 after some critical index fixes
metze
2009-11-20 13:49:15 +01:00
Nadezhda Ivanova
7c8b34657a Implementation of LDAP_SERVER_SD_FLAGS_OID on modify requests. 2009-11-20 13:25:13 +02:00
Nadezhda Ivanova
a760f169f4 Some changes to allow processing of ldap controls on modify requests.
ldap_backend used to filter out ldap controls on modify. Also, modified
python binding for ldap_modify to allow writing tests for such controls.
2009-11-20 13:22:38 +02:00
Matthias Dieter Wallnöfer
07e971f1c1 s4:ntvfs/posix/pvfs_acl - Remove unused variable "token" 2009-11-20 12:18:45 +01:00
Andrew Tridgell
92eff41ca5 s4-dsdb: some more attribuutes that we should only give if asked for 2009-11-20 15:19:35 +11:00
Andrew Tridgell
18cacc506e s4-drs: we need to specifically ask for ntSecurityDescriptor
ntSecurityDescriptor is no longer included by default
2009-11-20 14:57:04 +11:00
Andrew Tridgell
51a59e8f9e s4-ldb: added a warning about ldb_msg_add_dn
ldb_msg_add_dn does not copy the dn linearized string
2009-11-20 14:41:27 +11:00
Crístian Deives
1169dd3b50 added new function "ldb_msg_add_dn"
a helper function to a DN element to an ldb_msg using ldb_msg_add_string.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-20 14:39:01 +11:00
Andrew Tridgell
f3f0c8e2ce s4-dsdb: removed attributes that should not be displayed by default
Some attributes (like ntSecurityDescriptor) are stored in our db, but
should only be displayed if asked for. This also applied to parentGUID
from old installs, which is now generated.
2009-11-20 14:19:18 +11:00
Fernando J V da Silva
086fa79d4d s4-drs: Removes stored parentGUID's creation and renaming
parentGUID is now created on demand in operational.c

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-20 13:58:31 +11:00
Fernando J V da Silva
70d8db86b9 s4-drs: Synchronous Implementation of generated parentGUID
This generated parentGUID on demand, rather than getting it from the
database

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-20 13:56:50 +11:00
Fernando J V da Silva
8481581dc4 s4-drs: Utility functions to deal with GUID
dsdb_find_parentguid_by_dn() returns the parentGUID for a given DN
dsdb_msg_add_guid() adds a GUID value to a given message (either
objectGUID or parentGUID).

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-20 13:53:47 +11:00
Matthias Dieter Wallnöfer
a2707a3248 ldb:ldb_tdb backend/indexes - Outside API
- The outside API contains "DN" string arguments: Bad. Since in this way we
  fully rely on the outside calls regarding the right DN format. Solution: Use
  always a "struct ldb_dn" entry. Since this one is interchangeable and we can
  handle it in our preferred way.
2009-11-20 12:30:44 +11:00
Matthias Dieter Wallnöfer
afb70f9176 ldb:ldb_tdb backend/indexes - DN comparison
- DN comparison: The function doesn't seem that efficient. I "upgraded" it a bit
  to be more powerful (added a second length check and do both before the string
  comparison)
2009-11-20 12:26:37 +11:00
Andrew Tridgell
dda28a9a78 s4-dsdb: make sure mod_usn list is zeroed on each transaction 2009-11-20 12:23:55 +11:00
Andrew Tridgell
47923ea507 s4-ldb: added a double-rename test
This tests the fix for double rename/add and indexing
2009-11-20 12:23:46 +11:00
Andrew Tridgell
c99b310063 s4-ldb: when -v is specified, show progress of ldbadd/ldbmodify
This is useful for speed tests with large numbers of records.
2009-11-20 11:34:39 +11:00
Andrew Tridgell
79a43fb743 s4-ldb: make ldb tools line buffered
this prevents output being buffered when redirected to a file. Useful
for larger ldb command line operations
2009-11-20 11:34:39 +11:00
Andrew Tridgell
3b96d08b29 s4-ldb: fixed an issue in rename/modify indexing
When we rename or modify a record, we need to update the indexes at
the same time. It is important that we use the DN of the actual
message that is stored in the database to do this, not the DN that was
passed in by the user. If the two differ in case then the index
records needs to use the 'real' record DN, as index handling is
currently case sensitive.
2009-11-20 11:34:39 +11:00
Andrew Tridgell
2e46df492c s4-ldb: allow ldap.py test suite to run directly against a file
This makes it much easier to debug (as you can break in the ldb
modules by running gdb on /usr/bin/python)
2009-11-20 11:34:38 +11:00
Endi S. Dewata
3a8393c8aa s4:ldbcli - Added encoder/decoder for relax control. 2009-11-19 13:04:47 +11:00
Nadezhda Ivanova
6178c17e09 Added control copying for message types other than ldb_search.
When ildap created a new message to forward, it only copied controls for ldb_search
requests. This caused controls for add and modify to be lost in transition
and tests for them could not be implemented.
2009-11-18 18:47:29 +02:00
Stefan Metzmacher
fb685d3a8a s4:selftest: mark samba4.smb2.lock.*.VALID-REQUEST as known failure
metze
2009-11-18 08:24:13 +01:00
Stefan Metzmacher
c2a29967ea SMB2-LOCK: make use of torture_assert_*()
This is needed in order to mark tests as known failures.

metze
2009-11-18 08:24:13 +01:00
Stefan Metzmacher
77f335042b s4:ntvfs_generic: check for valid SMB2_LOCK flags
metze
2009-11-18 08:24:13 +01:00
Stefan Metzmacher
575967a5cf s4:selftest: fix logic for --option=torture:progress=no
metze
2009-11-18 06:50:24 +01:00
Stefan Metzmacher
63ff7a8db1 s4:torture/test_gentest.sh: make use of the PREFIX argument
We should not use hardcode pathes!

metze
2009-11-18 06:50:24 +01:00
Stefan Metzmacher
e3032d5fc8 s4:selftest: for now skip the BASE-DELAY-WRITE test completely
This test randomly fails depending on the timing
(the tests are too strict with the values introduced in
commit 0fca2b078c)
and local filesystem features (timestamp resolution).

metze
2009-11-18 06:50:23 +01:00
Stefan Metzmacher
e67445b7f7 s4:selftest: avoid running the slow BASE-DELAY-WRITE test on the cifs proxy share
It's enough to run it on the posix share.

metze
2009-11-18 06:50:23 +01:00
Stefan Metzmacher
b4c916c492 s4:selftest: add "rpc.netlogon.*.GetDomainInfo"
We need to expand the test to work against w2k8 and w2k8r2...

metze
2009-11-18 06:50:23 +01:00
Aravind Srinivasan
15d93a5d8e s4/torture: Port SMBv1 Change Notify tests to SMBv2
* Ported all tests from raw/notify.c to smb2/notify.c
* Parameterized the max_buffer_size so it can be set on a
  per-target basis.
* Fixed CHECK macros to use torture_result
* Created a SMB2-NOTIFY test suite
2009-11-17 17:06:26 -08:00
Aravind Srinivasan
74471387e0 s4/libcli: add a FILE_NOTIFY_CHANGE_ALL macro
This macro encompasses all possible file notifications that can
be raised.
2009-11-17 17:06:26 -08:00
Steven Danneman
c14b0cea48 torture/smb2: make SMB2 BRL tests pass against W2K8R2
The BRL tests previously based their results off several bugs in the
W2K8 byte range lock code.  I've fixed up the tests to pass against
Win7 which has fixed these bugs, and assume that the Win7 behavior
is the default.

I have inverted the test behavior for >63-bit lock requests.  The
tests previously expected NT_STATUS_OK as their default in this
case.  I've changed that default to expect STATUS_INVALID_LOCK_RANGE.
This may requires some changing of make test to compensate.

I've also removed a few test scenarios from VALID-REQUEST in preparation
of replacing them with separate tests ported from RAW-LOCK.
2009-11-17 17:06:26 -08:00
Matthias Dieter Wallnöfer
a31838eb3c s4:WINREG RPC server - remove a "talloc_free"
I assume that this "talloc_free" isn't necessary since the DCERPC server frees
the handle itself (we got always warnings about this).
2009-11-17 19:56:14 +01:00
Matthias Dieter Wallnöfer
5c6c2619fb s4:provision_users.ldif - Descriptions generally begin with a majuscle 2009-11-17 19:46:59 +01:00
Matthias Dieter Wallnöfer
dea569dc86 s4:SAMLDB DSDB module - Add "\n"s on debug messages 2009-11-17 19:22:00 +01:00
Matthias Dieter Wallnöfer
c4a70550b3 s4:SAMLDB DSDB module - Remove "\n" in LDB error messages
abartlet suggested me to not use anymore "\n"s in those kind of outputs.
Plus, enhance a search filter to consider also "builtinDomain" objects which
are basically domain objects too.
2009-11-17 18:45:17 +01:00
Nadezhda Ivanova
a97460d657 Fixed incorrect SID for RAS Servers. 2009-11-17 17:10:23 +02:00
Stefan Metzmacher
4532f683a7 s4:dsdb/schema: let schema_supclasses() return the correct pointer
str_list_unique() changes the pointer via talloc_realloc().

metze
2009-11-17 09:00:50 +01:00
Stefan Metzmacher
4750155071 s4:selftest: use "dc:local" instead of a hardcoded config file
If a tests needs access to the dc's config, it should run
as "dc:local", then it can also access unix named pipes...

If we pass a hardcoded config file the test fails if you use
a selftest_prefix.

metze
2009-11-17 09:00:48 +01:00
Stefan Metzmacher
39072c70d2 s4:selftest: allways start with $(ST_RM)
metze
2009-11-17 09:00:47 +01:00
Stefan Metzmacher
068d4336d6 s4:selftest: place summary file into selftest-prefix
metze
2009-11-17 09:00:47 +01:00
Andrew Bartlett
dc351a579d s4:heimdal: import lorikeet-heimdal-200911170333 (commit b532c294d974cead40a1183c71be644c6ccc2832)
This fixes up connections to Windows 2003, because the previous import
had a broken arcfour-hmac-md5 implementation (fixed in Heimdal
316fc6ff8ffb0cbb1ef3689685e9977c37405bc4)

Andrew Bartlett
2009-11-17 16:21:29 +11:00
Kamen Mazdrashki
b9e262c512 s4/drs(tort): Convert DSSYNC test to a test case fixture
Now it should be much more clear why and where a test
in DSSYNC test case has failed.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-11-17 10:47:16 +11:00
Kamen Mazdrashki
442cded430 s4/drs(tort): replace DEBUG with torture_asert/comment/fail
I left dumping of decrypted attributes values 'as is'
(using DEBUG and DEBUGADD) as it uses dump_data() function.
dump_data() uses DEBUGADD internally, so I have no way
to redirect its output to torture_context at this point.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-11-17 10:47:05 +11:00
Kamen Mazdrashki
aaff29f5b4 s4/drs(tort): use torture_drsuapi_assert_call() macro for error checking
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-11-17 10:46:59 +11:00
Kamen Mazdrashki
673049142b s4/drs(tort): replace 'printf' with 'torture_...' calls
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-11-17 10:46:48 +11:00
Kamen Mazdrashki
9e4beef614 s4/drs(tort): 'DsSyncBindInfo.pipe' renamed - 'pipe' is a system call
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-11-17 10:46:42 +11:00
Kamen Mazdrashki
b0de573629 s4/drs(tort): 'DsPrivate.pipe' renamed - 'pipe' is a system call
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-11-17 10:46:28 +11:00
Andrew Bartlett
b13518e4e8 s4:dsdb With these workarounds, we now pass the RPC-DSSYNC test 2009-11-17 10:38:09 +11:00
Andrew Bartlett
5c3ef6dbae s4:provision Split up reference creation, load schema earlier in the stack
The schema needs to be loaded above the extended_dn_out modules as
otherwise we don't get an extended DN in the search results.

The reference split is to ensure we create references after the
objects they reference exist.

Andrew Bartlett
2009-11-17 10:38:04 +11:00
Andrew Bartlett
e9f4dbce64 s4:schema Add the GUID to each defaultObjectCategory when loading from LDIF
This makes these full extended DNs, so we set the right values into
the database, even before we actually set the schema objects
themselves.

Andrew Bartlett
2009-11-17 10:38:03 +11:00
Andrew Bartlett
07953142a4 s4:dsdb Rework samdb code to use 'storage format' DNs for defaultObjectCategory
It is important to always ensure that this attribute has an extended
DN if the rest of the database stores things that way.

The knowlege of what format the DN is stored on disk with is passed
around in an LDB opaque.

Andrew Bartlett
2009-11-17 10:38:02 +11:00
Andrew Bartlett
0238147a85 s4:provision Generate a random objectGUID for each schema record
This is needed to then create extended DNs with GUID attributes in
them, when importing from the LDIF

Andrew Bartlett
2009-11-17 10:38:02 +11:00
Andrew Bartlett
39b8f31d66 s4:dsdb Load objectGUID and extended DN defaultObjectCategory into the schema
The load of defaultObjectCategory as an extended DN means we need to
use the common parsing functions I just split out, rather than the
GET_DS_DN macro.

The objectGUIDs are loaded so that we can create the extended DN when
we load from LDIF (and are loaded for the other cases for
consistency).

Also adapt callers to API changes needed for common parsing code

Andrew Bartlett
2009-11-17 10:38:02 +11:00
Andrew Bartlett
6710becbd4 s4:dsdb Use the new flags to dsdb_module_search in schema_load
This loads the defaultObjectCategory DN as an extended DN, so we can
apply it, with the associated GUID, when setting this on records in
the objectClass module.

Previously we would not store the extended DN components for
objectCategory.

Andrew Bartlett
2009-11-17 10:38:01 +11:00
Andrew Bartlett
58ded23b86 s4:dsdb Break up 'parse a DN from DRSUAPI' into a subfunction
This should make it easier to call this function from the DRS schema
load code, rather than duplicate it.

(we may do the same with other functions in future).

Andrew Bartlett
2009-11-17 10:38:01 +11:00
Andrew Bartlett
41ce3dc0c3 s4:dsdb Add 'dsdb_flags' to dsdb_module_search() to enable often-used features
These flags, also on dsdb_module_search_dn() allow us to add commonly
set controls to this pre-packaged blocking search, without rebuilding
the whole function in each caller.

Andrew Bartlett
2009-11-17 10:38:01 +11:00
Matthias Dieter Wallnöfer
5c54c73c0e s4:SAMLDB module
- Add more "\n" to make sure that error messages are displayed immediately
- Add a "NULL" in a attribute list
2009-11-16 17:57:50 +01:00
Matthias Dieter Wallnöfer
e853dd763b Revert "s4:dsdb/repl/replicated_objects - Applicate also here the new "lDAPDisplayName" generator"
This reverts commit df95d5c292.

abartlet pointed out in a post on the samba-technical list that this isn't
necessary at all (lDAPDisplayName normalisation algorithm). Rather it breaks
functionality of the replication.
2009-11-16 17:01:43 +01:00
Andrew Bartlett
8880170978 s4:dsdb LDB attribute lists must always be a static const char **.
(If they are not, then due to the async code, they will cause a segfault as they reference a reclaimed portion of the stack).

Andrew Bartlett
2009-11-16 10:19:42 +11:00
Endi S. Dewata
8e5f5e3f05 s4:provision - Removed dependency on full Samba 3 schema from FDS 2009-11-16 07:57:40 +11:00
Nadezhda Ivanova
55d2cec640 Fixed some major bugs in inheritance and access checks.
Fixed sd creation not working on LDAP modify.
Fixed incorrect replacement of CO and CG.
Fixed incorrect access check on modify for SD modification.
Fixed failing sec_descriptor test and enabled it.
Fixed failing sd add test in ldap.python
2009-11-15 22:31:44 +02:00
Wilco Baan Hofman
df3451aec0 Fix writing corrupt registries because of hardcoded version string in IDL.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-11-15 19:26:51 +01:00
Wilco Baan Hofman
5a7d48f82b Fix writing corrupt REG_SZ to the registry.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-11-15 19:26:50 +01:00
Wilco Baan Hofman
45bb24e939 Fix trailing garbage in the hbin block.
This specifically fixes a problem showing extra bytes of garbage in list and
print in regshell, even though the vk.data_length has the correct size.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-11-15 19:26:50 +01:00
Zahari Zahariev
1e984e6630 Added tests for descriptor inheritance on ldap modify.
Fixed some expected owners and groups.

Signed-off-by: Nadezhda Ivanova <nadezhda.ivanova@postpath.com>
2009-11-15 19:26:02 +02:00
Matthias Dieter Wallnöfer
cc080742bd ldb:python bindings - add a context on "py_ldb_delete"
So the converted DN will be freed after usage.
2009-11-15 14:26:41 +01:00
Matthias Dieter Wallnöfer
6cf43db7fc s4:ldap.py - enhance schema addition test
Don't add only a new objectclass but also a new attribute. Plus let now the
server itself calculate the "lDAPDisplayName" attribute and compare the result.
2009-11-15 14:26:41 +01:00
Matthias Dieter Wallnöfer
df95d5c292 s4:dsdb/repl/replicated_objects - Applicate also here the new "lDAPDisplayName" generator
Also here we've to be sure to generate the attribute correctly if it doesn't
exist yet.
2009-11-15 14:26:41 +01:00
Andrew Bartlett
2c7294bd8f s4:SAMLDB module - Add support for required and generated schema attributes
This missing support found by Microsoft test suite at AD interop event.

Patch by Andrew Bartlett
Enhancements by Matthias Dieter Wallnöfer
2009-11-15 14:26:40 +01:00
Matthias Dieter Wallnöfer
da3d471d10 s4:samdb util - add a call for generating a correct "lDAPDisplayName"
This is needed for the SAMLDB module enhancement regarding schema objects.
The algorithm in pseudo code is located in MS-ADTS 3.1.1.2.3.4.
2009-11-15 14:26:40 +01:00
Matthias Dieter Wallnöfer
8e320aea71 s4:ldap.py - Deactivates some at the moment pointless test parts
I think those parts should be deactivated since they're result set checks for
lookups which are commented out already.
2009-11-15 10:38:30 +01:00
Erick Nascimento
a3632f22ec s4-drs: DsExecuteKCC() implementation
I implemented the DsExecuteKCC() handling code on kccsrv_execute_kcc().

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-14 12:11:02 +11:00
Andrew Bartlett
ca12e7bc8f s4:heimdal Import generated files from heimdal tree
We should be able to rebuild these, but a cp is easier :-)
2009-11-13 23:19:06 +11:00
Andrew Bartlett
4f8ba5ad6a s4:heimdal: import lorikeet-heimdal-200911122202 (commit 9291fd2d101f3eecec550178634faa94ead3e9a1) 2009-11-13 23:19:05 +11:00
Andrew Bartlett
5bc87c14a1 s4:heimdal: import lorikeet-heimdal-200909210500 (commit 290db8d23647a27c39b97c189a0b2ef6ec21ca69) 2009-11-13 23:19:05 +11:00
Andrew Tridgell
c8884e1cf2 s4-ldb: changed the DN checks for \n to warnings
a \n is sometimes allowed in AD (eg in deleted DNs). Until we know
when is really is allowed, treat it as a warning only.
2009-11-13 19:32:47 +11:00
Andrew Tridgell
dbae29de1c s4-ldb: make DN escaping/unescaping consistent
The DN escape function was using the form \c where c is any
character. The unescape function was using \XX where XX is a 2 digit
hex number. The asymmetry led to quite a few problems when we start to
deal with DNs containing escape chars, such as CN=foo\0ADEL:XXX. The
result was a DN that was not accessible.

This patch changes the escaping to follow RFC2253 much more
closely. We accept either type of escape, and produce the two types of
escape, depending on the character being escaped
2009-11-13 19:32:46 +11:00