samba.git
8 years agolibcli/named_pipe_auth: add forward declaration in npa_tstream.h.
Günther Deschner [Fri, 29 Apr 2011 21:58:18 +0000 (23:58 +0200)]
libcli/named_pipe_auth: add forward declaration in npa_tstream.h.

Guenther

8 years agos3-proto: move remaining srvsvc protos to own header file.
Günther Deschner [Fri, 29 Apr 2011 21:57:49 +0000 (23:57 +0200)]
s3-proto: move remaining srvsvc protos to own header file.

Guenther

8 years agos3-proto: move remaining spoolss protos to own header file.
Günther Deschner [Fri, 29 Apr 2011 21:47:25 +0000 (23:47 +0200)]
s3-proto: move remaining spoolss protos to own header file.

Guenther

8 years agos3-proto: move more rpc_server prototypes out of proto.h
Günther Deschner [Fri, 29 Apr 2011 21:32:28 +0000 (23:32 +0200)]
s3-proto: move more rpc_server prototypes out of proto.h

Guenther

8 years agos3-rpc_server: remove proto of nonexisting function
Günther Deschner [Fri, 29 Apr 2011 20:43:59 +0000 (22:43 +0200)]
s3-rpc_server: remove proto of nonexisting function
(rpc_pipe_register_commands).

Guenther

8 years agos3-util: move valid_share_pathname() to lib/util.c
Günther Deschner [Fri, 29 Apr 2011 20:34:56 +0000 (22:34 +0200)]
s3-util: move valid_share_pathname() to lib/util.c

Guenther

8 years agos3-proto: move rpc_srv_register protos and structs to town headerfile.
Günther Deschner [Fri, 29 Apr 2011 20:32:12 +0000 (22:32 +0200)]
s3-proto: move rpc_srv_register protos and structs to town headerfile.

Guenther

8 years agos4:libcli/util/nterr: NO_S4U_PROT_SUPPORT and CROSSREALM_DELEGATION_FAILURE
Stefan Metzmacher [Mon, 2 May 2011 10:41:46 +0000 (12:41 +0200)]
s4:libcli/util/nterr: NO_S4U_PROT_SUPPORT and CROSSREALM_DELEGATION_FAILURE

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon May  2 15:02:56 CEST 2011 on sn-devel-104

8 years agos3:libsmb/nterr: NO_S4U_PROT_SUPPORT and CROSSREALM_DELEGATION_FAILURE
Stefan Metzmacher [Mon, 2 May 2011 10:41:46 +0000 (12:41 +0200)]
s3:libsmb/nterr: NO_S4U_PROT_SUPPORT and CROSSREALM_DELEGATION_FAILURE

metze

8 years agolibcli/util/ntstatus: NO_S4U_PROT_SUPPORT and CROSSREALM_DELEGATION_FAILURE
Stefan Metzmacher [Mon, 2 May 2011 10:41:46 +0000 (12:41 +0200)]
libcli/util/ntstatus: NO_S4U_PROT_SUPPORT and CROSSREALM_DELEGATION_FAILURE

metze

8 years agotalloc: use TC_UNDEFINE_SHRINK_CHUNK() instead of TC_INVALIDATE_SHRINK_CHUNK() for...
Stefan Metzmacher [Mon, 2 May 2011 11:50:52 +0000 (13:50 +0200)]
talloc: use TC_UNDEFINE_SHRINK_CHUNK() instead of TC_INVALIDATE_SHRINK_CHUNK() for realloc path

If we optimize on top of raw realloc() we need
TC_INVALIDATE_SHRINK_CHUNK together with TC_UNDEFINE_GROW_CHUNK
(with was missing and caused false positive valgrind warnings).

But that is really slow, as we do a lot of talloc_realloc calls in samba.

That's why we only to TC_UNDEFINE_SHRINK_CHUNK() for now.

metze

8 years agos3: Make name_resolve_bcast return sockaddr_storage
Volker Lendecke [Sat, 30 Apr 2011 17:23:55 +0000 (19:23 +0200)]
s3: Make name_resolve_bcast return sockaddr_storage

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Apr 30 20:40:46 CEST 2011 on sn-devel-104

8 years agos3: Remove ip_sevice from get_ipc_connect_master_ip
Volker Lendecke [Sat, 30 Apr 2011 15:10:35 +0000 (17:10 +0200)]
s3: Remove ip_sevice from get_ipc_connect_master_ip

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Apr 30 18:16:28 CEST 2011 on sn-devel-104

8 years agoprovision: reorganize attributes so that we don't attribute with DN syntax that depen...
Matthieu Patou [Fri, 29 Apr 2011 21:20:32 +0000 (01:20 +0400)]
provision: reorganize attributes so that we don't attribute with DN syntax that depends on non present object

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sat Apr 30 14:51:16 CEST 2011 on sn-devel-104

8 years agoscript/autobuild.py: don't force usage of ccache and gcc
Stefan Metzmacher [Sat, 30 Apr 2011 07:54:43 +0000 (09:54 +0200)]
script/autobuild.py: don't force usage of ccache and gcc

If someone wants to use it, CC="ccache gcc" script/autobuild.py will work.

It also makes it possible to use other compilers than gcc.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Apr 30 13:47:47 CEST 2011 on sn-devel-104

8 years agoscript/autobuild.py: make sure --with-selftest-prefix keeps working
Stefan Metzmacher [Sat, 30 Apr 2011 07:35:56 +0000 (09:35 +0200)]
script/autobuild.py: make sure --with-selftest-prefix keeps working

metze

8 years agoselftest: use env.SELFTEST_PREFIX instead of hardcoded "${srcdir}/st"
Stefan Metzmacher [Fri, 29 Apr 2011 19:12:53 +0000 (21:12 +0200)]
selftest: use env.SELFTEST_PREFIX instead of hardcoded "${srcdir}/st"

metze

8 years agos4:torture/nbt/winsreplication: ignore incoming broadcast messages
Stefan Metzmacher [Sat, 30 Apr 2011 08:14:54 +0000 (10:14 +0200)]
s4:torture/nbt/winsreplication: ignore incoming broadcast messages

This will hopefully fix the flakey behavior of the
samba4.nbt.winsreplication.owned test.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Apr 30 12:45:01 CEST 2011 on sn-devel-104

8 years agos4:torture/nbt/winsreplication: assert the nbt name before the type
Stefan Metzmacher [Sat, 30 Apr 2011 07:40:11 +0000 (09:40 +0200)]
s4:torture/nbt/winsreplication: assert the nbt name before the type

I hope that will make it easier to find problems
with the flakey samba4.nbt.winsreplication.owned test.

metze

8 years agos3-build Add popt dep to fix build on FreeBSD
Andrew Bartlett [Sat, 30 Apr 2011 08:10:17 +0000 (18:10 +1000)]
s3-build Add popt dep to fix build on FreeBSD

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Apr 30 11:42:20 CEST 2011 on sn-devel-104

8 years agolib/util Rename conv_str_size() -> conv_str_size_error()
Andrew Bartlett [Sat, 30 Apr 2011 03:10:18 +0000 (13:10 +1000)]
lib/util Rename conv_str_size() -> conv_str_size_error()

8 years agos4:torture/nbt/winsreplication: use torture macros in order report failures
Stefan Metzmacher [Sat, 30 Apr 2011 07:29:16 +0000 (09:29 +0200)]
s4:torture/nbt/winsreplication: use torture macros in order report failures

This makes sure we can ignore this failures with the "knownfail"
file.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Apr 30 10:37:16 CEST 2011 on sn-devel-104

8 years agos3-lib: Rely on uint64_t in conv_str_size()
Andrew Bartlett [Sat, 30 Apr 2011 02:52:11 +0000 (12:52 +1000)]
s3-lib: Rely on uint64_t in conv_str_size()

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Apr 30 05:58:35 CEST 2011 on sn-devel-104

8 years agokerberos: Only include gssapi/gssapi_krb5.h when available
Andrew Bartlett [Sat, 30 Apr 2011 02:05:25 +0000 (12:05 +1000)]
kerberos: Only include gssapi/gssapi_krb5.h when available

8 years agos3-waf: Add dependency on popt to fix build on FreeBSD
Andrew Bartlett [Sat, 30 Apr 2011 00:50:50 +0000 (10:50 +1000)]
s3-waf: Add dependency on popt to fix build on FreeBSD

8 years agoAdd POSIX O_RDONLY test of a directory for bug #8112 - POSIX extension opens of a...
Jeremy Allison [Fri, 29 Apr 2011 23:18:14 +0000 (16:18 -0700)]
Add POSIX O_RDONLY test of a directory for bug #8112 - POSIX extension opens of a directory are denied with EISDIR.

Don't strip access bits from wire flags when opening a directory.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Apr 30 02:21:24 CEST 2011 on sn-devel-104

8 years agoFix bug #8112 - POSIX extension opens of a directory are denied with EISDIR.
Jeremy Allison [Fri, 29 Apr 2011 23:15:55 +0000 (16:15 -0700)]
Fix bug #8112 - POSIX extension opens of a directory are denied with EISDIR.

Ensure create_options are passed down to SMB_VFS_CREATE_FILE().
Correctly set create_options is SMB_O_DIRECTORY is set or pathname
is known to be a directory.

Jeremy.

8 years agotorture test for bug #8111 - CIFS VFS: unexpected error on SMB posix open.
Jeremy Allison [Fri, 29 Apr 2011 21:27:45 +0000 (14:27 -0700)]
torture test for bug #8111 - CIFS VFS: unexpected error on SMB posix open.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Apr 30 00:33:40 CEST 2011 on sn-devel-104

8 years agoFix bug 8111 - CIFS VFS: unexpected error on SMB posix open
Jeremy Allison [Fri, 29 Apr 2011 21:27:32 +0000 (14:27 -0700)]
Fix bug 8111 - CIFS VFS: unexpected error on SMB posix open

We are conflating the O_CREAT|O_EXCL with the O_TRUNC
processing, they need to be separate. We need to chose
using (O_CREAT|O_EXCL) first, then modify if O_TRUNC is
set. This needs two separate switch statements.

Jeremy

8 years agos3-proto: move more headers to rpc_server/rpc_ncacn_np.h where they origin from.
Günther Deschner [Fri, 29 Apr 2011 14:40:24 +0000 (16:40 +0200)]
s3-proto: move more headers to rpc_server/rpc_ncacn_np.h where they origin from.

Guenther

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

8 years agos3-proto: remove duplicate prototypes.
Günther Deschner [Fri, 29 Apr 2011 14:20:27 +0000 (16:20 +0200)]
s3-proto: remove duplicate prototypes.

Guenther

8 years agos3-rpc_server: remove some unneeded headers.
Günther Deschner [Fri, 29 Apr 2011 14:19:54 +0000 (16:19 +0200)]
s3-rpc_server: remove some unneeded headers.

Guenther

8 years agos3-proto: move rpc_server/rpc_handles.c protos to ntdomain.h
Günther Deschner [Fri, 29 Apr 2011 13:22:29 +0000 (15:22 +0200)]
s3-proto: move rpc_server/rpc_handles.c protos to ntdomain.h

Guenther

8 years agos3-proto: move more librpc prototypes to librpc/rpc/dcerpc.h
Günther Deschner [Fri, 29 Apr 2011 13:13:55 +0000 (15:13 +0200)]
s3-proto: move more librpc prototypes to librpc/rpc/dcerpc.h

Guenther

8 years agos3-proto: remove remaining nss_info prototypes to nss_info.h
Günther Deschner [Fri, 29 Apr 2011 13:02:49 +0000 (15:02 +0200)]
s3-proto: remove remaining nss_info prototypes to nss_info.h

Guenther

8 years agoldb:tdb backend - cache - remove unused "last_attribute" structure member
Matthias Dieter Wallnöfer [Sun, 10 Apr 2011 17:41:34 +0000 (19:41 +0200)]
ldb:tdb backend - cache - remove unused "last_attribute" structure member

Reviewed-by: abartlet
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Apr 29 20:07:27 CEST 2011 on sn-devel-104

8 years agos4:"ldb_connect" calls - proof for "!= LDB_SUCCESS"
Matthias Dieter Wallnöfer [Sun, 10 Apr 2011 18:47:18 +0000 (20:47 +0200)]
s4:"ldb_connect" calls - proof for "!= LDB_SUCCESS"

Reviewed-by: abartlet
8 years agos4:torture/rpc/testjoin.c - use a LDB result constant
Matthias Dieter Wallnöfer [Sun, 10 Apr 2011 18:47:43 +0000 (20:47 +0200)]
s4:torture/rpc/testjoin.c - use a LDB result constant

Reviewed-by: abartlet
8 years agoldb:tools/cmdline.c + tools/ldbtest.c - make use of LDB result constants
Matthias Dieter Wallnöfer [Sun, 10 Apr 2011 17:35:22 +0000 (19:35 +0200)]
ldb:tools/cmdline.c + tools/ldbtest.c - make use of LDB result constants

Reviewed-by: abartlet
8 years agos4:repl_meta_data LDB module - quiet a discard const ptr warning
Matthias Dieter Wallnöfer [Wed, 13 Apr 2011 07:14:44 +0000 (09:14 +0200)]
s4:repl_meta_data LDB module - quiet a discard const ptr warning

8 years agoldb:ldb_controls.c - fix comment indentation
Matthias Dieter Wallnöfer [Sun, 10 Apr 2011 17:24:16 +0000 (19:24 +0200)]
ldb:ldb_controls.c - fix comment indentation

Reviewed-by: abartlet
8 years agos4:token_group.py python test - fix typos
Matthias Dieter Wallnöfer [Fri, 29 Apr 2011 17:03:48 +0000 (19:03 +0200)]
s4:token_group.py python test - fix typos

8 years agos3: Avoid a potential 100% CPU loop in winbindd
Volker Lendecke [Fri, 29 Apr 2011 11:00:14 +0000 (13:00 +0200)]
s3: Avoid a potential 100% CPU loop in winbindd

In the clustering case if ctdb is unhappy, winbindd_reinit_after_fork fails.
This can lead to an endless loop depending on the scheduling of the parent vs
child. Parent forks, child is immediately scheduled and exits. Parent gets
SIGCHLD, parent is then scheduled before it sends the request out to the child.
Parent tries to fork again immediately.

The code before this patch did not really take into account that
reinit_after_fork can fail. The code now sends the result of
winbindd_reinit_after_fork to the parent and the parent only considers the
child alive when it got NT_STATUS_OK.

This was seen in 3.4 winbind. winbind has changed significantly since then, so
it might be possible that this does not happen anymore in exactly this way. But
passing up the status of reinit_after_fork and only consider the child alive
when that's ok is the correct thing to do anyway.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Apr 29 17:58:19 CEST 2011 on sn-devel-104

8 years agos3: Make winbindd_reinit_after_fork return NTSTATUS
Volker Lendecke [Fri, 29 Apr 2011 10:53:13 +0000 (12:53 +0200)]
s3: Make winbindd_reinit_after_fork return NTSTATUS

8 years agos3: In winbind, close parent/child sockets
Volker Lendecke [Thu, 28 Apr 2011 11:26:57 +0000 (13:26 +0200)]
s3: In winbind, close parent/child sockets

This should further reduce fd load in winbind children

8 years agos3-tevent: only include ../lib/util/tevent wrappers where needed.
Günther Deschner [Thu, 28 Apr 2011 15:38:09 +0000 (17:38 +0200)]
s3-tevent: only include ../lib/util/tevent wrappers where needed.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104

8 years agos3-tsocket: only include ../lib/tsocket/tsocket.h where needed.
Günther Deschner [Thu, 28 Apr 2011 15:26:40 +0000 (17:26 +0200)]
s3-tsocket: only include ../lib/tsocket/tsocket.h where needed.

Guenther

8 years agos3-build: remove some unused headers.
Günther Deschner [Thu, 28 Apr 2011 14:37:05 +0000 (16:37 +0200)]
s3-build: remove some unused headers.

Guenther

8 years agos3-ldap Only prototype ldap_init_fd() when we have found it in the libraries
Andrew Bartlett [Fri, 29 Apr 2011 08:43:30 +0000 (18:43 +1000)]
s3-ldap Only prototype ldap_init_fd() when we have found it in the libraries

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Apr 29 11:47:07 CEST 2011 on sn-devel-104

8 years agobuild: put doserr.c into it's own subsystem, so it's no longer a duplicate
Andrew Bartlett [Fri, 29 Apr 2011 06:57:41 +0000 (16:57 +1000)]
build: put doserr.c into it's own subsystem, so it's no longer a duplicate

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Apr 29 10:00:32 CEST 2011 on sn-devel-104

8 years agoselftest: Restore the s3member environment by avoiding smbcacls
Andrew Bartlett [Fri, 29 Apr 2011 05:54:20 +0000 (15:54 +1000)]
selftest: Restore the s3member environment by avoiding smbcacls

This removes the need for acls on the filesystem for simple domain
member tests.  ACL tests should be written at some point...

Andrew Bartlett

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>

8 years agos4-param Rename lp_destructor() -> lpcfg_destructor() for consistency
Andrew Bartlett [Fri, 29 Apr 2011 04:02:16 +0000 (14:02 +1000)]
s4-param Rename lp_destructor() -> lpcfg_destructor() for consistency

8 years agos4-param Rename unused lp_ functions to match param.h
Andrew Bartlett [Fri, 29 Apr 2011 03:58:26 +0000 (13:58 +1000)]
s4-param Rename unused lp_ functions to match param.h

8 years agos4-param Rename volume_label() -> lpcfg_volume_label()
Andrew Bartlett [Fri, 29 Apr 2011 03:30:18 +0000 (13:30 +1000)]
s4-param Rename volume_label() -> lpcfg_volume_label()

8 years agolib/util Re-merge the string_sub() and all_string_sub() from source3
Andrew Bartlett [Fri, 29 Apr 2011 03:20:51 +0000 (13:20 +1000)]
lib/util Re-merge the string_sub() and all_string_sub() from source3

Andrew Bartlett

8 years agolib/util/charset Move strstr_m() to the top level
Andrew Bartlett [Fri, 29 Apr 2011 03:19:41 +0000 (13:19 +1000)]
lib/util/charset Move strstr_m() to the top level

8 years agos4-param Rename private_path() -> lpcfg_private_path()
Andrew Bartlett [Fri, 29 Apr 2011 02:47:11 +0000 (12:47 +1000)]
s4-param Rename private_path() -> lpcfg_private_path()

This is consistent with lock_path()

Andrew Bartlett

8 years agos4-param Remove config_path() -> lpcfg_config_path()
Andrew Bartlett [Fri, 29 Apr 2011 02:46:10 +0000 (12:46 +1000)]
s4-param Remove config_path() -> lpcfg_config_path()

This is consistent with lock_path()

Andrew Bartlett

8 years agos4-param Rename lock_path() -> lpcfg_lock_path()
Andrew Bartlett [Fri, 29 Apr 2011 02:41:45 +0000 (12:41 +1000)]
s4-param Rename lock_path() -> lpcfg_lock_path()

This avoids a conflict with the source3/ lock_path()

8 years agolibcli/smb Move attrib_string in common
Andrew Bartlett [Fri, 29 Apr 2011 02:41:27 +0000 (12:41 +1000)]
libcli/smb Move attrib_string in common

8 years agos3-client Add TALLOC_CTX argument to attrib_string().
Andrew Bartlett [Fri, 29 Apr 2011 02:05:07 +0000 (12:05 +1000)]
s3-client Add TALLOC_CTX argument to attrib_string().

This ensures the caller knows where the memory was allocated.

Andrew Bartlett

8 years agos3-smb Use FILE_ATTRIBUTE_ARCHIVE intead of aARCH
Andrew Bartlett [Fri, 29 Apr 2011 02:00:57 +0000 (12:00 +1000)]
s3-smb Use FILE_ATTRIBUTE_ARCHIVE intead of aARCH

This means we use just one constant for this file attribute.

Andrew Bartlett

8 years agos3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIR
Andrew Bartlett [Fri, 29 Apr 2011 01:57:02 +0000 (11:57 +1000)]
s3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIR

This means we use just one constant for this file attribute.

Andrew Bartlett

8 years agos3-smb Use FILE_ATTRIBUTE_VOLUME intead of aVOLID
Andrew Bartlett [Fri, 29 Apr 2011 01:52:48 +0000 (11:52 +1000)]
s3-smb Use FILE_ATTRIBUTE_VOLUME intead of aVOLID

This means we use just one constant for this file attribute.

Andrew Bartlett

8 years agos3-smb Use FILE_ATTRIBUTE_SYSTEM intead of aSYSTEM
Andrew Bartlett [Fri, 29 Apr 2011 03:23:14 +0000 (13:23 +1000)]
s3-smb Use FILE_ATTRIBUTE_SYSTEM intead of aSYSTEM

This means we use just one constant for this file attribute.

Andrew Bartlett

8 years agos3-smb Use FILE_ATTRIBUTE_HIDDEN intead of aHIDDEN
Andrew Bartlett [Fri, 29 Apr 2011 01:43:35 +0000 (11:43 +1000)]
s3-smb Use FILE_ATTRIBUTE_HIDDEN intead of aHIDDEN

This means we use just one constant for this file attribute.

Andrew Bartlett

8 years agos3-smb Use FILE_ATTRIBUTE_READONLY intead of aRONLY
Andrew Bartlett [Fri, 29 Apr 2011 01:36:14 +0000 (11:36 +1000)]
s3-smb Use FILE_ATTRIBUTE_READONLY intead of aRONLY

This means we use just one constant for this file attribute.

Andrew Bartlett

8 years agolibcli/smb Move FILE_ATTRIBUTE defines to the top level
Andrew Bartlett [Fri, 29 Apr 2011 01:25:56 +0000 (11:25 +1000)]
libcli/smb Move FILE_ATTRIBUTE defines to the top level

8 years agos3-libads Move variables into if (socket_wrapper_dir()) where they are used.
Andrew Bartlett [Thu, 28 Apr 2011 08:12:03 +0000 (18:12 +1000)]
s3-libads Move variables into if (socket_wrapper_dir()) where they are used.

8 years agobuild: Fix kerberos build issues in top level build
Andrew Bartlett [Thu, 28 Apr 2011 06:23:53 +0000 (16:23 +1000)]
build: Fix kerberos build issues in top level build

8 years agos3-ldap Move ldap prototypes to inside #ifdef HAVE_LDAP_H
Andrew Bartlett [Thu, 28 Apr 2011 05:49:21 +0000 (15:49 +1000)]
s3-ldap Move ldap prototypes to inside #ifdef HAVE_LDAP_H

This fixes the build without LDAP development headers.

8 years agoRevert "s4:selftest: skip s3member tests for now"
Stefan Metzmacher [Fri, 29 Apr 2011 05:16:35 +0000 (07:16 +0200)]
Revert "s4:selftest: skip s3member tests for now"

This reverts commit c5034ac3155958c0d3e2a1cfbfc669bc2e869f29.

This doesn't seem to help and isn't needed if the filesystem
has posix acl support.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Apr 29 08:23:01 CEST 2011 on sn-devel-104

8 years agos4:libcli/smb_composite: move smb2_composite_setpathinfo_setinfo_done()
Stefan Metzmacher [Thu, 28 Apr 2011 15:25:18 +0000 (17:25 +0200)]
s4:libcli/smb_composite: move smb2_composite_setpathinfo_setinfo_done()

It should be after smb2_composite_setpathinfo_create_done().

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Apr 28 21:38:53 CEST 2011 on sn-devel-104

8 years agos4:libcli/smb_composite: move smb2_composite_setpathinfo_create_done()
Stefan Metzmacher [Thu, 28 Apr 2011 15:00:26 +0000 (17:00 +0200)]
s4:libcli/smb_composite: move smb2_composite_setpathinfo_create_done()

It should be after smb2_composite_setpathinfo_send().

metze

8 years agos4:libcli/smb_composite: add smb2_composite_setpathinfo_close_done()
Stefan Metzmacher [Thu, 28 Apr 2011 14:58:41 +0000 (16:58 +0200)]
s4:libcli/smb_composite: add smb2_composite_setpathinfo_close_done()

metze

8 years agos4:libcli/smb_composite: better names for smb2_composite_setpathinfo_* funcs and...
Stefan Metzmacher [Thu, 28 Apr 2011 14:42:48 +0000 (16:42 +0200)]
s4:libcli/smb_composite: better names for smb2_composite_setpathinfo_* funcs and vars

metze

8 years agos4:libcli/smb2: let smb2_session_setup_spnego_* use tevent_req
Stefan Metzmacher [Wed, 27 Apr 2011 16:24:01 +0000 (18:24 +0200)]
s4:libcli/smb2: let smb2_session_setup_spnego_* use tevent_req

metze

8 years agos4:libcli/smb2: move smb2_session_setup_spnego_send() to the top
Stefan Metzmacher [Wed, 27 Apr 2011 07:16:52 +0000 (09:16 +0200)]
s4:libcli/smb2: move smb2_session_setup_spnego_send() to the top

smb2_session_setup_spnego_send() should be on the top of
the smb2_session_setup_spnego_* block.

metze

8 years agos4:libcli/smb2: move smb2_connect_tcon_done()
Stefan Metzmacher [Thu, 28 Apr 2011 14:11:50 +0000 (16:11 +0200)]
s4:libcli/smb2: move smb2_connect_tcon_done()

It should be after smb2_connect_session_done().

metze

8 years agos4:libcli/smb2: move smb2_connect_session_done()
Stefan Metzmacher [Thu, 28 Apr 2011 14:09:35 +0000 (16:09 +0200)]
s4:libcli/smb2: move smb2_connect_session_done()

It should be after smb2_connect_negprot_done().

metze

8 years agos4:libcli/smb2: move smb2_connect_negprot_done()
Stefan Metzmacher [Thu, 28 Apr 2011 14:07:49 +0000 (16:07 +0200)]
s4:libcli/smb2: move smb2_connect_negprot_done()

It should be after smb2_connect_socket_done().

metze

8 years agos4:libcli/smb2: move smb2_connect_socket_done()
Stefan Metzmacher [Thu, 28 Apr 2011 14:06:05 +0000 (16:06 +0200)]
s4:libcli/smb2: move smb2_connect_socket_done()

It should be after smb2_connect_resolve_done().

metze

8 years agos4:libcli/smb2: move smb2_connect_resolve_done()
Stefan Metzmacher [Thu, 28 Apr 2011 14:04:19 +0000 (16:04 +0200)]
s4:libcli/smb2: move smb2_connect_resolve_done()

It should be after smb2_connect_send().

metze

8 years agos4:libcli/smb2: rename step functions of smb2_connect_*()
Stefan Metzmacher [Thu, 28 Apr 2011 14:01:26 +0000 (16:01 +0200)]
s4:libcli/smb2: rename step functions of smb2_connect_*()

They should all start with a smb2_connect_ prefix.

metze

8 years agos4:libcli/smb2: convert smb2_connect_*() to tevent_req
Stefan Metzmacher [Wed, 27 Apr 2011 06:57:41 +0000 (08:57 +0200)]
s4:libcli/smb2: convert smb2_connect_*() to tevent_req

metze

8 years agos4:ntvfs/smb2: use sync version of smb2_connect()
Stefan Metzmacher [Wed, 27 Apr 2011 07:05:50 +0000 (09:05 +0200)]
s4:ntvfs/smb2: use sync version of smb2_connect()

We don't use it in an async fashion anyway.

metze

8 years agos4:selftest: skip s3member tests for now
Stefan Metzmacher [Thu, 28 Apr 2011 15:33:17 +0000 (17:33 +0200)]
s4:selftest: skip s3member tests for now

They are flakey, see
http://git.samba.org/autobuild.flakey/2011-04-28-1501/samba4.stdout
http://git.samba.org/autobuild.flakey/2011-04-28-1700/samba4.stdout

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Apr 28 18:42:06 CEST 2011 on sn-devel-104

8 years agos3: Close the winbind client fds after forking
Volker Lendecke [Wed, 27 Apr 2011 15:52:30 +0000 (17:52 +0200)]
s3: Close the winbind client fds after forking

In an overload situation, the winbind helper child process inherits all those
hundreds of fd's which it will never talk to. Close them.

We (Christian Ambach and me) just saw a crash in libkrb5. Christian's analysis
showed that libkrb5 also does select, probably exceeding FD_SETSIZE and
crashing due to that reason. The parent winbind in theory does not do Kerberos
at all, so this should fix that problem.

The crash is interesting because the child process did not really crash.
Somewhere in glibc backtrace() is called, probably due to an assert() or some
explicit consistency check. This then somehow generates a signal probably due
to corrupted memory structures. That signal triggers Samba to again call
backtrace(). This blocks hard on a ptrace_once(). Sorry for the long backtrace
here, but this *is* interesting.

The child process blocking and not really crashing makes the situation worse:
The parent process does not get told the child has crashed and more client
sockets pile up.

This patch is intended to put some relief on this problem by closing the
majority of sockets the parent holds.

(gdb) bt
\#0  0x00002ad686a2b07b in pthread_once () from /lib64/libpthread.so.0
\#1  0x00002ad6867adf87 in backtrace () from /lib64/libc.so.6
\#2  0x00002ad683eab27c in log_stack_trace () at lib/util.c:1580
\#3  0x00002ad683eab34b in smb_panic (why=0x2ad6841c6ec3 "internal error") at lib/util.c:1481
\#4  0x00002ad683e9af3e in fault_report (sig=1) at lib/fault.c:52
\#5  sig_fault (sig=1) at lib/fault.c:75 #6  <signal handler called>
\#7  0x00002ad68673b005 in _int_malloc () from /lib64/libc.so.6
\#8  0x00002ad68673c95d in calloc () from /lib64/libc.so.6
\#9  0x00002ad684503e25 in _dl_new_object () from /lib64/ld-linux-x86-64.so.2
\#10 0x00002ad6844ffadc in _dl_map_object_from_fd () from /lib64/ld-linux-x86-64.so.2
\#11 0x00002ad684501d43 in _dl_map_object () from /lib64/ld-linux-x86-64.so.2
\#12 0x00002ad68450ac8d in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
\#13 0x00002ad684506ed6 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
\#14 0x00002ad68450a68c in _dl_open () from /lib64/ld-linux-x86-64.so.2
\#15 0x00002ad6867d0ba0 in do_dlopen () from /lib64/libc.so.6
\#16 0x00002ad684506ed6 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
\#17 0x00002ad6867d0d07 in __libc_dlopen_mode () from /lib64/libc.so.6
\#18 0x00002ad6867adeea in init () from /lib64/libc.so.6
\#19 0x00002ad686a2b083 in pthread_once () from /lib64/libpthread.so.0
\#20 0x00002ad6867adf87 in backtrace () from /lib64/libc.so.6
\#21 0x00002ad68673285f in __libc_message () from /lib64/libc.so.6
\#22 0x00002ad68673a30f in _int_free () from /lib64/libc.so.6
\#23 0x00002ad68673a76b in free () from /lib64/libc.so.6
\#24 0x00002ad6853fe346 in krb5int_sendto () from /usr/lib64/libkrb5.so.3
\#25 0x00002ad6853fe511 in krb5_sendto_kdc () from /usr/lib64/libkrb5.so.3
\#26 0x00002ad6853df7c4 in ?? () from /usr/lib64/libkrb5.so.3
\#27 0x00002ad6853e0919 in krb5_get_init_creds () from /usr/lib64/libkrb5.so.3
\#28 0x00002ad6853e2a94 in krb5_get_init_creds_password () from /usr/lib64/libkrb5.so.3
\#29 0x00002ad684169ff1 in kerberos_kinit_password_ext (principal=0x2ad684702180 "<sanitized>", password=0x2ad6844c5bb0 "<sanitized>", time_offset=0, expire_time=0x2ad6846bf380, renew_till_time=0x0, cache_name=0x2ad6843cb3e0 "MEMORY:winbind_ccache", request_pac=false, add_netbios_addr=false, renewable_time=<value optimized out>, ntstatus=0x0) at libads/kerberos.c:223
\#30 0x00002ad68416a223 in ads_kinit_password (ads=0x2ad6846bf330) at libads/kerberos.c:327
\#31 0x00002ad68415f725 in ads_sasl_spnego_bind (ads=0x2ad6846bf330) at libads/sasl.c:812
\#32 0x00002ad68415dbc1 in ads_sasl_bind (ads=0x2ad6846bf330) at libads/sasl.c:1114
\#33 0x00002ad68415c09b in ads_connect (ads=0x2ad6846bf330) at libads/ldap.c:711
\#34 0x00002ad683e1b8f7 in ads_cached_connection (domain=0x2ad6846b07c0) at winbindd/winbindd_ads.c:124
\#35 0x00002ad683e1bc85 in sequence_number (domain=0x2ad6846b07c0, seq=0x2ad6846b0cd8) at winbindd/winbindd_ads.c:1233
\#36 0x00002ad683dffdd7 in refresh_sequence_number (domain=0x2ad6846b07c0, force=128) at winbindd/winbindd_cache.c:510
\#37 0x00002ad683e00520 in wcache_fetch (cache=<value optimized out>, domain=0x2ad6846b07c0, format=0x2ad68419901e "U/%s") at winbindd/winbindd_cache.c:638
\#38 0x00002ad683e04ac8 in query_user (domain=0x2ad6846b07c0, mem_ctx=0x2ad6846bc920, user_sid=0x7fff1d0cb8c0, info=0x7fff1d0cb810) at winbindd/winbindd_cache.c:1910
\#39 0x00002ad683df2d38 in winbindd_dual_userinfo (domain=0x2ad6846b07c0, state=0x7fff1d0cc9c0) at winbindd/winbindd_user.c:173
\#40 0x00002ad683e232e0 in fork_domain_child (child=0x2ad6846c2440) at winbindd/winbindd_dual.c:485
\#41 schedule_async_request (child=0x2ad6846c2440) at winbindd/winbindd_dual.c:319
\#42 0x00002ad683e229f2 in async_request_fail (state=0x2ad6846c1d00) at winbindd/winbindd_dual.c:214
\#43 0x00002ad683ebabec in run_events (ev=0x2ad6846aebf0, selrtn=0, read_fds=0x7fff1d0ce910, write_fds=<value optimized out>) at lib/events.c:123
\#44 0x00002ad683df08cb in process_loop (argc=<value optimized out>, argv=<value optimized out>, envp=<value optimized out>) at winbindd/winbindd.c:1113
\#45 main (argc=<value optimized out>, argv=<value optimized out>, envp=<value optimized out>) at winbindd/winbindd.c:1437

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

8 years agos3: Fix a strange German translation
Volker Lendecke [Thu, 28 Apr 2011 08:12:47 +0000 (10:12 +0200)]
s3: Fix a strange German translation

8 years agos4-selftest: Don't use a hardcoded target DC name
Andrew Bartlett [Thu, 28 Apr 2011 03:31:33 +0000 (13:31 +1000)]
s4-selftest: Don't use a hardcoded target DC name

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 28 07:34:31 CEST 2011 on sn-devel-104

8 years agoselftest: Make combined test the default when s3build is enabled
Andrew Bartlett [Tue, 19 Apr 2011 06:12:19 +0000 (16:12 +1000)]
selftest: Make combined test the default when s3build is enabled

8 years agoselftest: Fix combination of Samba3 and Samba4 test lists
Andrew Bartlett [Thu, 28 Apr 2011 03:58:07 +0000 (13:58 +1000)]
selftest: Fix combination of Samba3 and Samba4 test lists

The previous code was too subtle, and tried to filter via two xfail
scripts.  The --fail-immediately for the source3 knownfail would then
fail samba4 know failures.

Andrew Bartlett

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>

8 years agoselftest: Print a better warning warning message when smbcacls fails.
Andrew Bartlett [Thu, 28 Apr 2011 02:25:03 +0000 (12:25 +1000)]
selftest: Print a better warning warning message when smbcacls fails.

These tests can't run on systems without posix ACLs.

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 28 06:18:59 CEST 2011 on sn-devel-104

8 years agoselftest: Don't die() when the join fails
Andrew Bartlett [Wed, 27 Apr 2011 12:18:18 +0000 (22:18 +1000)]
selftest: Don't die() when the join fails

This kills off everything without a proper shutdown, and is difficult
to debug.

Andrew Bartlett

8 years agoselftest: s3member admember test to confirm s3/s4 interopability
Andrew Bartlett [Tue, 19 Apr 2011 06:38:46 +0000 (16:38 +1000)]
selftest: s3member admember test to confirm s3/s4 interopability

This checks that Samba3 joins Samba4 correctly, and allows NTLM and
Kerberos logons from a live Samba4 DC.

This needs the common krb5.conf generation logic, and because we now
override KRB5_CONFIG we must update ktest to have a valid krb5.conf.

Based on an original patch by metze

Andrew Bartlett

8 years agos3-libads: Use ldap_init_fd() to connect to AD server in socket_wrapper
Andrew Bartlett [Tue, 26 Apr 2011 03:53:45 +0000 (13:53 +1000)]
s3-libads: Use ldap_init_fd() to connect to AD server in socket_wrapper

This means that we control the connection setup, don't rely on signals
for timeouts and the connection uses socket_wrapper where that is
required in our test environment.

According to bug reports, this method is also used by curl and other
tools, so we are not the first to (ab)use the OpenLDAP libs in this
way.

It is ONLY enabled for socket_wrapper at this time, as this is the
best way to get 'make test' working for S3 winbind tests in an S4
domain.

Andrew Bartlett

8 years agoselftest: Make overwrite of $env->{target} optional
Andrew Bartlett [Wed, 27 Apr 2011 02:10:12 +0000 (12:10 +1000)]
selftest: Make overwrite of $env->{target} optional

This allows a target to be a mix of Samba3 and Samba4, and chose it's
own backend for check_env and get_log_env.

Andrew Bartlett

8 years agos3-libads Pass a struct sockaddr_storage to cldap routines
Andrew Bartlett [Tue, 26 Apr 2011 07:03:32 +0000 (17:03 +1000)]
s3-libads Pass a struct sockaddr_storage to cldap routines

This avoids these routines doing a DNS lookup that has already been
done, and ensures that the emulated DNS lookup isn't thrown away.

Andrew Bartlett

8 years agos3-selftest: Use default name resolution methods (now that dns is emulated)
Andrew Bartlett [Tue, 26 Apr 2011 01:42:55 +0000 (11:42 +1000)]
s3-selftest: Use default name resolution methods (now that dns is emulated)

Now that we have emulated DNS, we can test Samba with the default name
resolve order.

Andrew Bartlett

8 years agolib/util/charset Merge talloc-based pull and push charset functions
Andrew Bartlett [Thu, 28 Apr 2011 01:41:31 +0000 (11:41 +1000)]
lib/util/charset Merge talloc-based pull and push charset functions

These were copied from source3/lib/charcnv.c

Andrew Bartlett