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

23683 Commits

Author SHA1 Message Date
Andrew Tridgell
a709e423d2 waf-idl: put the gen_ndr/README file for source3 back
This was removed by 100d37fc46, probably
accidentially.
2010-07-19 22:17:17 +10:00
Kamen Mazdrashki
35b1e00ba3 s4: Remove trailing whitespaces
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:35 +10:00
Kamen Mazdrashki
11a44ce6f8 ldb: Mark _DEPRECATED_ ldb_msg_diff() and ldb_msg_canonicalize() functions
They are not quite safe to use (requires caller to steal
resulting message in own context) and may lead to holding
memory for too long.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:35 +10:00
Kamen Mazdrashki
31aeb841c9 s4-dsdb: use ldb_msg_normalize() in ldb_msg_difference()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:35 +10:00
Kamen Mazdrashki
1e20dbd812 s4-test: Use ldb_msg_normalize() in sqlite3 backend
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:35 +10:00
Kamen Mazdrashki
91d9f88d28 s4-test: Use ldb_msg_normalize() in torture/rpc/dssync.c test
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:35 +10:00
Kamen Mazdrashki
d71b20e8dc s4-dsdb: use ldb_msg_normalize() in ldbadd-process_file()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:35 +10:00
Kamen Mazdrashki
2ad701911e s4-dsdb: use ldb_msg_normalize() in source4/lib/ldb/common/ldb.c
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
86cc914717 s4-dsdb: use ldb_msg_normalize() in source4/dsdb/schema/schema_set.c
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
e5a9469a88 s4-ldb: Add ldb_msg_normalize() to accept a memory context from client
Previos implementation from ldb_msg_canonicalize()
was moved into this function and now ldb_msg_canonicalize()
is based on ldb_msg_normalize()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
48574ccc3f s4-ldb: Use _ldb_msg_add_el() in ldb_msg_add()
Previous implementation was 'leaking' attribute name
string, that is allocated by ldb_msg_add_empty()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
3944c81d08 s4-ldb: Use _ldb_msg_add_el() in ldb_msg_add_empty()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
8d523d46f5 s4-ldb: Add separate function to add empty element into ldb_msg
It just adds another element, nothing more.
Caller is responsible to fill-in the added element and
determine how to handle data allocation contexts.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
a95fd4ef64 s4-ldb: Write more explanatory comment for ldb_msg_add()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
8deae13313 s4-pyldb: Use ldb_msg_difference() in py_ldb_msg_diff()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
148b8588bc s4-test: Use ldb_msg_difference() in torture/rpc/dssync.c test
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:33 +10:00
Kamen Mazdrashki
fa0db46af1 s4-tools: use ldb_msg_difference() in ldbedit - modify_record()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:33 +10:00
Kamen Mazdrashki
fb1c0796c7 s4-dsdb/schema/schema_set.c: fix trailing spaces and comments spelling
Few comments split on several lines also...

(Sorry Metze, I know you hate reviewing "and this, and that"
type of patches, but those are just cosmetics)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:33 +10:00
Kamen Mazdrashki
a11d3b4dfb s4-dsdb: use ldb_msg_difference() in source4/dsdb/schema/schema_set.c
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:33 +10:00
Kamen Mazdrashki
65b967a706 s4-ldb: Implement ldb_msg_difference() function to accept a memory context from client
Old implementation from ldb_msg_diff() was moved into
this this function but with changed interface
so that a memory context may be passed.

ldb_msg_diff() function is now based on ldb_msg_difference(),
which fixes a hidden leak - internal ldb_msg object
(returned from ldb_msg_canonicalize) wasn't freed
and stays attached to ldb_context for the connection lifetime.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:33 +10:00
Matthieu Patou
c55f5f2a35 s4 nss_switch: fix build problem on computer without the iniparser
Although the build was ok on my workstation it appears that on build
server it was not because the include path was not correct.
2010-07-17 20:10:11 +04:00
Matthieu Patou
dbbfad8286 s4-waf: add the missing bits for builing nss_winbind and pam_winbind
This is something that was not picked up during the migration to waf
2010-07-17 18:05:12 +04:00
Matthieu Patou
e461e29cd9 s4 unittests: add blackblox test for ktpass 2010-07-17 17:56:16 +04:00
Matthieu Patou
5a8c77f97b s4: create a simple version of ktpass
This script is intended to be a replacement for the ktutil of Windows.
It's use is for exporting keytab that will be used for kerberized
services.
2010-07-17 17:56:16 +04:00
Günther Deschner
3b0c87cf31 s4-smbtorture: run all testcases with bigendian push as well in RPC-BIND.
Guenther
2010-07-16 22:47:30 +02:00
Günther Deschner
1c7d089904 s4-smbtorture: rearrange testlist in RPC-BIND.
Guenther
2010-07-16 22:47:30 +02:00
Günther Deschner
7755e196a1 s4-smbtorture: make sure to wipe out dcerpc auth flags before RPC-BIND starts.
Guenther
2010-07-16 22:47:30 +02:00
James Peach
ec25a00031 smbtorture shell: Allow any config option to be set.
Not sure what I was thinking by restricting the shell to "torture:"
parametric options. It's really extemely useful to be able to set
arbitrary options.
2010-07-16 11:13:21 -07:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Andrew Tridgell
e4c35c5a09 s4-loadparm: change lp_*() to lpcfg_*() and provide s3 compatibility lp_*()
This patch changes all Samba4 loadparm functions that take a
loadparm_context or a loadparm_service structure to use a lpcfg_*()
prefix. It then creates lp_*() functions which are wrappers around the
lpcfg_*() functions. This should allow us to mix Samba3 and Samba4
code which uses loadparm calls.
    
This first patch just makes the manual changes to the core loadparm
code. The tree will not build with just this patch. The next patch
replaces all of the callers, and was generated automatically with a
perl script.
    
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Andrew Bartlett
0e212acd32 s4:testprogs Operate the blackbox kinit and net tests using the :local config
This :local tells selftest.pl to use the local smb.conf for the test
environment, not the generic client smb.conf

This then makes the rest work properly - otherwise, it may attempt to
connect to the wrong KDC for example.

The only problem is that we can't test the 'net join' with this set,
so this is removed from the test.  The member server test environment
checks this anyway.

Andrew Bartlett
2010-07-16 07:08:41 +10:00
Andrew Bartlett
299057d8d9 s4:provision Handle machine account password changes while keeping keytab
The challenge here is to update the existing record if it already
exists, rather than deleting the old record.  This ensures that the
secrets.keytab handling code keeps the previous password in the
keytab.

Andrew Bartlett
2010-07-15 22:08:22 +10:00
Andrew Bartlett
3e8dba1703 s4:pyldb whitespace fix 2010-07-15 22:08:22 +10:00
Andrew Bartlett
fcdf619b36 s4:pyldb Fix memory handling for ldb_message_element
The problem here is that we need to use the array, not the individual
message element as the memory context.

Andrew Bartlett
2010-07-15 22:08:22 +10:00
Matthieu Patou
36b5feceee s4 upgradeprovision: Adapt the list of attribute modified
* isMemberOfPartialAttributeSet is now allowed to be deleted (on schema
 objects)
* attributeDisplayNames is now allowed to be added and modified (used on
  display specifiers)
* spnMapping is now allowed to be altered on Directory Service objects
* minPwdAge is now modified if the previous value was 0

We issue a clear information about the userControl attribute for
administrator to invite the user to modify himself the value.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
a748402f61 s4 ldb modules: relax some tests about attributes that should not be here
For attributes that we know that are harmless and that used to be stored
in the ldb we relax the tests on the existance in a given objectclass.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
7478224189 s4 upgradeprovision: Synchronize the calculated keyversionnumber with the one previously stored
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
0a1b1121c4 s4 upgradeprovision: do not copy RID Set it's automaticaly created by the RID manager
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
2afc2f20b6 s4 upgradeprovision: add function to backup the provision before updating
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
6c51b3a432 s4 upgradeprovision: fix whitespaces
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
62a32975c8 s4: Add unit test for increment_calculated_keyversion_number
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
9323901644 s4 upgradeprovision: introduce a new function to update the field use for calculating msds-keyversionnumber
This function change the version field of the unicodePwd in the
replPropertyMetaData so that the version is equal or
superior to the reference value passed.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
f97c90c9cd s4 python: Add functions to samdb to manipulate version of replPropertyMetaData attribute
This change contains also helpers for attribute id to attribute oid
conversion and from attribute id to attribute name.
It brings also unit tests

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Matthieu Patou
6a0856da9c s4 dsdb: Use the changereplmetadata control
This control allow to specify the replPropertyMetaData attribute to
be specified on modify request. It can be used for very specific needs
to tweak the content of the replication data.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Matthieu Patou
d861ebbd81 s4 dsdb: create a new control: changereplmetadata
This control is designed to allow replmetadata to be specified

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Matthieu Patou
b67a71f00b ldb: allow ldb_sequence_number to be called in python
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Matthieu Patou
0496af8341 s4: Unit test update_machine_account_password through kinit
This patch is for testing the chgdcpass script which is mostly a call to
update_machine_account_password.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Matthieu Patou
7ea70f86ac s4: Add a simple script to change dc password
This script will mostly be used by unit test (blackbox type) to test the
change of the dc password

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Matthieu Patou
fd2eb0dfd0 s4 provision: move update_machine_account_password to helpers
This is to allow reuse of this function and also unit tests

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Nadezhda Ivanova
d35e9008a7 s4: Added acl search tests for anonymous connection.
The tests make sure that we comply with dsHeuristics setting and
restrict anonymous access to rootDSE. They will be enabled when the
implementation is pushed. tests are verified against win2k8.
2010-07-14 14:44:46 +03:00