Björn Jacke [Wed, 9 Sep 2009 17:13:32 +0000 (19:13 +0200)]
s3:examples:ldap: fix some OIDs in various schema files
Andrew Tridgell [Wed, 9 Sep 2009 15:27:12 +0000 (01:27 +1000)]
s4/drs: when we don't find an attribute use zero values
thanks to metze for pointing this out
Andrew Tridgell [Wed, 9 Sep 2009 15:26:34 +0000 (01:26 +1000)]
s4/vampire: fixed i/j index mixup in vampire code
Andrew Tridgell [Wed, 9 Sep 2009 13:38:51 +0000 (23:38 +1000)]
s4:drs match the meta_data and attributes array
These two arrays need to be in sync, as they are walked in sync by the
client
Andrew Tridgell [Wed, 9 Sep 2009 11:26:17 +0000 (21:26 +1000)]
s4/drs: broke out the core of the getncchanges code
It is easier to understand without the heavy nesting
Andrew Tridgell [Wed, 9 Sep 2009 11:00:48 +0000 (21:00 +1000)]
s4:drs level_out is a pointer
DsAddEntry now seems to work for simple tests
Andrew Tridgell [Wed, 9 Sep 2009 11:00:01 +0000 (21:00 +1000)]
s4:drs split addentry and getncchanges into separate files
These will get quite complex eventually, I think we are better
separating them so the code is a bit easier to follow
Nadezhda Ivanova [Thu, 3 Sep 2009 11:39:40 +0000 (14:39 +0300)]
Added "admin_session" method.
The purpose of admin_session is to be able to execute parts of provisioning
as the user Administrator in order to have the correct group and owner in the
security descriptors. To be used for provisioning and tests only.
Andrew Tridgell [Wed, 9 Sep 2009 08:04:07 +0000 (18:04 +1000)]
s4/repl: implement DsReplicaSync
This patch implements DsReplicaSync by passing the call via irpc to
the repl server task. The repl server then triggers an immediate
replication of the specified partition.
This means we no longer need to set a small value for
dreplsrv:periodic_interval to force frequent DRS replication. We can
now wait for the DC to send us a ReplicaSync msg for any partition
that changes, and we immediately sync that partition.
Andrew Tridgell [Wed, 9 Sep 2009 07:04:16 +0000 (17:04 +1000)]
s4/repl: added refresh of repsTo
I've found that w2k3 deletes the repsTo records we carefully created
in the vampire join if we don't refresh them frequently. After about
30mins all 3 repsTo records are gone.
This patch adds automatic refresh of the repsTo by calling
DSReplicaUpdateRefs every time we do a sync cycle with the server
Andrew Tridgell [Wed, 9 Sep 2009 02:29:01 +0000 (12:29 +1000)]
s4: fixed format of repsTo in samdb
Metze pointed out what the windows tool ldp.exe will examine repsTo
attributes on remote DCs, so we do in fact need to use the same format
that windows uses. This patch changes the server side implementation
of UpdateRefs to use the windows format
Andrew Tridgell [Wed, 9 Sep 2009 01:26:50 +0000 (11:26 +1000)]
s4: allow repl:RODC=true/false to set ourselves as a RODC
I think this is what windows DCs use to see that we are read-only, but
I am not sure. Needs more testing.
Günther Deschner [Wed, 9 Sep 2009 00:29:58 +0000 (02:29 +0200)]
s3-winbindd: Fix Bug #6700: Use dns domain name when needing to guess server principal.
Patch from Robert LeBlanc <robert@leblancnet.us>.
Thanks!
Guenther
Günther Deschner [Tue, 8 Sep 2009 23:03:19 +0000 (01:03 +0200)]
ntlmssp: avoid duplicate inclusion of helper headers.
Guenther
Jelmer Vernooij [Tue, 8 Sep 2009 21:30:21 +0000 (23:30 +0200)]
Mark test_security_descriptor_add_neg as known failing (for now).
Zahari Zahariev [Tue, 8 Sep 2009 13:00:24 +0000 (16:00 +0300)]
Basic tests for nTSceurityDescriptor both SDDL and BASE64 format
These are updated second eddition unittests using ldb.add_ldif()
and ldb.modify_ldif(). Unittests are found to work when using
the right local domain SID. Negative test separated.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Günther Deschner [Tue, 8 Sep 2009 21:19:08 +0000 (23:19 +0200)]
s3-nterr: add NT_STATUS_RPC_NT_CALL_FAILED.
Guenther
Steven Danneman [Tue, 8 Sep 2009 19:39:39 +0000 (12:39 -0700)]
s4/torture/smb2: removed SMB2-FIND test
This test has been wholly replaced by the SMB2-DIR-ONE test found
in dir.c.
Steven Danneman [Tue, 8 Sep 2009 19:12:01 +0000 (12:12 -0700)]
s4/torture/smb2: Fix several small bugs and style issues in SMB2 dir tests
* removed all uses of printf, replaced with torture_comment
* replaced custom CHECK macros with new torture_assert_*_todo() helpers
* switched string dir name generation to generate_unique_strs() helper,
to avoid non-deterministic test behavior where generate_rand_str()
would cause file colissions in the same directory.
Steven Danneman [Tue, 8 Sep 2009 19:10:51 +0000 (12:10 -0700)]
s4/torture: add new torture_assert_*_todo() macros
These allow torture tests to perform cleanup after a failure, by
jumping to a goto label.
Steven Danneman [Tue, 8 Sep 2009 19:09:39 +0000 (12:09 -0700)]
lib/util: add unique string generator helper function
Günther Deschner [Thu, 3 Sep 2009 00:06:34 +0000 (02:06 +0200)]
ntlmssp: add some void decode calls (useful for ndrdump).
Guenther
Stefan Metzmacher [Tue, 8 Sep 2009 20:07:30 +0000 (22:07 +0200)]
socket_wrapper: swrap_read() should use SWRAP_RECV* for swrap_dump_packet()
This is the same as swrap_recv().
metze
Stefan Metzmacher [Tue, 8 Sep 2009 10:01:46 +0000 (12:01 +0200)]
s4:repl_meta_data: remove unused code
metze
Stefan Metzmacher [Thu, 2 Oct 2008 09:28:13 +0000 (11:28 +0200)]
s3:drsuapi: add a simple DsRemoveDSServer() implementation
metze
Stefan Metzmacher [Wed, 1 Oct 2008 04:28:32 +0000 (06:28 +0200)]
s4:drsuapi: add an incomplete DsAddEntry implementation
metze
Andrew Klosterman [Tue, 8 Sep 2009 15:38:37 +0000 (17:38 +0200)]
s3:smbd: Fix bug 6690, wrong error check
Günther Deschner [Tue, 8 Sep 2009 15:02:54 +0000 (17:02 +0200)]
schannel: add missing prototype for ndr_print_nbt_string() in schannel helper.
Hopefully fixes samba4 build.
Guenther
Günther Deschner [Tue, 8 Sep 2009 13:32:24 +0000 (15:32 +0200)]
s3: remove unused RPC_AUTH_SCHANNEL_NEG struct and parsing functions.
Guenther
Günther Deschner [Tue, 8 Sep 2009 13:31:01 +0000 (15:31 +0200)]
s3-rpc_server: use NL_AUTH_MESSAGE in pipe_schannel_auth_bind().
Guenther
Günther Deschner [Tue, 8 Sep 2009 13:30:22 +0000 (15:30 +0200)]
s3-rpc_client: use NL_AUTH_MESSAGE in create_schannel_auth_rpc_bind_req().
Guenther
Karolin Seeger [Tue, 8 Sep 2009 13:39:57 +0000 (15:39 +0200)]
s3/docs: Raise version number.
Karolin
Günther Deschner [Tue, 8 Sep 2009 12:51:42 +0000 (14:51 +0200)]
schannel: add NL_AUTH_MESSAGE and both NL_AUTH_SIGNATURE structs.
These actually belong netlogon but we for now want to keep netlogon as a security
providor separate.
Guenther
Andrew Bartlett [Tue, 8 Sep 2009 10:21:38 +0000 (20:21 +1000)]
s4:idl Add generated code for netlogon.idl changes
Matthieu Patou [Tue, 8 Sep 2009 08:21:09 +0000 (12:21 +0400)]
Return a correct value for Supported Encryption Type
Vista and upper version use this value to check wether they should ask the DC
to change the msDS-SupportedEncryptionTypes attribute or not.
Declare the different value as a bitmap in Netlogon idl
Kamen Mazdrashki [Fri, 28 Aug 2009 15:35:31 +0000 (18:35 +0300)]
tort: RPC-CRACKNAMES test case refactored
Kamen Mazdrashki [Fri, 28 Aug 2009 15:34:40 +0000 (18:34 +0300)]
tort: DsCrackNames - propagate torture context to all tests.
Kamen Mazdrashki [Fri, 28 Aug 2009 15:19:54 +0000 (18:19 +0300)]
tort: Helper function to get DC info for testing
Kamen Mazdrashki [Fri, 28 Aug 2009 12:42:48 +0000 (15:42 +0300)]
tort: Implement 'setup' and 'teardown' for DRSUAPI test cases.
Andrew Tridgell [Tue, 8 Sep 2009 12:15:59 +0000 (22:15 +1000)]
s4/ldb: support NDR printing for 2 more replication types
print replUpToDateVector and replPropertyMetaData using NDR format if
--show-binary is given.
Andrew Tridgell [Tue, 8 Sep 2009 12:02:59 +0000 (22:02 +1000)]
s4/ldb: allow prefixMap to be shown as NDR
Andrew Tridgell [Tue, 8 Sep 2009 11:55:56 +0000 (21:55 +1000)]
s4/ldb: allow printing ntSecurityDescriptor in full
print security descriptors in NDR format if --show-binary is
given. This is easier to read than sddl format.
Andrew Tridgell [Tue, 8 Sep 2009 11:45:08 +0000 (21:45 +1000)]
s4/ldb: added ldif handler for repsFrom/repsTo
In normal usage this makes no difference, but if you add --show-binary
then you can see the NDR printed out in the usual ndr_print_*() format
Andrew Tridgell [Tue, 8 Sep 2009 11:39:33 +0000 (21:39 +1000)]
s4/ldb: expose the ldb flags with ldb_get_flags()
Andrew Tridgell [Tue, 8 Sep 2009 11:39:09 +0000 (21:39 +1000)]
s4/ldb: don't line wrap ldif when --show-binary is used
Andrew Tridgell [Tue, 8 Sep 2009 10:57:31 +0000 (20:57 +1000)]
s4/ldb: added --show-binary command line option
This add --show-binary to ldbsearch. When this flag is set, binary
blobs will be shown as-is, instead of base64 encoded. This is useful
for some XML encoded attributes, and will also be used as part of some
NDR print formatting for attributes like repsTo.
Günther Deschner [Tue, 8 Sep 2009 09:57:52 +0000 (11:57 +0200)]
s3-schannel: Fix Bug #6697. Interdomain trusts with Windows 2008 R2 DCs.
The Schannel verifier (aka NL_AUTH_SIGNATURE) structure (32 byte) sent from a
W2k8r2 DC is passed in a buffer with the size of a NL_AUTH_SHA2_SIGNATURE (56
byte). We should just ignore the remaining 12 zeroed bytes and proceed.
Guenther
Matthias Dieter Wallnöfer [Tue, 8 Sep 2009 10:02:22 +0000 (12:02 +0200)]
s4:setpassword script - Passwords set by this script are set by the administrator not the user
Matthias Dieter Wallnöfer [Tue, 8 Sep 2009 09:55:40 +0000 (11:55 +0200)]
s4:provision - Cosmetic: Indent the parameters better
Matthias Dieter Wallnöfer [Mon, 7 Sep 2009 12:30:11 +0000 (14:30 +0200)]
s4:templates - Remove the latest relics (in "dcesrv_lsa_CreateSecret")
Dmitry Karasik [Mon, 7 Sep 2009 12:08:16 +0000 (14:08 +0200)]
s4:wmic - Output enhancements
Outputs shouldn't clash with metadata characters (|,()), special characters
should be escaped, "NULL" values should be reported as "(null)" string.
For the full explaination look at bug #6076.
Jeremy Allison [Tue, 8 Sep 2009 03:31:01 +0000 (20:31 -0700)]
Add read() to socketwrapper. Metze please check.
Jeremy.
Andrew Tridgell [Tue, 8 Sep 2009 01:51:27 +0000 (11:51 +1000)]
s4: commit generated DRS changes
Andrew Tridgell [Tue, 8 Sep 2009 01:51:01 +0000 (11:51 +1000)]
s4: added the structure for repsTo
This structure is stored in NDR format in the repsTo attribute of each
partition. It is updated by the DSUpdateRefs DSRUAPI call
Andrew Tridgell [Tue, 8 Sep 2009 01:50:14 +0000 (11:50 +1000)]
s4: fixed updaterefs options bitmap
Andrew Tridgell [Tue, 8 Sep 2009 01:49:28 +0000 (11:49 +1000)]
s4: implemented server side of DSUpdateRefs call
This call is made by DCs to tell us we should notify them of directory
changes
Andrew Tridgell [Tue, 8 Sep 2009 01:47:36 +0000 (11:47 +1000)]
s4/ldb: fixed spelling
Andrew Tridgell [Tue, 8 Sep 2009 01:47:11 +0000 (11:47 +1000)]
s4: 'index' is a libc function
Andrew Tridgell [Tue, 8 Sep 2009 01:46:49 +0000 (11:46 +1000)]
s4: fixed a unsigned printf warnings
Andrew Tridgell [Tue, 8 Sep 2009 01:46:27 +0000 (11:46 +1000)]
s4: removed an unused variable
Andrew Tridgell [Tue, 8 Sep 2009 01:46:08 +0000 (11:46 +1000)]
s4: fixed some shadowed variable warnings
Anatoliy Atanasov [Thu, 3 Sep 2009 15:37:31 +0000 (18:37 +0300)]
Fill the meta data vector in the responce struct.
Andrew Bartlett [Tue, 8 Sep 2009 00:48:40 +0000 (10:48 +1000)]
s4:selftest Fix 'make testenv-gdb' and 'make valgrindtest' etc
The problem here was that tridge's changes to ensure that test results
were always propogated didn't merge well with the addition of extra
environment variables for the 'make valgrindtest' and similar
environments. By splitting out the macro further, we keep the build
farm reporting accurate, but allow these other test modes to work.
Andrew Bartlett
Matthias Dieter Wallnöfer [Mon, 7 Sep 2009 10:38:44 +0000 (12:38 +0200)]
s4:tests/iconv - Fix a warning
Andrew Kroeger [Mon, 7 Sep 2009 03:28:56 +0000 (22:28 -0500)]
s4:pwsettings: Correct off by factor of 10 for ticks.
The tick conversion math was off by a factor of 10 due to the incorrect usage of
the "e" notation. The expression "XeY" means "X * (10^Y)", so the correct
expression is 1e7 to get the correct adjustment for ticks.
Andrew Kroeger [Mon, 7 Sep 2009 03:25:53 +0000 (22:25 -0500)]
gitignore: Ignore additional auto-generated files.
Matthias Dieter Wallnöfer [Wed, 19 Aug 2009 10:37:11 +0000 (12:37 +0200)]
s4: Let the "setpassword" script finally use the "samdb_set_password" routine
The "setpassword" script should use the "samdb_set_password" call to change
the NT user password. Windows Server tests show that "userPassword" is not the
right place to save the NT password and does not inherit the password complexity.
Stefan Metzmacher [Fri, 4 Sep 2009 12:31:28 +0000 (14:31 +0200)]
s4:dsdb: correctly implement _dsdb_syntax_OID_oid_ldb_to_drsuapi()
Here we just need to map the oid string in the ldb value to
the ATTRTYP id.
metze
Stefan Metzmacher [Mon, 7 Sep 2009 12:21:11 +0000 (14:21 +0200)]
lib/tdr: fix the build with --enable-automatic-dependencies
metze
Matthias Dieter Wallnöfer [Mon, 7 Sep 2009 10:00:11 +0000 (12:00 +0200)]
s4:LogonGetDomainInfo - add a basic check for the hostname
This check is specified in Windows Server after release 2003.
The parameter "hostname" should match as prefix of the dns hostname given as
parameter in the "workstation" structure.
Günther Deschner [Mon, 7 Sep 2009 09:56:10 +0000 (11:56 +0200)]
tdb: fix c++ build warning.
Guenther
Inra [Mon, 7 Sep 2009 07:40:34 +0000 (09:40 +0200)]
s4: Fix "Small memory leak after calling several times lp_update"
Should fix bug #6660.
Michael Ströder [Mon, 7 Sep 2009 07:12:09 +0000 (09:12 +0200)]
s4: Exceptions in "provision.py"
This looks much nicer than "normal" string exceptions - and fits better in the OO
programming style.
Matthias Dieter Wallnöfer [Mon, 7 Sep 2009 07:00:46 +0000 (09:00 +0200)]
s4:simple_ldap_map - "primaryGroupId"
Previous patch was incomplete regarding the "primaryGroupId" attribute. Complete it.
Matthias Dieter Wallnöfer [Sun, 6 Sep 2009 18:23:02 +0000 (20:23 +0200)]
s4:samldb - Fix typo
Matthias Dieter Wallnöfer [Sun, 6 Sep 2009 17:57:50 +0000 (19:57 +0200)]
s4:Foreign security principals - Fix them up
I fixed them up to match with Windows Server 2003. I don't think that the
creation of them in the provision script is needed so I put them in the
"provision_users.ldif" file.
Matthias Dieter Wallnöfer [Sun, 6 Sep 2009 15:27:51 +0000 (17:27 +0200)]
s4:subtree delete module - Cosmetic adaptions
Matthias Dieter Wallnöfer [Tue, 25 Aug 2009 23:49:00 +0000 (01:49 +0200)]
s4:ldap.py - Adds a test for the primary group behaviour
This passes the Windows Server behaviour. Also SAMBA 4 should match it.
Also some small enhancement.
Matthias Dieter Wallnöfer [Thu, 20 Aug 2009 19:13:13 +0000 (21:13 +0200)]
s4:provision - Change the module order to match Windows Server
Tests show that Windows Server seems to do the access checks on the very last moment.
Matthias Dieter Wallnöfer [Mon, 17 Aug 2009 21:39:41 +0000 (23:39 +0200)]
s4:sam - Implement also here the right primary group behaviour
We have not only to expand the additional groups but *also* the primary group to
gain all rights of a user account.
Also, remove an unneeded context (tmp_ctx) and "talloc_steal".
Matthias Dieter Wallnöfer [Mon, 17 Aug 2009 20:34:08 +0000 (22:34 +0200)]
s4:samr - Fix up the SAMR server to support the primary group of a user in the right way
When doing some tests with the NT User Manager for Domains on s4 I noticed that the
handling of the primary group for a user wasn't correct. So I fixed this.
Also some cosmetic changes (tab indent corrections).
Matthias Dieter Wallnöfer [Mon, 17 Aug 2009 19:29:47 +0000 (21:29 +0200)]
s4:samldb - Major rework
This fixes up the change of the primary group of a user when using the ADUC
console:
- When the "primaryGroupId" attribute changes, we have to delete the
"member"/"memberOf" attribute reference of the new primary group and add one
for the old primary group.
- Deny deletion of primary groups according to Windows Server (so we cannot
have invalid "primaryGroupID" attributes in our AD).
- We cannot add a primary group directly before it isn't a secondary one of a
user account.
- We cannot add a secondary reference ("member" attribute) when the group has
been chosen as primary one.
This also removes the LDB templates which are basically overhead now.
This should also fix bug #6599.
Matthias Dieter Wallnöfer [Sun, 6 Sep 2009 19:08:08 +0000 (21:08 +0200)]
s4:provision - Add a new delete function only for users and computers
We need this new function to delete users and computers before other objects
on reprovisioning. Otherwise primary groups could be deleted before user/computer
accounts (which isn't allowed anymore by the reworked "samldb" module).
Matthias Dieter Wallnöfer [Wed, 26 Aug 2009 01:51:45 +0000 (03:51 +0200)]
s4:provision - Change the "provision_users.ldif" file to support the "samldb" changes
The "provision_users.ldif" file needs some rework to pass against the changed
and improved "samldb" module (see next commit).
Jeremy Allison [Mon, 7 Sep 2009 04:38:50 +0000 (21:38 -0700)]
Fix bug 6673 - smbpasswd does not work with "unix password sync = yes".
Revert change from 3.3 -> 3.4 with read_socket_with_timeout changed
from sys_read() to sys_recv(). read_socket_with_timeout() is called
with non-fd's (with a pty in chgpasswd.c and with a disk file in
lib/dbwrap_file.c via read_data()). recv works for the disk file,
but not the pty. Change the name of read_socket_with_timeout() to
read_fd_with_timeout() to make this clear (and add comments).
Jeremy.
Andrew Tridgell [Mon, 7 Sep 2009 04:08:03 +0000 (14:08 +1000)]
s4:setup_dns.sh fixed the update of the GUID CNAME
Andrew Tridgell [Mon, 7 Sep 2009 04:07:39 +0000 (14:07 +1000)]
s4:nsupdate-gss allow forcing of the realm
this is needed for the _msdcs zone
Andrew Kroeger [Wed, 2 Sep 2009 08:31:41 +0000 (03:31 -0500)]
s4:setup: Remove display_specifiers.ldif.
This file is no longer needed as the DisplaySpecifiers are now generated from
files provided by Microsoft.
Andrew Kroeger [Wed, 2 Sep 2009 08:30:58 +0000 (03:30 -0500)]
s4:setup: Updated comment to reflect new DisplaySpecifiers location.
Andrew Kroeger [Wed, 2 Sep 2009 08:25:22 +0000 (03:25 -0500)]
s4:setup: Use ms_display_specifiers script for provision.
Changed the provisioning to use the new script to parse the Microsoft-provided
DisplaySpecifiers LDIF file.
Andrew Kroeger [Wed, 2 Sep 2009 08:20:50 +0000 (03:20 -0500)]
s4:setup: Added script to parse Microsoft DisplaySpecifiers document.
Created this script based on the existing ms_schema.py script.
- Removed some unnecessary transformations that are only necessary for schema
processing.
- Added capability to parse and properly output base64-encoded values.
- Removed unnecessary attributes based on what attributes were present (and also
what were explicitly removed) from display_specifiers.ldif.
Andrew Kroeger [Mon, 7 Sep 2009 01:16:22 +0000 (11:16 +1000)]
s4:setup: Change license headers to LDIF comments.
The original license headers provided by Microsoft cannot be parsed as valid
LDIF.
Changed the license headers to be valid LDIF comments, and added a new header
section detailing the exact changes that were made to the original document.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Andrew Bartlett [Mon, 7 Sep 2009 00:48:09 +0000 (10:48 +1000)]
s4:setup Add DisplaySpecifiers from Microsoft.
Like the schema, these are provided under the licence at the head of
the file, which is not the GPL, but allows us to distribute them with
Samba.
Andrew Bartlett
Andrew Tridgell [Mon, 7 Sep 2009 00:55:32 +0000 (10:55 +1000)]
s4: bring nsupdate-gss into the s4 tree
This is a perl script that does TSIG-GSS DNS updates against a AD
DC. The bind 9.5 nsupdate still doesn't seem to work with TSIG-GSS,
and we need a way to do DNS updates when we vampire a domain, so I
revived this ancient perl script and added a wrapper script that can
update DNS entries using our machine account credentials
Andrew Tridgell [Mon, 7 Sep 2009 00:33:47 +0000 (10:33 +1000)]
s4: fixed the secrets.ldb construction in libnet
on a vampire join we were not putting the right attributes and
objectclass on the secrets.ldb record
Andrew Tridgell [Mon, 7 Sep 2009 00:33:02 +0000 (10:33 +1000)]
s4: the secrets.ldb module needs the loadparm opaque setup
Volker Lendecke [Sun, 6 Sep 2009 13:18:58 +0000 (15:18 +0200)]
s3:winbind: Convert WINBINDD_SET_HWM to the new API
Volker Lendecke [Sun, 6 Sep 2009 12:59:41 +0000 (14:59 +0200)]
s3:winbind: Convert WINBINDD_REMOVE_MAPPING to the new API
Volker Lendecke [Sun, 6 Sep 2009 12:47:06 +0000 (14:47 +0200)]
s3:winbind: Convert WINBINDD_SET_MAPPING to the new API
Volker Lendecke [Sun, 6 Sep 2009 07:32:34 +0000 (09:32 +0200)]
s3:winbind: Convert WINBINDD_CHECK_MACHACC to the new API