kamenim/samba.git
13 years agos4-ldb: Add separate function to add empty element into ldb_msg
Kamen Mazdrashki [Fri, 16 Jul 2010 10:44:13 +0000 (13:44 +0300)]
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>
13 years agos4-ldb: Write more explanatory comment for ldb_msg_add()
Kamen Mazdrashki [Fri, 16 Jul 2010 10:41:57 +0000 (13:41 +0300)]
s4-ldb: Write more explanatory comment for ldb_msg_add()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos4-pyldb: Use ldb_msg_difference() in py_ldb_msg_diff()
Kamen Mazdrashki [Fri, 16 Jul 2010 10:40:50 +0000 (13:40 +0300)]
s4-pyldb: Use ldb_msg_difference() in py_ldb_msg_diff()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos4-test: Use ldb_msg_difference() in torture/rpc/dssync.c test
Kamen Mazdrashki [Fri, 16 Jul 2010 10:38:09 +0000 (13:38 +0300)]
s4-test: Use ldb_msg_difference() in torture/rpc/dssync.c test

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos4-tools: use ldb_msg_difference() in ldbedit - modify_record()
Kamen Mazdrashki [Fri, 16 Jul 2010 10:35:07 +0000 (13:35 +0300)]
s4-tools: use ldb_msg_difference() in ldbedit - modify_record()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos4-dsdb/schema/schema_set.c: fix trailing spaces and comments spelling
Kamen Mazdrashki [Fri, 16 Jul 2010 11:27:30 +0000 (14:27 +0300)]
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>
13 years agos4-dsdb: use ldb_msg_difference() in source4/dsdb/schema/schema_set.c
Kamen Mazdrashki [Fri, 16 Jul 2010 10:26:45 +0000 (13:26 +0300)]
s4-dsdb: use ldb_msg_difference() in source4/dsdb/schema/schema_set.c

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos4-ldb: Implement ldb_msg_difference() function to accept a memory context from client
Kamen Mazdrashki [Fri, 16 Jul 2010 11:23:24 +0000 (14:23 +0300)]
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>
13 years agos3-auth: Use talloc hierarchies to properly free auth_ntlmssp_state contexts
Simo Sorce [Fri, 16 Jul 2010 23:44:22 +0000 (19:44 -0400)]
s3-auth: Use talloc hierarchies to properly free auth_ntlmssp_state contexts

Turn auth_ntlmssp_end into a destructor and attach it to auth_ntlmssp_state.
Remote auth_ntlmssp_end and use TALLOC_FREE in the callers.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos3-auth: auth_make ntlmssp_state the parent context
Simo Sorce [Sat, 17 Jul 2010 14:22:04 +0000 (10:22 -0400)]
s3-auth: auth_make ntlmssp_state the parent context

There is no need for a separate mem_ctx member.
Also make the ntlmssp_state a children of auth_ntlmssp_state
Also cleanup auth_ntlmssp_end to free only what is not automatically freed

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos3-auth: Simplify how we free the auth_context
Simo Sorce [Fri, 16 Jul 2010 22:23:55 +0000 (18:23 -0400)]
s3-auth: Simplify how we free the auth_context

Turn the freeing function into a destructor and attach it to the
auth_context.
Make all callers TALLOC_FREE() the auth_context instead of calling
the free function.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos3-auth: Cleanup and readability fixes
Simo Sorce [Fri, 16 Jul 2010 21:47:21 +0000 (17:47 -0400)]
s3-auth: Cleanup and readability fixes

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos3-ntlmssp: Remove ntlmssp_end and let the talloc hierarchy handle it.
Simo Sorce [Fri, 16 Jul 2010 21:30:14 +0000 (17:30 -0400)]
s3-ntlmssp: Remove ntlmssp_end and let the talloc hierarchy handle it.

All the members are children of ntlmssp_state anyway.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
13 years agos3: Actually use the usecs in aio_fork_suspend
Volker Lendecke [Sun, 18 Jul 2010 15:12:30 +0000 (17:12 +0200)]
s3: Actually use the usecs in aio_fork_suspend

Jeremy, please check!

13 years agos3: Fix an uninitialized variable
Volker Lendecke [Sun, 18 Jul 2010 15:12:11 +0000 (17:12 +0200)]
s3: Fix an uninitialized variable

13 years agos3: Work better without the aio sighandler
Volker Lendecke [Sun, 18 Jul 2010 12:40:43 +0000 (14:40 +0200)]
s3: Work better without the aio sighandler

Refuse async I/O if we can't set up the signal handler

13 years agos3: Fix some nonempty blank lines
Volker Lendecke [Sun, 18 Jul 2010 11:39:51 +0000 (13:39 +0200)]
s3: Fix some nonempty blank lines

13 years agos3: Remove a direct use of procid_self()
Volker Lendecke [Sat, 17 Jul 2010 21:16:26 +0000 (23:16 +0200)]
s3: Remove a direct use of procid_self()

13 years agos3-rpc_client: Fixed a segfault in rpccli_samr_chng_pswd_auth_crap().
Andreas Schneider [Sun, 18 Jul 2010 13:04:20 +0000 (15:04 +0200)]
s3-rpc_client: Fixed a segfault in rpccli_samr_chng_pswd_auth_crap().

This fixes the WINBIND-WBCLIENT test. The test set
old_lm_hash_enc_blob.length to 0 and we don't check the length here. So
the memcpy segfaulted.

13 years agos3-waf: Fixed the build.
Andreas Schneider [Sun, 18 Jul 2010 09:28:24 +0000 (11:28 +0200)]
s3-waf: Fixed the build.

13 years agos3: Don't use as-needed
Volker Lendecke [Sun, 18 Jul 2010 09:56:17 +0000 (11:56 +0200)]
s3: Don't use as-needed

This is just broken. RHEL5 can't deal with it, FreeBSD8 is broken with it, and
who knows what other platforms are broken. I can rather live with a system that
links in a bit too much than a system that does not work at all.

13 years agopam_winbind: Fix shadowing a global on FreeBSD
Volker Lendecke [Sat, 17 Jul 2010 19:37:43 +0000 (21:37 +0200)]
pam_winbind: Fix shadowing a global on FreeBSD

FreeBSD defines a function pam_error()

13 years agos3-dcerpc: Fix build and remove unneeded headers
Simo Sorce [Sat, 17 Jul 2010 19:43:28 +0000 (15:43 -0400)]
s3-dcerpc: Fix build and remove unneeded headers

Sorry, botched a rebase.

13 years agos3-dcerpc: Move mere processing functions from srv_pipe_hnd.c to srv_pipe.c
Simo Sorce [Sat, 17 Jul 2010 19:22:26 +0000 (15:22 -0400)]
s3-dcerpc: Move mere processing functions from srv_pipe_hnd.c to srv_pipe.c

13 years agoFix a typo
Volker Lendecke [Sat, 17 Jul 2010 19:13:11 +0000 (21:13 +0200)]
Fix a typo

13 years agos3-dcerpc: Move common cli/srv functions into a common file
Simo Sorce [Sat, 17 Jul 2010 19:00:24 +0000 (15:00 -0400)]
s3-dcerpc: Move common cli/srv functions into a common file

13 years agos3: Really fix the 64-bit warnings
Volker Lendecke [Sat, 17 Jul 2010 18:20:14 +0000 (20:20 +0200)]
s3: Really fix the 64-bit warnings

Hmm. Forgot to git commit this piece, sorry :-(

13 years agos3: Fix some 64-bit warnings
Volker Lendecke [Sat, 17 Jul 2010 15:20:03 +0000 (17:20 +0200)]
s3: Fix some 64-bit warnings

13 years agos3: Right now we do not have includes in Makefile.in
Volker Lendecke [Sat, 17 Jul 2010 15:08:30 +0000 (17:08 +0200)]
s3: Right now we do not have includes in Makefile.in

Skip the expansion step on non-GNU-make systems

13 years agos4 pam_winbind: don't build if pam header are not installed
Matthieu Patou [Sat, 17 Jul 2010 17:45:12 +0000 (21:45 +0400)]
s4 pam_winbind: don't build if pam header are not installed

13 years agos4 nss_switch: fix build problem on computer without the iniparser
Matthieu Patou [Sat, 17 Jul 2010 16:07:52 +0000 (20:07 +0400)]
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.

13 years agos4-waf: add the missing bits for builing nss_winbind and pam_winbind
Matthieu Patou [Sat, 5 Jun 2010 15:16:20 +0000 (19:16 +0400)]
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

13 years agos4 unittests: add blackblox test for ktpass
Matthieu Patou [Sun, 11 Jul 2010 20:07:20 +0000 (00:07 +0400)]
s4 unittests: add blackblox test for ktpass

13 years agos4: create a simple version of ktpass
Matthieu Patou [Mon, 28 Jun 2010 17:38:35 +0000 (21:38 +0400)]
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.

13 years agos3-build: add LIBNDR_XATTR_OBJ.
Günther Deschner [Fri, 16 Jul 2010 21:25:12 +0000 (23:25 +0200)]
s3-build: add LIBNDR_XATTR_OBJ.

Guenther

13 years agoFix bug #7570 - New smb2 max parameters are undocumented.
Jeremy Allison [Fri, 16 Jul 2010 21:39:52 +0000 (14:39 -0700)]
Fix bug #7570 - New smb2 max parameters are undocumented.

Jeremy.

13 years agos3-dcerpc: rename SCHANNEL_SIG_SIZE to NL_AUTH_SIGNATURE_SIZE and move to IDL.
Günther Deschner [Fri, 16 Jul 2010 21:09:54 +0000 (23:09 +0200)]
s3-dcerpc: rename SCHANNEL_SIG_SIZE to NL_AUTH_SIGNATURE_SIZE and move to IDL.

Guenther

13 years agos3-perfcount: make it possible to compile the example perfcount daemon.
Günther Deschner [Fri, 16 Jul 2010 21:00:17 +0000 (23:00 +0200)]
s3-perfcount: make it possible to compile the example perfcount daemon.

Guenther

13 years agos4-smbtorture: run all testcases with bigendian push as well in RPC-BIND.
Günther Deschner [Fri, 16 Jul 2010 20:46:58 +0000 (22:46 +0200)]
s4-smbtorture: run all testcases with bigendian push as well in RPC-BIND.

Guenther

13 years agos4-smbtorture: rearrange testlist in RPC-BIND.
Günther Deschner [Fri, 16 Jul 2010 20:42:11 +0000 (22:42 +0200)]
s4-smbtorture: rearrange testlist in RPC-BIND.

Guenther

13 years agos4-smbtorture: make sure to wipe out dcerpc auth flags before RPC-BIND starts.
Günther Deschner [Fri, 16 Jul 2010 20:41:32 +0000 (22:41 +0200)]
s4-smbtorture: make sure to wipe out dcerpc auth flags before RPC-BIND starts.

Guenther

13 years agos3-dcerpc: Fix ability to receive Big Endian PDUs
Simo Sorce [Fri, 16 Jul 2010 19:15:48 +0000 (15:15 -0400)]
s3-dcerpc: Fix ability to receive Big Endian PDUs

13 years agosmbtorture shell: Allow any config option to be set.
James Peach [Fri, 16 Jul 2010 18:07:31 +0000 (11:07 -0700)]
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.

13 years agoMake the "map to guest" parameter work correctly with NTLMSSP (spnego
Jeremy Allison [Fri, 16 Jul 2010 18:05:34 +0000 (11:05 -0700)]
Make the "map to guest" parameter work correctly with NTLMSSP (spnego
and raw) under SMB2. Still need to investigate fixing this with krb5
auth (does this make sense ?).

Jeremy.

13 years agos4-loadparm: 2nd half of lp_ to lpcfg_ conversion
Andrew Tridgell [Fri, 16 Jul 2010 04:32:42 +0000 (14:32 +1000)]
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>
13 years agos4-loadparm: change lp_*() to lpcfg_*() and provide s3 compatibility lp_*()
Andrew Tridgell [Fri, 16 Jul 2010 04:32:10 +0000 (14:32 +1000)]
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>
13 years agoWHATSNEW: Start 3.6.0pre1 release notes.
Karolin Seeger [Fri, 16 Jul 2010 08:02:39 +0000 (10:02 +0200)]
WHATSNEW: Start 3.6.0pre1 release notes.

Karolin

13 years agolibcli/netlogon: re-enable debugging.
Günther Deschner [Fri, 16 Jul 2010 00:37:51 +0000 (02:37 +0200)]
libcli/netlogon: re-enable debugging.

Now that we do not share binary objects anymore, we can safely enable
debugging here again.

Guenther

This reverts commit 3eb122069b9f81196ac658375fcb828924af3e94.

13 years agos3-registry: use some prs macros to the only place where they are used.
Günther Deschner [Fri, 16 Jul 2010 00:20:34 +0000 (02:20 +0200)]
s3-registry: use some prs macros to the only place where they are used.

Guenther

13 years agos3-waf: fix the build.
Günther Deschner [Fri, 16 Jul 2010 00:07:51 +0000 (02:07 +0200)]
s3-waf: fix the build.

Guenther

13 years agos3-dcerpc: fix c++ warning.
Günther Deschner [Thu, 15 Jul 2010 23:11:39 +0000 (01:11 +0200)]
s3-dcerpc: fix c++ warning.

Guenther

13 years agoMove the remnants of rpc_parse code under registry/
Simo Sorce [Thu, 15 Jul 2010 21:45:29 +0000 (17:45 -0400)]
Move the remnants of rpc_parse code under registry/

The registry code is the only last user of this code.
Move everything under registry/ and hope someone will get rid od
it completely from there in the future.

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-parse_prs: Remove unuesd functions
Simo Sorce [Thu, 15 Jul 2010 21:27:11 +0000 (17:27 -0400)]
s3-parse_prs: Remove unuesd functions

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Use a local function to dump pdu regions
Simo Sorce [Thu, 15 Jul 2010 20:54:14 +0000 (16:54 -0400)]
s3-dcerpc: Use a local function to dump pdu regions

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-misc: Move smb_io_time() to regfio.c
Simo Sorce [Thu, 15 Jul 2010 20:19:04 +0000 (16:19 -0400)]
s3-misc: Move smb_io_time() to regfio.c

This is the last file using this function and we do not want anyone
else to keep using hand marshalled stuff anyway.
So make it also private to that file.

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Use DATA_BLOB for pipes_struct input data
Simo Sorce [Thu, 15 Jul 2010 14:28:59 +0000 (10:28 -0400)]
s3-dcerpc: Use DATA_BLOB for pipes_struct input data

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Use DATA_BLOB instead of prs_struct for req_data
Simo Sorce [Thu, 15 Jul 2010 12:48:51 +0000 (08:48 -0400)]
s3-dcerpc: Use DATA_BLOB instead of prs_struct for req_data

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Use DATA_BLOB instead of prs_struct for rpc_out
Simo Sorce [Thu, 15 Jul 2010 03:31:38 +0000 (23:31 -0400)]
s3-dcerpc: Use DATA_BLOB instead of prs_struct for rpc_out

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Avoid unnecessary memory allocation for dcerpc_ctx_list
Simo Sorce [Wed, 14 Jul 2010 23:57:01 +0000 (19:57 -0400)]
s3-dcerpc: Avoid unnecessary memory allocation for dcerpc_ctx_list

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Use DATA_BLOB instead of prs_struct for reply_pdu
Simo Sorce [Wed, 14 Jul 2010 23:39:54 +0000 (19:39 -0400)]
s3-dcerpc: Use DATA_BLOB instead of prs_struct for reply_pdu

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Use DATA_BLOB instead of prs_struct for incoming fragments
Simo Sorce [Wed, 14 Jul 2010 22:29:32 +0000 (18:29 -0400)]
s3-dcerpc: Use DATA_BLOB instead of prs_struct for incoming fragments

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Read a pdu in 2 steps, header first the payload
Simo Sorce [Wed, 14 Jul 2010 20:15:13 +0000 (16:15 -0400)]
s3-dcerpc: Read a pdu in 2 steps, header first the payload

We can't really cope with receiving more data than expected anyway
as there is code that checks if the size of the buffer is consistent with
pkt->frag_length and throws an error if not.

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dceprc: Use IDL defined constants for length calculations
Simo Sorce [Wed, 14 Jul 2010 17:56:13 +0000 (13:56 -0400)]
s3-dceprc: Use IDL defined constants for length calculations

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agoReformat and cleanup
Simo Sorce [Wed, 14 Jul 2010 18:01:44 +0000 (14:01 -0400)]
Reformat and cleanup

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Move common helpers into a common file
Simo Sorce [Wed, 14 Jul 2010 16:18:49 +0000 (12:18 -0400)]
s3-dcerpc: Move common helpers into a common file

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Padding is never done on a DCERPC_PKT_BIND_ACK packet.
Simo Sorce [Wed, 14 Jul 2010 15:09:04 +0000 (11:09 -0400)]
s3-dcerpc: Padding is never done on a DCERPC_PKT_BIND_ACK packet.

Empirically verified against Windows.
It never pads the auth credentials on this packet type.

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agodcerpc: remove ncacn_packet_header and related functions
Simo Sorce [Wed, 14 Jul 2010 06:04:04 +0000 (02:04 -0400)]
dcerpc: remove ncacn_packet_header and related functions

ncacn_packet_header was an artifact and it is not necessary anymore

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Refactor code and stop using ncacn_packet_header
Simo Sorce [Wed, 14 Jul 2010 05:59:10 +0000 (01:59 -0400)]
s3-dcerpc: Refactor code and stop using ncacn_packet_header

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: consolidate respones packet creation code
Simo Sorce [Wed, 14 Jul 2010 03:56:01 +0000 (23:56 -0400)]
s3-dcerpc: consolidate respones packet creation code

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Convert frag from prs_struct to a simple DATA_BLOB
Simo Sorce [Tue, 13 Jul 2010 22:01:16 +0000 (18:01 -0400)]
s3-dcerpc: Convert frag from prs_struct to a simple DATA_BLOB

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Convert rdata from prs_struct to a simple DATA_BLOB
Simo Sorce [Tue, 13 Jul 2010 19:43:44 +0000 (15:43 -0400)]
s3-dcerpc: Convert rdata from prs_struct to a simple DATA_BLOB

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Remove unused functions and headers
Simo Sorce [Tue, 13 Jul 2010 16:03:21 +0000 (12:03 -0400)]
s3-dcerpc: Remove unused functions and headers

parse_rpc.c is dead, long live parse_rpc.c !

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Stop using hand marshalling in create_next_pdu_noauth()
Simo Sorce [Tue, 13 Jul 2010 15:53:41 +0000 (11:53 -0400)]
s3-dcerpc: Stop using hand marshalling in create_next_pdu_noauth()

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Stop using hand marshalling in create_next_pdu_schannel()
Simo Sorce [Tue, 13 Jul 2010 13:52:56 +0000 (09:52 -0400)]
s3-dcerpc: Stop using hand marshalling in create_next_pdu_schannel()

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Stop using hand marshalling in create_next_pdu_ntlmssp()
Simo Sorce [Tue, 13 Jul 2010 13:26:13 +0000 (09:26 -0400)]
s3-dcerpc: Stop using hand marshalling in create_next_pdu_ntlmssp()

Signed-off-by: Günther Deschner <gd@samba.org>
13 years agos3-dcerpc: Stop using hand marshalling in rpc_finish_auth3_bind_send()
Simo Sorce [Tue, 13 Jul 2010 14:27:37 +0000 (10:27 -0400)]
s3-dcerpc: Stop using hand marshalling in rpc_finish_auth3_bind_send()

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

Signed-off-by: Günther Deschner <gd@samba.org>
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>