7 years agos3-xattr_tdb: Be nice to xattr_tdb_getxattr callers, return the full blob
Andrew Bartlett [Mon, 16 Apr 2012 07:14:06 +0000 (17:14 +1000)]
s3-xattr_tdb: Be nice to xattr_tdb_getxattr callers, return the full blob

In this case, the blob is already in memory, so it is easier to return the full
blob to the caller, and let the caller decide if some interface restriction
stops the full blob from being passed all the way up the stack.

This allows us to quickly write a python wrapper for this xattr storage

Andrew Bartlett

7 years agos3-xattr_tdb: make xattr_tdb a private library, for use outside vfs_xattr_tdb
Andrew Bartlett [Mon, 16 Apr 2012 05:49:13 +0000 (15:49 +1000)]
s3-xattr_tdb: make xattr_tdb a private library, for use outside vfs_xattr_tdb

7 years agos3-lib: Add file_id_string()
Andrew Bartlett [Mon, 16 Apr 2012 05:36:15 +0000 (15:36 +1000)]
s3-lib: Add file_id_string()

7 years agos3-build: move file_id.c into samba3-util and create a private header
Andrew Bartlett [Mon, 16 Apr 2012 05:34:40 +0000 (15:34 +1000)]
s3-build: move file_id.c into samba3-util and create a private header

7 years agodbwrap: Add dbwrap_tdb to private dbwrap library
Andrew Bartlett [Mon, 16 Apr 2012 04:21:33 +0000 (14:21 +1000)]
dbwrap: Add dbwrap_tdb to private dbwrap library

Andrew Bartlett

7 years agos3-build: Add missing samba3-util dep to tdb-wrap3
Andrew Bartlett [Mon, 16 Apr 2012 04:20:46 +0000 (14:20 +1000)]
s3-build: Add missing samba3-util dep to tdb-wrap3

7 years agolib/util: Move map_nt_error_from_tdb to the top level
Andrew Bartlett [Mon, 16 Apr 2012 04:18:49 +0000 (14:18 +1000)]
lib/util: Move map_nt_error_from_tdb to the top level

This will help with making dbwrap available as a top level library.

Andrew Bartlett

7 years agos3-dbwrap: push lp_ctx up another layer in the stack
Andrew Bartlett [Mon, 16 Apr 2012 03:37:39 +0000 (13:37 +1000)]
s3-dbwrap: push lp_ctx up another layer in the stack

This will allow db_open_tdb() to be called from common code, which may
already have a loadparm context loaded.

It also slowly moves the lp_ctx up the stack, as required to remove
the library loop between smbconf and the registry.

Andrew Bartlett

7 years agos3-dbwrap: Add talloc_stackframe() calls
Andrew Bartlett [Mon, 16 Apr 2012 03:36:01 +0000 (13:36 +1000)]
s3-dbwrap: Add talloc_stackframe() calls

This is in preperation for calling dbwrap from common code, where we may not
have a stackframe set up.

Andrew Bartlett

7 years agobuild: Remove more of the s3 special cases in waf: only pidfile.c needs -DCONFIGFILE
Andrew Bartlett [Tue, 17 Apr 2012 01:25:40 +0000 (11:25 +1000)]
build: Remove more of the s3 special cases in waf: only pidfile.c needs -DCONFIGFILE

7 years agos4:samdb:rootdse: implement the schemaUpgradeInProgress operation in ldap modify
Michael Adam [Fri, 6 Apr 2012 00:20:37 +0000 (02:20 +0200)]
s4:samdb:rootdse: implement the schemaUpgradeInProgress operation in ldap modify

This is preliminary in that it is implemented as a no-op for a start
just to be able to successfully answer the request, which seems to be
sufficient in order to e.g. survive the exchange schema extensions.

Signed-off-by: Matthieu Patou <>
Autobuild-User: Michael Adam <>
Autobuild-Date: Wed Apr 18 02:48:28 CEST 2012 on sn-devel-104

7 years agos4-schema: set subClassOf by default to top if not specified
Matthieu Patou [Tue, 17 Apr 2012 06:24:10 +0000 (23:24 -0700)]
s4-schema: set subClassOf by default to top if not specified

Signed-off-by: Michael Adam <>
7 years agos4-schema: remove unused variable
Matthieu Patou [Mon, 16 Apr 2012 22:34:24 +0000 (15:34 -0700)]
s4-schema: remove unused variable

7 years agos4-schema: Generate some schema related attribute as MS AD is doing if they are not...
Matthieu Patou [Mon, 16 Apr 2012 22:22:24 +0000 (15:22 -0700)]
s4-schema: Generate some schema related attribute as MS AD is doing if they are not present in ldb requests

7 years agos4-schema: rename dsdb_attribute_from_ldb to dsdb_set_attribute_from_ldb and dsdb_cl...
Matthieu Patou [Sun, 15 Apr 2012 21:50:20 +0000 (14:50 -0700)]
s4-schema: rename dsdb_attribute_from_ldb to dsdb_set_attribute_from_ldb  and dsdb_class_from_ldb to dsdb_set_class_from_ldb

7 years agos4: use enums instead of strings it's cheaper
Matthieu Patou [Sun, 15 Apr 2012 19:37:00 +0000 (12:37 -0700)]
s4: use enums instead of strings it's cheaper

7 years agoFix typo
Simo Sorce [Fri, 6 Apr 2012 19:22:06 +0000 (15:22 -0400)]
Fix typo

Autobuild-User: Simo Sorce <>
Autobuild-Date: Tue Apr 17 22:22:26 CEST 2012 on sn-devel-104

7 years agowaf: Use instead of print.
Andreas Schneider [Tue, 17 Apr 2012 12:11:45 +0000 (14:11 +0200)]
waf: Use instead of print.

Autobuild-User: Andreas Schneider <>
Autobuild-Date: Tue Apr 17 17:48:23 CEST 2012 on sn-devel-104

7 years agowaf: Add possibility to build with system libwbclient.
Andreas Schneider [Tue, 17 Apr 2012 10:34:48 +0000 (12:34 +0200)]
waf: Add possibility to build with system libwbclient.

7 years agos3-waf: Add possibility to build with system libsmbclient.
Andreas Schneider [Mon, 16 Apr 2012 15:05:35 +0000 (17:05 +0200)]
s3-waf: Add possibility to build with system libsmbclient.

7 years agos3-waf: Fix client/smbclient dependencies.
Andreas Schneider [Mon, 16 Apr 2012 15:07:05 +0000 (17:07 +0200)]
s3-waf: Fix client/smbclient dependencies.

7 years agos3:libsmb/cliconnect: make use of ntlmssp_is_anonymous()
Stefan Metzmacher [Tue, 17 Apr 2012 11:49:28 +0000 (13:49 +0200)]
s3:libsmb/cliconnect: make use of ntlmssp_is_anonymous()


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Tue Apr 17 16:16:51 CEST 2012 on sn-devel-104

7 years agos3:libsmb/ntlmssp: improve anonymous logins
Stefan Metzmacher [Tue, 17 Apr 2012 11:36:42 +0000 (13:36 +0200)]
s3:libsmb/ntlmssp: improve anonymous logins

smbtorture3 (and maybe others) use fstrings for 'user' and 'password',
so we need to check for empty strings.


7 years agos3:libsmb/ntlmssp: add ntlmssp_is_anonymous()
Stefan Metzmacher [Tue, 17 Apr 2012 11:34:27 +0000 (13:34 +0200)]
s3:libsmb/ntlmssp: add ntlmssp_is_anonymous()


7 years agos3:libsmb/ntlmssp: remove some indentation in ntlmssp_set_password()
Stefan Metzmacher [Tue, 17 Apr 2012 06:46:51 +0000 (08:46 +0200)]
s3:libsmb/ntlmssp: remove some indentation in ntlmssp_set_password()


7 years agoRevert "s3:libsmb/ntlmssp: an empty string should mean no password"
Stefan Metzmacher [Tue, 17 Apr 2012 06:38:10 +0000 (08:38 +0200)]
Revert "s3:libsmb/ntlmssp: an empty string should mean no password"

This reverts commit 92483eee254ef6844fe88abe1e64f67033a1ea2d.

7 years agotsocket: Fix a couple of typos and spellings in tsocket_guide.txt
Michael Adam [Tue, 17 Apr 2012 10:56:49 +0000 (12:56 +0200)]
tsocket: Fix a couple of typos and spellings in tsocket_guide.txt

Autobuild-User: Michael Adam <>
Autobuild-Date: Tue Apr 17 14:41:53 CEST 2012 on sn-devel-104

7 years agos3: Add smbstatus -N to output the notify db
Volker Lendecke [Wed, 4 Apr 2012 12:51:09 +0000 (14:51 +0200)]
s3: Add smbstatus -N to output the notify db

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Tue Apr 17 11:54:35 CEST 2012 on sn-devel-104

7 years agos3: Add "notify-cleanup" to smbcontrol
Volker Lendecke [Wed, 4 Apr 2012 12:49:21 +0000 (14:49 +0200)]
s3: Add "notify-cleanup" to smbcontrol

This triggers a notify cleanup run which would normally only run periodically

7 years agos3: New notify implementation
Volker Lendecke [Wed, 4 Apr 2012 12:51:43 +0000 (14:51 +0200)]
s3: New notify implementation

From notify_internal.c:

         * The notify database is split up into two databases: One
         * relatively static index db and the real notify db with the
         * volatile entries.

This change is necessary to make notify scale better in a cluster

7 years agos3: Add two notify benchmark tests
Volker Lendecke [Wed, 4 Apr 2012 12:35:12 +0000 (14:35 +0200)]
s3: Add two notify benchmark tests

7 years agos3: Make torture_nprocs globally available
Volker Lendecke [Wed, 4 Apr 2012 12:29:33 +0000 (14:29 +0200)]
s3: Make torture_nprocs globally available

7 years agos3: Make ctdbd_messaging_send_blob available in non-clustered mode
Volker Lendecke [Wed, 4 Apr 2012 09:56:06 +0000 (11:56 +0200)]
s3: Make ctdbd_messaging_send_blob available in non-clustered mode

This will avoid the need for some #ifdefs

7 years agos3: Make messaging_ctdbd_connection available in non-clustered mode
Volker Lendecke [Wed, 4 Apr 2012 09:27:08 +0000 (11:27 +0200)]
s3: Make messaging_ctdbd_connection available in non-clustered mode

This might make some #ifdef CLUSTER_SUPPORT unnecessary in the future

7 years agos3: Implement tevent_barrier
Volker Lendecke [Tue, 3 Apr 2012 13:26:22 +0000 (15:26 +0200)]
s3: Implement tevent_barrier

This will help notify torture tests: A tevent barrier can be waited on with
tevent_barrier_wait_send/recv. The barrier is initialized with a number of
requests that it will accept waiting. When that number is reached, all those
requests will be released and their callback will be called. The barrier will
be free for re-use again.

7 years agos3: Start a list of ctdb srvid assigments
Volker Lendecke [Fri, 30 Mar 2012 09:37:15 +0000 (11:37 +0200)]
s3: Start a list of ctdb srvid assigments

7 years agos3: Introduce ctdb_messaging_send_blob
Volker Lendecke [Fri, 30 Mar 2012 09:10:47 +0000 (11:10 +0200)]
s3: Introduce ctdb_messaging_send_blob

Send a raw blob without the messaging.idl wrap

7 years agos3: Add msg_channel
Volker Lendecke [Wed, 15 Feb 2012 12:56:23 +0000 (13:56 +0100)]
s3: Add msg_channel

This is a tevent_based variant of messaging_register

7 years agos3: Add messaging_tdb_event()
Volker Lendecke [Wed, 15 Feb 2012 12:53:07 +0000 (13:53 +0100)]
s3: Add messaging_tdb_event()

This is a void* that represents a signal handler attached to some
custom tevent_context. This is necessary to make the tdb based
messaging infrastructure trigger its business when we are sitting in
tevent_loop_once for an event context that is not the main one in the
messaging context.

7 years agos3: Add a second ctdb connect library
Volker Lendecke [Wed, 15 Feb 2012 11:26:59 +0000 (12:26 +0100)]
s3: Add a second ctdb connect library

The existing one is not async at all.

7 years agos3: Add dbwrap_try_fetch_locked
Volker Lendecke [Tue, 27 Mar 2012 12:31:04 +0000 (14:31 +0200)]
s3: Add dbwrap_try_fetch_locked

This is designed to spread the load on individual ctdb records to allow upper
layers to do backoff mechanisms. In the ctdb case, do not get the record if a
local lock is already taken. If we are not dmaster, do at most one migrate

For the tdb case, this is a nonblocking fetch_locked. If someone else has the
lock, give up.

7 years agos3: Add dbwrap_cache
Volker Lendecke [Sat, 24 Mar 2012 12:49:40 +0000 (13:49 +0100)]
s3: Add dbwrap_cache

This is a caching layer for the notify database and potentially for the brlock
database. It caches the parse_record operation as long as the underlying seqnum
does not change.

7 years agos3: Open up 3 levels of dbwrap_lock_order
Volker Lendecke [Sun, 18 Mar 2012 13:47:37 +0000 (14:47 +0100)]
s3: Open up 3 levels of dbwrap_lock_order

7 years agos3: Increase debuglevel for unknown child msgs
Volker Lendecke [Fri, 13 Apr 2012 14:03:26 +0000 (16:03 +0200)]
s3: Increase debuglevel for unknown child msgs

Now that we have forked background jobs, this spams log.smbd

7 years agos3: Add infrastructure for background jobs
Volker Lendecke [Fri, 23 Mar 2012 12:43:39 +0000 (13:43 +0100)]
s3: Add infrastructure for background jobs

7 years agos3: Return CTDB_PATH from lp_ctdbd_socket()
Volker Lendecke [Fri, 30 Mar 2012 13:37:33 +0000 (15:37 +0200)]
s3: Return CTDB_PATH from lp_ctdbd_socket()

All callers had that fallback

7 years agotdb-compat: Add tdb_chainlock_nonblock
Volker Lendecke [Mon, 16 Apr 2012 13:23:06 +0000 (15:23 +0200)]
tdb-compat: Add tdb_chainlock_nonblock

7 years pass down outf and errf
Stefan Metzmacher [Mon, 26 Mar 2012 07:31:55 +0000 (09:31 +0200)] pass down outf and errf

Not all classes are derived from class 'Command'.


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Tue Apr 17 10:06:47 CEST 2012 on sn-devel-104

7 years agodocs:man:vfs_gpfs: Remove itemized list to fix indentation
Christof Schmitt [Wed, 28 Mar 2012 19:57:11 +0000 (12:57 -0700)]
docs:man:vfs_gpfs: Remove itemized list to fix indentation

The indentation in the man page is wrong after the itemized list. An
easy fix is to put the text in the paragraph instead.

Autobuild-User: Christian Ambach <>
Autobuild-Date: Mon Apr 16 23:00:37 CEST 2012 on sn-devel-104

7 years agos3: switch off kernel oplocks by default
Christian Ambach [Mon, 16 Apr 2012 15:37:17 +0000 (17:37 +0200)]
s3: switch off kernel oplocks by default

as discussed on samba-technical, turn kernel oplocks off by default
to not leave users without the benefits of Level II oplocks

7 years agos3: Fix smbclient notify against Windows
Volker Lendecke [Mon, 16 Apr 2012 14:21:15 +0000 (16:21 +0200)]
s3: Fix smbclient notify against Windows


Autobuild-User: Volker Lendecke <>
Autobuild-Date: Mon Apr 16 21:27:54 CEST 2012 on sn-devel-104

7 years agoImprove the VFS Makefile so that it is easier for use out of tree but still works...
Richard Sharpe [Mon, 16 Apr 2012 12:00:08 +0000 (05:00 -0700)]
Improve the VFS Makefile so that it is easier for use out of tree but still works with FreeBSD.

Autobuild-User: Richard Sharpe <>
Autobuild-Date: Mon Apr 16 19:51:14 CEST 2012 on sn-devel-104

7 years agoprovision: Simplify handling of default for --server-role.
Jelmer Vernooij [Sun, 15 Apr 2012 21:36:54 +0000 (23:36 +0200)]
provision: Simplify handling of default for --server-role.

Autobuild-User: Jelmer Vernooij <>
Autobuild-Date: Mon Apr 16 18:12:24 CEST 2012 on sn-devel-104

7 years agoprovision: Simplify handling of default for --function-level.
Jelmer Vernooij [Sun, 15 Apr 2012 21:35:41 +0000 (23:35 +0200)]
provision: Simplify handling of default for --function-level.

7 years agoprovision: Simplify handling of default for --dns-backend option.
Jelmer Vernooij [Sun, 15 Apr 2012 21:35:07 +0000 (23:35 +0200)]
provision: Simplify handling of default for --dns-backend option.

7 years agos3/selftest: Fix reference to knownfail file.
Jelmer Vernooij [Sun, 15 Apr 2012 21:33:22 +0000 (23:33 +0200)]
s3/selftest: Fix reference to knownfail file.

7 years agobuild: rebuild idl if the pidl compiler is changed
David Disseldorp [Sun, 15 Apr 2012 23:00:46 +0000 (01:00 +0200)]
build: rebuild idl if the pidl compiler is changed

In determining whether to compile a given .idl source file,
currently checks:
a) that all build output files exist
b) build output files are newer than their corresponding .idl source

The .idl is rebuilt if either of the above conditions is false.
This logic does not catch the case where the pidl compiler itself is
changed. An IDL rebuild should occur in such a case.

Autobuild-User: David Disseldorp <>
Autobuild-Date: Mon Apr 16 16:29:45 CEST 2012 on sn-devel-104

7 years agos4:libcli/smb2: fix anonymous session setups against windows servers
Stefan Metzmacher [Mon, 16 Apr 2012 10:14:07 +0000 (12:14 +0200)]
s4:libcli/smb2: fix anonymous session setups against windows servers

Windows server doesn't set the SMB2_SESSION_FLAG_IS_GUEST nor

This fix makes sure we don't try to verify a signature on the
final session setup response.


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Mon Apr 16 14:44:46 CEST 2012 on sn-devel-104

7 years agos4:libcli/smb2: remove unused dependency to LIBPACKET
Stefan Metzmacher [Mon, 16 Apr 2012 10:12:59 +0000 (12:12 +0200)]
s4:libcli/smb2: remove unused dependency to LIBPACKET


7 years agos3:libsmb: fix anonymous session setups against windows servers
Stefan Metzmacher [Mon, 16 Apr 2012 10:14:07 +0000 (12:14 +0200)]
s3:libsmb: fix anonymous session setups against windows servers

Windows server doesn't set the SMB2_SESSION_FLAG_IS_GUEST nor

This fix makes sure we don't try to verify a signature on the
final session setup response.


7 years agos3:libsmb/ntlmssp: an empty string should mean no password
Stefan Metzmacher [Mon, 16 Apr 2012 10:32:28 +0000 (12:32 +0200)]
s3:libsmb/ntlmssp: an empty string should mean no password


7 years agolibcli/smb: move smb2cli_session_setup_*() prototypes to the code.
Stefan Metzmacher [Mon, 16 Apr 2012 10:49:58 +0000 (12:49 +0200)]
libcli/smb: move smb2cli_session_setup_*() prototypes to the code.


7 years agolibcli/smb: add smb2cli_session_get_flags()
Stefan Metzmacher [Mon, 16 Apr 2012 10:45:02 +0000 (12:45 +0200)]
libcli/smb: add smb2cli_session_get_flags()


7 years agolibcli/smb: we should not force a session key for anonymous connections
Stefan Metzmacher [Mon, 16 Apr 2012 10:41:30 +0000 (12:41 +0200)]
libcli/smb: we should not force a session key for anonymous connections

smb2cli_session_set_session_key() should not check for a valid session
key, if the connection is a guest or null session.


7 years agolibcli/smb: make use of data_blob_string_const_null()
Stefan Metzmacher [Mon, 16 Apr 2012 08:25:12 +0000 (10:25 +0200)]
libcli/smb: make use of data_blob_string_const_null()


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Mon Apr 16 12:21:17 CEST 2012 on sn-devel-104

7 years agos3:smbd/sesssetup: use a helper variable 'action' to mark guest access
Stefan Metzmacher [Sun, 1 Apr 2012 19:19:53 +0000 (21:19 +0200)]
s3:smbd/sesssetup: use a helper variable 'action' to mark guest access


7 years agoAdd an option to have s3fs as file server for samba4
Matthieu Patou [Mon, 9 Apr 2012 09:09:22 +0000 (02:09 -0700)]
Add an option to have s3fs as file server for samba4

Autobuild-User: Andrew Bartlett <>
Autobuild-Date: Mon Apr 16 09:38:18 CEST 2012 on sn-devel-104

7 years agoparam: leave realm as a normal string, handle upper/lower case in handle_realm
Andrew Bartlett [Thu, 12 Apr 2012 08:02:11 +0000 (18:02 +1000)]
param: leave realm as a normal string, handle upper/lower case in handle_realm

This matches the behaviour of lib/param.

Andrew Bartlett

7 years agoparam: harmonise wins parameters
Andrew Bartlett [Thu, 12 Apr 2012 07:47:08 +0000 (17:47 +1000)]
param: harmonise wins parameters

7 years agolib/param: swap preferred name for 'lock dir' to match s3
Andrew Bartlett [Thu, 12 Apr 2012 07:39:24 +0000 (17:39 +1000)]
lib/param: swap preferred name for 'lock dir' to match s3

7 years agoparam: Merge common param elements by adding .flags
Andrew Bartlett [Thu, 12 Apr 2012 07:37:19 +0000 (17:37 +1000)]
param: Merge common param elements by adding .flags

This removes the difference between many of the key elements of the global
parameters table, and makes it easier to merge the two tables.

Andrew Bartlett

7 years agos3-param: make FN_GLOBAL macros consistent, add lp_ using the macro
Andrew Bartlett [Thu, 12 Apr 2012 07:10:36 +0000 (17:10 +1000)]
s3-param: make FN_GLOBAL macros consistent, add lp_ using the macro

This will make it easier to share the parameter tables between this
and lib/param.

Andrew Bartlett

7 years agoparam: Change from _lp to lp__ as the prefix for internal parameter wrappers
Andrew Bartlett [Thu, 12 Apr 2012 07:03:38 +0000 (17:03 +1000)]
param: Change from _lp to lp__ as the prefix for internal parameter wrappers

This will make a merge with the lib/param param code easier, as we can then paste lp_ to the front of
all parameters unconditionally.

Andrew Bartlett

7 years agomake _lp_readraw() and _lp_writeraw() static
Andrew Bartlett [Thu, 12 Apr 2012 06:58:40 +0000 (16:58 +1000)]
make _lp_readraw() and _lp_writeraw() static

7 years agoparam: harmonsise logfile parameter
Andrew Bartlett [Thu, 12 Apr 2012 06:51:54 +0000 (16:51 +1000)]
param: harmonsise logfile parameter

7 years agoparam: Merge common param elements by adding .flags
Andrew Bartlett [Thu, 12 Apr 2012 06:29:21 +0000 (16:29 +1000)]
param: Merge common param elements by adding .flags

This removes the difference between many of the key elements of the global
parameters table, and makes it easier to merge the two tables.

Andrew Bartlett

7 years agos4-provision: Update configuration lines for dlz_bind9
Amitay Isaacs [Thu, 5 Apr 2012 06:51:24 +0000 (16:51 +1000)]
s4-provision: Update configuration lines for dlz_bind9

This adds configuration lines for BIND versions 9.8.x and 9.9.x.

Autobuild-User: Amitay Isaacs <>
Autobuild-Date: Mon Apr 16 03:52:14 CEST 2012 on sn-devel-104

7 years agodlz_bind9: Build shared libraries for both BIND versions 9.8 and 9.9
Amitay Isaacs [Thu, 5 Apr 2012 06:45:01 +0000 (16:45 +1000)]
dlz_bind9: Build shared libraries for both BIND versions 9.8 and 9.9

This adds #define BIND_VERSION_9_8 and keeps the current version as 9.9, so
shared libraries can be built for both BIND versions.

7 years agodlz_bind9: changes to make dlz_bind9 work with BIND 9.9.0
Amitay Isaacs [Thu, 8 Mar 2012 07:34:04 +0000 (18:34 +1100)]
dlz_bind9: changes to make dlz_bind9 work with BIND 9.9.0

The main changes are:
  DLZ_DLOPEN_VERSION changed from 1 to 2
  isc_boolean_t changed from bool to int
  dlz_lookup() now takes 2 additional arguments

7 years agowaf: samba-specific methods should have capitalized names, change process_separate_ru...
Alexander Bokovoy [Sat, 14 Apr 2012 05:16:20 +0000 (08:16 +0300)]
waf: samba-specific methods should have capitalized names, change process_separate_rule to follow

Changing process_separate_rule to PROCESS_SEPARATE_RULE.

Thanks Thomas Nagy for review.

Autobuild-User: Alexander Bokovoy <>
Autobuild-Date: Sat Apr 14 08:55:43 CEST 2012 on sn-devel-104

7 years agodocs: add a vfs_tsmsm manpage
Michael Adam [Thu, 22 Mar 2012 22:15:58 +0000 (23:15 +0100)]
docs: add a vfs_tsmsm manpage

Autobuild-User: Michael Adam <>
Autobuild-Date: Sat Apr 14 01:54:13 CEST 2012 on sn-devel-104

7 years agos4-auth: Make sure ldb context is initialized even if not passed by Python code
Alexander Bokovoy [Fri, 13 Apr 2012 20:44:52 +0000 (23:44 +0300)]
s4-auth: Make sure ldb context is initialized even if not passed by Python code

Autobuild-User: Alexander Bokovoy <>
Autobuild-Date: Sat Apr 14 00:21:00 CEST 2012 on sn-devel-104

7 years agorely on sys/inotify.h for inotify
Adrian Bunk [Mon, 9 Apr 2012 18:16:12 +0000 (21:16 +0300)]
rely on sys/inotify.h for inotify

sys/inotify.h was added to glibc 2.4 in 2006.

Signed-off-by: Jeremy Allison <>
Autobuild-User: Jeremy Allison <>
Autobuild-Date: Fri Apr 13 21:15:00 CEST 2012 on sn-devel-104

7 years agowafsamba: add support for separate rules in stages
Alexander Bokovoy [Fri, 13 Apr 2012 14:53:04 +0000 (17:53 +0300)]
wafsamba: add support for separate rules in stages

bld.process_separate_rule(rule) and conf.process_separate_rule(rule)
will cause WAF to import wscript_<stage>_<rule> script into current

Files wscript_<configure|build>_<rule> should exist in the current

This can be used to provide rules specific for alternative
implementations of certain libraries

Autobuild-User: Alexander Bokovoy <>
Autobuild-Date: Fri Apr 13 18:34:39 CEST 2012 on sn-devel-104

7 years agoWrong assertion/comparison: Compare value not pointer
Olaf Flebbe [Thu, 12 Apr 2012 09:29:41 +0000 (11:29 +0200)]
Wrong assertion/comparison: Compare value not pointer

Signed-off-by: Jeremy Allison <>
Autobuild-User: Jeremy Allison <>
Autobuild-Date: Fri Apr 13 02:23:36 CEST 2012 on sn-devel-104

7 years agoWe never cancel SMB1 aio, only SMB2 aio - and in this case we always return a value.
Jeremy Allison [Thu, 12 Apr 2012 22:11:22 +0000 (15:11 -0700)]
We never cancel SMB1 aio, only SMB2 aio - and in this case we always return a value.

So pass_cancel is no longer needed.

7 years agoRemove cancel_aio_by_fsp(). It can never work and could lead to memory corruption
Jeremy Allison [Thu, 12 Apr 2012 22:04:42 +0000 (15:04 -0700)]
Remove cancel_aio_by_fsp(). It can never work and could lead to memory corruption
as outstanding IO's complete. Also we never have any aio's on a call to close_normal_file()
with close_type ERROR_CLOSE.

7 years agoFix return_fn when aio was cancelled. We need to return -1, errno = ECANCELED.
Jeremy Allison [Thu, 12 Apr 2012 22:04:08 +0000 (15:04 -0700)]
Fix return_fn when aio was cancelled. We need to return -1, errno = ECANCELED.

7 years agoMove the counting of outstanding_aio_calls into the lifecycle of the aio_extra struct.
Jeremy Allison [Thu, 12 Apr 2012 20:48:29 +0000 (13:48 -0700)]
Move the counting of outstanding_aio_calls into the lifecycle of the aio_extra struct.
This way we can't end up with a mismatch between outstanding events and the counter.

We may still have problems with canceling and not correctly freeing the aio
struct, but at least the counter won't get out of sync anymore.

7 years agoFix the same bug reported by Kirill Malkin <> and
Jeremy Allison [Thu, 12 Apr 2012 20:15:23 +0000 (13:15 -0700)]
Fix the same bug reported by Kirill Malkin <>  and
fixed by Volker for vfs_aio_fork as ref 0aacdbfada46329e0ad9dacfa90041a1c7dbf3e8.

From that change:

    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

Fix this differently here by not calling directly back into smbd,
but using a new function aio_linux_setup_returns() to setup the
return values that wait_for_aio_completion() in the main smbd
will pick up by calling handle_aio_completd().

7 years agos3: Fix a typo
Volker Lendecke [Thu, 12 Apr 2012 19:59:31 +0000 (21:59 +0200)]
s3: Fix a typo

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Thu Apr 12 23:38:24 CEST 2012 on sn-devel-104

7 years agos3: Fix a segfault with debug level 3 on Solaris
Volker Lendecke [Thu, 12 Apr 2012 10:15:50 +0000 (12:15 +0200)]
s3: Fix a segfault with debug level 3 on Solaris

printf can not deal with NULL strings

7 years agos4-libnet: split export_keytab in a separate python module to avoid pulling in HDB...
Alexander Bokovoy [Tue, 10 Apr 2012 09:09:20 +0000 (12:09 +0300)]
s4-libnet: split export_keytab in a separate python module to avoid pulling in HDB dependency

Signed-off-by: Andreas Schneider <>
Autobuild-User: Andreas Schneider <>
Autobuild-Date: Thu Apr 12 15:23:19 CEST 2012 on sn-devel-104

7 years agoWAF: Add support for stopping processing before end of wscript{_*}
Alexander Bokovoy [Tue, 3 Apr 2012 08:22:15 +0000 (11:22 +0300)]
WAF: Add support for stopping processing before end of wscript{_*}

WAF scripts are written in Python and Python has no simple way
to stop program execution other than using exceptions.

This change adds WscriptCheckSkipped exception and its handling in
core WAF code. When any of wscript{_*} throws WscriptCheckSkipped
exception, WAF simply continues to process next wscript in queue
rather than breaking build.

WscriptCheckSkipped exception can be used to perform early bail out
of configuration/build target checks if certain dependency is not available
when the default checks are way more numerous than a check for this
particular dependency. This is to avoid 'if ...' indenting for large
blocks of existing code which also muddens git history for nothing.

Signed-off-by: Andreas Schneider <>
7 years agoclikrb5: Move pure krb wrapper functions from libads to clikrb5.
Simo Sorce [Tue, 3 Apr 2012 03:41:32 +0000 (23:41 -0400)]
clikrb5: Move pure krb wrapper functions from libads to clikrb5.

Signed-off-by: Andreas Schneider <>
7 years agogse: Remove unnecessary header.
Simo Sorce [Mon, 2 Apr 2012 14:20:24 +0000 (10:20 -0400)]
gse: Remove unnecessary header.

Signed-off-by: Andreas Schneider <>
7 years agosrv_keytab: Pass krb5_context directly, it's all we use anyways.
Simo Sorce [Sun, 1 Apr 2012 23:08:15 +0000 (19:08 -0400)]
srv_keytab: Pass krb5_context directly, it's all we use anyways.

Signed-off-by: Andreas Schneider <>
7 years agokrb5_wrap: krb5_string_to_key / krb5_encrypt_block are deprecated.
Simo Sorce [Sun, 1 Apr 2012 21:28:19 +0000 (17:28 -0400)]
krb5_wrap: krb5_string_to_key / krb5_encrypt_block are deprecated.

Remove checks and replace with krb5_c_string_to_key().

Signed-off-by: Andreas Schneider <>
7 years agoauth-krb: Move pac related util functions in a single place.
Simo Sorce [Sun, 1 Apr 2012 02:09:22 +0000 (22:09 -0400)]
auth-krb: Move pac related util functions in a single place.

Signed-off-by: Andreas Schneider <>
7 years agoauth-krb: Make functions static.
Simo Sorce [Sun, 1 Apr 2012 01:48:06 +0000 (21:48 -0400)]
auth-krb: Make functions static.

The remaining gssapi_parse functions were used exclusively in
gensec_krb5.  Move them there and make them static.

Signed-off-by: Andreas Schneider <>