nivanova/samba-autobuild/.git
12 years agobuild: fixed a link order problem
Andrew Tridgell [Thu, 2 Feb 2012 01:36:44 +0000 (12:36 +1100)]
build: fixed a link order problem

this fixes a problem found by obnox where the -L path for CUPS was put
before the path to internal libraries. The install path for CUPS
happened to be the same as for a old system libtevent, which meant we
linked against the old tevent instead of the correct one from our
private library paths.

The problem was that we were adding the -L paths directly to the
ldflags. The waf core code (in ccroot.py) only adds more paths if they
are not there already. So by adding it in ldflags it was not added at
the end of the list. The fix is just to not do the -L processing in
wafsamba and let the waf core do it in the right order

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Feb  2 06:54:42 CET 2012 on sn-devel-104

12 years agoreplace: Only add bsd dependency when bsd library was found.
Jelmer Vernooij [Thu, 2 Feb 2012 01:48:35 +0000 (02:48 +0100)]
replace: Only add bsd dependency when bsd library was found.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Feb  2 05:18:45 CET 2012 on sn-devel-104

12 years agotdb2: add --disable-tdb2
Rusty Russell [Thu, 2 Feb 2012 01:06:49 +0000 (11:36 +1030)]
tdb2: add --disable-tdb2

I thought you could --disable-tdb2=false, apparently not!  Thanks
Michael Adam...

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Thu Feb  2 03:43:08 CET 2012 on sn-devel-104

12 years agosmbtorture: Do not leak child processes when exiting
Christof Schmitt [Thu, 15 Dec 2011 20:53:48 +0000 (13:53 -0700)]
smbtorture: Do not leak child processes when exiting

When some child processes could not be created, smbtorture would exit
and leave the successfully started child processes running.  Add a loop
to kill the existing child processes for this case.

Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Feb  2 01:35:27 CET 2012 on sn-devel-104

12 years agos3-libsmb: Remove dead gssapi code.
Andreas Schneider [Wed, 1 Feb 2012 20:50:31 +0000 (21:50 +0100)]
s3-libsmb: Remove dead gssapi code.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Feb  1 23:29:44 CET 2012 on sn-devel-104

12 years agos3-lib: Fix util_cmdline which doesn't use popt.
Andreas Schneider [Mon, 30 Jan 2012 09:53:18 +0000 (10:53 +0100)]
s3-lib: Fix util_cmdline which doesn't use popt.

This creates its own header file for util_cmdline so it doesn't need to
link against popt.
This should fix linking on FreeBSD.

12 years agos3: Test for bug 8733
Volker Lendecke [Wed, 1 Feb 2012 19:07:24 +0000 (20:07 +0100)]
s3: Test for bug 8733

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Feb  1 21:53:50 CET 2012 on sn-devel-104

12 years agos3-vfstest: Correctly initialize the connection path
Volker Lendecke [Wed, 1 Feb 2012 18:44:32 +0000 (19:44 +0100)]
s3-vfstest: Correctly initialize the connection path

12 years agos3-vfstest: Fix some uninitialized vars
Volker Lendecke [Wed, 1 Feb 2012 18:43:46 +0000 (19:43 +0100)]
s3-vfstest: Fix some uninitialized vars

12 years agos3-vfstest: Fix some pointless statics
Volker Lendecke [Wed, 1 Feb 2012 18:42:55 +0000 (19:42 +0100)]
s3-vfstest: Fix some pointless statics

12 years agos3-vfstest: Fix a typo
Volker Lendecke [Wed, 1 Feb 2012 18:34:22 +0000 (19:34 +0100)]
s3-vfstest: Fix a typo

12 years agos3-vfstest: Fix some nonblank line endings
Volker Lendecke [Wed, 1 Feb 2012 13:42:39 +0000 (14:42 +0100)]
s3-vfstest: Fix some nonblank line endings

12 years agos3:smbd:smb2: fix an assignment-instead-of-check bug conn_snum_used()
Michael Adam [Wed, 1 Feb 2012 14:25:12 +0000 (14:25 +0000)]
s3:smbd:smb2: fix an assignment-instead-of-check bug conn_snum_used()

Accidential "=" instead of "==".

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Feb  1 17:10:15 CET 2012 on sn-devel-104

12 years agoRevert "s4-drs: do not try to contact for replication servers that are not anymore...
Andrew Tridgell [Wed, 1 Feb 2012 05:14:08 +0000 (16:14 +1100)]
Revert "s4-drs: do not try to contact for replication servers that are not anymore in reps*"

This reverts commit 5bfd6251eb22ff701184a95649822a73cf4d157b.

This change has been causing regular segfaults in the build farm since
it was applied. I also think it may be unnecessary as
dreplsrv_refresh_partitions() should already be achieving the same
thing (removing stale replication targets).

I think the segfaults were caused by freeing an in-flight DSA, but I
have been unable to reproduce it outside of the build farm

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Feb  1 07:49:42 CET 2012 on sn-devel-104

12 years agos4-heimdal: the ASN1 compiler now depends on libreplace
Andrew Tridgell [Wed, 1 Feb 2012 01:54:31 +0000 (12:54 +1100)]
s4-heimdal: the ASN1 compiler now depends on libreplace

it uses strlcat(), which we now get from libbsd if available

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Feb  1 05:51:56 CET 2012 on sn-devel-104

12 years agos3-auth Remove unused nt_status_squash from auth_context
Andrew Bartlett [Tue, 31 Jan 2012 10:34:19 +0000 (21:34 +1100)]
s3-auth Remove unused nt_status_squash from auth_context

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Feb  1 04:18:50 CET 2012 on sn-devel-104

12 years agoselftest: Remove unused support for --exeext
Andrew Bartlett [Wed, 25 Jan 2012 22:42:27 +0000 (09:42 +1100)]
selftest: Remove unused support for --exeext

12 years agos3/wscript: Fix dependency on gssapi, necessary when there is no system Kerberos.
Jelmer Vernooij [Tue, 31 Jan 2012 21:31:30 +0000 (22:31 +0100)]
s3/wscript: Fix dependency on gssapi, necessary when there is no system Kerberos.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Feb  1 02:43:11 CET 2012 on sn-devel-104

12 years agosource3/wscript: Expand tabs, to prevent confusion (whitespace is significant in...
Jelmer Vernooij [Tue, 31 Jan 2012 21:30:45 +0000 (22:30 +0100)]
source3/wscript: Expand tabs, to prevent confusion (whitespace is significant in python/waf).

12 years agoreplace: Add include for bsd/string.h.
Jelmer Vernooij [Tue, 31 Jan 2012 21:28:08 +0000 (22:28 +0100)]
replace: Add include for bsd/string.h.

12 years agos3: Add rmdir operation to streams_depot
Volker Lendecke [Tue, 31 Jan 2012 21:26:35 +0000 (22:26 +0100)]
s3: Add rmdir operation to streams_depot

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Feb  1 01:05:57 CET 2012 on sn-devel-104

12 years agos3: Delete streams on directories
Volker Lendecke [Tue, 31 Jan 2012 21:26:23 +0000 (22:26 +0100)]
s3: Delete streams on directories

12 years agos3: Simplify an if-statement
Volker Lendecke [Tue, 31 Jan 2012 16:47:07 +0000 (17:47 +0100)]
s3: Simplify an if-statement

is_ntfs_default_stream_smb_fname already contains all checks that
the variable "stream_name" gives us here.

12 years agoFix bug #8729 - getpass regressions on Solaris/Illumos - 3.6 and master.
Ira Cooper [Tue, 31 Jan 2012 20:15:36 +0000 (12:15 -0800)]
Fix bug #8729 - getpass regressions on Solaris/Illumos - 3.6 and 

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jan 31 23:28:09 CET 2012 on sn-devel-104

12 years agos3:client: ignore SMBecho errors (the server may not support it) (bug #8139)
Stefan Metzmacher [Tue, 31 Jan 2012 07:47:38 +0000 (08:47 +0100)]
s3:client: ignore SMBecho errors (the server may not support it) (bug #8139)

metze

12 years agoRevert "Fix bug #8139 - smbclient fails if server does not support Echo request."
Stefan Metzmacher [Tue, 31 Jan 2012 07:41:07 +0000 (08:41 +0100)]
Revert "Fix bug #8139 - smbclient fails if server does not support Echo request."

This reverts commit 1fdc96ecaff8ca12e9aa0082527468ad4242a8a9.

This is wrong in master as the error codes are different compared to
3.5.x. The correct way to handle this is to call cli_state_is_connected().

metze

12 years agos3:smbd: inline code in reply_sesssetup_and_X_spnego()
Stefan Metzmacher [Sat, 14 Jan 2012 12:24:51 +0000 (13:24 +0100)]
s3:smbd: inline code in reply_sesssetup_and_X_spnego()

This makes the logic much easier to follow.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jan 31 21:52:45 CET 2012 on sn-devel-104

12 years agos3:smbd: the spnego session setup don't need to copy the in blob
Stefan Metzmacher [Sat, 14 Jan 2012 11:38:36 +0000 (12:38 +0100)]
s3:smbd: the spnego session setup don't need to copy the in blob

metze

12 years agos3:smbd: rework reply_spnego_ntlmssp to reply_spnego_generic
Stefan Metzmacher [Fri, 13 Jan 2012 12:20:27 +0000 (13:20 +0100)]
s3:smbd: rework reply_spnego_ntlmssp to reply_spnego_generic

This removes the unused spnego_gen_auth_response() wrapping.

metze

12 years agos3:smbd: remove unused code from sesssetup.c
Stefan Metzmacher [Fri, 13 Jan 2012 11:46:25 +0000 (12:46 +0100)]
s3:smbd: remove unused code from sesssetup.c

metze

12 years agos3:smbd: remove pending_auth_data logic
Stefan Metzmacher [Fri, 13 Jan 2012 11:30:08 +0000 (12:30 +0100)]
s3:smbd: remove pending_auth_data logic

This is handled by the gensec_spnego module.

metze

12 years agos3:smbd: always use the gensec code path in sesssetup.c
Stefan Metzmacher [Fri, 13 Jan 2012 11:24:47 +0000 (12:24 +0100)]
s3:smbd: always use the gensec code path in sesssetup.c

The other code pathes are unused, because we always have
the spnego gensec module.

metze

12 years agos3:smbd: rework smbd_smb2_*_ntlmssp_auth* to smbd_smb2_auth_generic*
Stefan Metzmacher [Wed, 25 Jan 2012 08:02:15 +0000 (09:02 +0100)]
s3:smbd: rework smbd_smb2_*_ntlmssp_auth* to smbd_smb2_auth_generic*

metze

12 years agos3:smbd: always use the gensec code path in smb2_sesssetup.c
Stefan Metzmacher [Fri, 13 Jan 2012 11:24:47 +0000 (12:24 +0100)]
s3:smbd: always use the gensec code path in smb2_sesssetup.c

The other code pathes are unused, because we always have
the spnego gensec module.

metze

12 years agolibcli/smb: Convert struct smb_trans_enc_state to talloc
Andrew Bartlett [Sat, 14 Jan 2012 04:30:34 +0000 (15:30 +1100)]
libcli/smb: Convert struct smb_trans_enc_state to talloc

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3-libsmb: Remove unused enum smb_trans_enc_type
Andrew Bartlett [Sat, 14 Jan 2012 04:17:41 +0000 (15:17 +1100)]
s3-libsmb: Remove unused enum smb_trans_enc_type

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3-libsmb: Use gensec_spnego in smb seal client
Andrew Bartlett [Sat, 14 Jan 2012 01:28:28 +0000 (12:28 +1100)]
s3-libsmb: Use gensec_spnego in smb seal client

This is intead of the inline, manual spnego code currently
in use.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3-smbd: Use gensec_spnego in smb seal server
Andrew Bartlett [Sat, 14 Jan 2012 01:15:17 +0000 (12:15 +1100)]
s3-smbd: Use gensec_spnego in smb seal server

This is instead of the inline, manual spnego code currently
in use.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:libsmb/auth_generic: make use of gensec_spnego in the client
Stefan Metzmacher [Thu, 12 Jan 2012 15:12:02 +0000 (16:12 +0100)]
s3:libsmb/auth_generic: make use of gensec_spnego in the client

metze

12 years agos3:auth/auth_generic: make use of gensec_spnego in the server
Stefan Metzmacher [Thu, 12 Jan 2012 15:12:02 +0000 (16:12 +0100)]
s3:auth/auth_generic: make use of gensec_spnego in the server

metze

12 years agos3: Unify stream testing in open_directory
Volker Lendecke [Tue, 31 Jan 2012 16:26:34 +0000 (17:26 +0100)]
s3: Unify stream testing in open_directory

The second if-statement could never have kicked in, assuming the
SMB_ASSERT above was right.

Jeremy, please check!

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jan 31 20:15:36 CET 2012 on sn-devel-104

12 years agos3: Re-indent an && sequence for better understanding
Volker Lendecke [Tue, 31 Jan 2012 16:24:49 +0000 (17:24 +0100)]
s3: Re-indent an && sequence for better understanding

12 years agos3: Fix "smbcontrol smbd close-share"
Volker Lendecke [Mon, 30 Jan 2012 17:23:49 +0000 (18:23 +0100)]
s3: Fix "smbcontrol smbd close-share"

12 years agos3:net ads join: remove a useless empty comment block
Michael Adam [Tue, 31 Jan 2012 15:16:47 +0000 (16:16 +0100)]
s3:net ads join: remove a useless empty comment block

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Jan 31 18:37:45 CET 2012 on sn-devel-104

12 years agos3:net ads join: add a comment for the call to _net_ads_join_dns_update()
Michael Adam [Tue, 31 Jan 2012 15:15:54 +0000 (16:15 +0100)]
s3:net ads join: add a comment for the call to _net_ads_join_dns_update()

12 years agos3:net ads join: reduce indentation in _net_ads_join_dns_updates()
Michael Adam [Tue, 31 Jan 2012 00:05:14 +0000 (01:05 +0100)]
s3:net ads join: reduce indentation in _net_ads_join_dns_updates()

12 years agos3:net ads join: move dns update code out to new function _net_ads_join_dns_updates()
Michael Adam [Mon, 30 Jan 2012 23:59:21 +0000 (00:59 +0100)]
s3:net ads join: move dns update code out to new function _net_ads_join_dns_updates()

12 years agos3:net ads join: improve comment for dns update block
Michael Adam [Mon, 30 Jan 2012 17:04:41 +0000 (18:04 +0100)]
s3:net ads join: improve comment for dns update block

12 years agos3:net ads join: improve status evaluation for call to net_update_dns()
Michael Adam [Mon, 30 Jan 2012 13:15:14 +0000 (14:15 +0100)]
s3:net ads join: improve status evaluation for call to net_update_dns()

untangle assignment from check and log error code in message if failed.

12 years agos3:net ads join: interpret return code of ads_kinit_password() in dns update block
Michael Adam [Mon, 30 Jan 2012 13:12:15 +0000 (14:12 +0100)]
s3:net ads join: interpret return code of ads_kinit_password() in dns update block

If failed, print according error message and skip the attempt to do dns update.

12 years agos3:net ads join: check for malloc success and react accordingly in dns update block
Michael Adam [Mon, 30 Jan 2012 13:07:52 +0000 (14:07 +0100)]
s3:net ads join: check for malloc success and react accordingly in dns update block

12 years agos3:net ads join: check for success of fetching machine password in dns update block
Michael Adam [Mon, 30 Jan 2012 13:05:59 +0000 (14:05 +0100)]
s3:net ads join: check for success of fetching machine password in dns update block

log and cleanup accordingly if failed

12 years agos3:net ads join: untangle assignment from check, fix return code and improve error...
Michael Adam [Mon, 30 Jan 2012 13:00:12 +0000 (14:00 +0100)]
s3:net ads join: untangle assignment from check, fix return code and improve error logging

only the dns update failed, not the join.
Also do proper memory cleanup

12 years agos3:net ads join: reduce indentation and improve logging in the dns update code block
Michael Adam [Mon, 30 Jan 2012 12:56:45 +0000 (13:56 +0100)]
s3:net ads join: reduce indentation and improve logging in the dns update code block

by doing an early goto done upon error condition

12 years agos3:net ads join: untangle assignment from check.
Michael Adam [Mon, 30 Jan 2012 12:03:59 +0000 (13:03 +0100)]
s3:net ads join: untangle assignment from check.

12 years agos3:net registry: fix a copy and paste error in a help text
Michael Adam [Fri, 27 Jan 2012 13:02:07 +0000 (14:02 +0100)]
s3:net registry: fix a copy and paste error in a help text

12 years agotevent: Fix python documentation strings
Amitay Isaacs [Tue, 31 Jan 2012 13:58:32 +0000 (00:58 +1100)]
tevent: Fix python documentation strings

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Tue Jan 31 16:59:29 CET 2012 on sn-devel-104

12 years agoreplace: Only include C files from which there are actually functions used.
Jelmer Vernooij [Tue, 31 Jan 2012 10:25:17 +0000 (11:25 +0100)]
replace: Only include C files from which there are actually functions used.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Jan 31 15:21:04 CET 2012 on sn-devel-104

12 years agoreplace: use libbsd for strlcat/strlcpy when available.
Jelmer Vernooij [Tue, 31 Jan 2012 10:10:18 +0000 (11:10 +0100)]
replace: use libbsd for strlcat/strlcpy when available.

12 years agos4-s3-upgrade: Check if there are duplicate sids for users and groups
Amitay Isaacs [Mon, 30 Jan 2012 01:13:28 +0000 (12:13 +1100)]
s4-s3-upgrade: Check if there are duplicate sids for users and groups

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Tue Jan 31 02:23:17 CET 2012 on sn-devel-104

12 years agos4-s3-upgrade: Use lowercase hostname as hostname for provision
Amitay Isaacs [Tue, 6 Dec 2011 03:43:45 +0000 (14:43 +1100)]
s4-s3-upgrade: Use lowercase hostname as hostname for provision

12 years agoFix bug #8139 - smbclient fails if server does not support Echo request.
Jeremy Allison [Mon, 30 Jan 2012 22:13:47 +0000 (14:13 -0800)]
Fix bug #8139 - smbclient fails if server does not support Echo request.

Based on work by Matthias Scheler <tron@NetBSD.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jan 31 00:47:19 CET 2012 on sn-devel-104

12 years agos3-winbind: don't try to do clever thing if the username is not found while authentic...
Matthieu Patou [Mon, 30 Jan 2012 08:05:08 +0000 (00:05 -0800)]
s3-winbind: don't try to do clever thing if the username is not found while authenticating through winbind

This could cause that we authenticate a user with a bogus domain to
winbind's domain if the password supplied for the PAM_AUTH match.

The problem was reported by Jeff Venable (jvenable@juniper.net).
Patch from Andrew Bartlett (abartlett@samba.org).

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Mon Jan 30 18:58:12 CET 2012 on sn-devel-104

12 years agos3: check that a user in a bogus domain name is mapped to the localnetbios name of...
Matthieu Patou [Mon, 30 Jan 2012 06:12:40 +0000 (22:12 -0800)]
s3: check that a user in a bogus domain name is mapped to the localnetbios name of a domain member

This means that if we authentify for BOGUS\administrator in AD domain
FOREST with samba being domain member with the netbiosname MEMBER then
BOGUS\administrator will be mapped to MEMBER\administrator if the
password match.

12 years agos3-auth: Remove duplicate check for NT_STATUS_IS_OK(nt_status)
Andrew Bartlett [Mon, 30 Jan 2012 03:00:58 +0000 (14:00 +1100)]
s3-auth: Remove duplicate check for NT_STATUS_IS_OK(nt_status)

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jan 30 09:38:47 CET 2012 on sn-devel-104

12 years agogensec: inline gensec_generate_session_info() into only caller
Andrew Bartlett [Mon, 30 Jan 2012 00:53:04 +0000 (11:53 +1100)]
gensec: inline gensec_generate_session_info() into only caller

This avoids casting to and from the struct auth_user_info_dc *user_info_dc

to to this, the

if (user_info_dc->info->authenticated)

is moved into auth_generate_session_info_wrapper(), which is the
function that gensec_security->auth_context->generate_session_info
points to.

Andrew Bartlett

12 years agos4-auth: Return NT_STATUS_NOT_IMPLEMENTED if the challenge cannot be obtained
Andrew Bartlett [Mon, 30 Jan 2012 00:49:23 +0000 (11:49 +1100)]
s4-auth: Return NT_STATUS_NOT_IMPLEMENTED if the challenge cannot be obtained

12 years agoauth: Make check_password and generate_session_info hook generic
Andrew Bartlett [Mon, 30 Jan 2012 00:17:44 +0000 (11:17 +1100)]
auth: Make check_password and generate_session_info hook generic

gensec_ntlmssp does not need to know the internal form of the
struct user_info_dc or auth_serversupplied_info.  This will allow the
calling logic to be put in common.

Andrew Bartlett

12 years agotdb2: make --enable-tdb2 the default.
Rusty Russell [Mon, 30 Jan 2012 05:29:18 +0000 (15:59 +1030)]
tdb2: make --enable-tdb2 the default.

We still use the tdb1 on-disk format, but we do so via the tdb2 library.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Jan 30 08:02:43 CET 2012 on sn-devel-104

12 years agotdb2: add -1 and -2 options to tdbtorture
Rusty Russell [Mon, 30 Jan 2012 05:29:16 +0000 (15:59 +1030)]
tdb2: add -1 and -2 options to tdbtorture

(For now, -1 is the default).

12 years agotdb2:tdbtorture: use TEST_DATA_PREFIX for files
Rusty Russell [Mon, 30 Jan 2012 05:01:05 +0000 (15:31 +1030)]
tdb2:tdbtorture: use TEST_DATA_PREFIX for files

TDB2 version of commit b83672b36c1ea8c35833c40c3919b63809f16624.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: name tools the same as TDB1 tools.
Rusty Russell [Sun, 29 Jan 2012 23:37:18 +0000 (10:07 +1030)]
tdb2: name tools the same as TDB1 tools.

Otherwise, when we switch everyone's scripts will break (including our
own tests!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: tools/tdb2backup
Rusty Russell [Sun, 29 Jan 2012 23:37:17 +0000 (10:07 +1030)]
tdb2: tools/tdb2backup

Minor changes from tdb/tools/tdbbackup.c.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agosamdb: use compat wrappers for tdb_fetch().
Rusty Russell [Sun, 29 Jan 2012 23:37:17 +0000 (10:07 +1030)]
samdb: use compat wrappers for tdb_fetch().

TDB2's tdb_fetch() returns an error code; use tdb_fetch_compat() for now.
Similarly, tdb_errorstr() -> tdb_errorstr_compat().

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb_compat: only use hashsize attribute when O_CREAT
Rusty Russell [Sun, 29 Jan 2012 23:36:55 +0000 (10:06 +1030)]
tdb_compat: only use hashsize attribute when O_CREAT

tdb2 complains if you specify a tdb1 hashsize, and you're not actually
trying to create a new database.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agoldb_wrap.c: fix TDB2-incompatible API usage.
Rusty Russell [Sun, 29 Jan 2012 22:55:50 +0000 (09:25 +1030)]
ldb_wrap.c: fix TDB2-incompatible API usage.

Auditing revealed one place still expecting a -1 return on failure:
tdb2 returns the (negative) errcode directly, so the portable way to
do this is to check for != 0.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agotdb2: copy tdb1's changed expansion logic.
Rusty Russell [Sun, 29 Jan 2012 22:54:50 +0000 (09:24 +1030)]
tdb2: copy tdb1's changed expansion logic.

TDB2 uses the same expansion logic as TDB1, which got factored out
recently.  So update TDB2 to match.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit c438ec17d7b2efe76e56e5fc5ab88bd4a02735e8)

12 years agotdb2: careful on wrap.
Rusty Russell [Sun, 29 Jan 2012 22:53:50 +0000 (09:23 +1030)]
tdb2: careful on wrap.

It's much harder to wrap a 64-bit tdb2 than a 32-bit tdb1, but we should still
take care against bugs.

Also, we should *not* cast the length to a size_t when comparing it to
the stat result, in case size_t is 32 bit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 6f7cb26e589cea081e71c59801eae87178967861)

12 years agoauth: provide private pointer and do not return original PAC signatures
Andrew Bartlett [Sun, 29 Jan 2012 21:00:28 +0000 (08:00 +1100)]
auth: provide private pointer and do not return original PAC signatures

There is no need to return the PAC signatures via the special-purpose
torture element.  Instead, use a private pointer on the auth_context
in conjunction with the private PAC processing method.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Jan 29 23:52:50 CET 2012 on sn-devel-104

12 years agos3: Fix unused variable warnings
Volker Lendecke [Sun, 29 Jan 2012 13:58:43 +0000 (14:58 +0100)]
s3: Fix unused variable warnings

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jan 29 16:33:29 CET 2012 on sn-devel-104

12 years agolibcli/util: fix typo in nt_errs[] for NT_STATUS_NETWORK_SESSION_EXPIRED
Stefan Metzmacher [Sun, 29 Jan 2012 10:26:24 +0000 (11:26 +0100)]
libcli/util: fix typo in nt_errs[] for NT_STATUS_NETWORK_SESSION_EXPIRED

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jan 29 14:11:12 CET 2012 on sn-devel-104

12 years agos3-selftest: Add test for posix large reads and writes
Andrew Bartlett [Fri, 27 Jan 2012 04:20:17 +0000 (15:20 +1100)]
s3-selftest: Add test for posix large reads and writes

This includes encrypted reads and writes, both NTLM and kerberos.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Jan 28 00:13:57 CET 2012 on sn-devel-104

12 years agos3-libsmb Do not limit read replies to NBT packet sizes
Andrew Bartlett [Fri, 27 Jan 2012 00:48:11 +0000 (11:48 +1100)]
s3-libsmb Do not limit read replies to NBT packet sizes

With the posix extensions, we can read 16MB at a time, so we need to check
the full size of the packet, not the size rounded down to the old NBT
limit.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
12 years agos3-pdb: Make ADS-type backends updates secrets.tdb.
Simo Sorce [Thu, 26 Jan 2012 20:33:02 +0000 (15:33 -0500)]
s3-pdb: Make ADS-type backends updates secrets.tdb.

Make the backends that have ADS capability the only ones that can change the
SID and GUID in secrets.tdb at initialization time.

Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Fri Jan 27 19:42:17 CET 2012 on sn-devel-104

12 years agos3-pdb: Break SECRETS3 dependency on PDB.
Simo Sorce [Thu, 26 Jan 2012 20:27:54 +0000 (15:27 -0500)]
s3-pdb: Break SECRETS3 dependency on PDB.

This is causing circular depdnendcies that bring libpdb in all code and this is
BAD.

This change 'protects' the sid and guid of the domain by adding a special key
that makes them effectively read only.

Limit this temporarily to the samba 4 build, once it gets some good testing the
samba4 ifdefs can be dropped.

fix pdb dependencies

Signed-off-by: Andreas Schneider <asn@samba.org>
12 years agolibcli/smb: fix smbXcli_negprot(..., PROTOCOL_NT1, PROTOCOL_SMB2_02)
Stefan Metzmacher [Fri, 27 Jan 2012 12:39:54 +0000 (13:39 +0100)]
libcli/smb: fix smbXcli_negprot(..., PROTOCOL_NT1, PROTOCOL_SMB2_02)

The SMB1 negprot request already consumed the SMB2 sequence '0'.
This also happens for the SMB 2.02 case.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jan 27 15:27:41 CET 2012 on sn-devel-104

12 years agos3-waf: Create a subsystem for SERVER_MUTEX.
Andreas Schneider [Fri, 27 Jan 2012 09:40:29 +0000 (10:40 +0100)]
s3-waf: Create a subsystem for SERVER_MUTEX.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Fri Jan 27 12:55:01 CET 2012 on sn-devel-104

12 years agos3-waf: Add missing dependency of ntlmssp to wbclient.
Andreas Schneider [Fri, 27 Jan 2012 09:41:46 +0000 (10:41 +0100)]
s3-waf: Add missing dependency of ntlmssp to wbclient.

12 years agos3-waf: Add missing dependency of pdb_wbc_sam to wbclient.
Andreas Schneider [Thu, 26 Jan 2012 10:36:07 +0000 (11:36 +0100)]
s3-waf: Add missing dependency of pdb_wbc_sam to wbclient.

12 years agobuild: Add missing dependencies on popt
Amitay Isaacs [Fri, 27 Jan 2012 05:57:46 +0000 (16:57 +1100)]
build: Add missing dependencies on popt

This fixes compilation issues on freebsd where system popt is installed
under /usr/local.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Fri Jan 27 08:33:52 CET 2012 on sn-devel-104

12 years agoFinally remove all malloc()'s from the substitute code. Now totally
Jeremy Allison [Fri, 27 Jan 2012 01:10:44 +0000 (17:10 -0800)]
Finally remove all malloc()'s from the substitute code. Now totally
talloc() based.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jan 27 03:43:21 CET 2012 on sn-devel-104

12 years agoFix a really slow memory leak (in master at least). Found by Ira Cooper <ira@wakeful...
Jeremy Allison [Thu, 26 Jan 2012 22:53:43 +0000 (14:53 -0800)]
Fix a really slow memory leak (in master at least). Found by Ira Cooper <ira@wakeful.net>.

Bug #8724 - Memory leak in parent smbd on connection.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jan 27 01:26:28 CET 2012 on sn-devel-104

12 years agos3:auth/auth_generic: for now call sub_set_smb_name() and lp_load()
Stefan Metzmacher [Thu, 26 Jan 2012 08:21:21 +0000 (09:21 +0100)]
s3:auth/auth_generic: for now call sub_set_smb_name() and lp_load()

This matches the auth_ntlmssp case and the smbd/sesssetup.c code.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jan 26 17:58:17 CET 2012 on sn-devel-104

12 years agos3:gse: return NT_STATUS_LOGON_FAILURE instead of NT_STATUS_INTERNAL_ERROR
Stefan Metzmacher [Wed, 25 Jan 2012 10:18:00 +0000 (11:18 +0100)]
s3:gse: return NT_STATUS_LOGON_FAILURE instead of NT_STATUS_INTERNAL_ERROR

This matches the behavior of ads_verify_ticket().

Note that ads_verify_ticket() calls krb5_to_nt_status(), but
as a server it's likely to always returns NT_STATUS_UNSUCCESSFUL.
ads_verify_ticket() maps NT_STATUS_UNSUCCESSFUL to NT_STATUS_LOGON_FAILURE.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jan 26 10:48:36 CET 2012 on sn-devel-104

12 years agos4-rpc_server: Fix search for existing trust to actually look for the dns name
Andrew Bartlett [Wed, 25 Jan 2012 22:13:30 +0000 (09:13 +1100)]
s4-rpc_server: Fix search for existing trust to actually look for the dns name

Found by a eagle-eyed user.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Jan 26 08:39:47 CET 2012 on sn-devel-104

12 years agos3-build: Remove FIXME, bigballofmud is no more
Andrew Bartlett [Wed, 25 Jan 2012 04:56:05 +0000 (15:56 +1100)]
s3-build: Remove FIXME, bigballofmud is no more

12 years agoUpdate man page to fix typo vfs_aio_fork -> vfs_aio_pthread, add
Jeremy Allison [Thu, 26 Jan 2012 01:17:48 +0000 (17:17 -0800)]
Update man page to fix typo vfs_aio_fork -> vfs_aio_pthread, add
aio read size, aio write size examples.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jan 26 03:51:01 CET 2012 on sn-devel-104

12 years agoUse sys_pread/sys_pwrite to cope correctly with 64-bit sizes. As in the default VFS...
Jeremy Allison [Wed, 25 Jan 2012 23:30:56 +0000 (15:30 -0800)]
Use sys_pread/sys_pwrite to cope correctly with 64-bit sizes. As in the default VFS case fall back from pread -> read and pwrite -> write on an ESPIPE error in the worker thread.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jan 26 02:11:28 CET 2012 on sn-devel-104

12 years agoAdd man page for vfs_aio_pthread module.
Jeremy Allison [Wed, 25 Jan 2012 22:11:12 +0000 (14:11 -0800)]
Add man page for vfs_aio_pthread module.

12 years agos3: Fix a panic in aio_pthread
Volker Lendecke [Wed, 25 Jan 2012 15:43:49 +0000 (16:43 +0100)]
s3: Fix a panic in aio_pthread

Found by Nir Drang <nir@fabrix.tv>

Thanks!

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jan 25 18:22:37 CET 2012 on sn-devel-104