1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

96731 Commits

Author SHA1 Message Date
David Disseldorp
35539826d4 winbindd_cache: don't leak state_path onto talloc tos
Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:05 +01:00
David Disseldorp
d428aa65d3 winbindd: don't leak state_path onto talloc tos
Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:05 +01:00
David Disseldorp
364d55ccab idmap_autorid: don't leak state_path onto talloc tos
Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:05 +01:00
David Disseldorp
0210e3c9ce smbcontrol: don't leak state_path onto talloc tos
Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:04 +01:00
David Disseldorp
c3f3b13beb net_registry: don't leak state_path onto talloc tos
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:04 +01:00
David Disseldorp
70896833c9 net_idmap: don't leak state_path onto talloc tos
net_idmap currently uses a net_idmap_dbfile() helper to return the idmap
backed specific db path. Fix leaks in all callers.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:04 +01:00
David Disseldorp
587b21646c reg_perfcount: don't leak state_path onto talloc tos
reg_perfcount currently uses a counters_directory() helper to return the
counter specific tdb path. Fix leaks and error checking in the helper
function and all callers.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:04 +01:00
David Disseldorp
4b6af0dfa7 reg_backend_db: don't leak state_path onto talloc tos
Also check for allocation failures, and ensure that the regdb refcount
is not set by regdb_open() on failure.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:04 +01:00
David Disseldorp
2307c3700c nt_printing: don't leak state_path onto talloc tos
Also check for allocation failures, and close tdbs in
nt_printing_tdb_upgrade error paths.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:04 +01:00
David Disseldorp
6d5b8dd70e pdb_tdb: don't leak state_path onto talloc tos
Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:04 +01:00
David Disseldorp
f88535e56e account_pol: don't leak state_path onto talloc tos
Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:04 +01:00
David Disseldorp
30ab958f50 nmbd_winsserver: don't leak state_path onto talloc tos
Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:04 +01:00
David Disseldorp
f62d9080ad sharesec: don't leak state_path onto talloc tos
Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:04 +01:00
David Disseldorp
a852116ab3 eventlog: don't leak state_path onto talloc tos
Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:04 +01:00
David Disseldorp
b75d7ac9cb groupdb: don't leak state_path onto talloc tos
Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-03 23:46:04 +01:00
Gabriel Buades
745a1c54b6 Change expired password flag indicator
Signed-off-by: Gabriel Buades <gbuades@soffid.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
2014-11-03 23:46:04 +01:00
Stefan Metzmacher
a3b333a1a2 s3:locking: remove dead code from brl_get_locks_readonly()
struct byte_range_lock *rw = NULL; will never change...

commit 1057240733 removed the
possible assigment of 'rw'.

So we can remove all code under if (rw != NULL) { ...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct 31 06:07:43 CET 2014 on sn-devel-104
2014-10-31 06:07:43 +01:00
Volker Lendecke
151b9caeef s3:locking: Change from ndr_pull_struct_blob() to ndr_pull_struct_blob_all() so we fail if not all bytes are consumed.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-31 03:47:40 +01:00
Volker Lendecke
8334428666 s4:torture/smb2: test rename dir deny with open files
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-31 03:47:40 +01:00
Volker Lendecke
035fd7200d s3:smbd: Don't rename a dir with files open underneath
This is an EXPENSIVE check. We'll have to guard this with an option

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-31 03:47:40 +01:00
Jeremy Allison
5f60dcc38c selftest:Samba3: use "strict rename = yes"
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-31 03:47:40 +01:00
Jeremy Allison
b0a434386d s3:param: Add new option "strict rename".
Control whether smbd can rename directories containing
open files. Defaults to "no" (meaning we *can* do
such renames).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-31 03:47:40 +01:00
Volker Lendecke
9010bbeb00 s3:locking: allow early return for share_entry_forall()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-31 03:47:40 +01:00
Volker Lendecke
48926b7619 s3:locking: Introduce share_mode_forall
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-31 03:47:40 +01:00
Volker Lendecke
0d4f7bfdb9 s3:locking: Rename share_mode_forall->share_entry_forall
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-31 03:47:40 +01:00
Andreas Schneider
c3b00b9944 libcli: Make sure status is initialized.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-31 03:47:40 +01:00
Andreas Schneider
c98f8ce074 torture: Make sure server_type isn't used uninitialized.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-31 03:47:40 +01:00
Andreas Schneider
56ee6a2074 s3-libsmb: Make sure the stat structure is initialized.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-31 03:47:40 +01:00
Andreas Schneider
69d6d62a4c s3-rpcclient: Make sure current_nt_hash is initialized.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-31 03:47:40 +01:00
Martin Schwenke
d558281205 ctdb-includes: Reorder includes.h more logically
For now replace.h needs to be before tdb.h, since tdb.h needs
stdbool.h.  This is fixed upstream but not yet in various packaged
versions.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Oct 31 03:46:40 CET 2014 on sn-devel-104
2014-10-31 03:46:40 +01:00
Martin Schwenke
94f248d1cc ctdb-includes: Remove unused idtree.h
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-10-31 01:26:04 +01:00
Martin Schwenke
7fce187a0d ctdb-includes: Clean up includes.h
Remove unused #defines.  CTDB doesn't use these.  _PUBLIC_ is defined
in replace.h anyway.

Remove unnecessary #includes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-10-31 01:26:03 +01:00
Michael Adam
f184d12e5e build: fix check for subunit file when selftest prefix is given
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Oct 30 22:45:45 CET 2014 on sn-devel-104
2014-10-30 22:45:44 +01:00
Michael Adam
062289f0f8 script: fix display of ten slowest tests if < 10 tests are run.
Note: $#array is the biggest index in an array in perl.
@array evaluated in scalar context is the number of elements.
Hence scalar(@array) = 1 + $#array

Or equivalently: 0 + @array = 1 + $#array

... :-)

Apart from this off-by-one error, the "unless" clause to trigger
the capping of the number of tests listed was wrong. Hence if
less then 10 tests were run, a number of blank lines were appended.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-30 20:25:04 +01:00
Michael Adam
6168ae0b87 script/show_testsuite_time: error out if number argument is not a decimal number
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-30 20:25:04 +01:00
Michael Adam
594ffeedfc s3:loadparm: fix a comment typo
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
2014-10-30 20:25:04 +01:00
Stefan Metzmacher
331f9805ea selftest: only use Options.options.SELFTEST_PREFIX if it's not the default
The --with-selftest-prefix option is typically specified as argument
to './configure' ! Overwriting it for 'waf testonly' should only
happen with an explicit 'waf testonly --with-selftest-prefix=/some/path'.

This fixes a regression introduced by
commit edc1cedf93
(selftest: Actually honor --with-selftest-prefix).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-10-30 20:25:03 +01:00
Andreas Schneider
3535649976 selftest: Fake the hostname.
This fixes the GetPrinterDataEx(DNSMachineName) test on some machines.

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

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Oct 30 11:35:15 CET 2014 on sn-devel-104
2014-10-30 11:35:15 +01:00
root
e8bd0c0e93 Don't drop any error codes just because we think there cannot be any errors we didn't think of if the user asked for a level 10 log.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct 30 09:14:51 CET 2014 on sn-devel-104
2014-10-30 09:14:50 +01:00
David Disseldorp
d772b98283 spoolss: remove unused fill_job_info3()
This logic has been moved into the previous EnumJobs(level=3) caller.
The info3 structure only contains two fields that are used, so it
doesn't make sense to have a separate helper for it.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-30 06:52:04 +01:00
David Disseldorp
5e7ab3d2f4 spoolss: fix jobid in level 3 EnumJobs response
Until now, these responses have incorrectly carried the printing backend
job identifier (sysjob), rather than the one allocated and returned by
Samba on job submission.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10905

Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-30 06:52:04 +01:00
David Disseldorp
45abaf81c6 spoolss: fix jobid in level 2 GetJob and EnumJobs responses
Until now, these responses have incorrectly carried the printing backend
job identifier (sysjob), rather than the one allocated and returned by
Samba on job submission.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10905

Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-30 06:52:04 +01:00
David Disseldorp
4d7f5d2af6 spoolss: fix jobid in level 1 GetJob and EnumJobs responses
Until now, these responses have incorrectly carried the printing backend
job identifier (sysjob), rather than the one allocated and returned by
Samba on job submission.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10905

Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-30 06:52:04 +01:00
David Disseldorp
3a28ae5697 spoolss: fix GetJob jobid lookups
Clients issue GetJob requests using the jobid assigned by the spoolss
server. The corresponding printing backend (sysjob) identifier needs to
be resolved to locate the correct print queue entry.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10905

Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-30 06:52:04 +01:00
David Disseldorp
77b5be1742 printing: add jobid_to_sysjob helper function
Samba needs to deal with two types of print job identifiers, those
allocated by the printing backend (sysjob ids), and those allocated
by Samba's spoolss server (jobids).

This change adds a helper function to map spoolss jobids to sysjob ids,
to go alongside the corresponding sysjob to jobid mapping function.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-30 06:52:04 +01:00
Kai Blin
229f8b324a dns: Fix a compile warning by casting explicitly
Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-30 06:52:04 +01:00
Volker Lendecke
3c1214ddac dbwrap: Avoid "includes.h" in dbwrap_cache.c
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-30 06:52:04 +01:00
Volker Lendecke
e6a7f4cfaa dbwrap: Add some required #includes to dbwrap.h
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-30 06:52:04 +01:00
Volker Lendecke
d6a79d2d02 lib: loadparm.h uses TALLOC_CTX
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-30 06:52:04 +01:00
Volker Lendecke
ab64c4644c dbwrap: Avoid an unnecessary #include
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-30 06:52:04 +01:00