samba.git
7 years agovfs: Remove -D_LARGEFILE64_SOURCE from vfs examples Makefile
Andrew Bartlett [Tue, 27 Mar 2012 23:40:02 +0000 (10:40 +1100)]
vfs: Remove -D_LARGEFILE64_SOURCE from vfs examples Makefile

7 years agobuild: #ifdef LARGE_SMB_OFF_T as off_t is now always 64 bits
Andrew Bartlett [Tue, 27 Mar 2012 23:21:22 +0000 (10:21 +1100)]
build: #ifdef LARGE_SMB_OFF_T as off_t is now always 64 bits

7 years agoRemove off64_t declarations
Andrew Bartlett [Tue, 27 Mar 2012 23:03:24 +0000 (10:03 +1100)]
Remove off64_t declarations

7 years agobuild: Fix configure test that was declaring an off64_t
Andrew Bartlett [Tue, 27 Mar 2012 23:01:52 +0000 (10:01 +1100)]
build: Fix configure test that was declaring an off64_t

7 years agobuild: do not use HAVE_EXPLICIT_LARGEFILE_SUPPORT and *64() fucntions any more
Andrew Bartlett [Tue, 27 Mar 2012 22:49:48 +0000 (09:49 +1100)]
build: do not use HAVE_EXPLICIT_LARGEFILE_SUPPORT and *64() fucntions any more

7 years agobuild: Remove configure tests for *64 functions and types
Andrew Bartlett [Tue, 27 Mar 2012 22:39:57 +0000 (09:39 +1100)]
build: Remove configure tests for *64 functions and types

We now use the standard types only.

Andrew Bartlett

7 years agobuild: Require 64-bit files support and do not define HAVE_EXPLICIT_LARGEFILE_SUPPORT
Andrew Bartlett [Tue, 27 Mar 2012 22:47:53 +0000 (09:47 +1100)]
build: Require 64-bit files support and do not define HAVE_EXPLICIT_LARGEFILE_SUPPORT

7 years agobuild: Add getconf LFS_CFLAGS support to waf build
Andrew Bartlett [Wed, 4 Apr 2012 22:25:13 +0000 (08:25 +1000)]
build: Add getconf LFS_CFLAGS support to waf build

7 years agobuild: use only standard _FILE_OFFSET_BITS=64 macro for large files
Andrew Bartlett [Tue, 27 Mar 2012 22:34:12 +0000 (09:34 +1100)]
build: use only standard _FILE_OFFSET_BITS=64 macro for large files

(We also already use any other macro as set by getconf LFS_CFLAGS, and
the standard AC_SYS_LARGEFILE macro in libreplace).

This is instead of using the transitional *64 posix largefile API

Andrew Bartlett

7 years agolib/replace: Add getconf LFS_CFLAGS support to autoconf build
Andrew Bartlett [Wed, 4 Apr 2012 22:25:32 +0000 (08:25 +1000)]
lib/replace: Add getconf LFS_CFLAGS support to autoconf build

7 years agoThird part of fix for bug #8837 - smbd crashes when deleting directory and veto files...
Jeremy Allison [Wed, 4 Apr 2012 21:57:12 +0000 (14:57 -0700)]
Third part of fix for bug #8837 - smbd crashes when deleting directory and veto files are enabled.

Use correct check to see if veto files has been enabled. Even if not
set lp_veto_files() returns a valid string address (to a '\0' character).

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Apr  5 01:36:04 CEST 2012 on sn-devel-104

7 years agoSecond part of bugfix for bug #8837 - smbd crashes when deleting directory and veto...
Jeremy Allison [Wed, 4 Apr 2012 21:54:02 +0000 (14:54 -0700)]
Second part of bugfix for bug #8837 - smbd crashes when deleting directory and veto files are enabled.

Store the 'struct security_token' as well as the 'struct security_unix_token'
inside the locking db when setting a delete on close.

7 years agoFirst part of fix for bug 8837 - smbd crashes when deleting directory and veto files...
Jeremy Allison [Wed, 4 Apr 2012 21:53:10 +0000 (14:53 -0700)]
First part of fix for bug 8837 - smbd crashes when deleting directory and veto files are enabled.

Add some const to the sec_ctx code.

7 years agosystemd: Add samba service file.
Andreas Schneider [Mon, 2 Apr 2012 12:23:27 +0000 (14:23 +0200)]
systemd: Add samba service file.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Apr  4 18:04:09 CEST 2012 on sn-devel-104

7 years agos4:librpc/rpc: also parse ncacn_packet pdus with LIBNDR_FLAG_OBJECT_PRESENT
Stefan Metzmacher [Tue, 3 Apr 2012 17:57:03 +0000 (19:57 +0200)]
s4:librpc/rpc: also parse ncacn_packet pdus with LIBNDR_FLAG_OBJECT_PRESENT

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Apr  3 23:06:31 CEST 2012 on sn-devel-104

7 years agos4:librpc/rpc: don't mix up paylod ndr flags with the dcerpc layer
Stefan Metzmacher [Tue, 3 Apr 2012 17:55:42 +0000 (19:55 +0200)]
s4:librpc/rpc: don't mix up paylod ndr flags with the dcerpc layer

If the transfer syntax is NDR64, it's only for the payload not
for the dcerpc pdus.

metze

7 years agobuild: Remove checks for krb5_decode_ap_req, free_AP_REQ and KRB5_TICKET_HAS_KEYINFO
Andrew Bartlett [Mon, 12 Mar 2012 08:52:33 +0000 (19:52 +1100)]
build: Remove checks for krb5_decode_ap_req, free_AP_REQ and KRB5_TICKET_HAS_KEYINFO

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Apr  3 19:19:33 CEST 2012 on sn-devel-104

7 years agobuild: Remove unused check for HAVE_KRB5_TKT_ENC_PART2
Andrew Bartlett [Mon, 12 Mar 2012 08:26:16 +0000 (19:26 +1100)]
build: Remove unused check for HAVE_KRB5_TKT_ENC_PART2

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-krb5 Remove unused get_kvno_from_ap_req()
Andrew Bartlett [Mon, 12 Mar 2012 07:44:52 +0000 (18:44 +1100)]
s3-krb5 Remove unused get_kvno_from_ap_req()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-krb5 Remove unused get_enctype_from_ap_req
Andrew Bartlett [Mon, 12 Mar 2012 07:41:57 +0000 (18:41 +1100)]
s3-krb5 Remove unused get_enctype_from_ap_req

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-krb5: Remove unused smb_krb5_get_keyinfo_from_ap_req()
Andrew Bartlett [Mon, 12 Mar 2012 07:40:06 +0000 (18:40 +1100)]
s3-krb5: Remove unused smb_krb5_get_keyinfo_from_ap_req()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-krb5: Remove unused get_key_from_keytab
Andrew Bartlett [Mon, 12 Mar 2012 07:38:35 +0000 (18:38 +1100)]
s3-krb5: Remove unused get_key_from_keytab

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-krb5: remove unused unwrap_pac()
Andrew Bartlett [Mon, 12 Mar 2012 07:37:06 +0000 (18:37 +1100)]
s3-krb5: remove unused unwrap_pac()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-krb5: remove unused get_auth_data_from_tkt
Andrew Bartlett [Mon, 12 Mar 2012 07:33:12 +0000 (18:33 +1100)]
s3-krb5: remove unused get_auth_data_from_tkt

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-krb5: Remove unused get_authtime_from_tkt
Andrew Bartlett [Mon, 12 Mar 2012 07:31:42 +0000 (18:31 +1100)]
s3-krb5: Remove unused get_authtime_from_tkt

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-krb5: Remove unused krb5_rd_req_return_keyblock_from_keytab
Andrew Bartlett [Mon, 12 Mar 2012 07:29:57 +0000 (18:29 +1100)]
s3-krb5: Remove unused krb5_rd_req_return_keyblock_from_keytab

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-krb5: Remove unused get_principal_from_tkt
Andrew Bartlett [Mon, 12 Mar 2012 07:29:40 +0000 (18:29 +1100)]
s3-krb5: Remove unused get_principal_from_tkt

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-libads: Remove ads_verify_ticket() as it is now unused
Andrew Bartlett [Mon, 12 Mar 2012 07:24:25 +0000 (18:24 +1100)]
s3-libads: Remove ads_verify_ticket() as it is now unused

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-libads: Rework kerberos_return_pac() to use GENSEC for the server-side
Andrew Bartlett [Mon, 12 Mar 2012 07:21:10 +0000 (18:21 +1100)]
s3-libads: Rework kerberos_return_pac() to use GENSEC for the server-side

This removes the last user of ads_verify_ticket(), and means that we
only have one code path to verify an incoming krb5 (GSSAPI) ticket.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-libsmb: Remove unused spnego_parse_krb5_wrap()
Andrew Bartlett [Sun, 11 Mar 2012 01:30:22 +0000 (12:30 +1100)]
s3-libsmb: Remove unused spnego_parse_krb5_wrap()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agobuild: Reduce deps of ntlm_auth
Andrew Bartlett [Sat, 10 Mar 2012 21:11:36 +0000 (08:11 +1100)]
build: Reduce deps of ntlm_auth

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-ntlm_auth: use manage_gensec_request for squid-2.5-ntlmssp
Andrew Bartlett [Sat, 10 Mar 2012 21:10:16 +0000 (08:10 +1100)]
s3-ntlm_auth: use manage_gensec_request for squid-2.5-ntlmssp

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-auth: Order GENSEC mechs by priority, krb5 before NTLMSSP
Andrew Bartlett [Sat, 10 Mar 2012 20:04:38 +0000 (07:04 +1100)]
s3-auth: Order GENSEC mechs by priority, krb5 before NTLMSSP

Otherwise, really simple clients (such as the current ntlm_auth gss-spnego client)
will not select krb5.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-ntlm_auth: add ntlm_auth_generate_session_info_pac()
Andrew Bartlett [Sat, 10 Mar 2012 20:04:38 +0000 (07:04 +1100)]
s3-ntlm_auth: add ntlm_auth_generate_session_info_pac()

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-ntlm_auth Use GENSEC for gss-spnego server
Andrew Bartlett [Sat, 10 Mar 2012 19:45:39 +0000 (06:45 +1100)]
s3-ntlm_auth Use GENSEC for gss-spnego server

This imports the gensec handling code from the source4 ntlm_auth, which
will eventually be used for all the NTLMSSP and SPNEGO clients and servers
but which is only used for gss-spnego for now.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agos4:ldap_server: fix typo in DEBUG() message
Stefan Metzmacher [Tue, 3 Apr 2012 11:55:08 +0000 (13:55 +0200)]
s4:ldap_server: fix typo in DEBUG() message

metze

7 years agowafsamba: Avoid NameError when printing error about missing system deps.
Jelmer Vernooij [Tue, 3 Apr 2012 14:12:54 +0000 (16:12 +0200)]
wafsamba: Avoid NameError when printing error about missing system deps.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Apr  3 17:46:42 CEST 2012 on sn-devel-104

7 years agos3: Enhance the dbwrap needed x attempts msg
Volker Lendecke [Tue, 3 Apr 2012 11:20:39 +0000 (13:20 +0200)]
s3: Enhance the dbwrap needed x attempts msg

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Tue Apr  3 15:17:11 CEST 2012 on sn-devel-104

7 years agolib/util: charset modules do not exist any more
Andrew Bartlett [Tue, 3 Apr 2012 04:18:09 +0000 (14:18 +1000)]
lib/util: charset modules do not exist any more

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Apr  3 08:07:42 CEST 2012 on sn-devel-104

7 years agofile_server: Move vfs objects initialisation into file_server.c smb.conf wrapper
Andrew Bartlett [Tue, 3 Apr 2012 03:31:15 +0000 (13:31 +1000)]
file_server: Move vfs objects initialisation into file_server.c smb.conf wrapper

7 years agos3-vfs: initial work on posix:eadb module
Andrew Bartlett [Mon, 2 Apr 2012 08:39:09 +0000 (18:39 +1000)]
s3-vfs: initial work on posix:eadb module

This is a module that, like vfs_xattr_tdb, stores extended attributes
in a DB on disk.  This uses the format needed to support the
posix:eadb smb.conf option.

Andrew Bartlett

7 years agos4-ntvfs: Rename xattr_tdb.c to posix_eadb.c and make more generally useful
Andrew Bartlett [Tue, 3 Apr 2012 03:35:39 +0000 (13:35 +1000)]
s4-ntvfs: Rename xattr_tdb.c to posix_eadb.c and make more generally useful

This is now a small library, to be called from ntvfs, python and
vfs_posix_eadb.  The rename makes it clear that this has a different
DB format to that used by vfs_xattr_tdb, and matches the posix:eadb
smb.conf parameter used to configure it.

Andrew Bartlett

7 years agos3-vfs: Use new smb_load_module for better diagnostics
Andrew Bartlett [Tue, 3 Apr 2012 03:23:43 +0000 (13:23 +1000)]
s3-vfs: Use new smb_load_module for better diagnostics

7 years agos3-smbd: Inline init_modules() into only caller
Andrew Bartlett [Tue, 3 Apr 2012 03:23:18 +0000 (13:23 +1000)]
s3-smbd: Inline init_modules() into only caller

7 years agolib/util: Add smb_load_module that returns DEBUG(0) errors on failure
Andrew Bartlett [Tue, 3 Apr 2012 03:22:41 +0000 (13:22 +1000)]
lib/util: Add smb_load_module that returns DEBUG(0) errors on failure

These errors are very important when trying to work out why a module
does not load, and this rework allows them to be shown when loading
vfs modules.

Andrew Bartlett

7 years agos4:smb_server/smb2: add missing 'return;' statements in smb2srv_chain_reply()
Stefan Metzmacher [Mon, 26 Mar 2012 11:50:44 +0000 (13:50 +0200)]
s4:smb_server/smb2: add missing 'return;' statements in smb2srv_chain_reply()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Apr  2 23:02:53 CEST 2012 on sn-devel-104

7 years agos4:smb_server/smb2: after smbsrv_terminate_connection() we have to return
Stefan Metzmacher [Mon, 26 Mar 2012 11:49:36 +0000 (13:49 +0200)]
s4:smb_server/smb2: after smbsrv_terminate_connection() we have to return

req is a talloc child of the connection...

metze

7 years agos4:smb_server/smb2: fix memory leak in smb2srv_chain_reply()
Stefan Metzmacher [Mon, 26 Mar 2012 11:48:51 +0000 (13:48 +0200)]
s4:smb_server/smb2: fix memory leak in smb2srv_chain_reply()

metze

7 years agos4:smb_server/smb2: use helper variable smb2srv_chain_reply()
Stefan Metzmacher [Mon, 26 Mar 2012 11:47:39 +0000 (13:47 +0200)]
s4:smb_server/smb2: use helper variable smb2srv_chain_reply()

metze

7 years agos4:smb_server/smb: remove a request from the list before adding the next one in a...
Stefan Metzmacher [Mon, 19 Mar 2012 22:52:25 +0000 (23:52 +0100)]
s4:smb_server/smb: remove a request from the list before adding the next one in a chain.

metze

7 years agos3: Notifies should never time out
Volker Lendecke [Mon, 2 Apr 2012 08:50:33 +0000 (10:50 +0200)]
s3: Notifies should never time out

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Apr  2 12:31:17 CEST 2012 on sn-devel-104

7 years agos4-upgradedns: Fix the fqdn for forest dns zone
Amitay Isaacs [Mon, 2 Apr 2012 07:15:09 +0000 (17:15 +1000)]
s4-upgradedns: Fix the fqdn for forest dns zone

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Mon Apr  2 10:56:10 CEST 2012 on sn-devel-104

7 years agoFix some of the issues that Jelmer identified in my first patch. This might be
Richard Sharpe [Sun, 1 Apr 2012 20:14:49 +0000 (13:14 -0700)]
Fix some of the issues that Jelmer identified in my first patch. This might be
changed again, especially when I figure out how to return the file as an
object.

Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Mon Apr  2 01:43:44 CEST 2012 on sn-devel-104

7 years agoAdd an open and close method to samba.smb.SMB so we can open and close files.
Richard Sharpe [Sat, 31 Mar 2012 05:04:28 +0000 (22:04 -0700)]
Add an open and close method to samba.smb.SMB so we can open and close files.
Also, fix up some documentation.

Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Sun Apr  1 16:29:52 CEST 2012 on sn-devel-104

7 years agos3-aio-fork: Fix a segfault in vfs_aio_fork
Volker Lendecke [Sat, 31 Mar 2012 11:37:20 +0000 (13:37 +0200)]
s3-aio-fork: Fix a segfault in vfs_aio_fork

aio_suspend does not signal the main process with a signal, it just waits. The
aio_fork module does not use the signal at all, it directly calls back into the
main smbd by calling smbd_aio_complete_aio_ex. This is an abstraction
violation, but the alternative would have been to use signals where they are
not needed. However, in wait_for_aio_completion this bites us: With aio_fork we
call handle_aio_completed twice on the same aio_ex struct: Once from the call
to handle_aio_completion within the aio_fork module and once from the code in
wait_for_aio_completion.

This patch fixes it in a pretty bad way by introducing flag variables and more
state. But the mid-term plan is to replace the posix aio calls from the vfs and
do pread_send/recv and pwrite_send/recv at the vfs layer, so this will
significantly change anyway.

Thanks to Kirill Malkin <kirill.malkin@starboardstorage.com> for reporting this
crash!

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sat Mar 31 15:25:55 CEST 2012 on sn-devel-104

7 years agos3-aio-fork: Fix aio_suspend event hierarchy
Volker Lendecke [Sat, 31 Mar 2012 11:34:42 +0000 (13:34 +0200)]
s3-aio-fork: Fix aio_suspend event hierarchy

We end up here multiple times. There's no real point putting the events into
the child struct, at the end of this routine we need to free them anyway.

7 years agos3-aio-fork: Fix an alignment warning on OS/X
Volker Lendecke [Sat, 31 Mar 2012 08:37:15 +0000 (10:37 +0200)]
s3-aio-fork: Fix an alignment warning on OS/X

7 years agoMake sure we claim that a DACL or SACL is present if the SD says so
Richard Sharpe [Sat, 31 Mar 2012 05:02:25 +0000 (22:02 -0700)]
Make sure we claim that a DACL or SACL is present if the SD says so

Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Sat Mar 31 09:34:36 CEST 2012 on sn-devel-104

7 years agoFix an IPv6 breakage I introduced by adding an strlcpy truncation check. Found by...
Jeremy Allison [Sat, 31 Mar 2012 04:21:57 +0000 (21:21 -0700)]
Fix an IPv6 breakage I introduced by adding an strlcpy truncation check. Found by Matthieu Patou <mat@samba.org>.

The truncate of the strlcpy() here was a *desired* side effect.
strlcpy()/strlcat() should never be used like that. Be more
explicit about the truncation and don't use strlcpy here.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Mar 31 07:59:16 CEST 2012 on sn-devel-104

7 years agoFix bug #8831 - Inconsistent (with manpage) command-line switch for "help" in smbtree
Jeremy Allison [Fri, 30 Mar 2012 19:23:07 +0000 (12:23 -0700)]
Fix bug #8831 - Inconsistent (with manpage) command-line switch for "help" in smbtree

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Mar 30 22:59:53 CEST 2012 on sn-devel-104

7 years agoWho would have guessed - checking returns from strlcat found a memory overwrite bug...
Jeremy Allison [Fri, 30 Mar 2012 17:57:51 +0000 (10:57 -0700)]
Who would have guessed - checking returns from strlcat found a memory overwrite bug :-).

7 years agoMore strlcat/strlcpy truncate checks.
Jeremy Allison [Fri, 30 Mar 2012 00:13:07 +0000 (17:13 -0700)]
More strlcat/strlcpy truncate checks.

7 years agos4 dns: Allow updating PTR records.
Kai Blin [Fri, 30 Mar 2012 15:19:48 +0000 (17:19 +0200)]
s4 dns: Allow updating PTR records.

Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Fri Mar 30 19:26:52 CEST 2012 on sn-devel-104

7 years agos3: Avoid a crash with debug level 10
Volker Lendecke [Fri, 30 Mar 2012 13:15:29 +0000 (15:15 +0200)]
s3: Avoid a crash with debug level 10

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Mar 30 16:52:16 CEST 2012 on sn-devel-104

7 years agoldb: Permit desactivation of autocomit for every ldb_xxx_ctrl function
Matthieu Patou [Fri, 30 Mar 2012 08:24:07 +0000 (01:24 -0700)]
ldb: Permit desactivation of autocomit for every ldb_xxx_ctrl function

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Fri Mar 30 11:59:09 CEST 2012 on sn-devel-104

7 years agoStart to add truncate checks on all uses of strlcpy(). Reading lwn
Jeremy Allison [Wed, 28 Mar 2012 23:49:30 +0000 (16:49 -0700)]
Start to add truncate checks on all uses of strlcpy(). Reading lwn
has it's uses :-).

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Mar 29 20:48:15 CEST 2012 on sn-devel-104

7 years agoBased on code from Richard Sharpe <realrichardsharpe@gmail.com>,
Jeremy Allison [Wed, 28 Mar 2012 22:09:47 +0000 (15:09 -0700)]
Based on code from Richard Sharpe <realrichardsharpe@gmail.com>,
ensure we don't crash on a NULL DACL.

7 years agos3: Fix a valgrind error
Volker Lendecke [Thu, 29 Mar 2012 12:16:04 +0000 (14:16 +0200)]
s3: Fix a valgrind error

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Mar 29 15:50:13 CEST 2012 on sn-devel-104

7 years agolib/tdb: Update ABI tdb-1.2.10
Amitay Isaacs [Mon, 26 Mar 2012 22:44:59 +0000 (09:44 +1100)]
lib/tdb: Update ABI

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Thu Mar 29 13:12:46 CEST 2012 on sn-devel-104

7 years agolib/tdb: Add/expose lock functions to support CTDB
Amitay Isaacs [Mon, 26 Mar 2012 22:44:33 +0000 (09:44 +1100)]
lib/tdb: Add/expose lock functions to support CTDB

This patch adds two lock functions used by CTDB to perform asynchronous
locking. These functions do not actually perform any fcntl operations,
but only increment internal counters.

 - tdb_transaction_write_lock_mark()
 - tdb_transaction_write_lock_unmark()

It also exposes two internal functions
 - tdb_lock_nonblock()
 - tdb_unlock()

These functions are NOT exposed in include/tdb.h to prevent any further
uses of these functions. If you ever need to use these functions, consider
using tdb2.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
7 years agocast: make sure suncc sees a constant.
Rusty Russell [Thu, 29 Mar 2012 04:28:33 +0000 (14:58 +1030)]
cast: make sure suncc sees a constant.

cast_const() et. al. are supposed to be a constant expression, so you can do things like:
static char *p = cast_const(char *, (const char *)"hello");

Unfortunately, a cast to intptr_t and arithmetic makes suncc reject it as
a constant expression.  We need the cast, because (1) the expression could be
a void *, so we can't just add to it, and (2) gcc complains with -Wcast-qual
without it.

So instead of adding BUILD_BUG_OR_ZERO, we use a ? :, which keeps everyone happy.

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

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Thu Mar 29 08:18:57 CEST 2012 on sn-devel-104

7 years agocast: test/compile_fail-cast_static.c should fail without COMPOUND_LITERALS.
Rusty Russell [Tue, 27 Mar 2012 05:10:45 +0000 (15:40 +1030)]
cast: test/compile_fail-cast_static.c should fail without COMPOUND_LITERALS.

It still gave a warning on gcc, because casting a char to a char* gives a warning.  Not so on sun CC.

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

7 years agotdb2: fix prototype in tdb1 code.
Rusty Russell [Mon, 26 Mar 2012 04:03:17 +0000 (14:33 +1030)]
tdb2: fix prototype in tdb1 code.

We were handing an int-returning function where we should hand an enum TDB_ERROR
returning function.  Worse, it was returning 0/-1 instead of 0/TDB_ERR_*.

Fortunately, it's only compared against success, but the Solaris compiler
warns about it, and it's not correct anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years agos4-upgradedns: Make sure the attribute exists before accessing it
Amitay Isaacs [Wed, 28 Mar 2012 06:49:09 +0000 (17:49 +1100)]
s4-upgradedns: Make sure the attribute exists before accessing it

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Mar 28 10:27:40 CEST 2012 on sn-devel-104

7 years agoAdd DEBUG statements to show when access has been denied and why.
Richard Sharpe [Wed, 28 Mar 2012 03:32:11 +0000 (20:32 -0700)]
Add DEBUG statements to show when access has been denied and why.

Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Wed Mar 28 07:07:26 CEST 2012 on sn-devel-104

7 years agos4 dns: Only do recursive queries when allowed/desired
Kai Blin [Tue, 27 Mar 2012 13:00:01 +0000 (15:00 +0200)]
s4 dns: Only do recursive queries when allowed/desired

If recursive queries are switched off in smb.conf or the client doesn't ask for
recursion, don't recurse.

Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Tue Mar 27 17:39:26 CEST 2012 on sn-devel-104

7 years agos4 dns: Check smb.conf if we should allow recursion
Kai Blin [Tue, 27 Mar 2012 12:42:15 +0000 (14:42 +0200)]
s4 dns: Check smb.conf if we should allow recursion

7 years agos4 dns: Allow changing the dns operation flags in handlers
Kai Blin [Tue, 27 Mar 2012 11:59:03 +0000 (13:59 +0200)]
s4 dns: Allow changing the dns operation flags in handlers

7 years agos4 dns: Only forward for zones we don't own
Kai Blin [Tue, 27 Mar 2012 11:36:16 +0000 (13:36 +0200)]
s4 dns: Only forward for zones we don't own

7 years agos4 dns: Forward questions we can't answer to another server
Kai Blin [Tue, 27 Mar 2012 06:42:22 +0000 (08:42 +0200)]
s4 dns: Forward questions we can't answer to another server

This makes use of libdns and currently hardcodes the forward server, but
it works. :)

7 years agos4 dns: Add a simple dns lookup helper
Kai Blin [Mon, 26 Mar 2012 18:47:42 +0000 (20:47 +0200)]
s4 dns: Add a simple dns lookup helper

7 years agos4 dns: Add a simple async client library
Kai Blin [Sun, 11 Mar 2012 09:13:51 +0000 (10:13 +0100)]
s4 dns: Add a simple async client library

7 years agoselftest.py: Add get_interface.
Jelmer Vernooij [Sun, 25 Mar 2012 20:38:59 +0000 (21:38 +0100)]
selftest.py: Add get_interface.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Mar 27 00:32:48 CEST 2012 on sn-devel-104

7 years agondr: Update ABI.
Jelmer Vernooij [Mon, 26 Mar 2012 16:25:37 +0000 (18:25 +0200)]
ndr: Update ABI.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Mar 26 19:58:25 CEST 2012 on sn-devel-104

7 years agowafsamba: Cope with slight differences in gdb output regarding incomplete sequences.
Jelmer Vernooij [Tue, 20 Mar 2012 01:31:02 +0000 (02:31 +0100)]
wafsamba: Cope with slight differences in gdb output regarding incomplete sequences.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=8820

7 years agoAdd ABI file for libndr.
Jelmer Vernooij [Sat, 24 Mar 2012 14:42:22 +0000 (15:42 +0100)]
Add ABI file for libndr.

7 years agos3: Pass filters explicitly through vfs notify watch
Volker Lendecke [Mon, 26 Mar 2012 10:46:11 +0000 (12:46 +0200)]
s3: Pass filters explicitly through vfs notify watch

This removes a dependency on "struct notify_entry" and makes the nature of the
API more explicit. We depend upon the VFS module to mask out elements from
e->filter and e->subdir_filter that it took over to handle.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Mar 26 17:45:44 CEST 2012 on sn-devel-104

7 years agos3: Fix a typo
Volker Lendecke [Mon, 26 Mar 2012 11:11:02 +0000 (13:11 +0200)]
s3: Fix a typo

7 years agos3: Rename a variable in inotify_watch for clarity
Volker Lendecke [Mon, 26 Mar 2012 11:09:33 +0000 (13:09 +0200)]
s3: Rename a variable in inotify_watch for clarity

7 years agos3: Pass "filter" instead of "notify_entry" to inotify_map
Volker Lendecke [Mon, 26 Mar 2012 11:00:53 +0000 (13:00 +0200)]
s3: Pass "filter" instead of "notify_entry" to inotify_map

This makes the potential modification a bit more obvious

7 years agos3-docs: Prepend '/' to filename argument (Bug #8826)
SATOH Fumiyasu [Mon, 26 Mar 2012 10:13:12 +0000 (19:13 +0900)]
s3-docs: Prepend '/' to filename argument (Bug #8826)

7 years agos4-dsdb: use constant-time search for descriptor -> get_last_structural_class()
Andrew Bartlett [Mon, 26 Mar 2012 01:06:39 +0000 (12:06 +1100)]
s4-dsdb: use constant-time search for descriptor -> get_last_structural_class()

The objectClass list is sorted at this point, as we are called below
the objectclass module here, or are working from a search result.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Mar 26 05:38:13 CEST 2012 on sn-devel-104

7 years agoFix the PyDoc comments in samba.smb.SMB and add a security_info argument to both...
Richard Sharpe [Mon, 26 Mar 2012 00:27:11 +0000 (17:27 -0700)]
Fix the PyDoc comments in samba.smb.SMB and add a security_info argument to both get_acl and set_acl to allow the caller to specify what info is wanted. Defaults to 0 which means all info.

Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Mon Mar 26 04:05:25 CEST 2012 on sn-devel-104

7 years agos4:ldap.py - re-introduce the "(dn=CN=ldaptestUSER3,CN=Users,DC=wallnoefer2,DC=local...
Matthias Dieter Wallnöfer [Sat, 22 Oct 2011 10:44:02 +0000 (12:44 +0200)]
s4:ldap.py - re-introduce the "(dn=CN=ldaptestUSER3,CN=Users,DC=wallnoefer2,DC=local)" test

This syntax is not supported by Windows AD and should also be denied by
s4/LDB.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Mar 26 02:30:53 CEST 2012 on sn-devel-104

7 years agoLDB/s4 - deny the "(dn=...)" syntax on search filters when in AD mode
Matthias Dieter Wallnöfer [Wed, 26 Oct 2011 07:47:35 +0000 (09:47 +0200)]
LDB/s4 - deny the "(dn=...)" syntax on search filters when in AD mode

Achieve this by introducing a "disallowDNFilter" flag.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
7 years agoLDB/s4 - do not use the "(dn=...)" syntax on filters anymore
Matthias Dieter Wallnöfer [Tue, 25 Oct 2011 18:10:30 +0000 (20:10 +0200)]
LDB/s4 - do not use the "(dn=...)" syntax on filters anymore

Make it AD-compatible using "(distinguishedName=...)".

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
7 years agos4:ldap.py - test the already mentioned structural object class sorting behaviour
Matthias Dieter Wallnöfer [Sun, 25 Mar 2012 21:35:23 +0000 (23:35 +0200)]
s4:ldap.py - test the already mentioned structural object class sorting behaviour

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
7 years agos4:dsdb - enhance "get_last_structural_class()" for optimisations
Matthias Dieter Wallnöfer [Sun, 25 Mar 2012 21:25:01 +0000 (23:25 +0200)]
s4:dsdb - enhance "get_last_structural_class()" for optimisations

If the objectclass entry has been sorted before we are able to determine
the (last) structural or 88 object class in constant time.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
7 years agos4:objectclass LDB module - fix up the sorting in respect to structural or 88 objectc...
Matthias Dieter Wallnöfer [Sun, 25 Mar 2012 20:51:51 +0000 (22:51 +0200)]
s4:objectclass LDB module - fix up the sorting in respect to structural or 88 objectclasses

Please have a look at MS-ADTS 3.1.1.1.4.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
7 years agos4:objectclass LDB module - clean up "objectclass_sort()"
Matthias Dieter Wallnöfer [Sun, 25 Mar 2012 19:33:52 +0000 (21:33 +0200)]
s4:objectclass LDB module - clean up "objectclass_sort()"

Make it easier to comprehend

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>