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)]

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)]

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)]

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)]

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)]

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)]

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.


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().


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().


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()


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


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


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.


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().


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().


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().


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().


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().


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.


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


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.


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


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

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

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

8 years agos3-test: log to stdout for smbd/nmbd/winbindd
Andrew Tridgell [Thu, 28 Apr 2011 02:39:33 +0000 (12:39 +1000)]
s3-test: log to stdout for smbd/nmbd/winbindd

this prevents error messages from logfile creation before smb.conf is

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Apr 28 05:29:19 CEST 2011 on sn-devel-104

8 years agolib/util/charset Add copyright headers
Andrew Bartlett [Thu, 28 Apr 2011 00:56:36 +0000 (10:56 +1000)]
lib/util/charset Add copyright headers

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 28 04:13:44 CEST 2011 on sn-devel-104

8 years agolib/util/charset Make fast path from UTF16 to '8 bit' charsets clearer
Andrew Tridgell [Thu, 28 Apr 2011 00:50:06 +0000 (10:50 +1000)]
lib/util/charset Make fast path from UTF16 to '8 bit' charsets clearer

This breaks the fast path into handling for -1 and handling for
specified lenghts, avoding branch operations on each character.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util/charset Add tests for srclen=-1 behaviour.
Andrew Bartlett [Thu, 28 Apr 2011 00:48:43 +0000 (10:48 +1000)]
lib/util/charset Add tests for srclen=-1 behaviour.

This confirms that we do include a null terminator in all non-failed

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util/charset use convert_string.c in common
Andrew Bartlett [Tue, 12 Apr 2011 04:49:41 +0000 (14:49 +1000)]
lib/util/charset use convert_string.c in common

This brings another layer of the charcnv library in common.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agolib/util/charset Fix string termination conditions for UTF16 strings
Andrew Bartlett [Thu, 14 Apr 2011 07:23:25 +0000 (17:23 +1000)]
lib/util/charset Fix string termination conditions for UTF16 strings

This punts partial UTF16 strings to iconv() to deal with, as it's not
a fast path any longer if it's got an odd length.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agoRemove another fstring in this code.
Jeremy Allison [Thu, 28 Apr 2011 00:16:36 +0000 (17:16 -0700)]
Remove another fstring in this code.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Apr 28 03:15:32 CEST 2011 on sn-devel-104

8 years agos3: Properly clean up in pthreadpool_init in case of failure
Volker Lendecke [Wed, 27 Apr 2011 20:18:12 +0000 (22:18 +0200)]
s3: Properly clean up in pthreadpool_init in case of failure

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Apr 27 23:57:19 CEST 2011 on sn-devel-104

8 years agos3-rpc_server Fix compile without kerberos
Andrew Bartlett [Wed, 27 Apr 2011 05:37:59 +0000 (15:37 +1000)]
s3-rpc_server Fix compile without kerberos

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr 27 23:08:48 CEST 2011 on sn-devel-104

8 years agoFixup (C) - we've both worked lots on this :-).
Jeremy Allison [Tue, 26 Apr 2011 23:31:28 +0000 (16:31 -0700)]
Fixup (C) - we've both worked lots on this :-).

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Apr 27 21:56:29 CEST 2011 on sn-devel-104

8 years agoRemove fstrings from client struct. Properly talloc strings (ensuring we never end...
Jeremy Allison [Wed, 27 Apr 2011 19:06:25 +0000 (12:06 -0700)]
Remove fstrings from client struct. Properly talloc strings (ensuring we never end up with a NULL pointer).

8 years agos3-waf: add pthreadpool support.
Günther Deschner [Wed, 27 Apr 2011 11:16:59 +0000 (13:16 +0200)]
s3-waf: add pthreadpool support.

Volker, please check.


Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Apr 27 17:57:32 CEST 2011 on sn-devel-104

8 years agos3-waf: check for pthread support.
Günther Deschner [Wed, 27 Apr 2011 14:07:35 +0000 (16:07 +0200)]
s3-waf: check for pthread support.


8 years agos3-netapi: Fix Coverity CID #2302: FORWARD_NULL
Günther Deschner [Wed, 27 Apr 2011 13:41:49 +0000 (15:41 +0200)]
s3-netapi: Fix Coverity CID #2302: FORWARD_NULL


8 years agoRemove outdated S4 OpenLDAP backend HOWTO.
Andrew Bartlett [Wed, 27 Apr 2011 12:42:29 +0000 (22:42 +1000)]
Remove outdated S4 OpenLDAP backend HOWTO.

This is no longer a feature of Samba4

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr 27 15:32:28 CEST 2011 on sn-devel-104

8 years agos3-winbind Use get_dyn_WINBINDD_SOCKET_DIR() to get the winbind pipe dir
Andrew Bartlett [Wed, 27 Apr 2011 06:45:39 +0000 (16:45 +1000)]
s3-winbind Use get_dyn_WINBINDD_SOCKET_DIR() to get the winbind pipe dir

This ensures we follow the dynconfig convention for the socket
directory, and makes it easier to ensure that the client and server
both refer to the same socket.

Andrew Bartlett

8 years agodynconfig: Have only one dynconfig.o in the common code.
Andrew Bartlett [Wed, 27 Apr 2011 06:39:42 +0000 (16:39 +1000)]
dynconfig: Have only one dynconfig.o in the common code.

8 years agos3-test Make samba3.blackbox.net.local.registry.roundtrip reliable
Andrew Bartlett [Wed, 27 Apr 2011 10:29:16 +0000 (20:29 +1000)]
s3-test Make samba3.blackbox.net.local.registry.roundtrip reliable

Looking for smb.conf files with find -name \*.conf would find and not
find all sorts of things that were just not valid inputs.  When
restricted to under source3 it then finds no inputs in the top level
build, as it only worked on the generated smb.conf files from 'make
test' environments.

Instead, just run it on the one file we know is valid, and if we want
to run it on more files, then we can make this test run against more
environments, or specific target files.

Andrew Bartlett

8 years agos3-waf Don't enable profiling by default
Andrew Bartlett [Wed, 27 Apr 2011 08:55:24 +0000 (18:55 +1000)]
s3-waf Don't enable profiling by default

This is disabled by default in the s3-autoconf build.

Andrew Bartlett

8 years agobuild: Add lib/replace as a default include path
Andrew Bartlett [Wed, 27 Apr 2011 10:07:45 +0000 (20:07 +1000)]
build: Add lib/replace as a default include path

This makes #include "system/filesys.h" in the
source3/includes/includes.h work more often.

Andrew Bartlett

8 years agodocs: Fix a bogus )
Samba-JP oota [Wed, 27 Apr 2011 07:21:56 +0000 (09:21 +0200)]
docs: Fix a bogus )

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Apr 27 10:21:14 CEST 2011 on sn-devel-104

8 years agoselftest: we don't get valgrind errors any more with iconv
Andrew Tridgell [Wed, 27 Apr 2011 06:39:55 +0000 (16:39 +1000)]
selftest: we don't get valgrind errors any more with iconv

this check was causing the CP850 warning in the combined build, as the
s3 tests want CP850, but we don't have builtin support for that

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Apr 27 09:31:44 CEST 2011 on sn-devel-104

8 years agobuild: fixed build problems due to implicit library deps in samba3core
Andrew Tridgell [Wed, 27 Apr 2011 01:48:53 +0000 (11:48 +1000)]
build: fixed build problems due to implicit library deps in samba3core

this fixes the top level build on svart and probably other hosts

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Apr 27 08:27:49 CEST 2011 on sn-devel-104

8 years agoauth/kerberos Add check for gss_inquire_sec_context_by_oid
Andrew Bartlett [Wed, 27 Apr 2011 04:34:03 +0000 (14:34 +1000)]
auth/kerberos Add check for gss_inquire_sec_context_by_oid

Not all kerberos distributions have this function.

Andrew Bartlett

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

8 years agos4-gensec: Use new common 'obtain the PAC' functions.
Andrew Bartlett [Thu, 21 Apr 2011 02:38:51 +0000 (12:38 +1000)]
s4-gensec: Use new common 'obtain the PAC' functions.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr 27 05:08:10 CEST 2011 on sn-devel-104

8 years agos3-gse: Don't release the mech OID from gss_accept_security_context
Andrew Bartlett [Sat, 16 Apr 2011 05:39:00 +0000 (15:39 +1000)]
s3-gse: Don't release the mech OID from gss_accept_security_context

This is constant data according to the man pages I find for this
fucntion, and causes a segfault to free() when linked to Heimdal.  I
am advised that while it is constant for gss_mech_krb5, it may not be
for other mechanisms, so an assert will ensure this is dealt with by
the programmer who extends this code in future.

Andrew Bartlett

8 years agoauth/kerberos Move all the PAC handling functions to auth/kerberos
Andrew Bartlett [Tue, 26 Apr 2011 23:42:51 +0000 (09:42 +1000)]
auth/kerberos Move all the PAC handling functions to auth/kerberos

8 years agoauth/kerberos: Create common helper to get the verified PAC from GSSAPI
Andrew Bartlett [Sat, 16 Apr 2011 05:41:50 +0000 (15:41 +1000)]
auth/kerberos: Create common helper to get the verified PAC from GSSAPI

This only works for Heimdal and MIT Krb5 1.8, other versions will get

We no longer manually verify any details of the PAC in Samba for
GSSAPI logins, as we never had the information to do it properly, and
it is better to have the GSSAPI library handle it.

Andrew Bartlett

8 years agos3-libsmb Use 'resolv:hosts file' as a DNS emulation when specified.
Andrew Bartlett [Tue, 26 Apr 2011 02:08:22 +0000 (12:08 +1000)]
s3-libsmb Use 'resolv:hosts file' as a DNS emulation when specified.

This allows make test to operate without making real DNS calls.

Andrew Bartlett

8 years agos3-libads Don't start a DEBUG with 'time'
Andrew Bartlett [Tue, 26 Apr 2011 07:02:11 +0000 (17:02 +1000)]
s3-libads Don't start a DEBUG with 'time'

This strange requirement comes from our subunit test harness.

Andrew Bartlett

8 years agoselftest: Make bindir_path much less complex
Andrew Bartlett [Wed, 27 Apr 2011 01:19:20 +0000 (11:19 +1000)]
selftest: Make bindir_path much less complex

There is no need to pass it as a function pointer, just put it in 'Samba.pm'.

Andrew Bartlett

8 years agolibcli/auth Move Samba4's gssapi_error_string from GENSEC to libcli/auth
Andrew Bartlett [Wed, 20 Apr 2011 07:39:50 +0000 (17:39 +1000)]
libcli/auth Move Samba4's gssapi_error_string from GENSEC to libcli/auth

This will allow the GSSAPI PAC fetch code to use it.

Andrew Bartlett

8 years agos3: Make cli_session_setup_lanman2 async
Volker Lendecke [Sun, 3 Apr 2011 15:50:32 +0000 (17:50 +0200)]
s3: Make cli_session_setup_lanman2 async

Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Apr 27 00:25:35 CEST 2011 on sn-devel-104

8 years agos3: Make cli_session_setup_nt1 async
Volker Lendecke [Sun, 3 Apr 2011 09:44:35 +0000 (11:44 +0200)]
s3: Make cli_session_setup_nt1 async

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Make plaintext session setup async
Volker Lendecke [Sat, 2 Apr 2011 21:54:07 +0000 (23:54 +0200)]
s3: Make plaintext session setup async

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Remove cli_write
Volker Lendecke [Sat, 2 Apr 2011 14:44:40 +0000 (16:44 +0200)]
s3: Remove cli_write

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Use cli_writeall instead of cli_write
Volker Lendecke [Sat, 2 Apr 2011 09:46:30 +0000 (11:46 +0200)]
s3: Use cli_writeall instead of cli_write

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3: Add cli_writeall
Volker Lendecke [Tue, 26 Apr 2011 17:52:39 +0000 (10:52 -0700)]
s3: Add cli_writeall

Signed-off-by: Jeremy Allison <jra@samba.org>
8 years agos3:vfs use gpfs_lib_init
Christian Ambach [Mon, 21 Feb 2011 17:25:36 +0000 (18:25 +0100)]
s3:vfs use gpfs_lib_init

With newer GPFS releases, libgpfs contains a function
gpfs_lib_init(). It marks the pseudo-device the lib uses
as interface to the GPFS kernel module to not be to
destroyed after each call to GPFS.
This saves us some microseconds creating and removing the device
each time we do a call to libgpfs.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Apr 26 20:52:36 CEST 2011 on sn-devel-104

8 years agos3-utils: Fix Bug #8106. Fix the build of smbget on HP NonStop.
Günther Deschner [Tue, 26 Apr 2011 12:58:01 +0000 (14:58 +0200)]
s3-utils: Fix Bug #8106. Fix the build of smbget on HP NonStop.


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

8 years agos3: Fix a typo
Volker Lendecke [Tue, 26 Apr 2011 10:40:07 +0000 (12:40 +0200)]
s3: Fix a typo

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Apr 26 13:31:08 CEST 2011 on sn-devel-104

8 years agos3: Allow unlimited parallelism in pthreadpool
Volker Lendecke [Mon, 25 Apr 2011 18:05:31 +0000 (20:05 +0200)]
s3: Allow unlimited parallelism in pthreadpool

8 years agolibcli/auth Allow parsing of a PAC that is already verified.
Andrew Bartlett [Wed, 20 Apr 2011 07:37:45 +0000 (17:37 +1000)]
libcli/auth Allow parsing of a PAC that is already verified.

By making the verification parameters optional, we can parse a PAC
that is already verified.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Apr 26 10:06:59 CEST 2011 on sn-devel-104

8 years agos3-libads Remove KRB5_DNS_HACK
Andrew Bartlett [Tue, 26 Apr 2011 01:41:26 +0000 (11:41 +1000)]
s3-libads Remove KRB5_DNS_HACK

We have winbindd write a custom krb5.conf or use a kdc locator plugin
to do this properly now.

Andrew Bartlett

8 years agolibcli/dns Improve dns_hosts_file, using Samba3's struct dns_rr_srv
Andrew Bartlett [Mon, 25 Apr 2011 23:49:08 +0000 (09:49 +1000)]
libcli/dns Improve dns_hosts_file, using Samba3's struct dns_rr_srv

By reworking the 'fake DNS' file to use struct dns_rr_srv it should be
possible to emulate that resolver layer as well as the Samba4
sockaddr_storage* based layer.  This will then give us a common DNS
emulation for 'make test'.

Andrew Bartlett

8 years agowaf: introduce reverse logic for allowing unknown symbols
Matthieu Patou [Fri, 15 Apr 2011 21:15:51 +0000 (01:15 +0400)]
waf: introduce reverse logic for allowing unknown symbols

Some os (ie OSX 10.6) forbids by default unknown symbols so in order to
allow them (for special case) we have no to remove linker option *but*
to add options to ask the linker to be more relax.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
8 years agobuild: Invert --enable-s3build into --disable-s3build
Andrew Bartlett [Thu, 21 Apr 2011 10:02:28 +0000 (20:02 +1000)]
build: Invert --enable-s3build into --disable-s3build

We always want the s3 binaries, except when building an smbtorture4
for the s3-waf and autoconf builds.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Apr 26 04:27:28 CEST 2011 on sn-devel-104

8 years agolib/util Define samba-util-common only for s3-waf
Andrew Bartlett [Thu, 21 Apr 2011 07:19:29 +0000 (17:19 +1000)]
lib/util Define samba-util-common only for s3-waf

It causes too much trouble in the top level build.

Andrew Bartlett

8 years agobuild: Move Heimdal/MIT compat build rules to heimdal_build
Andrew Bartlett [Thu, 21 Apr 2011 02:28:27 +0000 (12:28 +1000)]
build: Move Heimdal/MIT compat build rules to heimdal_build

This allows top level build rules to rely on these names at all times.

Andrew Bartlett

8 years agoNo longer need to call SMB_VFS_LSTAT - check name hasn't changed above is sufficient.
Jeremy Allison [Mon, 25 Apr 2011 19:45:49 +0000 (12:45 -0700)]
No longer need to call SMB_VFS_LSTAT - check name hasn't changed above is sufficient.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Apr 25 23:35:37 CEST 2011 on sn-devel-104

8 years agoCorrectly detect and deny symlinks anywhere in a path (not just the last component...
Jeremy Allison [Fri, 22 Apr 2011 05:29:06 +0000 (22:29 -0700)]
Correctly detect and deny symlinks anywhere in a path (not just the last component) if "follow symlinks = no".

8 years agos3: Remove unused code
Volker Lendecke [Mon, 25 Apr 2011 16:29:59 +0000 (18:29 +0200)]
s3: Remove unused code

This is done in name_query_send these days

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Apr 25 19:24:58 CEST 2011 on sn-devel-104

8 years agos3: Move setting the name_query timeout
Volker Lendecke [Mon, 25 Apr 2011 15:37:08 +0000 (17:37 +0200)]
s3: Move setting the name_query timeout

An async caller might want a different timeout behaviour

8 years agodocs-xml/smb.conf.5: %i and %I no longer contain IPv4 mapped IPv6 addresses
Stefan Metzmacher [Mon, 25 Apr 2011 15:40:25 +0000 (17:40 +0200)]
docs-xml/smb.conf.5: %i and %I no longer contain IPv4 mapped IPv6 addresses


Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Apr 25 18:38:16 CEST 2011 on sn-devel-104

8 years agos3:lib/util_sock: listen on IPv6 addresses with IPV6_ONLY (bug #7383)
Stefan Metzmacher [Sat, 23 Apr 2011 09:29:51 +0000 (11:29 +0200)]
s3:lib/util_sock: listen on IPv6 addresses with IPV6_ONLY (bug #7383)

This avoids getting IPv4 addresses as mapped IPv6 addresses
(e.g. ::ffff:

Before the bahavior was inconsistent between operating system
and distributions. Some system have IPV6_ONLY as default.

Now we consistently get AF_INET for IPv4 addresses and AF_INET6
for IPv6 addresses.

It also makes it possible to listen only on IPv6 now
as "::" doesn't imply "" anymore. Which also
avoids confusing log messages that we were not able to
bind to "".


8 years agos3:lib/access: normalize IPv4 mapped IPv6 addresses in both directions (bug #7383)
Stefan Metzmacher [Sun, 24 Apr 2011 19:20:19 +0000 (21:20 +0200)]
s3:lib/access: normalize IPv4 mapped IPv6 addresses in both directions (bug #7383)


8 years agos3: Some build farm machines do not have /bin/true
Volker Lendecke [Mon, 25 Apr 2011 11:40:15 +0000 (13:40 +0200)]
s3: Some build farm machines do not have /bin/true

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Apr 25 14:35:42 CEST 2011 on sn-devel-104