samba.git
8 years agos3:rpc_client: fix argument order of call to lsa_open_policy2 in rpccli_lsa_open_policy2
Michael Adam [Mon, 28 Mar 2011 22:01:40 +0000 (00:01 +0200)]
s3:rpc_client: fix argument order of call to lsa_open_policy2 in rpccli_lsa_open_policy2

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Mar 29 01:34:28 CEST 2011 on sn-devel-104

8 years agos3-selftest Fix test_smbclient_auth.sh
Andrew Bartlett [Mon, 28 Mar 2011 11:06:40 +0000 (22:06 +1100)]
s3-selftest Fix test_smbclient_auth.sh

The -N in the command line meant that all the logins were as the
guest, not as the user specified.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Mar 29 00:47:50 CEST 2011 on sn-devel-104

8 years agos3-selftest Allow LM passwords and turn of NTLMv2 for security=share test
Andrew Bartlett [Mon, 28 Mar 2011 11:20:23 +0000 (22:20 +1100)]
s3-selftest Allow LM passwords and turn of NTLMv2 for security=share test

8 years agos3-selftest Add tests for security=server
Andrew Bartlett [Mon, 28 Mar 2011 09:42:55 +0000 (20:42 +1100)]
s3-selftest Add tests for security=server

Andrew Bartlett

8 years agos3-selftest unconditionaly include subunit.sh
Andrew Bartlett [Mon, 28 Mar 2011 11:05:27 +0000 (22:05 +1100)]
s3-selftest unconditionaly include subunit.sh

we no longer . this file into other shell scripts, so we don't need
this check any more.

Andrew Bartlett

8 years agowintest New snapshot for my wintest VMs
Andrew Bartlett [Mon, 28 Mar 2011 09:44:10 +0000 (20:44 +1100)]
wintest New snapshot for my wintest VMs

8 years agos4-fsmo: say which role is being transferred
Andrew Tridgell [Mon, 28 Mar 2011 05:48:46 +0000 (16:48 +1100)]
s4-fsmo: say which role is being transferred

this is particularly useful for "samba-tool fsmo transfer --role=all"

8 years agos4-fsmo: samba-tool fsmo transfer now gets full error code
Andrew Tridgell [Mon, 28 Mar 2011 05:45:22 +0000 (16:45 +1100)]
s4-fsmo: samba-tool fsmo transfer now gets full error code

We now wait for the transfer to succeed or fail

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agos4-dsdb: perform FSMO transfers asynchronously
Andrew Tridgell [Mon, 28 Mar 2011 05:44:32 +0000 (16:44 +1100)]
s4-dsdb: perform FSMO transfers asynchronously

this gives the administrator a proper error message on the command
line

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agos4-fsmo: make rootDSE modify for FSMO transfer async
Andrew Tridgell [Mon, 28 Mar 2011 05:20:47 +0000 (16:20 +1100)]
s4-fsmo: make rootDSE modify for FSMO transfer async

this gives the ldap client the error code from the transfer

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agos4-fsmo: nicer error messages on failed FSMO transfers
Andrew Tridgell [Mon, 28 Mar 2011 04:32:41 +0000 (15:32 +1100)]
s4-fsmo: nicer error messages on failed FSMO transfers

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agos4-drs: default hostname in samba-tool drs command
Andrew Tridgell [Mon, 28 Mar 2011 04:32:15 +0000 (15:32 +1100)]
s4-drs: default hostname in samba-tool drs command

default to our hostname

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agos4-dsdb: only allow administrators to trigger FSMO role transfers
Andrew Tridgell [Mon, 28 Mar 2011 03:41:36 +0000 (14:41 +1100)]
s4-dsdb: only allow administrators to trigger FSMO role transfers

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agos4-fsmo: samba-tool fsmo takes a URL, not a hostname
Andrew Tridgell [Mon, 28 Mar 2011 03:17:45 +0000 (14:17 +1100)]
s4-fsmo: samba-tool fsmo takes a URL, not a hostname

better to call the option --url

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agowintest: added a "ipconfig /flushdns"
Andrew Tridgell [Mon, 28 Mar 2011 01:50:24 +0000 (12:50 +1100)]
wintest: added a "ipconfig /flushdns"

w2k3 doesn't flush its DNS cache on a dynamic update

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agowintest: fixed syntax highlighting with emacs
Andrew Tridgell [Mon, 28 Mar 2011 01:27:33 +0000 (12:27 +1100)]
wintest: fixed syntax highlighting with emacs

8 years agowintest: ensure we startup the w2k3 DC VM
Andrew Tridgell [Mon, 28 Mar 2011 01:27:01 +0000 (12:27 +1100)]
wintest: ensure we startup the w2k3 DC VM

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agoBe a little clearer about when and when not to set this option.
Jeremy Allison [Mon, 28 Mar 2011 21:12:36 +0000 (14:12 -0700)]
Be a little clearer about when and when not to set this option.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Mar 28 23:59:47 CEST 2011 on sn-devel-104

8 years agoFix inspired by work done by David Disseldorp for bug #8040 - smbclient segfaults...
Jeremy Allison [Mon, 28 Mar 2011 20:26:27 +0000 (13:26 -0700)]
Fix inspired by work done by David Disseldorp for bug #8040 - smbclient segfaults when a Cyrillic netbios name or workgroup is configured.

Change msrpc_gen to return NTSTATUS and ensure everywhere this is
used it is correctly checked to return that status.

Jeremy.

8 years agos3: Fix Coverity ID 2143: DEADCODE
Volker Lendecke [Mon, 28 Mar 2011 09:12:32 +0000 (11:12 +0200)]
s3: Fix Coverity ID 2143: DEADCODE

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Mar 28 12:06:19 CEST 2011 on sn-devel-104

8 years agos3: Fix Coverity ID 2143: DEADCODE
Volker Lendecke [Mon, 28 Mar 2011 09:12:32 +0000 (11:12 +0200)]
s3: Fix Coverity ID 2143: DEADCODE

8 years agos3: Fix Coverity ID 2173: FORWARD_NULL
Volker Lendecke [Mon, 28 Mar 2011 08:52:51 +0000 (10:52 +0200)]
s3: Fix Coverity ID 2173: FORWARD_NULL

8 years agoRevert "Change strict allocate to default to true.
Stefan Metzmacher [Mon, 28 Mar 2011 06:11:01 +0000 (08:11 +0200)]
Revert "Change strict allocate to default to true.

This reverts commit ecf48af135e4c1ebc5aafe4b3dad785162f5949a.

This makes Samba unusable on systems without Linux and
a modern Filesystem.

This was discussed with Jeremy on IRC:
http://irclog.samba.org/2011/01/20110126-Wed.log

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Mar 28 09:00:09 CEST 2011 on sn-devel-104

8 years agos3: Fix Coverity ID 2188: MISSING_BREAK
Volker Lendecke [Sun, 27 Mar 2011 20:06:46 +0000 (22:06 +0200)]
s3: Fix Coverity ID 2188: MISSING_BREAK

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar 27 23:11:10 CEST 2011 on sn-devel-104

8 years agos3: Fix Coverity ID 2189: MISSING_BREAK
Volker Lendecke [Sun, 27 Mar 2011 20:06:46 +0000 (22:06 +0200)]
s3: Fix Coverity ID 2189: MISSING_BREAK

8 years agotdb: Fix Coverity ID 2192: NO_EFFECT
Volker Lendecke [Sun, 27 Mar 2011 19:43:53 +0000 (21:43 +0200)]
tdb: Fix Coverity ID 2192: NO_EFFECT

(ret < 0) can never be true

8 years agos3: Fix Coverity ID 2195: NO_EFFECT
Volker Lendecke [Sun, 27 Mar 2011 19:31:44 +0000 (21:31 +0200)]
s3: Fix Coverity ID 2195: NO_EFFECT

level is unsigned

8 years agolibrpc: Add some error checking to dcerpc_floor_pack_rhs_if_version_data
Volker Lendecke [Sun, 27 Mar 2011 19:19:37 +0000 (21:19 +0200)]
librpc: Add some error checking to dcerpc_floor_pack_rhs_if_version_data

8 years agolibrpc: Fix Coverity ID 2198: NULL_RETURNS
Volker Lendecke [Sun, 27 Mar 2011 19:17:53 +0000 (21:17 +0200)]
librpc: Fix Coverity ID 2198: NULL_RETURNS

8 years agos3: Fix Coverity ID 2200: NULL_RETURNS (cut&paste error)
Volker Lendecke [Sun, 27 Mar 2011 18:57:45 +0000 (20:57 +0200)]
s3: Fix Coverity ID 2200: NULL_RETURNS (cut&paste error)

8 years agos3: Fix Coverity ID 2228: RESOURCE_LEAK
Volker Lendecke [Sun, 27 Mar 2011 18:44:01 +0000 (20:44 +0200)]
s3: Fix Coverity ID 2228: RESOURCE_LEAK

Holger, please check!

8 years agos3: Fix Coverity ID 2226: RESOURCE_LEAK
Volker Lendecke [Sun, 27 Mar 2011 18:38:52 +0000 (20:38 +0200)]
s3: Fix Coverity ID 2226: RESOURCE_LEAK

Holger, please check!

8 years agos3: Fix Coverity ID 976: BAD_SIZEOF
Volker Lendecke [Sun, 27 Mar 2011 18:06:19 +0000 (20:06 +0200)]
s3: Fix Coverity ID 976: BAD_SIZEOF

8 years agos3: Fix Coverity ID 958: BAD_SIZEOF
Volker Lendecke [Sun, 27 Mar 2011 18:03:23 +0000 (20:03 +0200)]
s3: Fix Coverity ID 958: BAD_SIZEOF

This is supposed to wipe out the md5 context, not only the first bytes of it.

Others, please check!

8 years agos3: Fix Coverity ID 682: NEGATIVE_RETURNS
Volker Lendecke [Sun, 27 Mar 2011 17:41:34 +0000 (19:41 +0200)]
s3: Fix Coverity ID 682: NEGATIVE_RETURNS

8 years agos3: Fix Coverity ID 590: DEADCODE
Volker Lendecke [Sun, 27 Mar 2011 17:29:42 +0000 (19:29 +0200)]
s3: Fix Coverity ID 590: DEADCODE

8 years agos3: Fix Coverity ID 585: NEGATIVE_RETURNS
Volker Lendecke [Sun, 27 Mar 2011 17:27:26 +0000 (19:27 +0200)]
s3: Fix Coverity ID 585: NEGATIVE_RETURNS

8 years agos3: Fix Coverity ID 513: UNINIT
Volker Lendecke [Sun, 27 Mar 2011 17:11:44 +0000 (19:11 +0200)]
s3: Fix Coverity ID 513: UNINIT

8 years agos3: Fix Coverity ID 83: RESOURCE_LEAK
Volker Lendecke [Sun, 27 Mar 2011 17:08:10 +0000 (19:08 +0200)]
s3: Fix Coverity ID 83: RESOURCE_LEAK

8 years agos3: Convert cli_raw_tcon to cli_smb
Volker Lendecke [Sun, 27 Mar 2011 16:03:24 +0000 (18:03 +0200)]
s3: Convert cli_raw_tcon to cli_smb

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar 27 19:50:21 CEST 2011 on sn-devel-104

8 years agos3: Fix a memleak
Volker Lendecke [Sun, 27 Mar 2011 15:43:11 +0000 (17:43 +0200)]
s3: Fix a memleak

8 years agos3: Replace a use of cli_errstr
Volker Lendecke [Sun, 27 Mar 2011 15:37:24 +0000 (17:37 +0200)]
s3: Replace a use of cli_errstr

8 years agos3: Replace cli_negprot_sendsync() by cli_negprot_send()
Volker Lendecke [Sun, 27 Mar 2011 15:34:36 +0000 (17:34 +0200)]
s3: Replace cli_negprot_sendsync() by cli_negprot_send()

8 years agos3: Remove a pointless static
Volker Lendecke [Sun, 27 Mar 2011 15:20:28 +0000 (17:20 +0200)]
s3: Remove a pointless static

8 years agos3: Remove a use of cli_send_smb
Volker Lendecke [Sun, 27 Mar 2011 15:04:56 +0000 (17:04 +0200)]
s3: Remove a use of cli_send_smb

8 years agos3: Remove two calls to cli_errstr
Volker Lendecke [Sun, 27 Mar 2011 09:50:55 +0000 (11:50 +0200)]
s3: Remove two calls to cli_errstr

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar 27 13:17:47 CEST 2011 on sn-devel-104

8 years agos3: Fix Coverity ID 2296: UNUSED_VALUE
Volker Lendecke [Sun, 27 Mar 2011 09:22:57 +0000 (11:22 +0200)]
s3: Fix Coverity ID 2296: UNUSED_VALUE

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar 27 12:12:35 CEST 2011 on sn-devel-104

8 years agos3: Fix Coverity ID 2327: FORWARD_NULL
Volker Lendecke [Sun, 27 Mar 2011 09:11:07 +0000 (11:11 +0200)]
s3: Fix Coverity ID 2327: FORWARD_NULL

Make check_ft_info robust against an invalid type.

Günther, please check!

8 years agos3: Fix Coverity ID 2328: FORWARD_NULL
Volker Lendecke [Sun, 27 Mar 2011 09:06:02 +0000 (11:06 +0200)]
s3: Fix Coverity ID 2328: FORWARD_NULL

Make startsmbfilepwent robust against an invalid open type

8 years agos3: Fix Coverity ID 2329: RESOURCE_LEAK
Volker Lendecke [Sun, 27 Mar 2011 09:00:36 +0000 (11:00 +0200)]
s3: Fix Coverity ID 2329: RESOURCE_LEAK

8 years agos3: Fix Coverity ID 2330: RESOURCE_LEAK
Volker Lendecke [Sun, 27 Mar 2011 08:59:57 +0000 (10:59 +0200)]
s3: Fix Coverity ID 2330: RESOURCE_LEAK

8 years agos3: Fix Coverity ID 2331: RESOURCE_LEAK
Volker Lendecke [Sun, 27 Mar 2011 08:58:19 +0000 (10:58 +0200)]
s3: Fix Coverity ID 2331: RESOURCE_LEAK

8 years agos3: Fix an uninitialized variable read
Volker Lendecke [Sat, 26 Mar 2011 12:33:40 +0000 (13:33 +0100)]
s3: Fix an uninitialized variable read

The "is_valid_policy_handle" in the exit path reads uninitialized data

Lets see if this fixes Coverity ID 2172 which complains about h being
dereferenced in the dcerpc_winreg_CloseKey.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Mar 26 14:24:28 CET 2011 on sn-devel-104

8 years agos3: Fix Coverity ID 2326, CHECKED_RETURN
Volker Lendecke [Sat, 26 Mar 2011 12:29:37 +0000 (13:29 +0100)]
s3: Fix Coverity ID 2326, CHECKED_RETURN

8 years agoRevert "Fix bug 8021 - Incorrect string termination in volume/volume_name for TRANS2...
Jeremy Allison [Fri, 25 Mar 2011 22:43:54 +0000 (15:43 -0700)]
Revert "Fix bug 8021 - Incorrect string termination in volume/volume_name for TRANS2-QUERY_FS_INFO/Info Volume."

This reverts commit 042aafb87df6c05877b8fc7ef0d44877689d860a.

I need to test against OS/2 to see if this is something Win28K
breaks for older clients before allowing this.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Mar 26 01:19:55 CET 2011 on sn-devel-104

8 years agoFix bug 8040 - smbclient segfaults when a Cyrillic netbios name or workgroup is confi...
Jeremy Allison [Fri, 25 Mar 2011 21:37:29 +0000 (14:37 -0700)]
Fix bug 8040 - smbclient segfaults when a Cyrillic netbios name or workgroup is configured.

As discovered by David Disseldorp <ddiss@suse.de>, convert_string_talloc()
doesn't always return consistent results for a zero length string. The
API states an incoming string must *always* contain the terminating null,
but unfotunately too much code expects passing in a zero source length
to return a null terminated string, so at least ensure we return a
correct null string in the required character set and return the
correct length.

Also ensure we cannot return a zero length for a converted string
(we ensure that the returned buffer is always allocated and zero
terminated anyway) as calling code depends on the fact that returning
true from this function will *always* return a non-zero length (as
it must include the terminating null).

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Mar 25 23:25:40 CET 2011 on sn-devel-104

8 years agos3-netapi: fix memoryleak while not using talloc_tos() in cli_get_session_key() usage.
Günther Deschner [Fri, 25 Mar 2011 11:13:36 +0000 (12:13 +0100)]
s3-netapi: fix memoryleak while not using talloc_tos() in cli_get_session_key() usage.

Thanks Volker!

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Mar 25 18:21:18 CET 2011 on sn-devel-104

8 years agos3: Compile IDL files in autogen, some configure tests need this
Volker Lendecke [Fri, 25 Mar 2011 09:12:52 +0000 (10:12 +0100)]
s3: Compile IDL files in autogen, some configure tests need this

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Mar 25 16:35:30 CET 2011 on sn-devel-104

8 years agoRevert "s3-includes: fixed CONST_DISCARD() to actually discard const"
Volker Lendecke [Fri, 25 Mar 2011 10:31:38 +0000 (11:31 +0100)]
Revert "s3-includes: fixed CONST_DISCARD() to actually discard const"

This reverts commit 37261928bec145f4cbd85f3e409063563c00ac9e.

In source3 this creates a warning of the form

passdb/pdb_ldap.c:4565: warning: passing argument 2 of ‘pull_utf8_talloc’ from incompatible pointer type
include/proto.h:444: note: expected ‘char **’ but argument is of type ‘char ***’

for every use of CONST_DISCARD.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Mar 25 13:16:35 CET 2011 on sn-devel-104

8 years agocharcnv: ensure convert_string_error doesn't conflict with s3 function
Andrew Tridgell [Fri, 25 Mar 2011 03:34:43 +0000 (14:34 +1100)]
charcnv: ensure convert_string_error doesn't conflict with s3 function

use _handle for handle based functions

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Mar 25 05:22:24 CET 2011 on sn-devel-104

8 years agos3-charcnv: fixed converted_size return in fast paths
Andrew Tridgell [Fri, 25 Mar 2011 01:10:41 +0000 (12:10 +1100)]
s3-charcnv: fixed converted_size return in fast paths

8 years agos3-charcnv: removed unused function
Andrew Tridgell [Fri, 25 Mar 2011 00:41:52 +0000 (11:41 +1100)]
s3-charcnv: removed unused function

lp_failed_convert_char() is not needed any more

8 years agolib/util/charset rename iconv_convenience to iconv_handle
Andrew Bartlett [Thu, 24 Mar 2011 21:37:00 +0000 (08:37 +1100)]
lib/util/charset rename iconv_convenience to iconv_handle

This better reflects what this structure is

Andrew Bartlett

8 years agos3-charcnv: convert_string_internal() should not display errors
Andrew Tridgell [Thu, 24 Mar 2011 23:52:32 +0000 (10:52 +1100)]
s3-charcnv: convert_string_internal() should not display errors

debug error display happens in the convert_string() outer function

8 years agos3-string: removed the conv_silent global
Andrew Tridgell [Thu, 24 Mar 2011 04:43:02 +0000 (15:43 +1100)]
s3-string: removed the conv_silent global

use convert_string_error() instead

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agos3-string: removed last use of conv_silent
Andrew Tridgell [Thu, 24 Mar 2011 04:44:03 +0000 (15:44 +1100)]
s3-string: removed last use of conv_silent

This replaces the push_ascii_nstring() implementation with a call to
convert_string_error()

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agos3-charcnv Add convert_string_error()
Andrew Bartlett [Thu, 24 Mar 2011 22:15:06 +0000 (09:15 +1100)]
s3-charcnv Add convert_string_error()

This function returns errors rather than printing them.

Andrew Bartlett

8 years agocharcnv: added convert_string_error()
Andrew Tridgell [Thu, 24 Mar 2011 04:59:26 +0000 (15:59 +1100)]
charcnv: added convert_string_error()

this will allow us to remove conv_silent

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agos3-includes: fixed CONST_DISCARD() to actually discard const
Andrew Tridgell [Thu, 24 Mar 2011 04:40:45 +0000 (15:40 +1100)]
s3-includes: fixed CONST_DISCARD() to actually discard const

a cast is not enough

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agounistr: moved some UCS2 macros into util_unistr
Andrew Tridgell [Thu, 24 Mar 2011 04:39:27 +0000 (15:39 +1100)]
unistr: moved some UCS2 macros into util_unistr

we need to move towards eliminating smb_ucs2_t. This moves a couple of
the related macros into the only file they are used in

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agolibcli: created smb_constants.h
Andrew Tridgell [Thu, 24 Mar 2011 04:35:28 +0000 (15:35 +1100)]
libcli: created smb_constants.h

this starts the (long!) process of moving some of the SMB constants
into common files. This just moves the FLAGS2_ defines, which are
needed for common string routines (for FLAGS2_UNICODE_STRINGS)

8 years agotdb: rename convert_string() to tdb_convert_string()
Andrew Tridgell [Thu, 24 Mar 2011 04:33:39 +0000 (15:33 +1100)]
tdb: rename convert_string() to tdb_convert_string()

this prevents a conflict with the convert_string() in samba

8 years agos3-libsmb: work our correct length for EA strings
Andrew Tridgell [Thu, 24 Mar 2011 03:45:27 +0000 (14:45 +1100)]
s3-libsmb: work our correct length for EA strings

8 years agos3-string: sec_len==-1 support is no longer needed
Andrew Tridgell [Thu, 24 Mar 2011 02:00:05 +0000 (13:00 +1100)]
s3-string: sec_len==-1 support is no longer needed

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agos3-dfs: removed the last user of sec_len==-1 in pull_*_base_talloc()
Andrew Tridgell [Thu, 24 Mar 2011 02:00:37 +0000 (13:00 +1100)]
s3-dfs: removed the last user of sec_len==-1 in pull_*_base_talloc()

hopefully there aren't any others lurking in the code

8 years agos3-lib: make pull_ucs2_base_talloc static
Andrew Tridgell [Thu, 24 Mar 2011 01:09:03 +0000 (12:09 +1100)]
s3-lib: make pull_ucs2_base_talloc static

it is local to charcnv.c

8 years agolib: remove unused pieces of string_wrappers.h
Andrew Tridgell [Thu, 24 Mar 2011 00:42:40 +0000 (11:42 +1100)]
lib: remove unused pieces of string_wrappers.h

8 years agolib: move the string wrappers from source3/include to common lib/util
Andrew Tridgell [Thu, 24 Mar 2011 00:40:43 +0000 (11:40 +1100)]
lib: move the string wrappers from source3/include to common lib/util

this will allow the common charcnv library to use the string wrappers

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agos3-string: moved fstring functions into their own file
Andrew Tridgell [Thu, 24 Mar 2011 04:56:26 +0000 (15:56 +1100)]
s3-string: moved fstring functions into their own file

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agos3:dbwrap_ctdb: fix non-locked fetch on persistent db's causing corruption
Michael Adam [Thu, 24 Mar 2011 23:29:42 +0000 (00:29 +0100)]
s3:dbwrap_ctdb: fix non-locked fetch on persistent db's causing corruption

When doing a non-locking fetch on a record of a persistent db when no
transaction is running, the old behaviour was to fetch locally and
do a ctdb call when the record was not found in the local db.
The call is useless for persistent dbs anyway since they are only
written to using transactions and hence kept in sync, but it is
also harmful, because a ctdb call will bump the record RSN when it
does actually migrate the record from one node to another.

Recently, ctdb has been changed to make all calls do a migration.
This uncovered the client misbehaviour for persistent dbs, because
now _each_ non-locking fetch will render the persistent db inconsistent:
A subsequent transaction which touches the record in question will
fail because the RSNs are out of sync.

This patch fixes this old bug.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Mar 25 01:26:32 CET 2011 on sn-devel-104

8 years agos3-charcnv: remove unused labels.
Günther Deschner [Thu, 24 Mar 2011 22:02:36 +0000 (23:02 +0100)]
s3-charcnv: remove unused labels.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Mar 24 23:54:25 CET 2011 on sn-devel-104

8 years agos3-rpc_server: remove two uneeded include registry/reg_parse_prs.h
Günther Deschner [Thu, 24 Mar 2011 21:29:18 +0000 (22:29 +0100)]
s3-rpc_server: remove two uneeded include registry/reg_parse_prs.h

Guenther

8 years agos3-ldapsam: fix ldapsam_create_user() with existing posix accounts.
Günther Deschner [Thu, 24 Mar 2011 17:07:23 +0000 (18:07 +0100)]
s3-ldapsam: fix ldapsam_create_user() with existing posix accounts.

We were not taking into account the existing posix attributes and thus failed
while trying to add a 2nd uid attribute.

Found by Sumit.

Guenther

8 years agos3-netapi: use cli_get_session_key() in netapi.
Günther Deschner [Thu, 24 Mar 2011 21:14:20 +0000 (22:14 +0100)]
s3-netapi: use cli_get_session_key() in netapi.

Guenther

8 years agoFix bug 8021 - Incorrect string termination in volume/volume_name for TRANS2-QUERY_FS...
Volodymyr Khomenko [Thu, 24 Mar 2011 21:20:28 +0000 (14:20 -0700)]
Fix bug 8021 - Incorrect string termination in volume/volume_name for TRANS2-QUERY_FS_INFO/Info Volume.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Mar 24 23:07:09 CET 2011 on sn-devel-104

8 years agoFix is_myname_or_ipaddr() to be robust against strange DNS setups.
Jeremy Allison [Thu, 24 Mar 2011 19:11:02 +0000 (12:11 -0700)]
Fix is_myname_or_ipaddr() to be robust against strange DNS setups.

If IPv6 DNS names are turned on, but Samba isn't configured to
listen on an IPv6 interface, then is_myname_or_ipaddr() can return
false on a valid DNS name that it should detect is our own. If the
IPv6 addr is returned by preference, then looking at the first addr
only causes is_myname_or_ipaddr() to fail. We need to look at all the
addresses returned by the DNS lookup and check all of them against
our interface list. This is an order N^2 lookup, but there shouldn't
be enough addresses to make this a practical problem.

Jeremy.

8 years agos3-epmapper: fix vars init and return errors
Simo Sorce [Thu, 24 Mar 2011 15:49:27 +0000 (11:49 -0400)]
s3-epmapper: fix vars init and return errors

Properly initialize variables at each cycle.
Convert to the right error when returning EPMAPPER ones.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Thu Mar 24 20:43:49 CET 2011 on sn-devel-104

8 years agolibrpc: Return an error if we a broken floor.
Andreas Schneider [Thu, 24 Mar 2011 12:45:32 +0000 (13:45 +0100)]
librpc: Return an error if we a broken floor.

Pair-Programmed-With: Simo Sorce <idra@samba.org>

8 years agocleanup: fix some trailing spaces
Simo Sorce [Thu, 24 Mar 2011 13:21:11 +0000 (09:21 -0400)]
cleanup: fix some trailing spaces

8 years agos3-epmapper: Fix allocation of data on the wrong context
Simo Sorce [Thu, 24 Mar 2011 12:23:48 +0000 (08:23 -0400)]
s3-epmapper: Fix allocation of data on the wrong context

p->mem_ctx is the short-lived per request context, while this data is long
lived, allocate on p instead.

8 years agos3-epmapper: Make sure we work on a description duplicate.
Andreas Schneider [Thu, 24 Mar 2011 13:39:56 +0000 (14:39 +0100)]
s3-epmapper: Make sure we work on a description duplicate.

8 years agolibrpc: Added a dcerpc_binding_dup() function.
Andreas Schneider [Thu, 24 Mar 2011 13:39:37 +0000 (14:39 +0100)]
librpc: Added a dcerpc_binding_dup() function.

8 years agos3-epmapper: Refactor the cleanup of endpoints.
Andreas Schneider [Thu, 24 Mar 2011 12:07:54 +0000 (13:07 +0100)]
s3-epmapper: Refactor the cleanup of endpoints.

8 years agos3-epmapper: Use strcmp instead of strequal and check IPv6.
Andreas Schneider [Thu, 24 Mar 2011 12:07:05 +0000 (13:07 +0100)]
s3-epmapper: Use strcmp instead of strequal and check IPv6.

8 years agos3-epmapper: Increase debug levels.
Andreas Schneider [Thu, 24 Mar 2011 09:44:14 +0000 (10:44 +0100)]
s3-epmapper: Increase debug levels.

8 years agos3: Fix some errno assignments in SMBC_opendir_ctx
Volker Lendecke [Thu, 24 Mar 2011 15:03:13 +0000 (16:03 +0100)]
s3: Fix some errno assignments in SMBC_opendir_ctx

Do the assignment as the last action to make sure it's not overwritten

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Mar 24 17:31:57 CET 2011 on sn-devel-104

8 years agos3: Fix Coverity ID 2325: RESOURCE_LEAK
Volker Lendecke [Thu, 24 Mar 2011 14:59:55 +0000 (15:59 +0100)]
s3: Fix Coverity ID 2325: RESOURCE_LEAK

8 years agocharcnv: removed the allow_badcharcnv and allow_bad_conv options to convert_string*()
Andrew Tridgell [Wed, 23 Mar 2011 23:59:41 +0000 (10:59 +1100)]
charcnv: removed the allow_badcharcnv and allow_bad_conv options to convert_string*()

we shouldn't accept bad multi-byte strings, it just hides problems

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104

8 years agocharset: remove another allow_badcharcnv check
Andrew Tridgell [Wed, 23 Mar 2011 06:12:05 +0000 (17:12 +1100)]
charset: remove another allow_badcharcnv check

better to fail only if there is a bad character

8 years agos3-prototypes: remove protos of some dead functions.
Günther Deschner [Wed, 23 Mar 2011 23:00:22 +0000 (00:00 +0100)]
s3-prototypes: remove protos of some dead functions.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Mar 24 00:52:01 CET 2011 on sn-devel-104