kai/samba.git
13 years agos3-dcerpc: Remove unused function
Simo Sorce [Tue, 13 Jul 2010 12:39:03 +0000 (08:39 -0400)]
s3-dcerpc: Remove unused function

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Do not reparse the header
Simo Sorce [Tue, 13 Jul 2010 12:29:21 +0000 (08:29 -0400)]
s3-dcerpc: Do not reparse the header

Instead pass back and use the packet we have already parsed.

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Pull the whole packet at once instead of fetching just the header
Simo Sorce [Tue, 13 Jul 2010 11:59:12 +0000 (07:59 -0400)]
s3-dcerpc: Pull the whole packet at once instead of fetching just the header

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Delay parsing rpc header in client code
Simo Sorce [Mon, 12 Jul 2010 13:36:39 +0000 (09:36 -0400)]
s3-dcerpc: Delay parsing rpc header in client code

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agoFix bug - 7551 smbclient does not return proper exit code.
Jeremy Allison [Thu, 15 Jul 2010 23:06:11 +0000 (16:06 -0700)]
Fix bug - 7551 smbclient does not return proper exit code.

Catch error in cli_push.

Jeremy.

13 years agos4:testprogs Operate the blackbox kinit and net tests using the :local config
Andrew Bartlett [Thu, 15 Jul 2010 06:45:13 +0000 (16:45 +1000)]
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

13 years agos4:testprogs Show that we no longer delete the old keytab entries
Andrew Bartlett [Thu, 15 Jul 2010 04:05:23 +0000 (14:05 +1000)]
s4:testprogs Show that we no longer delete the old keytab entries

By using a CCACHE obtained while the old password was still valid, we
can tell if the server still accepts incoming Kerberos connections
with the old password.

Andrew Bartlett

13 years agos4:provision Handle machine account password changes while keeping keytab
Andrew Bartlett [Thu, 15 Jul 2010 04:03:11 +0000 (14:03 +1000)]
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

13 years agos4:pyldb whitespace fix
Andrew Bartlett [Thu, 15 Jul 2010 04:01:56 +0000 (14:01 +1000)]
s4:pyldb whitespace fix

13 years agos4:pyldb Fix memory handling for ldb_message_element
Andrew Bartlett [Thu, 15 Jul 2010 04:00:48 +0000 (14:00 +1000)]
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

13 years agos4:testprogs Prove kerberos still works after a password change
Andrew Bartlett [Thu, 15 Jul 2010 00:54:08 +0000 (10:54 +1000)]
s4:testprogs Prove kerberos still works after a password change

Changing the machine account password should not prevent connections
with a current, valid CCACHE.  This is because when the password is
changed, the server-side keytab keeps one old password around.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos4 upgradeprovision: Adapt the list of attribute modified
Matthieu Patou [Sun, 11 Jul 2010 13:27:13 +0000 (17:27 +0400)]
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>
13 years agos4 ldb modules: relax some tests about attributes that should not be here
Matthieu Patou [Sat, 10 Jul 2010 10:48:40 +0000 (14:48 +0400)]
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>
13 years agos4 upgradeprovision: Synchronize the calculated keyversionnumber with the one previou...
Matthieu Patou [Sun, 4 Jul 2010 21:00:13 +0000 (01:00 +0400)]
s4 upgradeprovision: Synchronize the calculated keyversionnumber with the one previously stored

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos4 upgradeprovision: do not copy RID Set it's automaticaly created by the RID manager
Matthieu Patou [Mon, 5 Jul 2010 19:46:46 +0000 (23:46 +0400)]
s4 upgradeprovision: do not copy RID Set it's automaticaly created by the RID manager

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos4 upgradeprovision: add function to backup the provision before updating
Matthieu Patou [Sat, 3 Jul 2010 12:26:24 +0000 (16:26 +0400)]
s4 upgradeprovision: add function to backup the provision before updating

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos4 upgradeprovision: fix whitespaces
Matthieu Patou [Sat, 3 Jul 2010 12:53:44 +0000 (16:53 +0400)]
s4 upgradeprovision: fix whitespaces

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos4: Add unit test for increment_calculated_keyversion_number
Matthieu Patou [Tue, 15 Jun 2010 08:54:05 +0000 (12:54 +0400)]
s4: Add unit test for increment_calculated_keyversion_number

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos4 upgradeprovision: introduce a new function to update the field use for calculating...
Matthieu Patou [Tue, 15 Jun 2010 08:49:19 +0000 (12:49 +0400)]
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>
13 years agos4 python: Add functions to samdb to manipulate version of replPropertyMetaData attribute
Matthieu Patou [Tue, 22 Jun 2010 16:03:15 +0000 (20:03 +0400)]
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>
13 years agos4 dsdb: Use the changereplmetadata control
Matthieu Patou [Wed, 16 Jun 2010 14:47:18 +0000 (18:47 +0400)]
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>
13 years agos4 dsdb: create a new control: changereplmetadata
Matthieu Patou [Tue, 22 Jun 2010 15:56:37 +0000 (19:56 +0400)]
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>
13 years agoldb: allow ldb_sequence_number to be called in python
Matthieu Patou [Mon, 21 Jun 2010 06:55:18 +0000 (10:55 +0400)]
ldb: allow ldb_sequence_number to be called in python

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos4: Unit test update_machine_account_password through kinit
Matthieu Patou [Sun, 4 Jul 2010 12:39:17 +0000 (16:39 +0400)]
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>
13 years agos4: Add a simple script to change dc password
Matthieu Patou [Mon, 28 Jun 2010 09:49:08 +0000 (13:49 +0400)]
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>
13 years agos4 provision: move update_machine_account_password to helpers
Matthieu Patou [Sun, 4 Jul 2010 12:38:54 +0000 (16:38 +0400)]
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>
13 years agos3: Fix crashes in the printing code
Volker Lendecke [Thu, 15 Jul 2010 08:36:40 +0000 (10:36 +0200)]
s3: Fix crashes in the printing code

create_conn_struct did not create the conn->sconn!=NULL assumption we now
depend on. Thanks to Andreas Schneider for testing!

13 years agos3-dcerpc: Break memory hierarchy for shared structure
Simo Sorce [Wed, 14 Jul 2010 12:57:47 +0000 (08:57 -0400)]
s3-dcerpc: Break memory hierarchy for shared structure

Handles are shared among multiple pipes_struct. We cannot allocate
them on any specific pipes_struct or it will vanish for all others
as soon as that pipes_struct is freed, leaving back dangling
pointers.

Signed-off-by: Andreas Schneider <asn@samba.org>
13 years agos4: Added acl search tests for anonymous connection.
Nadezhda Ivanova [Wed, 14 Jul 2010 11:44:46 +0000 (14:44 +0300)]
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.

13 years agos3-dcerpc: fix crash bug in error path of process_complete_pdu().
Günther Deschner [Wed, 14 Jul 2010 10:35:39 +0000 (12:35 +0200)]
s3-dcerpc: fix crash bug in error path of process_complete_pdu().

Guenther

13 years agoFixed system_session_anon to actually make an anonymous session
Nadezhda Ivanova [Wed, 14 Jul 2010 07:30:40 +0000 (10:30 +0300)]
Fixed system_session_anon to actually make an anonymous session

It seems that because the flag is false, this always used the supplied credentials
rhather than establish anonymous connection.

13 years agos3:auth Change auth_ntlmssp_server_info API to return NTSTATUS
Andrew Bartlett [Mon, 12 Jul 2010 04:26:34 +0000 (14:26 +1000)]
s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS

This fixes a bug where register_existing_vuid() could be called with a
NULL server_info if the alloction failed.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3:smbd Give the kerberos session key a parent
Andrew Bartlett [Mon, 12 Jul 2010 04:25:28 +0000 (14:25 +1000)]
s3:smbd Give the kerberos session key a parent

Nothing will free this, so this prevents a memory leak.

Andrew Bartlett

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3:smbd Fix segfault if register_existing_vuid() fails
Andrew Bartlett [Mon, 12 Jul 2010 04:21:34 +0000 (14:21 +1000)]
s3:smbd Fix segfault if register_existing_vuid() fails

The register_existing_vuid() call will handle both the ntlmssp_end and
vuid invalidation internally, so we don't want to do it again.

Andrew Bartlett

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Signed-off-by: Andrew Tridgell <tridge@samba.org>
13 years agos3-selftest: enable RPC-BIND against s3.
Günther Deschner [Tue, 13 Jul 2010 23:32:02 +0000 (01:32 +0200)]
s3-selftest: enable RPC-BIND against s3.

Guenther

13 years agos4-smbtorture: add very simple RPC-BIND testsuite.
Günther Deschner [Tue, 13 Jul 2010 23:31:12 +0000 (01:31 +0200)]
s4-smbtorture: add very simple RPC-BIND testsuite.

Guenther

13 years agos4-smbtorture: rename rpc/bind.c to rpc/multi_bind.c.
Günther Deschner [Tue, 13 Jul 2010 21:57:07 +0000 (23:57 +0200)]
s4-smbtorture: rename rpc/bind.c to rpc/multi_bind.c.

Guenther

13 years agos3-libnet: add missing header file, sorry.
Günther Deschner [Tue, 13 Jul 2010 21:35:25 +0000 (23:35 +0200)]
s3-libnet: add missing header file, sorry.

Guenther

13 years agos3-libnet: better separate headers.
Günther Deschner [Thu, 1 Jul 2010 22:14:04 +0000 (00:14 +0200)]
s3-libnet: better separate headers.

Guenther

13 years agos3-winbind: Don't cache queries to builtin and own sam domain.
Andreas Schneider [Tue, 13 Jul 2010 13:37:13 +0000 (15:37 +0200)]
s3-winbind: Don't cache queries to builtin and own sam domain.

13 years agos3-winbind: Set status before we leave in some msrpc functions.
Andreas Schneider [Wed, 7 Jul 2010 12:27:04 +0000 (14:27 +0200)]
s3-winbind: Set status before we leave in some msrpc functions.

13 years agoRevert "Remove the global char *LastDir."
Jeremy Allison [Tue, 13 Jul 2010 16:30:35 +0000 (09:30 -0700)]
Revert "Remove the global char *LastDir."

Volker pointed out I'd missed the "last directory" cache
part of this code. Return us to caching the directory we're
in (reduces sys call load).

Mea maxima culpa.

Jeremy.

This reverts commit 2f30aea3324f32f9b8555e961256fc1280da2871.

13 years agos3-waf: fix the build.
Günther Deschner [Tue, 13 Jul 2010 15:07:49 +0000 (17:07 +0200)]
s3-waf: fix the build.

Guenther

13 years agos3-ldb: fix build warning.
Günther Deschner [Tue, 13 Jul 2010 14:45:52 +0000 (16:45 +0200)]
s3-ldb: fix build warning.

Guenther

13 years agos4: Reorganized dsHeuristics reset so the code can be reused
Nadezhda Ivanova [Tue, 13 Jul 2010 14:15:54 +0000 (17:15 +0300)]
s4: Reorganized dsHeuristics reset so the code can be reused

Moved the setting of dsHeuristics to a method as soon we will have to set other
values as well in different tests

13 years agos3-dcerpc: Remove unused functions and headers
Simo Sorce [Sun, 11 Jul 2010 21:49:06 +0000 (17:49 -0400)]
s3-dcerpc: Remove unused functions and headers

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Use dcerpc_push_ncacn_packet() in api_pipe_alter_context()
Simo Sorce [Sun, 11 Jul 2010 21:35:02 +0000 (17:35 -0400)]
s3-dcerpc: Use dcerpc_push_ncacn_packet() in api_pipe_alter_context()

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Use dcerpc_push_dcerpc_auth() for spnego auth continuations.
Simo Sorce [Sun, 11 Jul 2010 21:07:19 +0000 (17:07 -0400)]
s3-dcerpc: Use dcerpc_push_dcerpc_auth() for spnego auth continuations.

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dceprc: Use dcerpc_push_ncacn_packet() in api_pipe_bind_req()
Simo Sorce [Sun, 11 Jul 2010 15:48:22 +0000 (11:48 -0400)]
s3-dceprc: Use dcerpc_push_ncacn_packet() in api_pipe_bind_req()

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Use a DATA_BLOB in bind processing and avoid one mem copy
Simo Sorce [Sun, 11 Jul 2010 15:15:40 +0000 (11:15 -0400)]
s3-dcerpc: Use a DATA_BLOB in bind processing and avoid one mem copy

Also move dcerpc_push_dcerpc_auth() invocation in api_pipe_bind_req()
to simplify the workflow.

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Rearrange api_pipe_bind_req() to do checks before allocating memory
Simo Sorce [Sun, 11 Jul 2010 14:47:32 +0000 (10:47 -0400)]
s3-dcerpc: Rearrange api_pipe_bind_req() to do checks before allocating memory

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: fix dcerpc_push_ncacn_packet, pass arg by address
Simo Sorce [Sun, 11 Jul 2010 16:18:13 +0000 (12:18 -0400)]
s3-dcerpc: fix dcerpc_push_ncacn_packet, pass arg by address

There is no need to copy the whole structure twice by passing it in by value.

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: pass the packet to setup_bind_nack()
Simo Sorce [Sun, 11 Jul 2010 14:37:07 +0000 (10:37 -0400)]
s3-dcerpc: pass the packet to setup_bind_nack()

Allows to not rely on p->call_id but use the value directly from the request
packet header.

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dceprc: Add debug messages
Simo Sorce [Sat, 10 Jul 2010 22:53:36 +0000 (18:53 -0400)]
s3-dceprc: Add debug messages

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Remove unused members
Simo Sorce [Sat, 10 Jul 2010 21:05:58 +0000 (17:05 -0400)]
s3-dcerpc: Remove unused members

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Remove unused functions
Simo Sorce [Sat, 10 Jul 2010 21:05:24 +0000 (17:05 -0400)]
s3-dcerpc: Remove unused functions

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Use dcerpc_pull_ncacn_packet() to unmarshall dceprc requests
Simo Sorce [Fri, 9 Jul 2010 23:34:34 +0000 (19:34 -0400)]
s3-dcerpc: Use dcerpc_pull_ncacn_packet() to unmarshall dceprc requests

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agodcerpc: move dcerpc_pull_auth_trailer into a the common dcerpc_util.c file
Simo Sorce [Fri, 9 Jul 2010 22:23:49 +0000 (18:23 -0400)]
dcerpc: move dcerpc_pull_auth_trailer into a the common dcerpc_util.c file

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dceprc: Store opnum in its own variable
Simo Sorce [Fri, 9 Jul 2010 23:35:22 +0000 (19:35 -0400)]
s3-dceprc: Store opnum in its own variable

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dceprc use a DATA_BLOB to hold the curren pdu in pipes_struct
Simo Sorce [Fri, 9 Jul 2010 20:28:52 +0000 (16:28 -0400)]
s3-dceprc use a DATA_BLOB to hold the curren pdu in pipes_struct

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: use dceprc_push_ncacn_packet_header in create_next_pdu_noauth()
Simo Sorce [Fri, 9 Jul 2010 19:46:43 +0000 (15:46 -0400)]
s3-dcerpc: use dceprc_push_ncacn_packet_header in create_next_pdu_noauth()

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Use dcerpc_push_ncacn_packet_header() in create_next_pdu_schannel()
Simo Sorce [Fri, 9 Jul 2010 19:38:03 +0000 (15:38 -0400)]
s3-dcerpc: Use dcerpc_push_ncacn_packet_header() in create_next_pdu_schannel()

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: use dcerpc_push_ncacn_packet_header() in create_next_pdu_ntlmssp()
Simo Sorce [Fri, 9 Jul 2010 19:33:03 +0000 (15:33 -0400)]
s3-dcerpc: use dcerpc_push_ncacn_packet_header() in create_next_pdu_ntlmssp()

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agosr-dcerpc: add dcerpc_push_ncacn_packet_header()
Simo Sorce [Fri, 9 Jul 2010 19:32:25 +0000 (15:32 -0400)]
sr-dcerpc: add dcerpc_push_ncacn_packet_header()

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc delay rpc header unmarshalling
Simo Sorce [Fri, 9 Jul 2010 18:23:59 +0000 (14:23 -0400)]
s3-dcerpc delay rpc header unmarshalling

Use dcerpc_get_frag_length() to get the whole pdu first

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Remove unused headers
Simo Sorce [Fri, 9 Jul 2010 00:25:50 +0000 (20:25 -0400)]
s3-dcerpc: Remove unused headers

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Use dcerpc_set_frag_length()
Simo Sorce [Thu, 8 Jul 2010 23:17:13 +0000 (19:17 -0400)]
s3-dcerpc: Use dcerpc_set_frag_length()

Automatically calculate the fragment length where possible.

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: link against ../librpc/rpc/dcerpc_util.c
Günther Deschner [Wed, 1 Apr 2009 20:37:38 +0000 (22:37 +0200)]
s3-dcerpc: link against ../librpc/rpc/dcerpc_util.c

Guenther

Signed-off-by: Simo Sorce <idra@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos4-dcerpc: move some util functions up to main librpc directory.
Günther Deschner [Wed, 1 Apr 2009 20:37:09 +0000 (22:37 +0200)]
s4-dcerpc: move some util functions up to main librpc directory.

Guenther

Signed-off-by: Simo Sorce <idra@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Remove unused prototype
Simo Sorce [Sat, 10 Jul 2010 20:55:37 +0000 (16:55 -0400)]
s3-dcerpc: Remove unused prototype

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Fix ntlmssp sign/seal.
Simo Sorce [Mon, 12 Jul 2010 22:57:32 +0000 (18:57 -0400)]
s3-dcerpc: Fix ntlmssp sign/seal.

Header calculation was misplaced.

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dceprc: Fix auth_length in auth3 response
Simo Sorce [Mon, 12 Jul 2010 20:27:22 +0000 (16:27 -0400)]
s3-dceprc: Fix auth_length in auth3 response

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Fix miscalculation of buffer start address
Simo Sorce [Mon, 12 Jul 2010 19:09:42 +0000 (15:09 -0400)]
s3-dcerpc: Fix miscalculation of buffer start address

This was breaking schannel

13 years agotsocket: Fix some unreachable code
Volker Lendecke [Sat, 22 May 2010 21:44:01 +0000 (23:44 +0200)]
tsocket: Fix some unreachable code

13 years agos3: [ug]id_to_unix_... can not fail
Volker Lendecke [Sun, 11 Jul 2010 15:30:53 +0000 (17:30 +0200)]
s3: [ug]id_to_unix_... can not fail

Remove some silly failure checks

13 years agoREADME.Coding: fix typos
Stefan Metzmacher [Sat, 10 Jul 2010 12:15:08 +0000 (14:15 +0200)]
README.Coding: fix typos

Thanks to Michael Wood <esiotrot@gmail.com> for the review.

metze

13 years agoREADME.Coding: add examples for good and bad comments
Stefan Metzmacher [Sat, 10 Jul 2010 08:06:17 +0000 (10:06 +0200)]
README.Coding: add examples for good and bad comments

metze

13 years agos4:provision: remove --policy-guid and --policy-guid-dc cmdline options
Stefan Metzmacher [Fri, 9 Jul 2010 11:08:07 +0000 (13:08 +0200)]
s4:provision: remove --policy-guid and --policy-guid-dc cmdline options

metze

13 years agos4:provision: also use fixed GUID names of the default group policies for domain...
Stefan Metzmacher [Fri, 25 Jun 2010 11:26:06 +0000 (13:26 +0200)]
s4:provision: also use fixed GUID names of the default group policies for domain and domain controllers in tests

metze

13 years agos4 provision: use correct GUID for default policies
Matthieu Patou [Thu, 8 Jul 2010 20:09:49 +0000 (00:09 +0400)]
s4 provision: use correct GUID for default policies

The value of GUID for policy is not random for default policies, it is
described here ("How Core Group Policy Works"):
http://technet.microsoft.com/en-us/library/cc784268%28WS.10%29.aspx
at paragraph System\Policies Container.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
13 years agos4 unittests: remove the provision directory before (re)generating
Matthieu Patou [Fri, 9 Jul 2010 16:29:27 +0000 (20:29 +0400)]
s4 unittests: remove the provision directory before (re)generating

13 years agos4 net: Add spn module to list/add/remove spn on objects
Matthieu Patou [Fri, 2 Jul 2010 19:52:33 +0000 (23:52 +0400)]
s4 net: Add spn module to list/add/remove spn on objects

Signed-off-by: Stefan Metzmacher <metze@samba.org>
13 years agotestprogs/blackbox/subunit.sh: initialize failed to 0
Stefan Metzmacher [Sat, 10 Jul 2010 07:25:57 +0000 (09:25 +0200)]
testprogs/blackbox/subunit.sh: initialize failed to 0

This is a short-term workarround for broken scripts,
which use "exit $failed", without initializing failed.

We need a discussion on the mailing list how to handle this
in a nicer way.

This should fix some random failures in the blackbox tests.

metze

13 years agos4:winbind: let WBSRV_SAMBA3_SET_STRING() initialize the whole buffer
Stefan Metzmacher [Sat, 10 Jul 2010 07:09:28 +0000 (09:09 +0200)]
s4:winbind: let WBSRV_SAMBA3_SET_STRING() initialize the whole buffer

We should not send uninitialized bytes to the winbind pipe,
this makes also makes valgrind very unhappy.

metze

13 years agos4:wb_cmd_list_groups: also handle NT_STATUS_NO_MORE_ENTRIES
Stefan Metzmacher [Sat, 10 Jul 2010 07:08:57 +0000 (09:08 +0200)]
s4:wb_cmd_list_groups: also handle NT_STATUS_NO_MORE_ENTRIES

metze

13 years agos4:wb_cmd_list_users: also handle NT_STATUS_NO_MORE_ENTRIES
Stefan Metzmacher [Sat, 10 Jul 2010 07:08:31 +0000 (09:08 +0200)]
s4:wb_cmd_list_users: also handle NT_STATUS_NO_MORE_ENTRIES

metze

13 years agos4:libnet_GroupList: allocate children strings on the correct talloc parent
Stefan Metzmacher [Sat, 10 Jul 2010 07:06:44 +0000 (09:06 +0200)]
s4:libnet_GroupList: allocate children strings on the correct talloc parent

Otherwise the _recv() function won't move the children strings to the
callers memory context and let the callers crash.

metze

13 years agos4:libnet_UserList: allocate children strings on the correct talloc parent
Stefan Metzmacher [Sat, 10 Jul 2010 07:04:43 +0000 (09:04 +0200)]
s4:libnet_UserList: allocate children strings on the correct talloc parent

Otherwise the _recv() function won't move the children strings to the
callers memory context and let the callers crash.

metze

13 years agos4:buildtools: add 'make show_waf_options'
Stefan Metzmacher [Sat, 10 Jul 2010 07:14:15 +0000 (09:14 +0200)]
s4:buildtools: add 'make show_waf_options'

metze

13 years agos4:buildtools: make it possible to use advanced test options via the make waf wrapper
Stefan Metzmacher [Sat, 10 Jul 2010 07:10:52 +0000 (09:10 +0200)]
s4:buildtools: make it possible to use advanced test options via the make waf wrapper

You can to do thinks like this now:
make test TEST_OPTIONS="--valgrind-server" TESTS=wbinfo

metze

13 years agos3: Cleanup of the initial SMB2 counters patch.
Ira Cooper [Thu, 8 Jul 2010 20:30:12 +0000 (16:30 -0400)]
s3: Cleanup of the initial SMB2 counters patch.

This reorganizes smbd_smb2_request_dispatch to have a central exit point,
and use the normal profiling macros.

Signed-off-by: Jeremy Allison <jra@samba.org>
13 years agos4:drepl_notify: hide some bugs from the make test output
Stefan Metzmacher [Fri, 9 Jul 2010 14:27:34 +0000 (16:27 +0200)]
s4:drepl_notify: hide some bugs from the make test output

It's useless to get messages like this every few seconds:

dreplsrv_notify: Failed to send DsReplicaSync to
edbf4745-2966-49a7-8653-99200f1c9430._msdcs.samba2003.example.com for
CN=Configuration,DC=samba2003,DC=example,DC=com -
NT_STATUS_OBJECT_NAME_NOT_FOUND : WERR_BADFILE

We have a non bug regarding non-linked DN attributes
and changes of the target DN.

metze

13 years agos4:drsuapi: don't return all linked attributes at the same time
Stefan Metzmacher [Fri, 9 Jul 2010 10:52:11 +0000 (12:52 +0200)]
s4:drsuapi: don't return all linked attributes at the same time

Windows gives them in chunks, but I don't know the correct
rule to calculate the chunk size.

For now I'll use 1500 as the max size.

Windows isn't happy when it gets ~ 100000 linked attributes in one
response. It corrupts its directory index and later moves some objects
to the LostAndFound folder.

metze

13 years agos3-build: Add a gdbtestenv environment for Samba3.
Andreas Schneider [Fri, 9 Jul 2010 13:42:34 +0000 (15:42 +0200)]
s3-build: Add a gdbtestenv environment for Samba3.

This will open 3 xterms; smbd with gdb, winbind with gdb and a window to
run client commands.

Example: make gdbtestenv SMBD_OPTIONS="-d2"

13 years agos4:selftest: run RPC-SAMR-LARGE-DC against the vampire_dc to test the rid alloc code
Stefan Metzmacher [Fri, 9 Jul 2010 07:24:30 +0000 (09:24 +0200)]
s4:selftest: run RPC-SAMR-LARGE-DC against the vampire_dc to test the rid alloc code

metze

13 years agoselftest/Samba4: set dreplsrv:periodic_startup_interval = 0
Stefan Metzmacher [Fri, 9 Jul 2010 07:23:04 +0000 (09:23 +0200)]
selftest/Samba4: set dreplsrv:periodic_startup_interval = 0

metze

13 years agos4:dsdb/repl: expose drsuapi_DsExtendedError to the caller (e.g. the ridalloc client)
Stefan Metzmacher [Thu, 8 Jul 2010 14:20:11 +0000 (16:20 +0200)]
s4:dsdb/repl: expose drsuapi_DsExtendedError to the caller (e.g. the ridalloc client)

metze

13 years agos4:drepl_out_helpers: don't return NT_STATUS_OK, if an extended operation doesn't...
Stefan Metzmacher [Thu, 8 Jul 2010 14:18:21 +0000 (16:18 +0200)]
s4:drepl_out_helpers: don't return NT_STATUS_OK, if an extended operation doesn't return success

metze

13 years agos4:drepl_ridalloc: only ask the rid master for a new rid pool if we need to.
Stefan Metzmacher [Thu, 8 Jul 2010 13:38:16 +0000 (15:38 +0200)]
s4:drepl_ridalloc: only ask the rid master for a new rid pool if we need to.

if we are at least half-exhausted then ask for a new pool.

This fixes a bug where we're sending unintialized alloc_pool
variable as exop->fsmo_info to the rid master and get back
DRSUAPI_EXOP_ERR_PARAM_ERROR.

metze

13 years agos4:dsdb:ridalloc: use ridalloc_ridset_values infrastructure in ridalloc_allocate_rid_...
Stefan Metzmacher [Thu, 8 Jul 2010 13:14:59 +0000 (15:14 +0200)]
s4:dsdb:ridalloc: use ridalloc_ridset_values infrastructure in ridalloc_allocate_rid_pool_fsmo()

metze