kai/samba.git
8 years agoselftest: Move Samba4 selftest wscript to the top level
Andrew Bartlett [Fri, 15 Apr 2011 06:42:35 +0000 (16:42 +1000)]
selftest: Move Samba4 selftest wscript to the top level

8 years agoselftest Add binary mappings for samba3 selftest
Andrew Bartlett [Fri, 15 Apr 2011 06:39:53 +0000 (16:39 +1000)]
selftest Add binary mappings for samba3 selftest

This will help us have a top level 'make test', working around the
fact that the --eanble-s3build has different names for some of these
binaries, without fixing the names forever (we can just change the
mapping later).

Andrew Bartlett

8 years agoselftest: Start using the binary mapping at the python layer as well
Andrew Bartlett [Fri, 15 Apr 2011 05:17:58 +0000 (15:17 +1000)]
selftest: Start using the binary mapping at the python layer as well

8 years agoselftest: Remove duplication between BUILDIR and BINDIR
Andrew Bartlett [Fri, 15 Apr 2011 02:41:22 +0000 (12:41 +1000)]
selftest: Remove duplication between BUILDIR and BINDIR

Just have BINDIR, and have it default to ./bin

Andrew Bartlett

8 years agoselftest: Remove unused BUILDDIR_ABS environment variable
Andrew Bartlett [Fri, 15 Apr 2011 02:28:21 +0000 (12:28 +1000)]
selftest: Remove unused BUILDDIR_ABS environment variable

8 years agoselftest: Provide a single bindir_path function across all targets
Andrew Bartlett [Fri, 15 Apr 2011 02:27:30 +0000 (12:27 +1000)]
selftest: Provide a single bindir_path function across all targets

This will allow a mapping to be made between things like smbtorture4
-> smbtorture that is correct for the different build environments.

Andrew Bartlett

8 years agoTrying to track down the SMB2 error. Add an invariant test.
Jeremy Allison [Fri, 15 Apr 2011 23:30:17 +0000 (16:30 -0700)]
Trying to track down the SMB2 error. Add an invariant test.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Apr 16 02:15:38 CEST 2011 on sn-devel-104

8 years agoUse handle based xattr set if available.
Jeremy Allison [Fri, 15 Apr 2011 17:49:34 +0000 (10:49 -0700)]
Use handle based xattr set if available.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Apr 15 22:11:12 CEST 2011 on sn-devel-104

8 years agoEnsure vfs_chown_fsp() is safe against races.
Jeremy Allison [Fri, 15 Apr 2011 19:21:39 +0000 (12:21 -0700)]
Ensure vfs_chown_fsp() is safe against races.

8 years agos3-waf: only LIBNMB needs to linked against -lresolv.
Günther Deschner [Fri, 15 Apr 2011 13:36:58 +0000 (15:36 +0200)]
s3-waf: only LIBNMB needs to linked against -lresolv.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Apr 15 17:02:16 CEST 2011 on sn-devel-104

8 years agos4-dsdb: Add more information on why we don't check the SD control
Matthieu Patou [Thu, 14 Apr 2011 19:03:50 +0000 (23:03 +0400)]
s4-dsdb: Add more information on why we don't check the SD control

Signed-off-by: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Fri Apr 15 16:16:27 CEST 2011 on sn-devel-104

8 years agos4-dsdb: If current attribute list is empty use the one from the request
Matthieu Patou [Thu, 14 Apr 2011 18:02:48 +0000 (22:02 +0400)]
s4-dsdb: If current attribute list is empty use the one from the request

This will avoid overwritting attribute list made by upper modules.

Signed-off-by: Nadezhda Ivanova <nivanova@samba.org>
8 years agos3-build: fix the --with-profiling-data build on mac os x.
Günther Deschner [Fri, 15 Apr 2011 10:39:15 +0000 (12:39 +0200)]
s3-build: fix the --with-profiling-data build on mac os x.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Apr 15 13:33:43 CEST 2011 on sn-devel-104

8 years agos3-waf: try to fix the non-ldap-but-krb5 build.
Günther Deschner [Fri, 15 Apr 2011 10:37:55 +0000 (12:37 +0200)]
s3-waf: try to fix the non-ldap-but-krb5 build.

Guenther

8 years agos3: Fix bug 8066, wrong output in smbget
Volker Lendecke [Thu, 7 Apr 2011 20:03:49 +0000 (22:03 +0200)]
s3: Fix bug 8066, wrong output in smbget

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Apr 15 09:32:55 CEST 2011 on sn-devel-104

8 years agos3-krb5 Move #ifdef HAVE_KRB5 above #include of libcli/auth/krb5_wrap.h
Andrew Bartlett [Thu, 14 Apr 2011 22:29:45 +0000 (08:29 +1000)]
s3-krb5 Move #ifdef HAVE_KRB5 above #include of libcli/auth/krb5_wrap.h

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Apr 15 01:22:51 CEST 2011 on sn-devel-104

8 years agoEnsure change_dir_owner_to_parent() can't be raced.
Jeremy Allison [Thu, 14 Apr 2011 20:56:05 +0000 (13:56 -0700)]
Ensure change_dir_owner_to_parent() can't be raced.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Apr 14 23:39:55 CEST 2011 on sn-devel-104

8 years agoFix bug #8083 - "inherit owner = yes" doesn't interact correctly with vfs_acl_xattr...
Jeremy Allison [Thu, 14 Apr 2011 20:20:08 +0000 (13:20 -0700)]
Fix bug #8083 - "inherit owner = yes" doesn't interact correctly with vfs_acl_xattr or vfs_acl_tdb module.

If "inherit owner = yes", pass in the directory owner and group
owner as the target for CREATOR_OWNER and CREATOR_GROUP substitutions,
and also as the owner and primary group of the new security descriptor
being applied to the object.

Jeremy.

8 years agoOptimization for change_file_owner_to_parent() and change_dir_owner_to_parent()
Jeremy Allison [Thu, 14 Apr 2011 19:49:58 +0000 (12:49 -0700)]
Optimization for change_file_owner_to_parent() and change_dir_owner_to_parent()

Don't do the chown if the owner is already correct.

8 years agos3: Fix Coverity ID 2471: UNINIT
Volker Lendecke [Tue, 12 Apr 2011 08:48:03 +0000 (10:48 +0200)]
s3: Fix Coverity ID 2471: UNINIT

Signed-off-by: Günther Deschner <gd@samba.org>
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Apr 14 16:22:58 CEST 2011 on sn-devel-104

8 years agos3: Fix smbd with the async echo responder
Volker Lendecke [Thu, 14 Apr 2011 12:05:43 +0000 (14:05 +0200)]
s3: Fix smbd with the async echo responder

We need to read from the echo socket, pass the socket to read
from down to the read routines

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Apr 14 15:34:36 CEST 2011 on sn-devel-104

8 years agos3-build: make sure we pick up system tdb and talloc via #include.
Günther Deschner [Thu, 14 Apr 2011 09:43:31 +0000 (11:43 +0200)]
s3-build: make sure we pick up system tdb and talloc via #include.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Apr 14 12:56:28 CEST 2011 on sn-devel-104

8 years agos3-includes: move readahead prototype to its only user.
Günther Deschner [Wed, 13 Apr 2011 22:52:45 +0000 (00:52 +0200)]
s3-includes: move readahead prototype to its only user.

Guenther

8 years agos3: Fix a typo
Volker Lendecke [Thu, 14 Apr 2011 09:06:00 +0000 (11:06 +0200)]
s3: Fix a typo

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Apr 14 11:55:56 CEST 2011 on sn-devel-104

8 years agolibcli/auth Fix compile on hosts without krb5
Andrew Bartlett [Thu, 14 Apr 2011 08:21:45 +0000 (18:21 +1000)]
libcli/auth Fix compile on hosts without krb5

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 14 11:08:49 CEST 2011 on sn-devel-104

8 years agolib/util Move alpha_strcpy() from s3 into common code
Andrew Bartlett [Thu, 14 Apr 2011 05:48:00 +0000 (15:48 +1000)]
lib/util Move alpha_strcpy() from s3 into common code

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 14 09:21:59 CEST 2011 on sn-devel-104

8 years agos3-auth Rename smb_krb5_open_keytab to avoid a conflict with s3
Andrew Bartlett [Thu, 14 Apr 2011 05:42:42 +0000 (15:42 +1000)]
s3-auth Rename smb_krb5_open_keytab to avoid a conflict with s3

The s3 function doesn't use the keytab_container concept.

Andrew Bartlett

8 years agolibcli/auth Move krb5 wrapper functions from s3 into common
Andrew Bartlett [Thu, 14 Apr 2011 05:40:28 +0000 (15:40 +1000)]
libcli/auth Move krb5 wrapper functions from s3 into common

This requires a small rework of the build system to ensure that the
correct #define statements are made in both the s3 and top level
builds.  We now define the various HAVE_ macros in config.h at all
times, using heimdal_build/wscript_configure when that is in use.

Andrew Bartlett

8 years agos3-lib Remove very unused (#if 0) strncpyn
Andrew Bartlett [Thu, 14 Apr 2011 02:50:19 +0000 (12:50 +1000)]
s3-lib Remove very unused (#if 0) strncpyn

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 14 06:27:31 CEST 2011 on sn-devel-104

8 years agos3-lib Remove unused string_append
Andrew Bartlett [Thu, 14 Apr 2011 02:47:45 +0000 (12:47 +1000)]
s3-lib Remove unused string_append

8 years agos3-lib Move unix_strlower and unix_strupper to their only users.
Andrew Bartlett [Thu, 14 Apr 2011 02:42:52 +0000 (12:42 +1000)]
s3-lib Move unix_strlower and unix_strupper to their only users.

8 years agos3-lib Remove unused str_ascii_charnum()
Andrew Bartlett [Thu, 14 Apr 2011 02:34:51 +0000 (12:34 +1000)]
s3-lib Remove unused str_ascii_charnum()

8 years agos3-lib Move strisnormal to it's only user in mangle_hash.c
Andrew Bartlett [Thu, 14 Apr 2011 02:31:18 +0000 (12:31 +1000)]
s3-lib Move strisnormal to it's only user in mangle_hash.c

8 years agolibcli/ldap Re-add ldap_ndr.h as a public header
Andrew Bartlett [Thu, 14 Apr 2011 02:12:00 +0000 (12:12 +1000)]
libcli/ldap Re-add ldap_ndr.h as a public header

as noticed by Brad Hards

Andrew Bartlett

8 years agos4/libcli: do not use netbios name in NTLMv2 blobs w/o spnego
Christian Ambach [Thu, 7 Apr 2011 12:05:04 +0000 (14:05 +0200)]
s4/libcli: do not use netbios name in NTLMv2 blobs w/o spnego

I have seen domain controllers rejecting NTLMv2 blobs presented to
NetrLogonSamLogonEx with LOGON_FAILURE when the MsvAvNbComputerName
was a FQDN or an IP address

I have not seen this field in NTLMv2 blobs send by Windows clients
when extended security was not available, so omitting the field
makes Samba similar to Windows.

This prevents errors with some smbtorture testcases that disable
spnego and when a target name is specified that is not a valid
netbios name.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 14 02:19:08 CEST 2011 on sn-devel-104

8 years agolibcli: allow exclusion of netbios name in NTLMV2 blob
Christian Ambach [Thu, 7 Apr 2011 12:01:50 +0000 (14:01 +0200)]
libcli: allow exclusion of netbios name in NTLMV2 blob

when no hostname is given, leave away the MsvAvNbComputerName part
of the ntlmv2 blob

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
8 years agos4/libcli: do not announce NT error code support when it is disabled
Christian Ambach [Wed, 9 Mar 2011 12:48:06 +0000 (13:48 +0100)]
s4/libcli: do not announce NT error code support when it is disabled

when the support of NT error codes has been disabled in the options of a
CLI connection, support for them should not be announced during
protocol negotiation

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
8 years agos3: only include smb profiling where needed.
Günther Deschner [Wed, 13 Apr 2011 22:36:23 +0000 (00:36 +0200)]
s3: only include smb profiling where needed.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Apr 14 01:31:39 CEST 2011 on sn-devel-104

8 years agos3-waf: add --with-profiling-data configure option.
Günther Deschner [Wed, 13 Apr 2011 22:17:29 +0000 (00:17 +0200)]
s3-waf: add --with-profiling-data configure option.

Guenther

8 years agos3: fix the build of --with-profiling-data.
Günther Deschner [Wed, 13 Apr 2011 22:04:08 +0000 (00:04 +0200)]
s3: fix the build of --with-profiling-data.

Guenther

8 years agos3-includes: only include acl prototypes when needed.
Günther Deschner [Wed, 13 Apr 2011 21:48:33 +0000 (23:48 +0200)]
s3-includes: only include acl prototypes when needed.

Guenther

8 years agos3-includes: absolutely no need to globally include debugparse.h
Günther Deschner [Wed, 13 Apr 2011 21:34:51 +0000 (23:34 +0200)]
s3-includes: absolutely no need to globally include debugparse.h

Guenther

8 years agos3-includes: include lib/util/debug.h headers in includes.h not smb.h
Günther Deschner [Wed, 13 Apr 2011 21:34:25 +0000 (23:34 +0200)]
s3-includes: include lib/util/debug.h headers in includes.h not smb.h

Guenther

8 years agos3-includes: remove unused schema_types enum.
Günther Deschner [Wed, 13 Apr 2011 21:33:49 +0000 (23:33 +0200)]
s3-includes: remove unused schema_types enum.

Guenther

8 years agos3-includes: move struct pipe_open_rec to srvsvc rpc server.
Günther Deschner [Wed, 13 Apr 2011 21:03:56 +0000 (23:03 +0200)]
s3-includes: move struct pipe_open_rec to srvsvc rpc server.

Guenther

8 years agoFix WAF build for sids2xids.
Jeremy Allison [Wed, 13 Apr 2011 21:49:49 +0000 (14:49 -0700)]
Fix WAF build for sids2xids.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Apr 14 00:33:53 CEST 2011 on sn-devel-104

8 years agos3: Add a test for sid2xids
Volker Lendecke [Mon, 11 Apr 2011 15:26:35 +0000 (17:26 +0200)]
s3: Add a test for sid2xids

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Add some debug to winbindd_sids_to_xids
Volker Lendecke [Tue, 12 Apr 2011 11:32:20 +0000 (13:32 +0200)]
s3: Add some debug to winbindd_sids_to_xids

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Use wbcSidsToUnixIds in create_local_token
Volker Lendecke [Wed, 23 Mar 2011 17:31:38 +0000 (18:31 +0100)]
s3: Use wbcSidsToUnixIds in create_local_token

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agonsswitch: Add wbinfo --sids-to-unix-ids
Volker Lendecke [Wed, 23 Mar 2011 17:31:17 +0000 (18:31 +0100)]
nsswitch: Add wbinfo --sids-to-unix-ids

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agolibwbclient: Add wbcSidsToUnixIds
Volker Lendecke [Wed, 23 Mar 2011 17:30:32 +0000 (18:30 +0100)]
libwbclient: Add wbcSidsToUnixIds

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Export WINBINDD_SIDS_TO_XIDS via the winbind pipe
Volker Lendecke [Wed, 23 Mar 2011 17:29:45 +0000 (18:29 +0100)]
s3: Export WINBINDD_SIDS_TO_XIDS via the winbind pipe

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Add wbint_Sids2UnixIDs idl & implementation
Volker Lendecke [Wed, 23 Mar 2011 17:18:13 +0000 (18:18 +0100)]
s3: Add wbint_Sids2UnixIDs idl & implementation

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Make idmap_find_domain public
Volker Lendecke [Wed, 23 Mar 2011 17:15:34 +0000 (18:15 +0100)]
s3: Make idmap_find_domain public

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Add is_domain_online
Volker Lendecke [Tue, 22 Mar 2011 15:37:41 +0000 (16:37 +0100)]
s3: Add is_domain_online

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agonsswitch: wbinfo --lookup-sids
Volker Lendecke [Wed, 9 Mar 2011 15:36:20 +0000 (16:36 +0100)]
nsswitch: wbinfo --lookup-sids

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agolib: Move next_token next to next_token_talloc
Volker Lendecke [Wed, 9 Mar 2011 15:34:49 +0000 (16:34 +0100)]
lib: Move next_token next to next_token_talloc

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agolibwbclient: Add wbcLookupSids
Volker Lendecke [Tue, 8 Mar 2011 17:01:21 +0000 (18:01 +0100)]
libwbclient: Add wbcLookupSids

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Add winbindd_lookupsids
Volker Lendecke [Tue, 8 Mar 2011 13:31:44 +0000 (14:31 +0100)]
s3: Add winbindd_lookupsids

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Add wb_lookupsids
Volker Lendecke [Mon, 7 Mar 2011 12:40:30 +0000 (13:40 +0100)]
s3: Add wb_lookupsids

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Add wbint_LookupSids
Volker Lendecke [Fri, 11 Mar 2011 11:48:11 +0000 (12:48 +0100)]
s3: Add wbint_LookupSids

This will be called from wb_lookupsids to query remote DCs via lsa

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Make parse_sidlist public
Volker Lendecke [Tue, 8 Mar 2011 13:23:15 +0000 (14:23 +0100)]
s3: Make parse_sidlist public

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Simplify parse_sidlist
Volker Lendecke [Mon, 7 Mar 2011 19:27:30 +0000 (20:27 +0100)]
s3: Simplify parse_sidlist

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agoAdd dom_sid_parse_endp
Volker Lendecke [Mon, 7 Mar 2011 19:16:13 +0000 (20:16 +0100)]
Add dom_sid_parse_endp

This returns a pointer to the first non-parsed character, along the lines of
strtoul for example.

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agoDon't print "success" message after error message in change_file_owner_to_parent...
Jeremy Allison [Tue, 12 Apr 2011 23:32:37 +0000 (16:32 -0700)]
Don't print "success" message after error message in change_file_owner_to_parent(). Remove "goto" in change_dir_owner_to_parent().

8 years agos3-build: finally remove references to ndr and dcerpc headers that were included...
Günther Deschner [Wed, 13 Apr 2011 12:32:55 +0000 (14:32 +0200)]
s3-build: finally remove references to ndr and dcerpc headers that were included globally.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Apr 13 23:07:05 CEST 2011 on sn-devel-104

8 years agos3-rpc_client: add and use rpc_client/rpc_client.h.
Günther Deschner [Wed, 13 Apr 2011 12:32:16 +0000 (14:32 +0200)]
s3-rpc_client: add and use rpc_client/rpc_client.h.

Guenther

8 years agos3-netapi: remove two shadowed variables.
Günther Deschner [Wed, 13 Apr 2011 11:33:30 +0000 (13:33 +0200)]
s3-netapi: remove two shadowed variables.

Guenther

8 years agos3:WHATSNEW.txt: remove the "strict allocate" default value
Stefan Metzmacher [Wed, 13 Apr 2011 18:33:45 +0000 (20:33 +0200)]
s3:WHATSNEW.txt: remove the "strict allocate" default value

commit dc36d75d5fddaa351025e8eb8140f401b66aeb9d
reverted the change to true, because it makes Samba
unusable on systems without Linux and a modern Filesystem.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Apr 13 21:21:10 CEST 2011 on sn-devel-104

8 years agos3-cli_pipe: fix timeout in rpc_pipe_open_tcp_port().
Günther Deschner [Wed, 13 Apr 2011 15:41:36 +0000 (17:41 +0200)]
s3-cli_pipe: fix timeout in rpc_pipe_open_tcp_port().

Make sure we use a timeout of 60 seconds, not 60 milliseconds...

This prevented us from successfully using the ncacn_ip_tcp client in a lot of
places, I guess.

Guenther

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Apr 13 18:59:19 CEST 2011 on sn-devel-104

8 years agos3-util_sock: very brief documentation for open_socket_out().
Günther Deschner [Wed, 13 Apr 2011 15:35:44 +0000 (17:35 +0200)]
s3-util_sock: very brief documentation for open_socket_out().

The most important bit is to document that timeout is in MILLIseconds, not
seconds.

Guenther

8 years agos3: Make send_nt_replies() static
Volker Lendecke [Wed, 13 Apr 2011 13:40:15 +0000 (15:40 +0200)]
s3: Make send_nt_replies() static

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Apr 13 16:25:29 CEST 2011 on sn-devel-104

8 years agotalloc: fix compiler warnings with -Wc++-compat
Stefan Metzmacher [Wed, 13 Apr 2011 11:40:29 +0000 (13:40 +0200)]
talloc: fix compiler warnings with -Wc++-compat

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Apr 13 14:33:23 CEST 2011 on sn-devel-104

8 years agos3: Fix Coverity ID 2470: STRAY_SEMICOLON
Volker Lendecke [Tue, 12 Apr 2011 08:53:36 +0000 (10:53 +0200)]
s3: Fix Coverity ID 2470: STRAY_SEMICOLON

Signed-off-by: Günther Deschner <gd@samba.org>
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Apr 13 12:57:43 CEST 2011 on sn-devel-104

8 years agos3: Use talloc_tos() in the S3 build
Volker Lendecke [Wed, 13 Apr 2011 06:35:00 +0000 (08:35 +0200)]
s3: Use talloc_tos() in the S3 build

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Apr 13 09:30:55 CEST 2011 on sn-devel-104

8 years agobuild: Bring DYNCONFIG into samba-util library to avoid symbol duplication
Andrew Bartlett [Wed, 13 Apr 2011 05:26:30 +0000 (15:26 +1000)]
build: Bring DYNCONFIG into samba-util library to avoid symbol duplication

When this was depended on directly as a subsystem, it ended up in
multiple libraries.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr 13 08:39:35 CEST 2011 on sn-devel-104

8 years agos3-build Remove distinct LOCALEDIR subsystem
Andrew Bartlett [Wed, 13 Apr 2011 05:13:45 +0000 (15:13 +1000)]
s3-build Remove distinct LOCALEDIR subsystem

This is no different to the rest of dynconfig, and so should be dealt
with there.

Andrew Bartlett

8 years agos4-test: added a test for E_deshash()
Andrew Tridgell [Wed, 13 Apr 2011 04:40:27 +0000 (14:40 +1000)]
s4-test: added a test for E_deshash()

this particularly checks the boundary conditions near passwords of
length 14 characters

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Apr 13 07:31:55 CEST 2011 on sn-devel-104

8 years agos3-charcnv: Move convert_string() et al to lib/util/charset
Andrew Bartlett [Tue, 12 Apr 2011 04:01:41 +0000 (14:01 +1000)]
s3-charcnv: Move convert_string() et al to lib/util/charset

This is the first step to this being the common convert_string
implementation.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolibcli/auth Use convert_string_error to check LM hash calculation.
Andrew Bartlett [Tue, 12 Apr 2011 01:29:59 +0000 (11:29 +1000)]
libcli/auth Use convert_string_error to check LM hash calculation.

This allows us to know if the LM hash was built correctly or not.

NOTE: talloc_tos() is not available in the common code at this time.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util/charset Add many more charset tests
Andrew Bartlett [Tue, 12 Apr 2011 00:37:24 +0000 (10:37 +1000)]
lib/util/charset Add many more charset tests

This confirms that the behaviour of the convert_string() API (with the
process-wide iconv handle).

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util/charset Add convert_string_error()
Andrew Bartlett [Tue, 12 Apr 2011 00:36:37 +0000 (10:36 +1000)]
lib/util/charset Add convert_string_error()

This adds an interface that matches the source3/ convert string code.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util/charset Make ASCII conversion validate it's input
Andrew Bartlett [Tue, 12 Apr 2011 00:35:43 +0000 (10:35 +1000)]
lib/util/charset Make ASCII conversion validate it's input

We should not just strip the high bits off unicode strings being
converted to ASCII, we need to actually fail the conversion.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos3-selftest Add workaround for RAP test failure
Andrew Bartlett [Wed, 13 Apr 2011 01:37:33 +0000 (11:37 +1000)]
s3-selftest Add workaround for RAP test failure

The rap.sam test reads 0xFFFFFFFF as a string in the level 2
r->HomeDir attribute, which once we start validating ASCII strings
fails.  This restores a unchecked dos charset for this test only,
until it is determined if the client or server RAP code is at fault.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util/charset Rename convert_string test to allow a 'non_handle' test
Andrew Bartlett [Mon, 11 Apr 2011 11:37:01 +0000 (21:37 +1000)]
lib/util/charset Rename convert_string test to allow a 'non_handle' test

A future commit will test (with a subset of tests) the varient of this
function without _handle.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util/charset Add more tests for convert_string_error_handle()
Andrew Bartlett [Mon, 11 Apr 2011 11:36:13 +0000 (21:36 +1000)]
lib/util/charset Add more tests for convert_string_error_handle()

This helps define the semantics of this function very clearly,
particularly for partial and invalid inputs.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util/charset Preserve 'pull' errors even when converting via UTF16
Andrew Bartlett [Mon, 11 Apr 2011 11:34:21 +0000 (21:34 +1000)]
lib/util/charset Preserve 'pull' errors even when converting via UTF16

When we do not have a direct iconv handle between any two charsets, we
must go iva UTF16.  However, we should still return the same buffer
and error code as if we were able to go direct - including the partial
conversion and the error code.

This is important for locating the invalid multibyte character in the
stream, for example.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util/charset Add tests for convert_string_error_handle
Andrew Bartlett [Mon, 11 Apr 2011 10:47:13 +0000 (20:47 +1000)]
lib/util/charset Add tests for convert_string_error_handle

These confirm that the errno is set correctly and that we stop on a
partial multibyte character

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util/charset Add expected values for upper/lower case tests
Andrew Bartlett [Mon, 11 Apr 2011 10:46:42 +0000 (20:46 +1000)]
lib/util/charset Add expected values for upper/lower case tests

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util/charset Fix and add public interface for convert_string_error_handle
Andrew Bartlett [Mon, 11 Apr 2011 10:15:53 +0000 (20:15 +1000)]
lib/util/charset Fix and add public interface for convert_string_error_handle

It makes much more sense for this to match the source3/ interface and
return a bool.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos4/torture Fix calls to charcnv functions to always supply converted_size
Andrew Bartlett [Tue, 12 Apr 2011 08:12:20 +0000 (18:12 +1000)]
s4/torture Fix calls to charcnv functions to always supply converted_size

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util: Make string_replace from s3 common
Andrew Bartlett [Fri, 8 Apr 2011 03:04:26 +0000 (13:04 +1000)]
lib/util: Make string_replace from s3 common

The s4 implementation didn't do multibyte strings, so was only good
for '/' which is known to be safe in all multibyte charsets.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util ucs2_align is identical, put it in common
Andrew Bartlett [Fri, 8 Apr 2011 02:55:28 +0000 (12:55 +1000)]
lib/util ucs2_align is identical, put it in common

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util Move simple string routines into common code.
Andrew Bartlett [Fri, 8 Apr 2011 02:02:40 +0000 (12:02 +1000)]
lib/util Move simple string routines into common code.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util/charset Move source3/lib/util_unistr.c to the common code.
Andrew Bartlett [Tue, 12 Apr 2011 06:31:08 +0000 (16:31 +1000)]
lib/util/charset Move source3/lib/util_unistr.c to the common code.

This file (largely) contains functions to deal with UTF16 strings.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos3-lib Move strdup_w to it's only user in mangle_hash.c
Andrew Bartlett [Tue, 12 Apr 2011 06:55:16 +0000 (16:55 +1000)]
s3-lib Move strdup_w to it's only user in mangle_hash.c

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos3-lib Move isvalid83_w to mangle_hash.c
Andrew Bartlett [Tue, 12 Apr 2011 06:23:17 +0000 (16:23 +1000)]
s3-lib Move isvalid83_w to mangle_hash.c

This means that there is no need for the 'valid.dat' table to be
loaded by anything other than smbd, so the unloader is also removed.

The concept of a 'valid dos character' has been replaced by the hash2
mangle method.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos3-lib make static and remove more _w functions
Andrew Bartlett [Tue, 12 Apr 2011 06:16:22 +0000 (16:16 +1000)]
s3-lib make static and remove more _w functions

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos3-lib Remove unused #define
Andrew Bartlett [Tue, 12 Apr 2011 06:11:13 +0000 (16:11 +1000)]
s3-lib Remove unused #define

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos3-lib Remove unused skip_unibuf()
Andrew Bartlett [Tue, 12 Apr 2011 06:10:57 +0000 (16:10 +1000)]
s3-lib Remove unused skip_unibuf()

Signed-off-by: Andrew Tridgell <tridge@samba.org>