kai/samba-autobuild/.git
10 years agoOPC oota edits
John H Terpstra [Thu, 10 Sep 2009 04:12:27 +0000 (23:12 -0500)]
OPC oota edits

10 years agos4/drs: correctly fill in the GUID of DRS objects
Andrew Tridgell [Thu, 10 Sep 2009 03:51:08 +0000 (13:51 +1000)]
s4/drs: correctly fill in the GUID of DRS objects

10 years agos4: fix spelling
Andrew Tridgell [Thu, 10 Sep 2009 03:50:46 +0000 (13:50 +1000)]
s4: fix spelling

10 years agos4/provision: another fix for breakage from b1dabb1133
Andrew Tridgell [Thu, 10 Sep 2009 02:42:57 +0000 (12:42 +1000)]
s4/provision: another fix for breakage from b1dabb1133

10 years agos4:provision Don't reference provision_backend when using LDB
Andrew Bartlett [Thu, 10 Sep 2009 02:25:25 +0000 (12:25 +1000)]
s4:provision Don't reference provision_backend when using LDB

This broke in Endi's patch for Fedora DS support

Andrew Bartlett

10 years agos4/torture: don't mix declarations and code
Andrew Tridgell [Thu, 10 Sep 2009 02:14:53 +0000 (12:14 +1000)]
s4/torture: don't mix declarations and code

10 years agos4: regenerate drsuapi IDL
Andrew Tridgell [Thu, 10 Sep 2009 02:09:01 +0000 (12:09 +1000)]
s4: regenerate drsuapi IDL

10 years agos4/schema: teach the schema_syntax code how to encode/decode more attributes
Andrew Tridgell [Thu, 10 Sep 2009 02:08:15 +0000 (12:08 +1000)]
s4/schema: teach the schema_syntax code how to encode/decode more attributes

We were trying to encode strings like 'top' as integers, without first
looking them up in our schema. We need special handling for all the
attributes that contain attributeID_id or governsID_id fields that
should be translated first before encoding.

10 years agos4/schema: don't crash if we don't have subClassOf
Andrew Tridgell [Thu, 10 Sep 2009 02:06:20 +0000 (12:06 +1000)]
s4/schema: don't crash if we don't have subClassOf

10 years agos4/drsuapi: tech the IDL about some more key attribute names
Andrew Tridgell [Thu, 10 Sep 2009 02:05:50 +0000 (12:05 +1000)]
s4/drsuapi: tech the IDL about some more key attribute names

10 years agos4: Use SASL authentication against Fedora DS.
Endi Sukma Dewata [Wed, 9 Sep 2009 16:45:24 +0000 (12:45 -0400)]
s4: Use SASL authentication against Fedora DS.

1. During instance creation the provisioning script will import the SASL
   mapping for samba-admin. It's done here due to missing config schema
   preventing adding the mapping via ldapi.

2. After that it will use ldif2db to import the cn=samba-admin user as
   the target of SASL mapping.

3. Then it will start FDS and continue to do provisioning using the
   Directory Manager with simple bind.

4. The SASL credentials will be stored in secrets.ldb, so when Samba
   server runs later it will use the SASL credentials.

5. After the provisioning is done (just before stopping the slapd)
   it will use the DM over direct ldapi to delete the default SASL
   mappings included automatically by FDS, leaving just the new
   samba-admin mapping.

6. Also before stopping slapd it will use the DM over direct ldapi to
   set the ACL on the root entries of the user, configuration, and
   schema partitions. The ACL will give samba-admin the full access
   to these partitions.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:docs: Add info about how to obtain cifs module in cifs mount helper manpage
Volker Lendecke [Wed, 9 Sep 2009 21:08:28 +0000 (23:08 +0200)]
s3:docs: Add info about how to obtain cifs module in cifs mount helper manpage

10 years agoFix compile in a usually non-selected define.
Jeremy Allison [Wed, 9 Sep 2009 20:54:47 +0000 (13:54 -0700)]
Fix compile in a usually non-selected define.
Jeremy.

10 years agos3:smbd: Add a "hidden" parameter "share:fake_fscaps"
Volker Lendecke [Wed, 9 Sep 2009 19:58:47 +0000 (21:58 +0200)]
s3:smbd: Add a "hidden" parameter "share:fake_fscaps"

This is needed to support some special app I've just come across where I had to
set the SPARSE_FILES bit (0x40) to make it work against Samba at all. There
might be others to fake. This is definitely a "Don't touch if you don't know
what you're doing" thing, so I decided to make this an undocumented parametric
parameter.

I know this sucks, so feel free to beat me up on this. But I don't think it
will hurt.

10 years agos3:examples:ldap: allow substing search on more attributes in nds schema file
Björn Jacke [Wed, 9 Sep 2009 18:07:19 +0000 (20:07 +0200)]
s3:examples:ldap: allow substing search on more attributes in nds schema file

10 years agos4/torture: add new SMB oplock tests
Aravind Srinivasan [Tue, 8 Sep 2009 20:19:44 +0000 (13:19 -0700)]
s4/torture: add new SMB oplock tests

* test if oplocks are granted when requesting delete-on-close
* test how oplocks are broken by byte-range-lock requests

10 years agos4/torture: convert printf to torture_comment()
Aravind Srinivasan [Tue, 8 Sep 2009 20:12:26 +0000 (13:12 -0700)]
s4/torture: convert printf to torture_comment()

Allows "make test" and other harnesses to print cleaner output.

10 years agos3:examples:ldap: fix some OIDs in various schema files
Björn Jacke [Wed, 9 Sep 2009 17:13:32 +0000 (19:13 +0200)]
s3:examples:ldap: fix some OIDs in various schema files

10 years agos4/drs: when we don't find an attribute use zero values
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

10 years agos4/vampire: fixed i/j index mixup in vampire code
Andrew Tridgell [Wed, 9 Sep 2009 15:26:34 +0000 (01:26 +1000)]
s4/vampire: fixed i/j index mixup in vampire code

10 years agos4:drs match the meta_data and attributes array
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

10 years agos4/drs: broke out the core of the getncchanges code
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

10 years agos4:drs level_out is a pointer
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

10 years agos4:drs split addentry and getncchanges into separate files
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

10 years agoAdded "admin_session" method.
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.

10 years agos4/repl: implement DsReplicaSync
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.

10 years agos4/repl: added refresh of repsTo
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

10 years agos4: fixed format of repsTo in samdb
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

10 years agos4: allow repl:RODC=true/false to set ourselves as a RODC
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.

10 years agos3-winbindd: Fix Bug #6700: Use dns domain name when needing to guess server principal.
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

10 years agontlmssp: avoid duplicate inclusion of helper headers.
Günther Deschner [Tue, 8 Sep 2009 23:03:19 +0000 (01:03 +0200)]
ntlmssp: avoid duplicate inclusion of helper headers.

Guenther

10 years agoMark test_security_descriptor_add_neg as known failing (for now).
Jelmer Vernooij [Tue, 8 Sep 2009 21:30:21 +0000 (23:30 +0200)]
Mark test_security_descriptor_add_neg as known failing (for now).

10 years agoBasic tests for nTSceurityDescriptor both SDDL and BASE64 format
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>
10 years agos3-nterr: add NT_STATUS_RPC_NT_CALL_FAILED.
Günther Deschner [Tue, 8 Sep 2009 21:19:08 +0000 (23:19 +0200)]
s3-nterr: add NT_STATUS_RPC_NT_CALL_FAILED.

Guenther

10 years agos4/torture/smb2: removed SMB2-FIND test
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.

10 years agos4/torture/smb2: Fix several small bugs and style issues in SMB2 dir tests
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.

10 years agos4/torture: add new torture_assert_*_todo() macros
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.

10 years agolib/util: add unique string generator helper function
Steven Danneman [Tue, 8 Sep 2009 19:09:39 +0000 (12:09 -0700)]
lib/util: add unique string generator helper function

10 years agontlmssp: add some void decode calls (useful for ndrdump).
Günther Deschner [Thu, 3 Sep 2009 00:06:34 +0000 (02:06 +0200)]
ntlmssp: add some void decode calls (useful for ndrdump).

Guenther

10 years agosocket_wrapper: swrap_read() should use SWRAP_RECV* for swrap_dump_packet()
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

10 years agos4:repl_meta_data: remove unused code
Stefan Metzmacher [Tue, 8 Sep 2009 10:01:46 +0000 (12:01 +0200)]
s4:repl_meta_data: remove unused code

metze

10 years agos3:drsuapi: add a simple DsRemoveDSServer() implementation
Stefan Metzmacher [Thu, 2 Oct 2008 09:28:13 +0000 (11:28 +0200)]
s3:drsuapi: add a simple DsRemoveDSServer() implementation

metze

10 years agos4:drsuapi: add an incomplete DsAddEntry implementation
Stefan Metzmacher [Wed, 1 Oct 2008 04:28:32 +0000 (06:28 +0200)]
s4:drsuapi: add an incomplete DsAddEntry implementation

metze

10 years agos3:smbd: Fix bug 6690, wrong error check
Andrew Klosterman [Tue, 8 Sep 2009 15:38:37 +0000 (17:38 +0200)]
s3:smbd: Fix bug 6690, wrong error check

10 years agoschannel: add missing prototype for ndr_print_nbt_string() in schannel helper.
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

10 years agos3: remove unused RPC_AUTH_SCHANNEL_NEG struct and parsing functions.
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

10 years agos3-rpc_server: use NL_AUTH_MESSAGE in pipe_schannel_auth_bind().
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

10 years agos3-rpc_client: use NL_AUTH_MESSAGE in create_schannel_auth_rpc_bind_req().
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

10 years agos3/docs: Raise version number.
Karolin Seeger [Tue, 8 Sep 2009 13:39:57 +0000 (15:39 +0200)]
s3/docs: Raise version number.

Karolin

10 years agoschannel: add NL_AUTH_MESSAGE and both NL_AUTH_SIGNATURE structs.
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

10 years agos4:idl Add generated code for netlogon.idl changes
Andrew Bartlett [Tue, 8 Sep 2009 10:21:38 +0000 (20:21 +1000)]
s4:idl Add generated code for netlogon.idl changes

10 years agoReturn a correct value for Supported Encryption Type
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

10 years agotort: RPC-CRACKNAMES test case refactored
Kamen Mazdrashki [Fri, 28 Aug 2009 15:35:31 +0000 (18:35 +0300)]
tort: RPC-CRACKNAMES test case refactored

10 years agotort: DsCrackNames - propagate torture context to all tests.
Kamen Mazdrashki [Fri, 28 Aug 2009 15:34:40 +0000 (18:34 +0300)]
tort: DsCrackNames - propagate torture context to all tests.

10 years agotort: Helper function to get DC info for testing
Kamen Mazdrashki [Fri, 28 Aug 2009 15:19:54 +0000 (18:19 +0300)]
tort: Helper function to get DC info for testing

10 years agotort: Implement 'setup' and 'teardown' for DRSUAPI test cases.
Kamen Mazdrashki [Fri, 28 Aug 2009 12:42:48 +0000 (15:42 +0300)]
tort: Implement 'setup' and 'teardown' for DRSUAPI test cases.

10 years agos4/ldb: support NDR printing for 2 more replication types
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.

10 years agos4/ldb: allow prefixMap to be shown as NDR
Andrew Tridgell [Tue, 8 Sep 2009 12:02:59 +0000 (22:02 +1000)]
s4/ldb: allow prefixMap to be shown as NDR

10 years agos4/ldb: allow printing ntSecurityDescriptor in full
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.

10 years agos4/ldb: added ldif handler for repsFrom/repsTo
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

10 years agos4/ldb: expose the ldb flags with ldb_get_flags()
Andrew Tridgell [Tue, 8 Sep 2009 11:39:33 +0000 (21:39 +1000)]
s4/ldb: expose the ldb flags with ldb_get_flags()

10 years agos4/ldb: don't line wrap ldif when --show-binary is used
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

10 years agos4/ldb: added --show-binary command line option
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.

10 years agos3-schannel: Fix Bug #6697. Interdomain trusts with Windows 2008 R2 DCs.
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

10 years agos4:setpassword script - Passwords set by this script are set by the administrator...
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

10 years agos4:provision - Cosmetic: Indent the parameters better
Matthias Dieter Wallnöfer [Tue, 8 Sep 2009 09:55:40 +0000 (11:55 +0200)]
s4:provision - Cosmetic: Indent the parameters better

10 years agos4:templates - Remove the latest relics (in "dcesrv_lsa_CreateSecret")
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")

10 years agos4:wmic - Output enhancements
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.

10 years agoAdd read() to socketwrapper. Metze please check.
Jeremy Allison [Tue, 8 Sep 2009 03:31:01 +0000 (20:31 -0700)]
Add read() to socketwrapper. Metze please check.
Jeremy.

10 years agos4: commit generated DRS changes
Andrew Tridgell [Tue, 8 Sep 2009 01:51:27 +0000 (11:51 +1000)]
s4: commit generated DRS changes

10 years agos4: added the structure for repsTo
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

10 years agos4: fixed updaterefs options bitmap
Andrew Tridgell [Tue, 8 Sep 2009 01:50:14 +0000 (11:50 +1000)]
s4: fixed updaterefs options bitmap

10 years agos4: implemented server side of DSUpdateRefs call
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

10 years agos4/ldb: fixed spelling
Andrew Tridgell [Tue, 8 Sep 2009 01:47:36 +0000 (11:47 +1000)]
s4/ldb: fixed spelling

10 years agos4: 'index' is a libc function
Andrew Tridgell [Tue, 8 Sep 2009 01:47:11 +0000 (11:47 +1000)]
s4: 'index' is a libc function

10 years agos4: fixed a unsigned printf warnings
Andrew Tridgell [Tue, 8 Sep 2009 01:46:49 +0000 (11:46 +1000)]
s4: fixed a unsigned printf warnings

10 years agos4: removed an unused variable
Andrew Tridgell [Tue, 8 Sep 2009 01:46:27 +0000 (11:46 +1000)]
s4: removed an unused variable

10 years agos4: fixed some shadowed variable warnings
Andrew Tridgell [Tue, 8 Sep 2009 01:46:08 +0000 (11:46 +1000)]
s4: fixed some shadowed variable warnings

10 years agoFill the meta data vector in the responce struct.
Anatoliy Atanasov [Thu, 3 Sep 2009 15:37:31 +0000 (18:37 +0300)]
Fill the meta data vector in the responce struct.

10 years agos4:selftest Fix 'make testenv-gdb' and 'make valgrindtest' etc
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

10 years agos4:tests/iconv - Fix a warning
Matthias Dieter Wallnöfer [Mon, 7 Sep 2009 10:38:44 +0000 (12:38 +0200)]
s4:tests/iconv - Fix a warning

10 years agos4:pwsettings: Correct off by factor of 10 for ticks.
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.

10 years agogitignore: Ignore additional auto-generated files.
Andrew Kroeger [Mon, 7 Sep 2009 03:25:53 +0000 (22:25 -0500)]
gitignore: Ignore additional auto-generated files.

10 years agos4: Let the "setpassword" script finally use the "samdb_set_password" routine
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.

10 years agos4:dsdb: correctly implement _dsdb_syntax_OID_oid_ldb_to_drsuapi()
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

10 years agolib/tdr: fix the build with --enable-automatic-dependencies
Stefan Metzmacher [Mon, 7 Sep 2009 12:21:11 +0000 (14:21 +0200)]
lib/tdr: fix the build with --enable-automatic-dependencies

metze

10 years agos4:LogonGetDomainInfo - add a basic check for the hostname
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.

10 years agotdb: fix c++ build warning.
Günther Deschner [Mon, 7 Sep 2009 09:56:10 +0000 (11:56 +0200)]
tdb: fix c++ build warning.

Guenther

10 years agos4: Fix "Small memory leak after calling several times lp_update"
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.

10 years agos4: Exceptions in "provision.py"
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.

10 years agos4:simple_ldap_map - "primaryGroupId"
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.

10 years agos4:samldb - Fix typo
Matthias Dieter Wallnöfer [Sun, 6 Sep 2009 18:23:02 +0000 (20:23 +0200)]
s4:samldb - Fix typo

10 years agos4:Foreign security principals - Fix them up
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.

10 years agos4:subtree delete module - Cosmetic adaptions
Matthias Dieter Wallnöfer [Sun, 6 Sep 2009 15:27:51 +0000 (17:27 +0200)]
s4:subtree delete module - Cosmetic adaptions

10 years agos4:ldap.py - Adds a test for the primary group behaviour
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.

10 years agos4:provision - Change the module order to match Windows Server
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.

10 years agos4:sam - Implement also here the right primary group behaviour
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".

10 years agos4:samr - Fix up the SAMR server to support the primary group of a user in the right way
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).

10 years agos4:samldb - Major rework
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.

10 years agos4:provision - Add a new delete function only for users and computers
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).