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

85409 Commits

Author SHA1 Message Date
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
David Disseldorp
b475ef008b torture: support printer publish pending responses
Windows (tested against 2k8r2) returns WERR_IO_PENDING and
DSPRINT_PENDING when a publish or unpublish is requested via
setprinter(level=7). Modify the AD printer publishing test to support
these responses.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jun  3 16:06:15 CEST 2013 on sn-devel-104
2013-06-03 16:06:15 +02:00
David Disseldorp
56b0246162 torture: add AD printer publishing test
This test publishes and unpublishes a printer using setprinter(level=7).
Printer info2.attributes and info7.action flags are check at each point
to ensure MS-RPRN conformance.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-06-03 14:10:07 +02:00
David Disseldorp
002d1a4467 Fix bug 9900: is_printer_published GUID retrieval
Samba currently always responds to GetPrinter(level = 7) requests with
DSPRINT_UNPUBLISH, regardless of the AD publish status tracked via the
PRINTER_ATTRIBUTE_PUBLISHED flag. This is due to erroneous "objectGUID"
unmarshalling in is_printer_published().

This change splits "objectGUID" retrieval into a separate function, and
adds a pull_reg_sz() call to correctly unmarshall the GUID.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-06-03 14:10:07 +02:00
David Disseldorp
f9b6b09e4e printing: explicitly clear PUBLISHED attribute
Currently nt_printer_publish(DSPRINT_UNPUBLISH) flips (via xor) the
info2->attributes PRINTER_ATTRIBUTE_PUBLISHED flag, rather than
explicitly clearing it.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-06-03 14:10:07 +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
Michael Wood
5528551ea3 docs: Avoid mentioning a possibly misleading option.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-06-01 18:54:08 +10:00
Michael Wood
7c4c896eac WHATSNEW: Fix 4.0 default for allow dns updates.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-06-01 18:54:06 +10: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
Kai Blin
8b24c43b38 dns: Delete dnsNode objects when they are empty
If an update leaves the dnsNode without any entries, the dnsNode object
should be deleted. Thanks to Günter Kukkukk for his excellent debugging
work on this one.

This should fix bug #9559

Signed-off-by: Kai Blin <kai@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-06-01 18:48:11 +10:00
Guenter Kukkukk
553d63f0ea s4-dns: set TTL value in the NS server part of the SOA record
noticed this when using samba-tool to create a new zone

Signed-off-by: Guenter Kukkukk <kukks@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu May 30 09:41:20 CEST 2013 on sn-devel-104
2013-05-30 09:41:20 +02:00
Karolin Seeger
09aaa991ef build-htmlman-nogit: Run build-htmlman-nogit with bash.
On debian/ubuntu, the "dash" which is sh, does not
provide pushd/popd...

Signed-off-by: Karolin Seeger <kseeger@samba.org>

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

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu May 30 04:48:06 CEST 2013 on sn-devel-104
2013-05-30 04:48:06 +02:00
Karolin Seeger
fa3cca3fb0 build-htmlman-git: Run build-htmlman-git with bash.
On debian/ubuntu, the "dash" which is sh, does not
    provide pushd/popd...

Signed-off-by: Karolin Seeger <kseeger@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-30 10:57:40 +10:00
Karolin Seeger
737dd2a9fd build-htmlman-nogit: manpages-3 has been moved to manpages.
Signed-off-by: Karolin Seeger <kseeger@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-30 10:57:40 +10:00
Karolin Seeger
ce8bbdd9fc build-htmlman-git: manpages-3 has been moved to manpages.
Signed-off-by: Karolin Seeger <kseeger@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-30 10:57:40 +10:00
Karolin Seeger
0c67a29976 docs-xml/.gitignore: manpages-3 has been moved to manpages.
Signed-off-by: Karolin Seeger <kseeger@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-30 10:57:39 +10:00
Anand Avati
0b8b6fdc96 vfs_glusterfs: Samba VFS module for glusterfs
Implement a Samba VFS plugin for glusterfs based on gluster's gfapi.
This is a "bottom" vfs plugin (not something to be stacked on top of
another module), and translates (most) calls into closest actions
on gfapi.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Signed-off-by: Anand Avati <avati@redhat.com>
2013-05-30 10:57:35 +10:00
Amitay Isaacs
05578dcdbf samba-tool/dns: Set secure zone update flag after creating new zone
Windows DC ignores the secure update flag while creating new zone.  Windows
performs another operation to set the secure update flag.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2013-05-30 10:44:13 +10:00
Amitay Isaacs
c22eb103d8 samba-tool/dns: Pass on additional flags when creating zones
Windows DCs require additional flags to be set when creating zones.

This fixes bug #9599.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2013-05-30 10:44:11 +10:00
Amitay Isaacs
612fbc18c3 s4-dns: Support update of SOA records
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2013-05-30 10:44:08 +10:00
Amitay Isaacs
de2788acd1 s4-rpc: dnsserver: When updating SOA record, use the specified serial
This makes sure that when updating SOA record, the serial is set to the value
sent by client.  For all other records, serial is incremented.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2013-05-30 10:44:03 +10:00
Amitay Isaacs
cc103a8187 s4-rpc: dnsserver: dns_name_equal() returns boolean
Remove the remaining check for return value after strcmp() was changed to
dns_name_equal().

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-30 10:43:46 +10:00
Amitay Isaacs
b5c3ec0abc s4-rpc: dnsserver: Fix removal of trailing '.' in soa mname
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-30 10:43:42 +10:00
Michael Adam
3f24d694e7 build: Add missing new line to replaced python shebang line. (Fix bug #9909)
When configuring with a non-standard python specified in
the PYTHON environment variable, the shebang lines in various
python tools like samba-tool and samba_dnsupdate get replaced.

This replace line for the shebang was missing a newline
which joined the shebang line with the following line,
rendereing those scripts with a nonempty second line unusuable,
for example samba_dnsupdate.

This patch fixes this bug which is bug #9909 on bugzilla.

Pair-Programmed-With: Karolin Seeger <kseeger@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Karolin Seeger <kseeger@samba.org>

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

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed May 29 13:21:51 CEST 2013 on sn-devel-104
2013-05-29 13:21:51 +02:00
Günther Deschner
886f062e72 s4-torture: Always compile backupkey ndr testsuite.
This removes another incorrect AD_DC_BUILD_IS_ENABLED check ifdef check. The ndr
test is not at all heimdal specific.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Wed May 29 11:29:51 CEST 2013 on sn-devel-104
2013-05-29 11:29:50 +02:00
David Disseldorp
b48ceef1d3 waf: build PIEs if supported by the compiler
Currently waf performs a mandatory check for compiler PIE support,
unless --without-pie is specified.
This change makes Waf only perform the mandatory check if --with-pie is
specified. If neither --with-pie nor --without-pie are specified, then
PIEs are only built if compiler support is available.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-05-29 09:36:39 +02:00
Michael Adam
d86fda9b18 autobuild: remove remnants of removed samba3 targets
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed May 29 09:35:16 CEST 2013 on sn-devel-104
2013-05-29 09:35:16 +02:00
Michael Adam
89edff08db net: use smbconf_create_set_share() in "net conf import"
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue May 28 20:01:12 CEST 2013 on sn-devel-104
2013-05-28 20:01:12 +02: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
Andrew Bartlett
277831eaf1 dsdb-repl_meta_data: Move TODO comment about conflicts and missing parents
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue May 28 18:11:00 CEST 2013 on sn-devel-104
2013-05-28 18:11:00 +02:00
Andrew Bartlett
2d38009852 torture: Add tests of rename behaviour to replica_sync.py
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-28 16:20:08 +02:00
Andrew Bartlett
6960f8e4c3 dsdb-repl_meta_data: Handle renames better, considering only the RDN as given, and then the parent as given
This ignores the full DN as given, because the parent compents might be out of date.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-28 16:20:08 +02:00
Andrew Bartlett
54e092bb31 dsdb-linked_attributes: Do not crash if the target GUID can not be found
Note that we must not give an error when we cannot find the object
that should hold the backlink, there really isn't anything we can do
in this case.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-28 16:20:08 +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
Amitay Isaacs
5a633dd6bb s4-dns: Print/Set minimumTTL value in SOA record
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

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

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue May 28 08:47:56 CEST 2013 on sn-devel-104
2013-05-28 08:47:56 +02:00
Andrew Bartlett
667651132b build: Remove unused mkbuildoptions.awk
This is not used by the waf build.

Andrew Bartlett

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-28 12:17:12 +10:00
Andrew Bartlett
dd72d85e92 build: Remove unused tool for config.h comparison
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-28 12:17:12 +10:00
Andrew Bartlett
4c4520ac37 build: Remove feature tests for variables now always provided
These #ifdef statements were added in replacement for #if (_SAMBA_BUILD_ >= 4)
in fbe7ed79b0

Andrew Bartlett

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-28 12:17:12 +10:00
Andrew Bartlett
dc6b03ffa5 build: Remove unused credentials_samba3.c
This file was only used by the autoconf build system.

Andrew Bartlett

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-28 12:17:12 +10:00
Andrew Bartlett
26d36befa8 selftest: VFSLIBDIR is not needed, the waf build knows where to find modules automatically
This is why was relinks on install, because it is fixing these
internal variables up.

Andrew Bartlett

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-28 12:17:12 +10:00
Andrew Bartlett
cbddf9e2ef build: Remove autoconf build system from examples/VFS
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-28 12:17:12 +10:00