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

45978 Commits

Author SHA1 Message Date
Stefan Metzmacher
07d03e2777 s3:lib: fix const warnings in popt_common.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Nov 15 01:46:13 CET 2014 on sn-devel-104
2014-11-15 01:46:13 +01:00
Stefan Metzmacher
3dcc321daf s3:auth: add some const to user_in_list()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-14 23:27:05 +01:00
Stefan Metzmacher
c6d3571650 s3:auth: add missing auth_samba4_init() prototype
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-14 23:27:05 +01:00
David Disseldorp
8ed899783d fsrvp: define FSRVP_E_SHADOWCOPYSET_ID_MISMATCH
This was recently added to the [MS-FSRVP] specification with the errata
http://msdn.microsoft.com/en-us/library/dn785066.aspx#BKMK_FSRVP

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-14 23:27:04 +01:00
Volker Lendecke
04a9a1ac6d lib: Slightly simplify strupper_m
toupper_ascii_fast_table is only referenced here, make it static.

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): Fri Nov 14 00:31:16 CET 2014 on sn-devel-104
2014-11-14 00:31:16 +01:00
Volker Lendecke
2dab2f0f73 registry: Slightly simplify tdb_data_is_cstr
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-13 22:10:08 +01:00
Matt Rogers
0de6799996 s3-keytab: fix keytab array NULL termination.
Signed-off-by: Matt Rogers <mrogers@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-12 20:21:09 +01:00
Volker Lendecke
2d44498740 s3:smb2_break: First test for NT_STATUS_INVALID_OPLOCK_PROTOCOL, then for in_oplock_level being reasonable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 12 00:03:34 CET 2014 on sn-devel-104
2014-11-12 00:03:34 +01:00
Volker Lendecke
837e29035c s3:locking: convert brl_have_read field to brl_num_read.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-11-11 21:41:05 +01:00
Jeremy Allison
1020c5942a s3:smbd: Don't set fsp->oplock_type before we've granted any oplocks.
It's not needed, and may lead to unexpected side effects.

grant_fsp_oplock_type() is the only place to touch this.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-11-11 21:41:05 +01:00
Volker Lendecke
a08b0e7822 s3:smbd: move all oplock granting code to grant_fsp_oplock_type()
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Jeremy Allison <jra@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
2014-11-11 21:41:05 +01:00
Volker Lendecke
87a102189b s3:smbd: break oplocks to none with FILE_OVERWRITE
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-11-11 21:41:04 +01:00
Volker Lendecke
c2bda5bfae pdb_tdb: Avoid a nasty error message with ctdb
ctdb gives us 0-sized records for deleted passdb entries

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Nov 11 16:19:37 CET 2014 on sn-devel-104
2014-11-11 16:19:37 +01:00
Volker Lendecke
05f8e03713 pdb_tdb: Fix a TALLOC/SAFE_FREE mixup
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-11-11 13:59:05 +01:00
David Disseldorp
853b96f4db eventlog: Free tos talloced path.
Non-error code path was missed in the last talloc tos leak fix patch-set.

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 Nov 10 19:00:01 CET 2014 on sn-devel-104
2014-11-10 19:00:00 +01:00
David Disseldorp
6e86bd5dab mapping_tdb: add missing talloc_free in error path
Reported-by: Michael Croes <mycroes@gmail.com>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-11-10 16:36:03 +01:00
Volker Lendecke
6bc62af42e Use tevent_req_simple_recv_unix in a few places
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-10 06:09:04 +01:00
Ralph Boehme
5f68f7289c vfs_snapper: check for <linux/ioctl.h>
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Nov  9 16:02:24 CET 2014 on sn-devel-104
2014-11-09 16:02:24 +01:00
Ralph Boehme
d840f11386 s3:messaging: fix conversion specifier
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-11-09 13:40:07 +01:00
Stefan Metzmacher
5cb4a28569 s3:smbstatus: fix return value in print_share_mode()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-07 20:13:09 +01:00
Stefan Metzmacher
fbe40d21c8 s3:smbd: fix file corruption using "write cache size != 0"
A client can:
- open a handle (h1)
- write some data to h1.
- open a 2nd handle h2 (downgrades both handles to level II)
- try to read the data on h2 (this gets old data)

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

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

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Nov  6 13:09:38 CET 2014 on sn-devel-104
2014-11-06 13:09:38 +01:00
Volker Lendecke
10e888f6ce smbcontrol: Use server_id_str_buf
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Nov  5 13:03:39 CET 2014 on sn-devel-104
2014-11-05 13:03:39 +01:00
Noel Power
6faef4d213 btrfs: don't leak opened directory handle
Closing a directory handle file descriptor via close() is undefined,
according to:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/dirfd.html

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Nov  4 20:51:02 CET 2014 on sn-devel-104
2014-11-04 20:51:02 +01:00
Jeremy Allison
7467f6e72c s3: nmbd: Ensure NetBIOS names are only 15 characters stored.
This screws up if the name is greater than MAX_NETBIOSNAME_LEN-1 in the
unix charset, but less than or equal to MAX_NETBIOSNAME_LEN-1 in the DOS
charset, but this is so old we have to live with that.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Nov  4 18:23:11 CET 2014 on sn-devel-104
2014-11-04 18:23:11 +01:00
David Disseldorp
e07ecd4fe6 smbstatus: check for lock_path talloc failures
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov  4 02:07:35 CET 2014 on sn-devel-104
2014-11-04 02:07:35 +01:00
David Disseldorp
c5e241831c smbXsrv: don't leak lock_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
ca18783463 notify_internal: don't leak lock_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
d3cd60d660 printer_list: don't leak lock_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
49fe698fe9 nmbd_namelistdb: don't leak lock_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
8f9137cb52 share_mode_lock: don't leak lock_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
39f8ff2355 brlock: don't leak lock_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
d6792eca3c serverid: don't leak lock_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
76fe51cea2 server_mutex: don't leak lock_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
d9d16cb582 g_lock: don't leak lock_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
176259f2c4 dbwrap_watch: don't leak lock_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
760af79621 lang_tdb: don't leak lock_path or data_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
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