1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

3351 Commits

Author SHA1 Message Date
Ralph Wuerthner
3cd640dc5d tdb: Fix typos.
Reviewed-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jun  7 15:18:47 CEST 2013 on sn-devel-104
2013-06-07 15:18:47 +02:00
Ralph Wuerthner
d273bdf18c Add "repack" command to tdbtool documentation.
The original commit 'Add "repack" command to tdbtool.' only added
the documentation to docs-xml/manpages-3/tdbtool.8.xml and forgot
about lib/tdb/manpages/tdbtool.8.xml .

Reviewed-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-06-07 13:25:23 +02:00
Volker Lendecke
56055f788c Revert "dbwrap: dbwrap_fetch_locked_timeout()."
This reverts commit f6eb187fda.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jun  6 14:26:26 CEST 2013 on sn-devel-104
2013-06-06 14:26:26 +02:00
Stefan Metzmacher
d1feccb35e tdb: change version to tdb-1.2.12
* internal code cleanups
* crash fix for pytdb
* fix for 4GB overflow detection
  See http://permalink.gmane.org/gmane.network.samba.internals/42906 for
  an example of what happens.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jun  4 16:07:55 CEST 2013 on sn-devel-104
2013-06-04 16:07:55 +02:00
David Disseldorp
8a6743e4ed Bug 8997: change libreplace GPL source to LGPL
libreplace currently includes socket.c and getifaddrs.c both of which
are GPL licensed.
Although not required, talloc and tdb build alongside this source,
leading to some ambiguity regarding their LGPL licences.

The following copyright holders have agreed to the GPL->LGPL change:
lib/replace/getifaddrs.c
   Copyright (C) Andrew Tridgell 1998
   Copyright (C) Jeremy Allison 2007
   Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007

lib/replace/test/getifaddrs.c
lib/replace/socket.c
 * Copyright (C) Michael Adam <obnox@samba.org> 2008

Signed-off-by: David Disseldorp <ddiss@samba.org>

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

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jun  3 18:06:18 CEST 2013 on sn-devel-104
2013-06-03 18:06:18 +02:00
Volker Lendecke
1f269fcc6e tdb: Add another overflow check to tdb_expand_adjust
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jun  3 14:08:54 CEST 2013 on sn-devel-104
2013-06-03 14:08:53 +02:00
Volker Lendecke
d9b4f19e73 tdb: Make tdb_recovery_allocate overflow-safe
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
2013-06-03 10:21:32 +02:00
Volker Lendecke
8b215df445 tdb: Make tdb_recovery_size overflow-safe
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
2013-06-03 10:21:31 +02:00
Stefan Metzmacher
7ae09a9695 tdb: add proper OOM/ENOSPC handling to tdb_expand()
Failing to do so will result in corrupt tdbs: We will overwrite
the hash chain pointers with 0x42424242.

Pair-Programmed-With: Volker Lendecke <vl@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
2013-06-03 10:21:30 +02:00
Stefan Metzmacher
854c5f0aac tdb: add overflow detection to tdb_expand_adjust()
We round up at maximun to a new size of 4GB,
but still return at least the given size.

The caller has to deal with ENOSPC itself.

Pair-Programmed-With: Volker Lendecke <vl@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
2013-06-03 10:21:28 +02:00
Stefan Metzmacher
e19d46f7e3 tdb: add overflow/ENOSPC handling to tdb_expand_file()
Pair-Programmed-With: Volker Lendecke <vl@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
2013-06-03 10:21:27 +02:00
Stefan Metzmacher
a07ba17e0c tdb: add a 'new_size' helper variable to tdb_expand_file()
Pair-Programmed-With: Volker Lendecke <vl@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
2013-06-03 10:21:22 +02:00
Volker Lendecke
4483bf143d tdb: Add overflow-checking tdb_add_off_t
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
2013-06-03 10:21:20 +02:00
Michael Wood
42b0b27505 param_table: Remove misleading allow dns updates options.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Jun  1 12:46:32 CEST 2013 on sn-devel-104
2013-06-01 12:46:32 +02:00
Kai Blin
0de1675e5d libcli: Remove uneeded debug message
Signed-off-by: Kai Blin <kai@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-06-01 18:48:11 +10:00
David Disseldorp
caf83bcb76 libsmbconf: add smbconf_create_set_share
This call creates a new share definition, using the parameters provided
with a smbconf_service structure.
Such an interface allows for simple cloning of services with:
smbconf_get_share(conf_ctx, mem_ctx, base_sharename, &base_service_def);
base_service_def->name = clone_sharename;
smbconf_create_set_share(conf_ctx, base_service_def);

Pair-Programmed-With: Michael Adam <obnox@samba.org>

Signed-off-by: David Disseldorp <ddiss@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2013-05-28 18:12:26 +02:00
Michael Adam
57634fd87d libsmbconf: fix documentation of transaction calls.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-28 18:12:26 +02:00
Rusty Russell
3bd686c5ad tdb: fix logging of offets and lengths.
We can have offsets > 2G, so use unsigned values.  Fixes other prints to be
native types rather than casts, too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

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

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue May 28 11:22:14 CEST 2013 on sn-devel-104
2013-05-28 11:22:14 +02:00
Andrew Bartlett
922fe921ce lib/util/modules.c: Remove #if SAMBA_BUILD_ == 3 now we only have the waf build
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-28 12:17:12 +10:00
Andrew Bartlett
2bede9d0d6 param: Remove _SAMBA_BUILD_ checks from now the autoconf build is gone
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-28 12:17:11 +10:00
Andrew Bartlett
cd4b413cb0 build: Remove autoconf build system
We are now confident that that waf build system meets enough of our needs
that we will work to improve it, rather than maintain two build systems.

Andrew Bartlett

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-28 12:17:10 +10:00
Andrew Bartlett
940a6a6205 lib/replace: Remove unused install-sh
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon May 27 05:51:04 CEST 2013 on sn-devel-104
2013-05-27 05:51:04 +02:00
Andrew Bartlett
2a4eaa3241 build: Rework BSD_STYLE_STATVFS check to match autoconf build
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2013-05-27 11:56:48 +10:00
Andrew Bartlett
9ddfd7d878 lib/replace: Set BROKEN_STRNLEN and BROKEN_STRNDUP on all AIX
The background is in https://bugzilla.samba.org/show_bug.cgi?id=1097
and wider reports are at
http://stackoverflow.com/questions/2091460/strndup-call-is-currupting-stack-frames

Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 23 03:52:10 CEST 2013 on sn-devel-104
2013-05-23 03:52:10 +02:00
Andrew Bartlett
30a2243675 build: Update md5.h detection in waf and autoconf to use sys/md5.h and -lmd
This brings the two build systems in sync, without using md5.h (which is a problem name)

Tested on FreeBSD

Andrew Bartlett

Reviewed-by: Richard Sharpe <rsharpe@samba.org>

Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Wed May 22 10:06:40 CEST 2013 on sn-devel-104
2013-05-22 10:06:40 +02:00
Volker Lendecke
d7708fd360 talloc: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Mon May 20 18:48:49 CEST 2013 on sn-devel-104
2013-05-20 18:48:49 +02:00
Matthieu Patou
96f972460c ldb_tdb: Warn when reindexing is done
Signed-off-by: Matthieu Patou <mat@matws.net>

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

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon May 20 15:47:33 CEST 2013 on sn-devel-104
2013-05-20 15:47:32 +02:00
Kai Blin
30cba0d201 debug: Add ability to dump_data per debug class
Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-18 10:58:05 +02:00
Vadim Zhukov
2fda6c47f4 More generic check for OpenBSD platform
OpenBSD versioning is different from many other
projects, and, say, 5.0 does not differ from 4.9 more than from 5.1. So the
right approach will be to check that platform name starts with "openbsd"
instead. This is also the thing OpenBSD developers do when patching other
software, so this patch is consistent with already existing practicies.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9888

Reviewed-by: Lars Müller <lars@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri May 17 17:58:16 CEST 2013 on sn-devel-104
2013-05-17 17:58:16 +02:00
Volker Lendecke
d67e614a07 lib: Add before/after hooks to async_connect
This will facilitiate [un]become_root for smbd to connect safely to ctdbd.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2013-05-17 11:22:45 +02:00
Christian Ambach
162ec83f68 waf: only use -fstack-protector when both compiler and linker support it
otherwise build with xlc on AIX fails because the compiler silently ignores the parameter
but the linker does not like it

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-17 11:16:33 +02:00
Kai Blin
4b01099748 debug: Add debugclass for DNS server
Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-By: Amitay Isaacs <amitay@gmail.com>
2013-05-16 21:40:08 +10:00
Karolin Seeger
b82d3346fe lib/testtools/testtools/tests/test_testresult.py: Fix typos.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-15 21:04:41 -07:00
Karolin Seeger
70aec093a9 lib/subunit/README: Fix typo.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-15 21:04:41 -07:00
Stefan Metzmacher
8c3fa009ca lib/param: remove unused 'printer_admin'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue May 14 21:45:19 CEST 2013 on sn-devel-104
2013-05-14 21:45:19 +02:00
Stefan Metzmacher
8a878ec74b talloc: only provide the --enable-talloc-compat1 in standalone build
The compat library is already only built in standalone build,
so we need the configure option also only in the standalone build.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-05-14 19:55:58 +02:00
Christian Ambach
11f467d0bd tdb: include information about hash function being used in tdbtool info output
makes it possible to easily determine if the tdb under examination
uses jenkins hash or not

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-05-14 14:34:20 +02:00
Volker Lendecke
8b3d4eff93 dbwrap: Fix CID 1002092 Uninitialized scalar variable
We don't set saved_errno in the ret==0 case.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-05-12 15:56:08 +02:00
Christian Ambach
a4cc41d4d0 lib/replace: add SCNx macros
we already have PRI*, but the corresponding SCN* were missing

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-05-06 16:33:38 +02:00
Christian Ambach
d68e676cac lib/replace: prefer inttypes.h over stdint.h
according to C99 7.8, inttypes.h should include stdint.h so prefer inttypes.h
and fall back to stdint.h (and our own definitions of PRI*) only when inttypes.h
could not be found

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-05-06 16:33:38 +02:00
Volker Lendecke
79fe1381a3 talloc: Simplify _talloc_free_poolmem a bit
Early returns are easier to understand than "else if"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr 18 22:50:42 CEST 2013 on sn-devel-104
2013-04-18 22:50:42 +02:00
Volker Lendecke
a796e48b1d talloc: Do an early return
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-18 11:36:44 -07:00
Volker Lendecke
ccf33dd054 talloc: Avoid some "else" by doing early returns
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-18 11:36:28 -07:00
Volker Lendecke
d3928b0c8a talloc: Fix nonblank line endings
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-18 11:36:14 -07:00
Gregor Beck
1ed22ba4b7 s3:smbd: add a scavenger process for disconnected durable handles
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-04-18 13:15:13 +02:00
Rusty Russell
41333f92d0 ntdb: remove --disable-ntdb.
Remove DISABLE_NTDB option, and --disable-ntdb from waf build.  This just
means that it will always get built: it isn't used by default yet.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Apr 13 02:01:02 CEST 2013 on sn-devel-104
2013-04-13 02:01:02 +02:00
Rusty Russell
ccfd929d96 lib/param: lpcfg_private_db_path()
This wrapper avoids testing lpcfg_use_ntdb() everywhere.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-12 14:59:23 -07:00
Rusty Russell
5b15d10795 autoconf: build in NTDB.
I previously added -DDISABLE_NTDB to FLAGS, but lib/param/util.c
doesn't seem to be compiled with that flag, so it's really not a good
solution.

So instead, compile in ntdb for the autoconf build.  This means:

1) Add -DHAVE_CCAN to cflags.
2) Remove pyntdb from autoconf objects (which is what tdb does)
3) Remove -DDISABLE_NTDB
4) Add ntdb utility objects
5) Link in ntdb everywhere we link in tdb.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-12 14:59:00 -07:00
Stef Walter
ca0d38596d getpass: Don't fail if stdin is not a tty
We don't need to manipulate the tty state (such as turning off
echo) when prompting for passwords if we're not reading from a tty.

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Fri Apr  5 07:34:37 CEST 2013 on sn-devel-104
2013-04-05 07:34:37 +02:00
Volker Lendecke
7f366d745c tevent: Only set poll_ev->delete=false if it was true
Might not be noticable, but I thought it would be an obvious tiny
optimization. Possibly the compiler already does this.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Apr  4 18:32:39 CEST 2013 on sn-devel-104
2013-04-04 18:32:39 +02:00