nivanova/samba-autobuild/.git
8 years agos3-smbldap: make octet_strings/DATA_BLOBs const.
Sumit Bose [Mon, 4 Apr 2011 12:16:44 +0000 (14:16 +0200)]
s3-smbldap: make octet_strings/DATA_BLOBs const.

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos3-ipasam: rename of smbldap_make_mod_blob to _smbldap_make_mod_blob.
Günther Deschner [Wed, 6 Apr 2011 09:33:12 +0000 (11:33 +0200)]
s3-ipasam: rename of smbldap_make_mod_blob to _smbldap_make_mod_blob.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos3-smbldap: support storing octet_strings/DATA_BLOBs.
Günther Deschner [Thu, 29 Oct 2009 22:36:14 +0000 (23:36 +0100)]
s3-smbldap: support storing octet_strings/DATA_BLOBs.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos3-pdb_ipa: Fix indentation
Sumit Bose [Mon, 4 Apr 2011 11:07:37 +0000 (13:07 +0200)]
s3-pdb_ipa: Fix indentation

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos4-test: fixed a problem with very verbose NDR debug
Andrew Tridgell [Wed, 6 Apr 2011 05:34:22 +0000 (15:34 +1000)]
s4-test: fixed a problem with very verbose NDR debug

lp.get("log level") returns a string, not an integer. It needs to be
cast to an integer for comparison with a number

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

8 years agolib/crypto: rename the SHA256_ functions to samba_SHA256_
Andrew Tridgell [Wed, 6 Apr 2011 04:36:21 +0000 (14:36 +1000)]
lib/crypto: rename the SHA256_ functions to samba_SHA256_

this prevents a symbol duplication with the openssl library, which may
be linked in via a secondary library dependency

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

8 years agotstream: make npa_tstream a private library
Andrew Tridgell [Wed, 6 Apr 2011 04:29:34 +0000 (14:29 +1000)]
tstream: make npa_tstream a private library

this prevents symbol duplication of the npa_tstream symbols

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

8 years agolib: make asn1_util a private library
Andrew Tridgell [Wed, 6 Apr 2011 04:28:28 +0000 (14:28 +1000)]
lib: make asn1_util a private library

this prevents symbol duplication of the asn1 symbols in the service
and ntvfs subsystems

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

8 years agolib: moved data_blob.c into samba-util-common
Andrew Tridgell [Wed, 6 Apr 2011 04:26:00 +0000 (14:26 +1000)]
lib: moved data_blob.c into samba-util-common

this avoids a duplication of the data_blob symbols some binaries
(eg. smbtorture)

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

8 years agoThis reverts commit 378c4b221a6be75e1d32cb6fb3a773ce5de6dbda.
Volker Lendecke [Wed, 6 Apr 2011 05:25:12 +0000 (07:25 +0200)]
This reverts commit 378c4b221a6be75e1d32cb6fb3a773ce5de6dbda.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Apr  6 08:11:53 CEST 2011 on sn-devel-104

8 years agowaf: a better way to detect duplicated symbols
Andrew Tridgell [Wed, 6 Apr 2011 03:35:49 +0000 (13:35 +1000)]
waf: a better way to detect duplicated symbols

this detects when we have the same symbol linked in twice in any
binary by using ldd and nm on the binary and its associated libraries.

Some of these duplicates are caused by a subsystem being linked twice,
and some are caused by two versions of the same function name being
linked into a binary

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Apr  6 06:44:14 CEST 2011 on sn-devel-104

8 years agos4: Update/Set local USN only on attribute that have been modified/created
Matthieu Patou [Tue, 5 Apr 2011 10:49:05 +0000 (14:49 +0400)]
s4: Update/Set local USN only on attribute that have been modified/created

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos3-selftest Add tests to show kerberos works across a password change
Andrew Bartlett [Tue, 5 Apr 2011 23:12:15 +0000 (09:12 +1000)]
s3-selftest Add tests to show kerberos works across a password change

It is important that a machine account password change does not
invalidate existing tickets.

This is only for the default kerberos method with a password in
secrets.tdb.  The keytab based methods are still not tested.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr  6 05:24:48 CEST 2011 on sn-devel-104

8 years agos3-librpc Fix creation of in-memory keytab for previous password
Andrew Bartlett [Tue, 5 Apr 2011 23:10:13 +0000 (09:10 +1000)]
s3-librpc Fix creation of in-memory keytab for previous password

We set the current password twice, rather than the current and old
password.

Andrew Bartlett

8 years agos3-selftest names into DNS hosts file to avoid NBT lookups
Andrew Bartlett [Wed, 6 Apr 2011 02:10:03 +0000 (12:10 +1000)]
s3-selftest names into DNS hosts file to avoid NBT lookups

NBT lookups cause trouble and variablity in 'make test', so it's much
better if we just use the fake DNS code.  This code is only used by
smbtorture4 at this time, but the other client tools are generally
told to contact by IP address.

We need to contact by name to test Kerberos, and this should make the
kerberos tests much more reliable.

Andrew Bartlett

8 years agolibcli/nbt Cope with blank lines in DNS hosts file
Andrew Bartlett [Wed, 6 Apr 2011 02:09:41 +0000 (12:09 +1000)]
libcli/nbt Cope with blank lines in DNS hosts file

8 years agodocs: fix the missing parameter description section in the smb.conf manpage
Michael Adam [Tue, 5 Apr 2011 21:07:01 +0000 (23:07 +0200)]
docs: fix the missing parameter description section in the smb.conf manpage

The smb.conf (5) manpage recently sometimes failed to contain the
contents of the description of each parameter section. The reason
was a unreliable chain of dependencies in the Makefile.

The error can be reproduced by touching manpages-3/smb.conf.5.xml
and then building the manpages.
Then smb.conf.5.xml is newer than any of the smbdotconf/*/*.xml
files and hence the intermediate inexistent parameters.*.xml
don't get generated.

This patch fixes this problem by introducing a phony "parameters"
target referencing the parameters.*.xml targets, so that they
get build unconditionally.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Apr  6 01:22:00 CEST 2011 on sn-devel-104

8 years agopackaging(RHEL-CTDB): Fix debuginfo builds
Michael Adam [Fri, 3 Dec 2010 09:13:46 +0000 (02:13 -0700)]
packaging(RHEL-CTDB): Fix debuginfo builds

At least on RHEL 5.5, we observed broken debuginfo packages
when either old build directories were still present or old
debuginfo packages (of samba) were installed.

This patch removes the debuginfo samba RPMs and old RPM build
directories, giving the user a 10 second chance to quit.

8 years agopackaging(RHEL-CTDB): add BuildRequires to ctdb-devel >= 1.2.25
Michael Adam [Tue, 5 Apr 2011 13:49:39 +0000 (15:49 +0200)]
packaging(RHEL-CTDB): add BuildRequires to ctdb-devel >= 1.2.25

This should make sure we build against ctdb with SCHEDULE_FOR_DELETION control.

8 years agopackaging(RHEL-CTDB): replace Prereq by Requires.
Michael Adam [Thu, 10 Feb 2011 06:33:56 +0000 (07:33 +0100)]
packaging(RHEL-CTDB): replace Prereq by Requires.

In RHEL6, Prereq is deprecated.

8 years agos3-auth: Make server_info const in create_local_token()
Andrew Bartlett [Tue, 5 Apr 2011 20:46:26 +0000 (06:46 +1000)]
s3-auth: Make server_info const in create_local_token()

Andreas Schneider <asn@samba.org> correctly points out that this input
parameter should now be const, and that found a bug where I used then
used it incorrectly as a talloc context.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr  6 00:33:31 CEST 2011 on sn-devel-104

8 years agokdc: always ldb escape the realm
Andrew Bartlett [Tue, 5 Apr 2011 06:21:14 +0000 (16:21 +1000)]
kdc: always ldb escape the realm

8 years agoauth: Move auth_session_info into IDL
Andrew Bartlett [Tue, 5 Apr 2011 06:15:27 +0000 (16:15 +1000)]
auth: Move auth_session_info into IDL

This changes auth_session_info_transport to just be a wrapper, rather
than a copy that has to be kept in sync.

As auth_session_info was already wrapped in python, this required
changes to the existing pyauth wrapper and it's users.

Andrew Bartlett

8 years agos4-auth: Always talloc_zero() the struct auth_session_info
Andrew Bartlett [Tue, 5 Apr 2011 05:57:42 +0000 (15:57 +1000)]
s4-auth: Always talloc_zero() the struct auth_session_info

8 years agopidl: Add support for the [ignore] property
Andrew Bartlett [Tue, 5 Apr 2011 05:55:07 +0000 (15:55 +1000)]
pidl: Add support for the [ignore] property

This is implemented to simply never push this pointer, but to push a
NULL in it's place.  Likewise a pull will simply return a NULL.

Andrew Bartlett

8 years agolibrpc/idl Add [nopython] to krb5pac ndrdump functions
Andrew Bartlett [Tue, 5 Apr 2011 05:50:08 +0000 (15:50 +1000)]
librpc/idl Add [nopython] to krb5pac ndrdump functions

These functions are not real RPC functions, but are used to help
ndrdump operate.  They don't need python bindings.

Andrew Bartlett

8 years agoFix bug #7080 - Quota only shown when logged as root.
Jeremy Allison [Tue, 5 Apr 2011 18:24:39 +0000 (11:24 -0700)]
Fix bug #7080 - Quota only shown when logged as root.

Remove the final incorrect uses of conn->session_info->utok.uid.
When we're in the "admin users" list, then this value is not set
to zero.

Inspired by the comment on this bug by Dmitry Butskoy <dmitry@butskoy.name>.

I'll create a different fix for 3.5.x.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Apr  5 21:53:59 CEST 2011 on sn-devel-104

8 years agos3: Add maintainers for s3/auth
Volker Lendecke [Tue, 5 Apr 2011 08:32:37 +0000 (10:32 +0200)]
s3: Add maintainers for s3/auth

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Apr  5 19:09:14 CEST 2011 on sn-devel-104

8 years agos3/vfs_gpfs: s/syncops/gpfs
Björn Jacke [Sun, 3 Apr 2011 14:19:11 +0000 (16:19 +0200)]
s3/vfs_gpfs: s/syncops/gpfs

as pointed out by Metze in bug #8031

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue Apr  5 18:08:42 CEST 2011 on sn-devel-104

8 years agos3-waf: fix typo in ctdb checks.
Günther Deschner [Tue, 5 Apr 2011 12:15:24 +0000 (14:15 +0200)]
s3-waf: fix typo in ctdb checks.

Guenther

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

8 years agos3: Make vlp printing work by default
Volker Lendecke [Sat, 2 Apr 2011 16:51:55 +0000 (18:51 +0200)]
s3: Make vlp printing work by default

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Apr  5 13:12:14 CEST 2011 on sn-devel-104

8 years agos3: Fix print_spool_end
Volker Lendecke [Sat, 2 Apr 2011 16:46:58 +0000 (18:46 +0200)]
s3: Fix print_spool_end

We have to use the spoolss pipe instance opened in print_spool_open, otherwise
the spoolss server won't be able to find the right printer and job.

8 years agos4 samba-tool: Implement "testparm" command
Kai Blin [Wed, 23 Mar 2011 22:06:18 +0000 (23:06 +0100)]
s4 samba-tool: Implement "testparm" command

This is a port of the existing "testparm" python script to a samba-tool
command.

Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Tue Apr  5 07:49:13 CEST 2011 on sn-devel-104

8 years agos3-selftest Look only under source3 for smb.conf files
Andrew Bartlett [Mon, 4 Apr 2011 11:01:40 +0000 (21:01 +1000)]
s3-selftest Look only under source3 for smb.conf files

This test looks for any .conf file with [global] in it, and assumes
it's a Samba3 format smb.conf file.  If 'make test' has been run in
the top level build, it was finding the smb.conf files it generated.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Apr  4 23:50:06 CEST 2011 on sn-devel-104

8 years agos3-auth Rename user_session_key -> session_key to match auth_session_info
Andrew Bartlett [Mon, 14 Feb 2011 00:35:21 +0000 (11:35 +1100)]
s3-auth Rename user_session_key -> session_key to match auth_session_info

8 years agos3-auth use create_local_token() to transform server_info -> session_info
Andrew Bartlett [Fri, 11 Feb 2011 00:50:37 +0000 (11:50 +1100)]
s3-auth use create_local_token() to transform server_info -> session_info

Before a auth_serversupplied_info struct can be used for
authorization, the local groups and privileges must be calculated.
create_local_token() now copies the server_info, and then sets the
calulated token and unix groups.

Soon, it will also transform the result into an expanded struct
auth_session_info.  Until then, the variable name (server_info vs
session_info provides a clue to the developer about what information
has been entered in the structure).

By moving the calls to create_local_token within the codebase, we
remove duplication, and ensure that the session key (where modified)
is consistently copied into the new structure.

Andrew Bartlett

8 years agoMove SET_STAT_INVALID call added by Volker as fix for bug 8042 - Newly create files...
Jeremy Allison [Mon, 4 Apr 2011 17:22:03 +0000 (10:22 -0700)]
Move SET_STAT_INVALID call added by Volker as fix for bug 8042 - Newly create files are always failed with NT_STATUS_FILE_IS_A_DIRECTORY

Ensure we do this for all cases where the stat fails.

Jeremy

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Apr  4 20:08:45 CEST 2011 on sn-devel-104

8 years agoNote that check_parent_exists() doesn't change the contents of smb_fname (add const).
Jeremy Allison [Mon, 4 Apr 2011 17:15:16 +0000 (10:15 -0700)]
Note that check_parent_exists() doesn't change the contents of smb_fname (add const).

8 years agos3-net: add command "net idmap check"
Gregor Beck [Fri, 28 Jan 2011 09:55:58 +0000 (10:55 +0100)]
s3-net: add command "net idmap check"

This is a tool to check the consistency of an idmap tdb database.

The default mode is to scan the database and list invalid entries,
e.g. records with an invalid format, or records which are valid
but for which the reverse mapping entry is missing.

With the "--repair" switch, one can enter an interactive
repair mode which will prompt for each invalid entry found
with the option to delete, skip or edit the record.

There is also a non-interactive repair mode triggered by "--auto"
which will remove all records with invalid content and fill up
mappings which are missing the reverse entry.

The "--test" parameter lets "net idmap check" only list the
changes that would be written and not actually commit them to
the database.

The "--lock" option allows to lock the database already in the
first reading traverse, in order to remove the race when the
database has to be closed and reopened again before writing
the changes.

Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Apr  4 18:21:09 CEST 2011 on sn-devel-104

8 years agos3: add function srprs_quoted to parse strings written with cbuf_print_quoted
Gregor Beck [Thu, 17 Mar 2011 09:22:25 +0000 (10:22 +0100)]
s3: add function srprs_quoted to parse strings written with cbuf_print_quoted

8 years agos3: add function cbuf_print_quoted
Gregor Beck [Thu, 17 Mar 2011 09:20:30 +0000 (10:20 +0100)]
s3: add function cbuf_print_quoted

8 years agos3: add function dbwrap_traverse
Gregor Beck [Fri, 18 Mar 2011 13:39:15 +0000 (14:39 +0100)]
s3: add function dbwrap_traverse

8 years agos3: add function dbwrap_trans_traverse
Gregor Beck [Wed, 16 Mar 2011 08:13:40 +0000 (09:13 +0100)]
s3: add function dbwrap_trans_traverse

8 years agos3: fix cbuf_swapptr
Gregor Beck [Wed, 16 Mar 2011 08:12:28 +0000 (09:12 +0100)]
s3: fix cbuf_swapptr

8 years agos3:idmap_tdb2: fix build of tdb2
Michael Adam [Mon, 4 Apr 2011 09:46:31 +0000 (11:46 +0200)]
s3:idmap_tdb2: fix build of tdb2

The include of system/filesys.h was removed from includes.h. ...

8 years agos3-rpc_server Remove comment, yes the key is correct.
Andrew Bartlett [Thu, 10 Feb 2011 10:40:07 +0000 (21:40 +1100)]
s3-rpc_server Remove comment, yes the key is correct.

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Apr  4 13:31:52 CEST 2011 on sn-devel-104

8 years agos3-auth consolidate create_local_token() into make_server_info_krb5()
Andrew Bartlett [Thu, 10 Feb 2011 10:04:01 +0000 (21:04 +1100)]
s3-auth consolidate create_local_token() into make_server_info_krb5()

This ensures that all callers don't need to each add builtin groups
and privileges to the user's token

Andrew Bartlett

8 years agos3-selftest Remove more instances of /tmp in test_smbclient_s3.sh
Andrew Bartlett [Mon, 4 Apr 2011 09:18:47 +0000 (19:18 +1000)]
s3-selftest Remove more instances of /tmp in test_smbclient_s3.sh

8 years agos3-selftest Add testing of kerberos login
Andrew Bartlett [Mon, 4 Apr 2011 09:13:17 +0000 (19:13 +1000)]
s3-selftest Add testing of kerberos login

This uses a pre-calculated credentials cache, that should be valid
until 2036.

Andrew Bartlett

8 years agos4-credentials Add a command line hook to set the kerberos credentials cache
Andrew Bartlett [Mon, 4 Apr 2011 09:11:39 +0000 (19:11 +1000)]
s4-credentials Add a command line hook to set the kerberos credentials cache

This allows this to be specified independent of the KRB5CCNAME
environment variable (in this case, it's harder than it should be to
set up in the make test for s3 that way).

Andrew Bartlett

8 years agos3-selftest Disable log rotation in 'make test'
Andrew Bartlett [Sun, 3 Apr 2011 23:22:03 +0000 (09:22 +1000)]
s3-selftest Disable log rotation in 'make test'

8 years agotalloc - some documentation changes
Matthias Dieter Wallnöfer [Thu, 31 Mar 2011 19:32:51 +0000 (21:32 +0200)]
talloc - some documentation changes

- Fix some typos
- Document better the differences in the behaviour between talloc 1.X and 2.X.
  Previously this seemed a bit spongy to me.

Reviewed-by: Jelmer + Tridge
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Apr  4 11:05:42 CEST 2011 on sn-devel-104

8 years agos4-dsdb: implemented creation of conflict records
Andrew Tridgell [Fri, 1 Apr 2011 08:53:23 +0000 (19:53 +1100)]
s4-dsdb: implemented creation of conflict records

when a record with the same DN gets created on two DCs at the same
time, this creates a replication conflict. To resolve this conflict
one of the DCs needs to create a conflict record, which is a rename of
one of the two DNs, based on which one is newer.

This prevents replication from failing when DCs are temporarily
disconnected and then have conflicts when they next replicate

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

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Apr  4 03:27:07 CEST 2011 on sn-devel-104

8 years agos4-samba-tool: give a bit better error on user delete failure
Andrew Tridgell [Fri, 1 Apr 2011 04:59:15 +0000 (15:59 +1100)]
s4-samba-tool: give a bit better error on user delete failure

8 years agos4-rpc: improved error mapping for several RPC server calls
Andrew Tridgell [Fri, 1 Apr 2011 04:58:55 +0000 (15:58 +1100)]
s4-rpc: improved error mapping for several RPC server calls

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

8 years agos4-dsdb: added a ldb err -> NTSTATUS mapping
Andrew Tridgell [Fri, 1 Apr 2011 04:58:21 +0000 (15:58 +1100)]
s4-dsdb: added a ldb err -> NTSTATUS mapping

this is not perfect, but its better than always giving
NT_STATUS_UNSUCCESSFUL in our RPC servers

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

8 years agos4-krb5: be a bit less verbose about krb5 packets
Andrew Tridgell [Fri, 1 Apr 2011 04:57:39 +0000 (15:57 +1100)]
s4-krb5: be a bit less verbose about krb5 packets

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

8 years agos4-loadparm: be a bit less verbose about smb.conf processing
Andrew Tridgell [Fri, 1 Apr 2011 04:57:22 +0000 (15:57 +1100)]
s4-loadparm: be a bit less verbose about smb.conf processing

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

8 years agos4-libnet: honour convention of DEBUGLEVEL>=10 for NDR print
Andrew Tridgell [Fri, 1 Apr 2011 04:56:58 +0000 (15:56 +1100)]
s4-libnet: honour convention of DEBUGLEVEL>=10 for NDR print

8 years agodebug: default debug to stderr
Andrew Tridgell [Fri, 1 Apr 2011 03:55:37 +0000 (14:55 +1100)]
debug: default debug to stderr

if setup_logging() hasn't been called then default to sending debug to
stderr

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

8 years agoAvoid uppercasing server role in error message.
Jelmer Vernooij [Sun, 3 Apr 2011 17:13:45 +0000 (19:13 +0200)]
Avoid uppercasing server role in error message.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Apr  3 20:01:48 CEST 2011 on sn-devel-104

8 years agos3: Remove some unused code
Volker Lendecke [Sun, 3 Apr 2011 15:46:41 +0000 (17:46 +0200)]
s3: Remove some unused code

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Apr  3 18:32:51 CEST 2011 on sn-devel-104

8 years agoFix compilation without external heimdal.
Jelmer Vernooij [Sun, 3 Apr 2011 14:32:27 +0000 (16:32 +0200)]
Fix compilation without external heimdal.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Apr  3 17:18:56 CEST 2011 on sn-devel-104

8 years agouse system heimdal headers if possible, fix missing dependencies on hx509 and krb5...
Jelmer Vernooij [Sun, 3 Apr 2011 13:40:24 +0000 (15:40 +0200)]
use system heimdal headers if possible, fix missing dependencies on hx509 and krb5 libraries.

8 years agos3: Add a quick test for bug 8042
Volker Lendecke [Sun, 3 Apr 2011 12:36:53 +0000 (14:36 +0200)]
s3: Add a quick test for bug 8042

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Apr  3 16:13:21 CEST 2011 on sn-devel-104

8 years agos3: Fix bug 8042: File creation on OS/X
Volker Lendecke [Sun, 3 Apr 2011 11:57:11 +0000 (13:57 +0200)]
s3: Fix bug 8042: File creation on OS/X

With a case insensitive file system the stat cache lookup leaked the parent
directorys stat information from unix_convert into the smb_filename. This led
open_file_ntcreate to believe it just created a directory.

In the case where we do the search we already invalidate the stat struct.

Thanks to TAKAHASHI Motonobu for insisting! :-)

Volker

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Apr  3 14:54:27 CEST 2011 on sn-devel-104

8 years agoFix for servers that don't put a path separator at the end of the service.
Larry Reid [Sat, 26 Mar 2011 22:39:27 +0000 (15:39 -0700)]
Fix for servers that don't put a path separator at the end of the service.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Apr  3 10:33:42 CEST 2011 on sn-devel-104

8 years agos3:waf: add cluster support / ctdb checks.
Michael Adam [Sat, 2 Apr 2011 00:20:49 +0000 (02:20 +0200)]
s3:waf: add cluster support / ctdb checks.

The checks are roughtly taken from the autoconf ctdb checks.

I was not able to implement checks with CHECK_DECL, CHECK_TYPE,
CHECK_HEADER and friends, because the ctdb headers seem to need too
special a setup of includes and defines in order to compile.
So I used CHECK_CODE() in all checks.

In the long run, this should be changed.

I supported a --with-ctdb-dir options to allow for building
against a ctdb that is not installed into /usr (e.g. against
a local git checkout). In order to implement this, I had to
hand includes in to the CHECK_CODE function.
Here I found a problem with CHECK_CODE (or even the core waf
conf.check() function: The CHECK_CODE function does not
expand the includes it gets (i.e. '#' is not expanded to the
base dir, and relative paths are left relative). But the core
check() function seems to ignore all include paths that are
not absolute paths. Hence in particular the usual default '# .'
for the includes is useless. So I preprocessed the list of includes
for the cluster checks. But I assume that it would be useful
to move this expansion into CHECK_CODE or even into the core
waf check function.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sat Apr  2 03:26:55 CEST 2011 on sn-devel-104

8 years agos3:waf:compare_config_h3.sh: make diff tool configurable as env var "DIFF"
Michael Adam [Fri, 1 Apr 2011 22:33:52 +0000 (00:33 +0200)]
s3:waf:compare_config_h3.sh: make diff tool configurable as env var "DIFF"

8 years agos3:waf:compare_config_h3.sh: specify autoconf-config.h as commandline parameter
Michael Adam [Fri, 1 Apr 2011 22:29:51 +0000 (00:29 +0200)]
s3:waf:compare_config_h3.sh: specify autoconf-config.h as commandline parameter

8 years agoFix bug #7987 - ACL can get lost when files are being renamed.
Jeremy Allison [Fri, 1 Apr 2011 23:50:28 +0000 (16:50 -0700)]
Fix bug #7987 - ACL can get lost when files are being renamed.

There is no reason for smbd with Windows ACLs to use chmod
or fchmod unless it's a file opened with UNIX extensions or
with posix pathnames.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Apr  2 02:40:43 CEST 2011 on sn-devel-104

8 years agoFix bug #8047 - mdns registration doesn't work if "interfaces" is used in smb.conf
Marc A. Dahlhaus [Fri, 1 Apr 2011 20:26:31 +0000 (13:26 -0700)]
Fix bug #8047 - mdns registration doesn't work if "interfaces" is used in smb.conf

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Apr  1 23:15:34 CEST 2011 on sn-devel-104

8 years agos3: Fix Coverity ID 1137: CONSTANT_EXPRESSION_RESULT
Volker Lendecke [Fri, 1 Apr 2011 06:40:38 +0000 (08:40 +0200)]
s3: Fix Coverity ID 1137: CONSTANT_EXPRESSION_RESULT

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Apr  1 09:35:19 CEST 2011 on sn-devel-104

8 years agos3: Fix Coverity ID 1136: CONSTANT_EXPRESSION_RESULT
Volker Lendecke [Fri, 1 Apr 2011 06:40:38 +0000 (08:40 +0200)]
s3: Fix Coverity ID 1136: CONSTANT_EXPRESSION_RESULT

8 years agodebug: Restore the s3-style check in check_log_size()
Volker Lendecke [Thu, 31 Mar 2011 15:02:27 +0000 (17:02 +0200)]
debug: Restore the s3-style check in check_log_size()

This has caused me considerable grief.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Mar 31 19:42:38 CEST 2011 on sn-devel-104

8 years agos3:configure: allow building without SCHEDULE_FOR_DELETION with --enable-old-ctdb
Michael Adam [Thu, 31 Mar 2011 14:12:02 +0000 (16:12 +0200)]
s3:configure: allow building without SCHEDULE_FOR_DELETION with --enable-old-ctdb

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Mar 31 18:55:38 CEST 2011 on sn-devel-104

8 years agos3:configure: introduce "--enable-old-ctdb" to enable enforcing build against old...
Michael Adam [Thu, 31 Mar 2011 14:06:36 +0000 (16:06 +0200)]
s3:configure: introduce "--enable-old-ctdb" to enable enforcing build against old ctdb

8 years agos3:configure: add check for new CTDB_CONTROL_SCHEDULE_FOR_DELETION
Michael Adam [Thu, 31 Mar 2011 13:39:41 +0000 (15:39 +0200)]
s3:configure: add check for new CTDB_CONTROL_SCHEDULE_FOR_DELETION

8 years agos3:configure: rework logic of ctdb/clustering checks
Michael Adam [Thu, 31 Mar 2011 13:23:28 +0000 (15:23 +0200)]
s3:configure: rework logic of ctdb/clustering checks

8 years agos3:configure: remove unused variable CTDB_CFLAGS
Michael Adam [Thu, 31 Mar 2011 12:17:44 +0000 (14:17 +0200)]
s3:configure: remove unused variable CTDB_CFLAGS

8 years agos3:configure: fix a comment.
Michael Adam [Thu, 31 Mar 2011 11:45:21 +0000 (13:45 +0200)]
s3:configure: fix a comment.

8 years agos3:dbwrap_ctdb: in ctdb_delete, send a SCHEDULE_FOR_DELETION control to local ctdbd
Michael Adam [Wed, 22 Dec 2010 13:16:07 +0000 (14:16 +0100)]
s3:dbwrap_ctdb: in ctdb_delete, send a SCHEDULE_FOR_DELETION control to local ctdbd

This way, the record will be scheduled for fast vacuuming.

This is sent with the NOREPLY flag, so ctd should not sent
a reply packet and samba does not expect one. Hence, it
is not important for the success of the db_ctdb_delete command
whether or not the ctdbd we are running against supports the
SCHEDULE_FOR_DELETION control.

8 years agos3:ctdb: pass the ctdb control flags to the ctdb daemon when sending the control
Michael Adam [Tue, 8 Mar 2011 15:26:34 +0000 (16:26 +0100)]
s3:ctdb: pass the ctdb control flags to the ctdb daemon when sending the control

The only flag that is currently used is the NOREPLY flag to indicate that
the client expects no reply packet. This needs to get passed down to the
ctdb daemon so that it really does not send a reply.

8 years agos3:ctdb: samba can now handle the NOREPLY flag
Michael Adam [Thu, 23 Dec 2010 15:46:24 +0000 (16:46 +0100)]
s3:ctdb: samba can now handle the NOREPLY flag

Revert "samba3 can't handle NOREPLY yet"

This reverts commit 9bf211db6d7d6ef6e59508de69d6d8dfe5bae059.

8 years agos3:ctdb: correctly handle cstatus if CTDB_CTRL_FLAG_NOREPLY is set.
Michael Adam [Thu, 23 Dec 2010 15:43:55 +0000 (16:43 +0100)]
s3:ctdb: correctly handle cstatus if CTDB_CTRL_FLAG_NOREPLY is set.

8 years agos3-net: Do not use uninitialized value
Sumit Bose [Thu, 31 Mar 2011 12:09:45 +0000 (14:09 +0200)]
s3-net: Do not use uninitialized value

s3-net: Do not use uninitialized value

Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Mar 31 18:09:57 CEST 2011 on sn-devel-104

8 years agos3-winbindd: Use the correct enums for samr_QueryDomainInfo.
Andreas Schneider [Wed, 30 Mar 2011 09:08:31 +0000 (11:08 +0200)]
s3-winbindd: Use the correct enums for samr_QueryDomainInfo.

8 years agolib/util/charset Add tests for strcasecmp_m(), talloc_strupper() et al
Andrew Bartlett [Thu, 31 Mar 2011 05:44:24 +0000 (16:44 +1100)]
lib/util/charset Add tests for strcasecmp_m(), talloc_strupper() et al

This adds tests for:
 strncasecmp_m
 strcasecmp_m
 strupper_talloc_n
 strlower_talloc
 strhaslower
 strhasupper

The tests can certainly be improved with pre-calculated upper and
lower case text, but this at least puts them though their paces.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Mar 31 14:24:22 CEST 2011 on sn-devel-104

8 years agos4-dsdb: cope with failed searches in the linked attributes callback
Andrew Tridgell [Thu, 31 Mar 2011 04:16:51 +0000 (15:16 +1100)]
s4-dsdb: cope with failed searches in the linked attributes callback

This fixes a bug where we try to add an empty backlink because the
search for the forward link failed.

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 31 13:37:36 CEST 2011 on sn-devel-104

8 years agos3-torture: a very simple test for convert_string_error()
Andrew Tridgell [Wed, 30 Mar 2011 06:30:08 +0000 (17:30 +1100)]
s3-torture: a very simple test for convert_string_error()

this is a very simple test based on the example volker gave in
1e50f9a5. A more sophisticated test will also be worthwhile, but this
at least gives us a basic test while changes are being made

8 years agos3: Fix a typo
Volker Lendecke [Thu, 31 Mar 2011 10:02:26 +0000 (12:02 +0200)]
s3: Fix a typo

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Mar 31 12:50:53 CEST 2011 on sn-devel-104

8 years agocharconv: Use talloc_tos() in the S3 build
Volker Lendecke [Thu, 31 Mar 2011 06:25:32 +0000 (08:25 +0200)]
charconv: Use talloc_tos() in the S3 build

In S3 we put a talloc_pool on top of the stack so that an allocation from
talloc_tos() normally is just a pointer increment.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Mar 31 09:14:01 CEST 2011 on sn-devel-104

8 years agoArg. I hate the "if (xxx) return foo" all on one line style of code.
Jeremy Allison [Thu, 31 Mar 2011 02:27:29 +0000 (19:27 -0700)]
Arg. I hate the "if (xxx) return foo" all on one line style of code.

Fix the talloc leaks I introduced by not spotting these returns.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Mar 31 05:19:34 CEST 2011 on sn-devel-104

8 years agoDon't burn 2k of stack on every iconv, use the heap when it's a slow call.
Jeremy Allison [Thu, 31 Mar 2011 01:13:05 +0000 (18:13 -0700)]
Don't burn 2k of stack on every iconv, use the heap when it's a slow call.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Mar 31 04:09:09 CEST 2011 on sn-devel-104

8 years agoFix bug #7996 - sgid bit lost on folder rename.
Jeremy Allison [Thu, 31 Mar 2011 01:00:09 +0000 (18:00 -0700)]
Fix bug #7996 - sgid bit lost on folder rename.

Refuse to set dos attributes into unix mode bits on such a
folder.

8 years agoSMBTA: make vfs_smb_traffic_analyzer aware of the sendfile and recvfile functionality...
Holger Hetterich [Tue, 29 Mar 2011 20:16:10 +0000 (22:16 +0200)]
SMBTA: make vfs_smb_traffic_analyzer aware of the sendfile and recvfile functionality and store the results as common read/write results.

8 years agolib/util/charset smb_panic() on incorrect use of strlen_m_ext
Andrew Bartlett [Wed, 30 Mar 2011 23:32:52 +0000 (10:32 +1100)]
lib/util/charset smb_panic() on incorrect use of strlen_m_ext

This may save a developer some time in the future.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Mar 31 02:40:31 CEST 2011 on sn-devel-104

8 years agolib/util/charset Add tests for strlen_m_ext() and convert_string_talloc()
Andrew Bartlett [Wed, 30 Mar 2011 23:28:36 +0000 (10:28 +1100)]
lib/util/charset Add tests for strlen_m_ext() and convert_string_talloc()

This convers a few more cases for convert_string_talloc() and
introduces tests for strlen_m_ext() across complex multibyte strings.

Andrew Bartlett

8 years agolib/util/charset Add wrapper to allow testing of strlen_m_ext()
Andrew Bartlett [Wed, 30 Mar 2011 23:27:41 +0000 (10:27 +1100)]
lib/util/charset Add wrapper to allow testing of strlen_m_ext()

This allows test routines to force in particular character sets, and
not rely on the smb.conf.

Andrew Bartlett

8 years agolib/util/charset correct calculation of UTF8 character sizes
Andrew Bartlett [Wed, 30 Mar 2011 23:26:08 +0000 (10:26 +1100)]
lib/util/charset correct calculation of UTF8 character sizes

Characters between 0x800 0x0FFFF are 3 bytes long.

Andrew Bartlett