8 years agolib: import ccan modules for tdb2
Rusty Russell [Mon, 20 Jun 2011 07:24:15 +0000 (16:54 +0930)]
lib: import ccan modules for tdb2

Imported from git:// init-1161-g661d41f

Signed-off-by: Rusty Russell <>
8 years agos3: Replace shadow_copy2 with a new implementation
Volker Lendecke [Mon, 20 Jun 2011 07:52:21 +0000 (09:52 +0200)]
s3: Replace shadow_copy2 with a new implementation

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Mon Jun 20 11:17:47 CEST 2011 on sn-devel-104

8 years agopyldb: add unit test for get(myattribute, defVal)
Matthieu Patou [Sat, 11 Jun 2011 14:09:40 +0000 (18:09 +0400)]
pyldb: add unit test for get(myattribute, defVal)

Autobuild-User: Matthieu Patou <>
Autobuild-Date: Mon Jun 20 09:23:15 CEST 2011 on sn-devel-104

8 years agolibcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol
Andrew Bartlett [Mon, 20 Jun 2011 04:55:32 +0000 (14:55 +1000)]
libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol

The two error tables need to be combined, but for now seperate the names.

(As the common parts of the tree now use the _common function,
errmap_unix.c must be included in the s3 autoconf build).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <>
Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104

8 years agolibcli/util Bring samba4 unix -> nt_status code in common.
Andrew Bartlett [Mon, 20 Jun 2011 04:03:26 +0000 (14:03 +1000)]
libcli/util Bring samba4 unix -> nt_status code in common.

Due to library link orders, this is already the function that is being
used.  However we still need to sort out the duplicate symbol issues,
probably by renaming things.

Andrew Bartlett

8 years agos3-libcli Remove unused error mapping tables
Andrew Bartlett [Mon, 20 Jun 2011 03:24:38 +0000 (13:24 +1000)]
s3-libcli Remove unused error mapping tables

The functions which uesed these tables have since moved in common.

Andrew Bartlett

8 years agos3-winbind Move winbind privileged socket dir into state_path()
Andrew Bartlett [Mon, 20 Jun 2011 00:13:09 +0000 (10:13 +1000)]
s3-winbind Move winbind privileged socket dir into state_path()

On default installs, this will be the same as the old lock_path(), but
lock_path() is now a directory that can safely be mapped to /var/locks
and removed by the OS on reboot.  It is important that the directory
permissions of this directory be preserved, as they may be customised.

Andrew Bartlett

8 years agobuild: Put lockdir and cachedir in FHS-like locations by default
Andrew Bartlett [Wed, 15 Jun 2011 04:40:51 +0000 (14:40 +1000)]
build: Put lockdir and cachedir in FHS-like locations by default

This does not move statedir, leaving it in PREFIX/var/locks because
state files such as idmap are dangerous to move, as they might
re-create, causing chaos.

This isn't ideal, but I don't have a better solution right now.

Andrew Bartlett

8 years agos4-build Change default paths and --with flags for a 4.0 release
Andrew Bartlett [Tue, 14 Jun 2011 07:01:02 +0000 (17:01 +1000)]
s4-build Change default paths and --with flags for a 4.0 release

The following changes are made since Samba 3.6:

* --with-ncalrpcdir and --with-nmbdsocketdir are replaced with --with-socket-dir
  (with ntp_signd, winbindd, nmbd subdirs)

* This moves the winbind socket out of /tmp.  Distributions have moved
  this out of /tmp for quite some time now, and /var/run in the FHS
  blessed location these days.  --with-socketdir should point to
  /var/run in a distribution package.

* Configuration files are expected in PREFIX/etc instead of PREFIX/lib
  (they need to be moved manually)

* SWAT data files have moved to PREFIX/share/swat (alongside
  PREFIX/share/setup containing samba4 provision templates).

* The --with-fhs option is no longer available (it was never very
  useful, and major distributions (Debian, OpenSuSE, Fedora) either
  specified every option (overriding the effect) or didn't specify it
  at all.

* PID files are now in PREFIX/var/run, moved from PREFIX/var/locks

* The ncalrpc and nmbd sockets are now in PREFIX/var/run by default

The following changes are made for users of Samba3 binaries built with the top level build in master

* 'state' files are now expected to be in their Samba 3.6 location
  PREFIX/var/locks (and will need to be moved manually)

Andrew Bartlett

Signed-off-by: Andrew Tridgell <>
8 years agos4-upgradeprovision: propose the use of findprovisionranges if no ranges are present
Matthieu Patou [Sun, 19 Jun 2011 21:05:04 +0000 (01:05 +0400)]
s4-upgradeprovision: propose the use of findprovisionranges if no ranges are present

Autobuild-User: Matthieu Patou <>
Autobuild-Date: Mon Jun 20 00:30:59 CEST 2011 on sn-devel-104

8 years agos4: create script to find provision ranges for old provision without this information
Matthieu Patou [Sun, 19 Jun 2011 21:00:48 +0000 (01:00 +0400)]
s4: create script to find provision ranges for old provision without this information

8 years agos4-sambatool: extract the confirm function in a separte module for reuse
Matthieu Patou [Sun, 19 Jun 2011 19:09:59 +0000 (23:09 +0400)]
s4-sambatool: extract the confirm function in a separte module for reuse

8 years agos4-samba-tool: remove unused imports
Matthieu Patou [Sun, 19 Jun 2011 17:27:32 +0000 (21:27 +0400)]
s4-samba-tool: remove unused imports

8 years agos4-samba-tool: use correct object notation ie. obj.method rather than method(obj...
Matthieu Patou [Sun, 19 Jun 2011 17:26:48 +0000 (21:26 +0400)]
s4-samba-tool: use correct object notation ie. obj.method rather than method(obj, ...)

8 years agos4-sambatool: use correct way to call class methods
Matthieu Patou [Sun, 19 Jun 2011 16:43:11 +0000 (20:43 +0400)]
s4-sambatool: use correct way to call class methods

8 years agos4-upgradeprovision: improve message output
Matthieu Patou [Sat, 18 Jun 2011 21:17:44 +0000 (01:17 +0400)]
s4-upgradeprovision: improve message output

8 years agos4-upgradeprovision: skip versionNumber, it's used by GPO
Matthieu Patou [Sat, 18 Jun 2011 21:17:27 +0000 (01:17 +0400)]
s4-upgradeprovision: skip versionNumber, it's used by GPO

8 years agos4-provision: Remove hard coded SD for CN=Sites container
Matthieu Patou [Sat, 18 Jun 2011 20:16:54 +0000 (00:16 +0400)]
s4-provision: Remove hard coded SD for CN=Sites container

With the fix introduced by Nadya in changeset
622ef6aed82a2f2f7748c2a88535486af77487de we are now able to generate
correct SD (at least the same as W2k3R2 with a Forest Level of 2003), so
there is no need for this fix anymore as it makes SDs for Forest Level
2003 and lower incorrect.

8 years agos4-upgradeprovision: deltaattr can be empty or none too
Matthieu Patou [Wed, 15 Jun 2011 11:20:46 +0000 (15:20 +0400)]
s4-upgradeprovision: deltaattr can be empty or none too

8 years agos4-upgradeprovision: handle the fact that oEMInformation might not be present
Matthieu Patou [Wed, 15 Jun 2011 11:20:06 +0000 (15:20 +0400)]
s4-upgradeprovision: handle the fact that oEMInformation might not be present

8 years agos4-upgradeprovision: Rework completly how SDs are recalculated
Matthieu Patou [Mon, 13 Jun 2011 21:42:59 +0000 (01:42 +0400)]
s4-upgradeprovision: Rework completly how SDs are recalculated

8 years agos4-python: make checks of sacl in get_diff_sddls optionnal
Matthieu Patou [Sat, 18 Jun 2011 19:21:18 +0000 (23:21 +0400)]
s4-python: make checks of sacl in get_diff_sddls optionnal

8 years agos4-upgradeprovision: remove useless comment
Matthieu Patou [Mon, 13 Jun 2011 21:42:28 +0000 (01:42 +0400)]
s4-upgradeprovision: remove useless comment

8 years agos4-upgradeprovision: ignore objectSid
Matthieu Patou [Mon, 13 Jun 2011 21:41:56 +0000 (01:41 +0400)]
s4-upgradeprovision: ignore objectSid

8 years agos4-upgradeprovision: add a list of attribute that are not DSDB attribute that we...
Matthieu Patou [Mon, 13 Jun 2011 21:39:41 +0000 (01:39 +0400)]
s4-upgradeprovision: add a list of attribute that are not DSDB attribute that we don't want to copy

8 years agos4: fix wrong index usage PRIMARY_USER_SID_INDEX when it should have been PRIMARY_GRO...
Matthieu Patou [Mon, 13 Jun 2011 20:27:07 +0000 (00:27 +0400)]
s4: fix wrong index usage PRIMARY_USER_SID_INDEX when it should have been PRIMARY_GROUP_SID_INDEX

The system account was instanciated with wrong user an group SIDs, group
sid resulted being just the domain SID.
Bug seems to date from fbe6d155bf177c610ee549cc534650b0f0700e8a.

Andrew (B.) please check.

8 years agos4-upgradeprovision: if there is nothing to really modify then skip it
Matthieu Patou [Mon, 13 Jun 2011 19:23:05 +0000 (23:23 +0400)]
s4-upgradeprovision: if there is nothing to really modify then skip it

8 years agos4-upgradeprovision: dn must be skipped as delta.remove("dn") do not remove this...
Matthieu Patou [Mon, 13 Jun 2011 18:59:35 +0000 (22:59 +0400)]
s4-upgradeprovision: dn must be skipped as delta.remove("dn") do not remove this attribute

8 years agos4-upgradeprovision: change hashAttrNotCopied to be an array
Matthieu Patou [Mon, 13 Jun 2011 14:49:23 +0000 (18:49 +0400)]
s4-upgradeprovision: change hashAttrNotCopied to be an array

8 years agos4-upgradeprovision: fix inverted logic and wrong flags on sd_flags control
Matthieu Patou [Sat, 18 Jun 2011 20:02:03 +0000 (00:02 +0400)]
s4-upgradeprovision: fix inverted logic and wrong flags on sd_flags control

8 years agos4-upgradeprovision: remove useless code
Matthieu Patou [Mon, 13 Jun 2011 14:37:51 +0000 (18:37 +0400)]
s4-upgradeprovision: remove useless code

8 years agos4-upgradeprovision: don't print dn in the list of modified attributes
Matthieu Patou [Mon, 13 Jun 2011 13:15:37 +0000 (17:15 +0400)]
s4-upgradeprovision: don't print dn in the list of modified attributes

8 years agos4-upgradeprovision: clean up, reformating and update docs
Matthieu Patou [Mon, 13 Jun 2011 13:56:17 +0000 (17:56 +0400)]
s4-upgradeprovision: clean up, reformating and update docs

8 years agos4-upgradeprovision: introduce invocation id in lastprovisionUSNs
Matthieu Patou [Mon, 13 Jun 2011 13:39:06 +0000 (17:39 +0400)]
s4-upgradeprovision: introduce invocation id in lastprovisionUSNs

8 years agos4-upgradeprovision: add function to know if attribute is replicated or not
Matthieu Patou [Mon, 13 Jun 2011 14:34:49 +0000 (18:34 +0400)]
s4-upgradeprovision: add function to know if attribute is replicated or not

8 years agos4-upgradeprovision: split update_present in two functions depending on the method...
Matthieu Patou [Mon, 13 Jun 2011 13:50:00 +0000 (17:50 +0400)]
s4-upgradeprovision: split update_present in two functions depending on the method used

In order to make the function a bit more clearer and with less depth,
the selection of attribute that are not updated is split in two
functions depending on the fact that we are using mainly
replPropertyMetadata to make our choice or if we are using the list of
attributes that should, could or shouldn't be updated/created/deleted.

8 years agos4-upgradeprovision: handle_special_attributes don't really need ranges of USNs,...
Matthieu Patou [Mon, 13 Jun 2011 13:13:26 +0000 (17:13 +0400)]
s4-upgradeprovision: handle_special_attributes don't really need ranges of USNs, just the information if we are using replPropertyMetadata for attribute selection

8 years agos4-python: fix wrong discovery of the site name in find_key_provision_parameters
Matthieu Patou [Mon, 13 Jun 2011 12:09:14 +0000 (16:09 +0400)]
s4-python: fix wrong discovery of the site name in find_key_provision_parameters

8 years agos4-upgradeprovisision: fix bug 8063, old SD can miss some componenent (group, owner...
Matthieu Patou [Sun, 5 Jun 2011 13:39:32 +0000 (17:39 +0400)]
s4-upgradeprovisision: fix bug 8063, old SD can miss some componenent (group, owner, ...)

Don't make the assumption that SD are correct, they can be wrong and

Fix this bug:

8 years agos4-upgradeprovision: Fix an error, so that cursddl and refsddl are not the same
Matthieu Patou [Sun, 5 Jun 2011 13:26:07 +0000 (17:26 +0400)]
s4-upgradeprovision: Fix an error, so that cursddl and refsddl are not the same

Thanks to Dirk Paulli for pointing it with his bug report.

8 years agopy-ldb: allow dictionnary like usage (ie. e.get("myattribute", defVal)
Matthieu Patou [Sat, 11 Jun 2011 12:57:02 +0000 (16:57 +0400)]
py-ldb: allow dictionnary like usage (ie. e.get("myattribute", defVal)

8 years agos3: Fix Coverity ID 2582: FORWARD_NULL
Volker Lendecke [Sun, 19 Jun 2011 17:23:47 +0000 (19:23 +0200)]
s3: Fix Coverity ID 2582: FORWARD_NULL

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Sun Jun 19 20:46:43 CEST 2011 on sn-devel-104

8 years agos3: Fix Coverity ID 2583: RESOURCE_LEAK
Volker Lendecke [Sun, 19 Jun 2011 17:23:47 +0000 (19:23 +0200)]
s3: Fix Coverity ID 2583: RESOURCE_LEAK

8 years agos3: Remove unused name_queries
Volker Lendecke [Sun, 19 Jun 2011 11:06:11 +0000 (13:06 +0200)]
s3: Remove unused name_queries

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Sun Jun 19 15:14:38 CEST 2011 on sn-devel-104

8 years agos3: Fix some type-punned warnings
Volker Lendecke [Sun, 19 Jun 2011 11:06:00 +0000 (13:06 +0200)]
s3: Fix some type-punned warnings

8 years agos3: Add name_resolve_bcast_send/recv
Volker Lendecke [Sun, 19 Jun 2011 11:05:29 +0000 (13:05 +0200)]
s3: Add name_resolve_bcast_send/recv

8 years agos3: Fix a memleak in name_resolve_bcast
Volker Lendecke [Sun, 19 Jun 2011 09:26:55 +0000 (11:26 +0200)]
s3: Fix a memleak in name_resolve_bcast

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Sun Jun 19 12:40:55 CEST 2011 on sn-devel-104

8 years agos3: Test nttrans_create
Volker Lendecke [Sat, 18 Jun 2011 07:56:12 +0000 (09:56 +0200)]
s3: Test nttrans_create

This is a test for the share security descriptor exception for nttrans_create

8 years agos3: Add incomplete cli_nttrans_create
Volker Lendecke [Sat, 18 Jun 2011 07:10:30 +0000 (09:10 +0200)]
s3: Add incomplete cli_nttrans_create

secdesc only at this moment

8 years agos3: Correctly align even
Volker Lendecke [Sat, 18 Jun 2011 17:30:52 +0000 (19:30 +0200)]
s3: Correctly align even

8 years agos3: Allow NULL sd_size in make_sec_desc
Volker Lendecke [Sat, 18 Jun 2011 07:55:05 +0000 (09:55 +0200)]
s3: Allow NULL sd_size in make_sec_desc

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Sat Jun 18 22:26:15 CEST 2011 on sn-devel-104

8 years agos3:modules fix Bug 8244 - Cannot copy files larger than 2 GB to Samba share
Christian Ambach [Fri, 17 Jun 2011 19:54:30 +0000 (21:54 +0200)]
s3:modules fix Bug 8244 - Cannot copy files larger than 2 GB to Samba share

the time_audit module uses int instead of uint64 as return value
in get_alloc_size so that sizes of files larger than 2 GB are
cut of leading to wrong replies to NtCreateAndX and Windows
clients giving up

While checking the types of all functions, I found two more wrong
return value types that needed correction

Autobuild-User: Christian Ambach <>
Autobuild-Date: Fri Jun 17 23:11:10 CEST 2011 on sn-devel-104

8 years agos4-errors: Import error maps from the source3/ unix -> ntstatus mapping
Andrew Bartlett [Fri, 17 Jun 2011 07:07:26 +0000 (17:07 +1000)]
s4-errors: Import error maps from the source3/ unix -> ntstatus mapping

We need to syncronise these mappings, as the duplication of this
symobol in the build means that either may be called based only on
library link orders.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <>
Autobuild-Date: Fri Jun 17 10:22:07 CEST 2011 on sn-devel-104

8 years agoerrors: reorder error codes for easier s3/s4 comparison
Andrew Bartlett [Fri, 17 Jun 2011 06:06:34 +0000 (16:06 +1000)]
errors: reorder error codes for easier s3/s4 comparison

8 years agos4-util: removed the s4 nterr.c
Andrew Tridgell [Fri, 17 Jun 2011 04:40:26 +0000 (14:40 +1000)]
s4-util: removed the s4 nterr.c

this is now in common code

Pair-Programmed-With: Andrew Bartlett <>

8 years agos3-util: remove the s3 nterr.c
Andrew Tridgell [Fri, 17 Jun 2011 04:40:07 +0000 (14:40 +1000)]
s3-util: remove the s3 nterr.c

this is now in common code

Pair-Programmed-With: Andrew Bartlett <>

8 years agoutil: moved nt_errstr() into common code
Andrew Tridgell [Fri, 17 Jun 2011 04:39:37 +0000 (14:39 +1000)]
util: moved nt_errstr() into common code

this brings nt_errstr() into common code, using the new
talloc_stackframe_exists() to ensure that we only allocate an error
string using talloc_tos() if a talloc stackframe does currently
exists. This makes it safe to use in external libraries

Pair-Programmed-With: Andrew Bartlett <>

8 years agolibclu/util: Move get_friendly_nt_error_msg() in common.
Andrew Bartlett [Thu, 16 Jun 2011 03:00:09 +0000 (13:00 +1000)]
libclu/util: Move get_friendly_nt_error_msg() in common.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <>
8 years agobuild: only use the git version on install, not in the build tree
Andrew Tridgell [Fri, 17 Jun 2011 05:21:39 +0000 (15:21 +1000)]
build: only use the git version on install, not in the build tree

having the git version in our version.h in the build tree is annoying
for developers, as every time you commit or rebase you need to spend
several minutes re-linking. This changes it to use the git version
only on install, which is much more useful as when you actually
install the binaries you may be using them in a way that reporting the
version is useful

Pair-Programmed-With: Andrew Bartlett <>

Autobuild-User: Andrew Tridgell <>
Autobuild-Date: Fri Jun 17 08:37:06 CEST 2011 on sn-devel-104

8 years agosamba-tool: exit with non-zero status on dbcheck failure
Andrew Tridgell [Fri, 17 Jun 2011 04:40:48 +0000 (14:40 +1000)]
samba-tool: exit with non-zero status on dbcheck failure

Pair-Programmed-With: Andrew Bartlett <>

8 years agotalloc: added talloc_stackframe_exists()
Andrew Tridgell [Fri, 17 Jun 2011 04:22:28 +0000 (14:22 +1000)]
talloc: added talloc_stackframe_exists()

This can be used to tell if a talloc stackframe is currently
available. Callers can use this to decide if they will use
talloc_tos() or instead use an alternative strategy. This gives us a
way to safely have calls to talloc_tos() in common code that may end
up in external libraries, as long as all talloc_tos() calls in these
pieces of common code check first that a stackframe is available.

8 years agos4-auth: quiet down the krb5 warnings when kerberos is not set to 'MUST'
Andrew Tridgell [Fri, 17 Jun 2011 03:47:14 +0000 (13:47 +1000)]
s4-auth: quiet down the krb5 warnings when kerberos is not set to 'MUST'

this prevents spurious error messages on client commands when when we
will fallback to NTLM authentication

Pair-Programmed-With: Andrew Bartlett <>

8 years agosamba-tool: show success message on group operations
Andrew Tridgell [Fri, 17 Jun 2011 03:35:52 +0000 (13:35 +1000)]
samba-tool: show success message on group operations

8 years agos4-pysamdb: fixed the normalisation of grouptype in group add
Andrew Tridgell [Fri, 17 Jun 2011 02:02:23 +0000 (12:02 +1000)]
s4-pysamdb: fixed the normalisation of grouptype in group add

ldap integers are signed

Autobuild-User: Andrew Tridgell <>
Autobuild-Date: Fri Jun 17 05:43:18 CEST 2011 on sn-devel-104

8 years agosamba-tool: report total error count and suggest --fix if needed
Andrew Tridgell [Fri, 17 Jun 2011 01:34:19 +0000 (11:34 +1000)]
samba-tool: report total error count and suggest --fix if needed

8 years agosamba-tool: added attribute normalisation checks
Andrew Tridgell [Fri, 17 Jun 2011 01:31:25 +0000 (11:31 +1000)]
samba-tool: added attribute normalisation checks

this checks that all attributes have the right normalisation, and
offers to fix the ones that don't

8 years agos4-dsdb: if we don't have a remote schema, then use the local one
Andrew Tridgell [Fri, 17 Jun 2011 01:30:41 +0000 (11:30 +1000)]
s4-dsdb: if we don't have a remote schema, then use the local one

this allows the use of drsuapi_to_ldb() on all attributes for the
local database

8 years agos4-pydsdb: added dsdb_normalise_attributes() call
Andrew Tridgell [Fri, 17 Jun 2011 01:29:44 +0000 (11:29 +1000)]
s4-pydsdb: added dsdb_normalise_attributes() call

this call converts a set of attributes to DRSUAPI format and back to
ldb format. This has the effect of normalising the attributes using
the schema syntax rules

8 years agos3:wb_lookupsids: add some paranoia checks to wb_lookupsids_recv()
Stefan Metzmacher [Thu, 16 Jun 2011 16:25:15 +0000 (18:25 +0200)]
s3:wb_lookupsids: add some paranoia checks to wb_lookupsids_recv()

This hopefully catches future bugs.


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Thu Jun 16 19:50:16 CEST 2011 on sn-devel-104

8 years agos3:wb_lookupsids: don't ignore 'result' and check if we got useable values
Stefan Metzmacher [Thu, 16 Jun 2011 16:16:15 +0000 (18:16 +0200)]
s3:wb_lookupsids: don't ignore 'result' and check if we got useable values

The wrong fix for bug #8215 discovered this bug, as it caused
sam_rids_to_names() to always return NT_STATUS_NONE_MAPPED.


8 years agoRevert "s3-winbind: Fix paranoia checks in winbindd_samr.c."
Stefan Metzmacher [Thu, 16 Jun 2011 16:40:04 +0000 (18:40 +0200)]
Revert "s3-winbind: Fix paranoia checks in winbindd_samr.c."

This reverts commit 207a84d725b905c2b119d2ef0f4f4d4eb391140d.

This is the wrong fix for the problem, see bug #8215.


8 years agos3:rpc_server/svcctl: fix valgrind bug in _svcctl_QueryServiceObjectSecurity()
Stefan Metzmacher [Thu, 16 Jun 2011 10:47:22 +0000 (12:47 +0200)]
s3:rpc_server/svcctl: fix valgrind bug in _svcctl_QueryServiceObjectSecurity()

r->out.buffer needs to stay in its size, as it will be marshalled completely.
As it's preallocated and initialized with zeros, we just need to copy
the payload into it, even if it's smaller than the offered buffer size.


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Thu Jun 16 14:15:47 CEST 2011 on sn-devel-104

8 years agos3:rpc_server/svcctl: fix valgrind bugs in _svcctl_QueryServiceConfig2W()
Stefan Metzmacher [Thu, 16 Jun 2011 10:34:42 +0000 (12:34 +0200)]
s3:rpc_server/svcctl: fix valgrind bugs in _svcctl_QueryServiceConfig2W()

r->out.buffer needs to stay in its size, as it will be marshalled completely.
As it's preallocated and initialized with zeros, we just need to copy
the payload into it.

If we always marshall the return buffer, we already have the needed
buffer size and don't need to call ndr_size_* functions.


8 years agos3:rpc_server/svcctl: don't allocate return values on a temporary stackframe
Stefan Metzmacher [Thu, 16 Jun 2011 06:33:09 +0000 (08:33 +0200)]
s3:rpc_server/svcctl: don't allocate return values on a temporary stackframe

And always initialize the whole return structure.

This caused samba3.posix_s3.rpc.svcctl to be flakey.


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Thu Jun 16 11:34:34 CEST 2011 on sn-devel-104

8 years agos4:winbind/wb_samba3_protocol.c - rework it using concrete enum values
Matthias Dieter Wallnöfer [Thu, 16 Jun 2011 07:01:04 +0000 (09:01 +0200)]
s4:winbind/wb_samba3_protocol.c - rework it using concrete enum values

This changes commit 49352cafb4259503e6afb44d38db9bfd525d5e0d to comply
with kblin's plans.

Autobuild-User: Matthias Dieter Wallnöfer <>
Autobuild-Date: Thu Jun 16 10:14:52 CEST 2011 on sn-devel-104

8 years agos4:ntvfs subsystems - rework it using concrete enum values
Matthias Dieter Wallnöfer [Thu, 16 Jun 2011 06:39:03 +0000 (08:39 +0200)]
s4:ntvfs subsystems - rework it using concrete enum values

This changes commit 260bc987b00b3fff6c9b99211627b14e9bd0789a to comply
with metze's plans.

8 years agoauth/kerberos/gssapi_pac: fix compiler warnings
Stefan Metzmacher [Sat, 30 Apr 2011 15:39:48 +0000 (17:39 +0200)]
auth/kerberos/gssapi_pac: fix compiler warnings


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Wed Jun 15 19:06:24 CEST 2011 on sn-devel-104

8 years agos4:libcli/smb_composite: convert smb2_composite_setpathinfo_send/rev to tevent_req
Stefan Metzmacher [Sun, 1 May 2011 16:10:20 +0000 (18:10 +0200)]
s4:libcli/smb_composite: convert smb2_composite_setpathinfo_send/rev to tevent_req


8 years agolibrpc: fix buildwarning in NDR_WMI.
Günther Deschner [Tue, 14 Jun 2011 09:31:43 +0000 (11:31 +0200)]
librpc: fix buildwarning in NDR_WMI.


Autobuild-User: Günther Deschner <>
Autobuild-Date: Wed Jun 15 17:23:49 CEST 2011 on sn-devel-104

8 years agos3: Add debug level 0 warnings to make_new_server_info_guest
Volker Lendecke [Wed, 15 Jun 2011 12:08:23 +0000 (14:08 +0200)]
s3: Add debug level 0 warnings to make_new_server_info_guest

I've got a backtrace where this must have failed, but it is not clear why. If
this fails, we should really complain because we can't start up.

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Wed Jun 15 15:20:49 CEST 2011 on sn-devel-104

8 years agos3: Fix the return of make_new_server_info_guest
Volker Lendecke [Wed, 15 Jun 2011 12:09:50 +0000 (14:09 +0200)]
s3: Fix the return of make_new_server_info_guest

8 years agos3-winbind: Fix paranoia checks in winbindd_samr.c.
Andreas Schneider [Fri, 20 May 2011 13:42:46 +0000 (15:42 +0200)]
s3-winbind: Fix paranoia checks in winbindd_samr.c.

This fixes looking up the correct unix user instead of allocation a new
uid and creating it.

Fix bug #8215 (winbind unix username lookup doesn't work correctly).
(cherry picked from commit 531edfdd1924bfb2ef486820f7f5787098bd953a)

Autobuild-User: Andreas Schneider <>
Autobuild-Date: Wed Jun 15 09:56:01 CEST 2011 on sn-devel-104

8 years agobuild: fixed development symlinks for libraries in subdirectories
Andrew Tridgell [Wed, 15 Jun 2011 04:13:04 +0000 (14:13 +1000)]
build: fixed development symlinks for libraries in subdirectories

this fixes the symlink for

Autobuild-User: Andrew Tridgell <>
Autobuild-Date: Wed Jun 15 07:23:10 CEST 2011 on sn-devel-104

8 years agobuild: fixed dependencies on install prefix for pc files and python scripts
Andrew Tridgell [Wed, 15 Jun 2011 03:53:19 +0000 (13:53 +1000)]
build: fixed dependencies on install prefix for pc files and python scripts

waf can't automatically determine these dependencies as the
construction of the files is via a python function

thanks to Andrew for noticing this bug

8 years agos3:utils/net_*registry: use c99 initializers which are supported by old gcc 2.95...
Stefan Metzmacher [Wed, 15 Jun 2011 00:34:53 +0000 (02:34 +0200)]
s3:utils/net_*registry: use c99 initializers which are supported by old gcc 2.95 compilers (bug #8226)


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Wed Jun 15 03:48:41 CEST 2011 on sn-devel-104

8 years agos3: Fix connecting to ctdb as non-root
Volker Lendecke [Tue, 14 Jun 2011 15:52:42 +0000 (17:52 +0200)]
s3: Fix connecting to ctdb as non-root

This is at least one instance which I could identify

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Tue Jun 14 19:06:39 CEST 2011 on sn-devel-104

8 years agos3: Fix count_current_connections
Volker Lendecke [Tue, 14 Jun 2011 15:50:41 +0000 (17:50 +0200)]
s3: Fix count_current_connections

"False" is not really a valid return value for "int"..

8 years agos3-docs: Fix a typo found by Samba-JP oota <>
Volker Lendecke [Tue, 14 Jun 2011 10:53:42 +0000 (12:53 +0200)]
s3-docs: Fix a typo found by Samba-JP oota <>

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Tue Jun 14 14:06:22 CEST 2011 on sn-devel-104

8 years agos3-docs: Fix a duplicate list entry
Volker Lendecke [Tue, 14 Jun 2011 10:50:57 +0000 (12:50 +0200)]
s3-docs: Fix a duplicate list entry

Thanks to Samba-JP oota <>

8 years agos3-utils: fix crash in net cache get
Christian Ambach [Tue, 14 Jun 2011 07:09:07 +0000 (09:09 +0200)]
s3-utils: fix crash in net cache get

free the blob correctly

Autobuild-User: Christian Ambach <>
Autobuild-Date: Tue Jun 14 12:01:59 CEST 2011 on sn-devel-104

8 years agosamba-tool: disable validation on removing an empty attribute in dbcheck
Andrew Tridgell [Tue, 14 Jun 2011 06:43:10 +0000 (16:43 +1000)]
samba-tool: disable validation on removing an empty attribute in dbcheck

Autobuild-User: Andrew Tridgell <>
Autobuild-Date: Tue Jun 14 10:49:34 CEST 2011 on sn-devel-104

8 years agopyldb: make ldb operations more consistent
Andrew Tridgell [Tue, 14 Jun 2011 06:41:35 +0000 (16:41 +1000)]
pyldb: make ldb operations more consistent

This changes the controls option on ldb operations to be a keyword
argument, which is more consistent with general python
conventions. This also fixes the pydoc output to include the controls

8 years agopyldb: added validate option to ldb.modify()
Andrew Tridgell [Tue, 14 Jun 2011 06:39:49 +0000 (16:39 +1000)]
pyldb: added validate option to ldb.modify()

This allows validation of ldb messages in a ldb modify operation to be
bypassed, by setting validate=False. This is useful in the dbcheck
tool to allow for removing invalid empty attributes from the database

8 years agos3:smbd/quotas: add #include "system/filesys.h" (bug #8224)
Stefan Metzmacher [Tue, 14 Jun 2011 06:27:34 +0000 (08:27 +0200)]
s3:smbd/quotas: add #include "system/filesys.h" (bug #8224)

This should fix the build on FreeBSD


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Tue Jun 14 09:38:49 CEST 2011 on sn-devel-104

8 years agos3:proto.h: remove prototypes of error functions moved to common code.
Michael Adam [Sun, 12 Jun 2011 23:56:09 +0000 (01:56 +0200)]
s3:proto.h: remove prototypes of error functions moved to common code.

ntstatus_to_dos, werror_to_ntstatus, ntstatus_to_werror

Autobuild-User: Michael Adam <>
Autobuild-Date: Mon Jun 13 03:31:58 CEST 2011 on sn-devel-104

8 years agos3: Use resolve_wins_send/recv in resolve_wins
Volker Lendecke [Fri, 3 Jun 2011 14:11:17 +0000 (16:11 +0200)]
s3: Use resolve_wins_send/recv in resolve_wins

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Sun Jun 12 18:19:41 CEST 2011 on sn-devel-104

8 years agos3: Add resolve_wins_send/recv
Volker Lendecke [Thu, 2 Jun 2011 12:12:06 +0000 (14:12 +0200)]
s3: Add resolve_wins_send/recv

8 years agos3: Add wins_server_tag_ips()
Volker Lendecke [Sun, 12 Jun 2011 12:07:22 +0000 (14:07 +0200)]
s3: Add wins_server_tag_ips()

For a given tag, return the list of all wins servers

8 years agos3: Add query_wins_list_send/recv
Volker Lendecke [Sat, 14 May 2011 16:24:03 +0000 (18:24 +0200)]
s3: Add query_wins_list_send/recv

8 years agos3: Fix IO_TIMEOUT handling for wins queries
Volker Lendecke [Sun, 12 Jun 2011 13:44:19 +0000 (15:44 +0200)]
s3: Fix IO_TIMEOUT handling for wins queries