[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 14f29c4 buildscripts: Fix the regression with --without-acl-support. via 38bb993 source3/wscript: Add support for disabling vfs_cephfs from a0e60e9 samba-tool/ldapcmp: ignore differences of whenChanged https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 14f29c4f560f1b3942245a6fa43924a8ce45d99d Author: Ira Cooper Date: Tue Jul 26 11:44:47 2016 -0400 buildscripts: Fix the regression with --without-acl-support. This will disable the vfs_glusterfs and vfs_cephfs modules if you provide --without-acl-support. In addition it makes compiling in POSIXACL_XATTR conditional on vfs_glusterfs or vfs_cephfs being built in. Signed-off-by: Ira Cooper Reviewed-by: Steve French Tested-by: Steve French Autobuild-User(master): Ira Cooper Autobuild-Date(master): Mon Aug 8 21:27:46 CEST 2016 on sn-devel-144 commit 38bb993657f8eb6c49899de0d741ed5186ca5022 Author: Ira Cooper Date: Tue Jul 26 11:22:43 2016 -0400 source3/wscript: Add support for disabling vfs_cephfs --enable-cephfs and --disable-cephfs both work now. --enable-cephfs is the default to match previous versions of Samba. Signed-off-by: Ira Cooper Reviewed-by: Steve French Tested-by: Steve French --- Summary of changes: source3/modules/wscript_build | 1 + source3/wscript | 16 2 files changed, 13 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/wscript_build b/source3/modules/wscript_build index 2d42a82..a5d8407 100644 --- a/source3/modules/wscript_build +++ b/source3/modules/wscript_build @@ -6,6 +6,7 @@ bld.SAMBA3_SUBSYSTEM('NFS4_ACLS', bld.SAMBA3_SUBSYSTEM('POSIXACL_XATTR', source='posixacl_xattr.c', + enabled=(bld.SAMBA3_IS_ENABLED_MODULE('vfs_ceph') or bld.SAMBA3_IS_ENABLED_MODULE('vfs_glusterfs')), deps='acl attr') bld.SAMBA3_LIBRARY('non_posix_acls', diff --git a/source3/wscript b/source3/wscript index 497b673..5ce1b77 100644 --- a/source3/wscript +++ b/source3/wscript @@ -69,6 +69,7 @@ def set_options(opt): action="store", dest='libcephfs_dir', default=None) opt.SAMBA3_ADD_OPTION('glusterfs', with_name="enable", without_name="disable", default=True) +opt.SAMBA3_ADD_OPTION('cephfs', with_name="enable", without_name="disable", default=True) opt.add_option('--enable-vxfs', help=("enable support for VxFS (default=no)"), @@ -1578,8 +1579,12 @@ main() { conf.env['CPPPATH_CEPHFS'] = Options.options.libcephfs_dir + '/include' conf.env['LIBPATH_CEPHFS'] = Options.options.libcephfs_dir + '/lib' -if conf.CHECK_HEADERS('cephfs/libcephfs.h', False, False, 'cephfs') and conf.CHECK_LIB('cephfs'): -conf.DEFINE('HAVE_CEPH', '1') +if conf.CHECK_HEADERS('cephfs/libcephfs.h', False, False, 'cephfs') and conf.CHECK_LIB('cephfs', shlib=True) and Options.options.with_cephfs: +if Options.options.with_acl_support: +conf.DEFINE('HAVE_CEPH', '1') +else: +Logs.warn("ceph support disabled due to --without-acl-support") +conf.undefine('HAVE_CEPH') if Options.options.with_glusterfs: conf.CHECK_CFG(package='glusterfs-api', args='"glusterfs-api >= 4" --cflags --libs', @@ -1588,9 +1593,12 @@ main() { conf.CHECK_LIB('gfapi', shlib=True) if conf.CONFIG_SET('HAVE_API_GLFS_H'): -conf.DEFINE('HAVE_GLUSTERFS', '1') +if Options.options.with_acl_support: + conf.DEFINE('HAVE_GLUSTERFS', '1') +else: +Logs.warn("GlusterFS support disabled due to --without-acl-support") +conf.undefine('HAVE_GLUSTERFS') else: -conf.SET_TARGET_TYPE('gfapi', 'EMPTY') conf.undefine('HAVE_GLUSTERFS') else: conf.SET_TARGET_TYPE('gfapi', 'EMPTY') -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4c5367d s3: vfs: ceph: Add posix acl support via fcc5883 s3: vfs: generalize functions that set/get posix acl through xattr from 497658f s4-torture: fix compile of new NDR PAC tests with MIT Kerberos. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4c5367d84b0b51d5597b652a59ba43688731572c Author: Yan, Zheng Date: Mon Mar 21 10:42:21 2016 +0800 s3: vfs: ceph: Add posix acl support Signed-off-by: Yan, Zheng Signed-off-by: Ira Cooper Reviewed-by: Jeremy Allison Autobuild-User(master): Ira Cooper Autobuild-Date(master): Sun Jul 24 04:08:23 CEST 2016 on sn-devel-144 commit fcc58834cfa106b9dd92960b1fc3557b9e6020b2 Author: Yan, Zheng Date: Mon Mar 21 10:42:20 2016 +0800 s3: vfs: generalize functions that set/get posix acl through xattr Move posix acl related code in vfs_glusterfs.c to a seperate module. Signed-off-by: Yan, Zheng Signed-off-by: Ira Cooper Reviewed-by: Jeremy Allison --- Summary of changes: source3/modules/posixacl_xattr.c | 504 .../modules/{vfs_solarisacl.h => posixacl_xattr.h} | 27 +- source3/modules/vfs_ceph.c | 54 +-- source3/modules/vfs_glusterfs.c| 522 + source3/modules/wscript_build | 8 +- 5 files changed, 536 insertions(+), 579 deletions(-) create mode 100644 source3/modules/posixacl_xattr.c copy source3/modules/{vfs_solarisacl.h => posixacl_xattr.h} (62%) Changeset truncated at 500 lines: diff --git a/source3/modules/posixacl_xattr.c b/source3/modules/posixacl_xattr.c new file mode 100644 index 000..652a2ee --- /dev/null +++ b/source3/modules/posixacl_xattr.c @@ -0,0 +1,504 @@ +/* + Unix SMB/Netbios implementation. + VFS module to get and set posix acls through xattr + Copyright (c) 2013 Anand Avati + Copyright (c) 2016 Yan, Zheng + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "includes.h" +#include "system/filesys.h" +#include "smbd/smbd.h" +#include "modules/posixacl_xattr.h" + +/* + POSIX ACL Format: + + Size = 4 (header) + N * 8 (entry) + + Offset SizeField (Little Endian) + - + 0-3 4-byte Version + + 4-5 2-byte Entry-1 tag + 6-7 2-byte Entry-1 perm + 8-114-byte Entry-1 id + + 12-13 2-byte Entry-2 tag + 14-15 2-byte Entry-2 perm + 16-19 4-byte Entry-2 id + + ... + + */ + + + +/* private functions */ + +#define ACL_EA_ACCESS "system.posix_acl_access" +#define ACL_EA_DEFAULT "system.posix_acl_default" +#define ACL_EA_VERSION 0x0002 +#define ACL_EA_HEADER_SIZE 4 +#define ACL_EA_ENTRY_SIZE 8 + +#define ACL_EA_SIZE(n) (ACL_EA_HEADER_SIZE + ((n) * ACL_EA_ENTRY_SIZE)) + +static SMB_ACL_T mode_to_smb_acl(mode_t mode, TALLOC_CTX *mem_ctx) +{ + struct smb_acl_t *result; + int count; + + count = 3; + result = sys_acl_init(mem_ctx); + if (!result) { + return NULL; + } + + result->acl = talloc_array(result, struct smb_acl_entry, count); + if (!result->acl) { + errno = ENOMEM; + talloc_free(result); + return NULL; + } + + result->count = count; + + result->acl[0].a_type = SMB_ACL_USER_OBJ; + result->acl[0].a_perm = (mode & S_IRWXU) >> 6; + + result->acl[1].a_type = SMB_ACL_GROUP_OBJ; + result->acl[1].a_perm = (mode & S_IRWXG) >> 3; + + result->acl[2].a_type = SMB_ACL_OTHER; + result->acl[2].a_perm = mode & S_IRWXO; + + return result; +} + +static SMB_ACL_T posixacl_xattr_to_smb_acl(const char *buf, size_t xattr_size, + TALLOC_CTX *mem_ctx) +{ + int count; + int size; + struct smb_acl_entry *smb_ace; + struct smb_acl_t *result; + int i; + int offset; + uint16_t tag; + uint16_t perm; + uint32_t id; + + size = xattr_size; + + if (siz
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f27ba17 vfs_glusterfs: Fix a memory leak in AIO from 55d8bfc s3:libsmb: remove unused spnego related includes https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f27ba17fcf1cf6a8559ef7d77c08efe648fd49e5 Author: Jose A. Rivera Date: Thu Dec 17 08:19:22 2015 -0600 vfs_glusterfs: Fix a memory leak in AIO Signed-off-by: Jose A. Rivera Reviewed-by: Ira Cooper Autobuild-User(master): Ira Cooper Autobuild-Date(master): Thu Dec 17 20:55:22 CET 2015 on sn-devel-144 --- Summary of changes: source3/modules/vfs_glusterfs.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index e0cf719..f32f598 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -577,18 +577,14 @@ static void aio_tevent_fd_done(struct tevent_context *event_ctx, DEBUG(0,("\nRead from pipe failed (%s)", strerror(errno))); } - if (state->cancelled) { - return; - } - - req = state->req; - /* if we've cancelled the op, there is no req, so just clean up. */ if (state->cancelled == true) { TALLOC_FREE(state); return; } + req = state->req; + if (req) { tevent_req_done(req); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 464f4b9 param: remove two unused #defines via 40c9cc1 s3:param: remove arg save_defaults from lp_load_with_registry_shares() via 0e0d775 s3:param: remove arg initialize_globals from lp_load_with_registry_shares() via 55bf0d0 s3:param: rename arg initialize_globals->reinit_globals in lp_load() via 3a8952e s3:param: rename arg initialize_globals->reinit_globals in lp_load_ex() via 8b7acbb s3:param: fix a comment via af539f4 s3:param: use GLOBAL_SECTION_SNUM in lp_enforce_ad_dc_settings() via 3dbff67 s3:param: factor lp_enforce_ad_dc_settings() out of lp_load_ex() via db60f1d s3:param: in lp_load_initial_only(), make sure to save defaults. via 5a7147a s3:param: make lp_load() static via 31392f6 vfstest: use lp_load_with_shares() in cmd_conf via 7af9d23 s3:param: use lp_load_no_reinit() in lp_load_for_s4_ctx() via 14c1e05 s3:param: add lp_load_no_reinit() via 526e376 s3:torture:msg: use lp_load()-wrapper lp_load_global() via 677fbce s4:torture:libnetapi: use lp_load_global() instead of lp_load() via 1f60ceed s3:param: remove "add_ipc" parameter from lp_load_with_registry_shares(). via 97e8768 s3:param: remove "global_only" parameter from lp_load_with_registry_shares(). via 696ce36 s3:auth: use lp_load_with_shares() in auth3_check_password() via f1cdba2 s3:auth: use lp_load_with_shares() in auth3_generate_session_info_pac() via d892ce2 nsswitch/wins: use lp_load_global() wrapper of lp_load(). via 214ef25 s3:smbd: use lp_load_with_shares() in reload_services(). via df7677c s3:param: let lp_load_global_no_reinit() call lp_load() instead of lp_load_ex() via 79f8fd9 s3:param: add wrapper lp_load_with_shares(). via 8f2c5fd s3:param: let lp_load_global() call lp_load(), not lp_load_ex(). via e197ddc s3:lsasd: use lp_load() wrapper lp_load_global() via 2f889f7 s3:spoolss: use lp_load() wrapper lp_load_global(). from 5074cf8 Convert all uses of uint8/16/32 to uint8/16/32_t in the libads code. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 464f4b95c6c731cafa2cfab07912a20cfe6e928e Author: Michael Adam Date: Wed Sep 24 10:30:17 2014 +0200 param: remove two unused #defines Signed-off-by: Michael Adam Reviewed-by: Ira Cooper Autobuild-User(master): Ira Cooper Autobuild-Date(master): Wed Apr 22 16:37:12 CEST 2015 on sn-devel-104 commit 40c9cc150ad99c468207f1762b0a2eaba9f03925 Author: Michael Adam Date: Tue Apr 21 15:24:42 2015 +0200 s3:param: remove arg save_defaults from lp_load_with_registry_shares() This is only used in command line contexts, especially for testparm which relies on safe defaults. The only changed use is in sharesec, but it does not harm to also safe the defaults there. Signed-off-by: Michael Adam Reviewed-by: Ira Cooper commit 0e0d77519c27038b30fec92d542198e97be767d9 Author: Michael Adam Date: Tue Apr 21 14:48:42 2015 +0200 s3:param: remove arg initialize_globals from lp_load_with_registry_shares() This is only ever called in client context, and only called once. So there is no point at all in requesting reinit_globals. Set it to false. Signed-off-by: Michael Adam Reviewed-by: Ira Cooper commit 55bf0d0a2b1f3c9bc43dcf7ab19380501b251f0a Author: Michael Adam Date: Sat Sep 20 04:49:10 2014 +0200 s3:param: rename arg initialize_globals->reinit_globals in lp_load() Signed-off-by: Michael Adam Reviewed-by: Ira Cooper commit 3a8952e3e7e69ae5d8616da333b1977ee559f4b1 Author: Michael Adam Date: Sat Sep 20 04:48:11 2014 +0200 s3:param: rename arg initialize_globals->reinit_globals in lp_load_ex() Signed-off-by: Michael Adam Reviewed-by: Ira Cooper commit 8b7acbbc8087fce37449ed9c0b7c46bc22cc3542 Author: Michael Adam Date: Sat Sep 20 04:46:41 2014 +0200 s3:param: fix a comment Signed-off-by: Michael Adam Reviewed-by: Ira Cooper commit af539f44a98ca16a24f7014f27cde742725b18c7 Author: Michael Adam Date: Sat Sep 20 04:45:45 2014 +0200 s3:param: use GLOBAL_SECTION_SNUM in lp_enforce_ad_dc_settings() Signed-off-by: Michael Adam Reviewed-by: Ira Cooper commit 3dbff676eaadb5140296b5ede7aba93a6d0311b7 Author: Michael Adam Date: Sat Sep 20 04:42:40 2014 +0200 s3:param: factor lp_enforce_ad_dc_settings() out of lp_load_ex() Signed-off-by: Michael Adam Reviewed-by: Ira Cooper commit db60f1d9562f91fcb83c7e9f42915ec9b426abca Author: Michael Adam Date: Wed Aug 6 16:20:42 2014 +0200 s3:param: in lp_load_initial_only(), make sure to save defaults. This is the initial loading of the config in the
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e53f6e9 Add the definition of FSCTL_SET_INTEGRITY_INFORMATION found from a capture and the Web. from eca0553 torture/fsrvp: remove verification trailer magic field https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e53f6e9ec2eb05ded39a0caec407bb3bb23039cf Author: Richard Sharpe Date: Sat Mar 7 07:46:31 2015 -0800 Add the definition of FSCTL_SET_INTEGRITY_INFORMATION found from a capture and the Web. Signed-off-by: Richard Sharpe Reviewed-by: Ira Cooper Autobuild-User(master): Ira Cooper Autobuild-Date(master): Sun Mar 8 00:43:08 CET 2015 on sn-devel-104 --- Summary of changes: libcli/smb/smb_constants.h | 2 ++ 1 file changed, 2 insertions(+) Changeset truncated at 500 lines: diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h index f2c880c..6da769a 100644 --- a/libcli/smb/smb_constants.h +++ b/libcli/smb/smb_constants.h @@ -525,6 +525,8 @@ enum csc_policy { #define FSCTL_FILE_LEVEL_TRIM (FSCTL_FILESYSTEM | FSCTL_ACCESS_WRITE | 0x0208 | FSCTL_METHOD_BUFFERED) #define FSCTL_OFFLOAD_READ (FSCTL_FILESYSTEM | FSCTL_ACCESS_READ | 0x0264 | FSCTL_METHOD_BUFFERED) #define FSCTL_OFFLOAD_WRITE(FSCTL_FILESYSTEM | FSCTL_ACCESS_WRITE | 0x0268 | FSCTL_METHOD_BUFFERED) +#define FSCTL_SET_INTEGRITY_INFORMATION (FSCTL_FILESYSTEM | FSCTL_ACCESS_READ \ + | FSCTL_ACCESS_WRITE | 0x0280 | FSCTL_METHOD_BUFFERED) #define FSCTL_NAMED_PIPE 0x0011 #define FSCTL_PIPE_PEEK(FSCTL_NAMED_PIPE | FSCTL_ACCESS_READ | 0x000C | FSCTL_METHOD_BUFFERED) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via bccf5c9 perfcount: Fix CID 1035494 Out-of-bounds read via 819d4b4 perfcount: Fix CID 1035493 Out-of-bounds read via bd3b2c3 perfcount: Fix CID 1035492 Out-of-bounds read via 5968310 perfcount: Fix CID 1274043 Division or modulo by zero from fb86aa8 printing: increse log level for unreachable cups servers https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit bccf5c9a7bc18b859f262307ab6a2b6edaca0588 Author: Volker Lendecke Date: Thu Mar 5 11:12:38 2015 +0100 perfcount: Fix CID 1035494 Out-of-bounds read Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper Autobuild-User(master): Ira Cooper Autobuild-Date(master): Thu Mar 5 18:28:44 CET 2015 on sn-devel-104 commit 819d4b4bcd71ea82930365df33cc4b76a4835130 Author: Volker Lendecke Date: Thu Mar 5 11:11:59 2015 +0100 perfcount: Fix CID 1035493 Out-of-bounds read Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper commit bd3b2c3d9b09f385a74ee80b1d87b1a71428c162 Author: Volker Lendecke Date: Thu Mar 5 11:10:35 2015 +0100 perfcount: Fix CID 1035492 Out-of-bounds read Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper commit 5968310060ddc298835a8ee720ae7fe68aece1b9 Author: Volker Lendecke Date: Thu Mar 5 11:07:56 2015 +0100 perfcount: Fix CID 1274043 Division or modulo by zero Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper --- Summary of changes: source3/modules/perfcount_test.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/perfcount_test.c b/source3/modules/perfcount_test.c index c0b5336..0dc073c 100644 --- a/source3/modules/perfcount_test.c +++ b/source3/modules/perfcount_test.c @@ -69,7 +69,7 @@ static void perfcount_test_add_counters(struct perfcount_test_context *ctxt) found = false; - if (ptc->op > MAX_OP) + if (ptc->op >= MAX_OP) continue; for (head = g_list[ptc->op]; head != NULL; head = head->next) { @@ -132,13 +132,13 @@ static const char *smb_subop_name(int op, int subop) { /* trans */ if (op == 0x25) { - if (subop > sizeof(trans_subop_table) / + if (subop >= sizeof(trans_subop_table) / sizeof(trans_subop_table[0])) { return "unknown"; } return trans_subop_table[subop]; } else if (op == 0x32) { - if (subop > sizeof(trans2_subop_table) / + if (subop >= sizeof(trans2_subop_table) / sizeof(trans2_subop_table[0])) { return "unknown"; } @@ -172,6 +172,10 @@ static void perfcount_test_dump_counters(void) count_mod = lp_parm_int(0, PARM_PC_TEST_TYPE, PARM_DUMPON_COUNT, PARM_DUMPON_COUNT_DEFAULT); + if (count_mod == 0) { + return; + } + if ((count++ % count_mod) != 0) return; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2501afe vfs_ceph: fix disk_free_fn callback from d1da1f7 s4-messaging: Unify list of possible messages into messaging.idl https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2501afe08b94a514d8e2f3eeb4a2c4edc9764979 Author: Yan, Zheng Date: Fri Feb 13 18:25:57 2015 +0800 vfs_ceph: fix disk_free_fn callback Free space and available space should be in unit of block size. Besides, we should call disk_norm() to adjust the returned values. Signed-off-by: Yan, Zheng Reviewed-by: Ira Cooper Reviewed-by: David Disseldorp Autobuild-User(master): Ira Cooper Autobuild-Date(master): Mon Feb 16 18:14:02 CET 2015 on sn-devel-104 --- Summary of changes: source3/modules/vfs_ceph.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index ec72312..b074e2d 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -167,8 +167,9 @@ static uint64_t cephwrap_disk_free(struct vfs_handle_struct *handle, const char * Provide all the correct values. */ *bsize = statvfs_buf.f_bsize; - *dfree = statvfs_buf.f_bsize * statvfs_buf.f_bavail; - *dsize = statvfs_buf.f_bsize * statvfs_buf.f_blocks; + *dfree = statvfs_buf.f_bavail; + *dsize = statvfs_buf.f_blocks; + disk_norm(small_query, bsize, dfree, dsize); DEBUG(10, ("[CEPH] bsize: %llu, dfree: %llu, dsize: %llu\n", llu(*bsize), llu(*dfree), llu(*dsize))); return *dfree; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4c3a3d9 vfs_glusterfs: Replace eventfd with pipes, for AIO use from 87c5795 libcli/auth: add netlogon_creds_cli_GetForestTrustInformation*() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4c3a3d9e6adc95d0f0e1f6030b2406613d9f9f53 Author: Ira Cooper Date: Mon Jan 19 23:08:17 2015 -0500 vfs_glusterfs: Replace eventfd with pipes, for AIO use Pipes clean up the AIO implementation substantially, due to the fact that they implement a natural ithread safe queue instead of us creating our own queue. Signed-off-by: Ira Cooper Signed-off-by: Poornima G Reviewed-by: Günther Deschner Reviewed-by: Michael Adam Autobuild-User(master): Ira Cooper Autobuild-Date(master): Wed Jan 21 20:40:11 CET 2015 on sn-devel-104 --- Summary of changes: source3/modules/vfs_glusterfs.c | 137 source3/wscript | 1 - 2 files changed, 41 insertions(+), 97 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index 10c3a22..12ec0b7 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -41,22 +41,15 @@ #include "api/glfs.h" #include "lib/util/dlinklist.h" #include "lib/util/tevent_unix.h" -#ifdef HAVE_SYS_EVENTFD_H -#include -#endif -#include +#include "lib/tevent/tevent_internal.h" #include "smbd/globals.h" +#include "lib/sys_rw.h" #define DEFAULT_VOLFILE_SERVER "localhost" -#ifdef HAVE_EVENTFD -static pthread_mutex_t lock_req_list = PTHREAD_MUTEX_INITIALIZER; -static int event_fd = -1; +static int read_fd = -1; +static int write_fd = -1; static struct tevent_fd *aio_read_event = NULL; -static struct tevent_req **req_producer_list = NULL; -static struct tevent_req **req_consumer_list = NULL; -static uint64_t req_counter = 0; -#endif /** * Helper to convert struct stat to struct stat_ex. @@ -503,15 +496,13 @@ struct glusterfs_aio_state { /* * This function is the callback that will be called on glusterfs * threads once the async IO submitted is complete. To notify - * Samba of the completion we use eventfd mechanism. + * Samba of the completion we use a pipe pased queue. */ static void aio_glusterfs_done(glfs_fd_t *fd, ssize_t ret, void *data) { -#if HAVE_EVENTFD struct tevent_req *req = NULL; struct glusterfs_aio_state *state = NULL; - int i, sts = 0; - uint64_t u = 1; + int sts = 0; req = talloc_get_type_abort(data, struct tevent_req); state = tevent_req_data(req, struct glusterfs_aio_state); @@ -525,88 +516,65 @@ static void aio_glusterfs_done(glfs_fd_t *fd, ssize_t ret, void *data) } /* -* Store the reqs that needs to be completed by calling -* tevent_req_done(). tevent_req_done() cannot be called -* here, as it is not designed to be executed in the -* multithread environment, tevent_req_done() should be +* Write the pointer to each req that needs to be completed +* by calling tevent_req_done(). tevent_req_done() cannot +* be called here, as it is not designed to be executed +* in the multithread environment, tevent_req_done() must be * executed from the smbd main thread. */ - pthread_mutex_lock (&lock_req_list); - { - for (i = 0 ; i < aio_pending_size ; i++) { - if(!req_producer_list[i]) { - req_producer_list[i] = req; - req_counter = req_counter + 1; - break; - } - } - } - pthread_mutex_unlock (&lock_req_list); - /* -* For a bunch of fops notify only once -*/ - if (req_counter == 1) { - sts = write (event_fd, &u, sizeof(uint64_t)); - if (sts < 0 && errno == EAGAIN) - DEBUG(0,("\nWRITE: reached max value")); +sts = sys_write (write_fd, &req, sizeof(struct tevent_req *)); +if (sts < 0) { +DEBUG(0,("\nWrite to pipe failed (%s)", strerror(errno))); } + return; -#endif } -#ifdef HAVE_EVENTFD +/* + * Read each req off the pipe and process it. + */ static void aio_tevent_fd_done(struct tevent_context *event_ctx, struct tevent_fd *fde, uint16 flags, void *data) { struct tevent_req *req = NULL; - struct tevent_req **temp = NULL; - int i = 0, sts = 0; - uint64_t u = 0; - - sts = read (event_fd, &u,
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 587befb lib/popt: Remove non third_party popt. via 38de110 third_party/popt: Initial support for popt. via 8cc9667 third_party/popt: Initial copy of popt. via b08cbc6 lib/zlib: Remove non third_party zlib. via ba8ee8c third_party/zlib: Initial support for zlib via e8e8568 third_party/zlib: Initial copy of zlib. via ea3d62e lib/iniparser: Remove non third_party iniparser. via f46b79b third_party/iniparser: Initial support for iniparser. via cdbcb7b third_party/iniparser: Initial copy of iniparser. via 61dd665 nsswitch: Fix bogus #include line. from f215cf1 passdb: add missing newline to debug message in get_primary_group_sid() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 587befbbb2f624031aeaf5ba734619f7996ba23f Author: Ira Cooper Date: Tue Jul 22 21:11:01 2014 -0700 lib/popt: Remove non third_party popt. Signed-off-by: Ira Cooper Reviewed-by: Jeremy Allison Autobuild-User(master): Ira Cooper Autobuild-Date(master): Sat Aug 9 20:47:05 CEST 2014 on sn-devel-104 commit 38de110b02ff7e622d6394e12d99c3e01568db3e Author: Ira Cooper Date: Tue Jul 22 21:34:17 2014 -0700 third_party/popt: Initial support for popt. ctdb, ldb, and samba are supported builds for third_party popt. Signed-off-by: Ira Cooper Reviewed-by: Jeremy Allison commit 8cc966747df8531eb0afc8870dac29a306fb4352 Author: Ira Cooper Date: Wed Jul 23 00:17:30 2014 -0700 third_party/popt: Initial copy of popt. Signed-off-by: Ira Cooper Reviewed-by: Jeremy Allison commit b08cbc64c00d563738c45a701d4a7a7fd371e63f Author: Ira Cooper Date: Wed Jul 23 00:16:24 2014 -0700 lib/zlib: Remove non third_party zlib. Signed-off-by: Ira Cooper Reviewed-by: Jeremy Allison commit ba8ee8c9e011361cfc405b1355172d38718ba0cc Author: Ira Cooper Date: Tue Jul 22 21:27:13 2014 -0700 third_party/zlib: Initial support for zlib Signed-off-by: Ira Cooper Reviewed-by: Jeremy Allison commit e8e85689756eaf74e82f55b8ae6f706b430b01cd Author: Ira Cooper Date: Tue Jul 22 21:26:40 2014 -0700 third_party/zlib: Initial copy of zlib. Signed-off-by: Ira Cooper Reviewed-by: Jeremy Allison commit ea3d62eea980348e73d6eeb870f36d0908ab42c3 Author: Ira Cooper Date: Thu Jul 17 18:07:31 2014 -0400 lib/iniparser: Remove non third_party iniparser. Signed-off-by: Ira Cooper Reviewed-by: Jeremy Allison commit f46b79bdb8824c7c95dee0a282b2c852091bcfce Author: Ira Cooper Date: Thu Jul 17 18:04:35 2014 -0400 third_party/iniparser: Initial support for iniparser. This is the initial support for iniparser, as well the basic third_party framework. Signed-off-by: Ira Cooper Reviewed-by: Jeremy Allison commit cdbcb7bb4b2363d459e0228f8a7a5457a736b007 Author: Ira Cooper Date: Thu Jul 17 17:31:05 2014 -0400 third_party/iniparser: Initial copy of iniparser. Signed-off-by: Ira Cooper Reviewed-by: Jeremy Allison commit 61dd66575dd1917ceaca4dbae271e0a6a264271d Author: Ira Cooper Date: Wed Jul 16 17:40:57 2014 -0400 nsswitch: Fix bogus #include line. We are not allowed to reach around behind the system's back and include the wrong headerfiles. Signed-off-by: Ira Cooper Reviewed-by: Jeremy Allison --- Summary of changes: buildtools/wafsamba/samba_third_party.py | 41 buildtools/wafsamba/wafsamba.py|1 + ctdb/third_party |1 + ctdb/wscript | 15 ++- lib/ldb/wscript| 18 +++- lib/zlib/wscript | 30 -- nsswitch/wbinfo.c |1 - source4/torture/winbind/wscript_build |2 +- source4/torture/wscript_build | 16 testsuite/headers/wscript_build|2 +- {lib => third_party}/iniparser/AUTHORS |0 {lib => third_party}/iniparser/INSTALL |0 {lib => third_party}/iniparser/LICENSE |0 {lib => third_party}/iniparser/Makefile|0 {lib => third_party}/iniparser/README |0 {lib => third_party}/iniparser/html/doxygen.css|0 {lib => third_party}/iniparser/html/doxygen.png| Bin 1281 -> 1281 bytes .../iniparser/html/globals_func.html |0 {lib => third_party}/iniparser/html/index.html |0 .../iniparser/html/iniparser_8h.html |0 .../iniparser/html/iniparser_8main.html
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9b24abe fix unstrcpy from a058397 samba: Retain case sensitivity of cifs client http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9b24abe2f7961c6c54ddc9cd90ff09bf429dd3c0 Author: Volker Lendecke Date: Tue Jul 22 07:02:00 2014 +0200 fix unstrcpy Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Bug: https://bugzilla.samba.org/show_bug.cgi?id=10735 CVE-2014-3560: unstrcpy macro length is invalid Autobuild-User(master): Ira Cooper Autobuild-Date(master): Fri Aug 1 22:10:23 CEST 2014 on sn-devel-104 --- Summary of changes: lib/util/string_wrappers.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/string_wrappers.h b/lib/util/string_wrappers.h index 5f9d568..243fafc 100644 --- a/lib/util/string_wrappers.h +++ b/lib/util/string_wrappers.h @@ -51,7 +51,7 @@ do { \ #define unstrcpy(d,s) \ do { \ const char *_unstrcpy_src = (const char *)(s); \ - strlcpy((d),_unstrcpy_src ? _unstrcpy_src : "",sizeof(fstring)); \ + strlcpy((d),_unstrcpy_src ? _unstrcpy_src : "",sizeof(unstring)); \ } while (0) #ifdef HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via dff649f lib/zlib: Remove undeeded files that trigger GPL issues. from 776c7ed samlogon_cache: avoid overwriting info3->base.full_name.string. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit dff649f3e7e245c480ecdae06e53f4ffa2a592de Author: Ira Cooper Date: Wed Jul 16 07:38:45 2014 -0400 lib/zlib: Remove undeeded files that trigger GPL issues. These files have been removed in upstream versions of zlib due to the fact that binaries tend to become GPL violations. Signed-off-by: Ira Cooper Reviewed-by: Volker Lendecke Autobuild-User(master): Ira Cooper Autobuild-Date(master): Wed Jul 16 19:14:56 CEST 2014 on sn-devel-104 --- Summary of changes: lib/zlib/contrib/masmx64/gvmat64.obj | Bin 4119 -> 0 bytes lib/zlib/contrib/masmx64/inffasx64.obj | Bin 5913 -> 0 bytes lib/zlib/contrib/masmx86/gvmat32.obj | Bin 10241 -> 0 bytes lib/zlib/contrib/masmx86/inffas32.obj | Bin 14893 -> 0 bytes 4 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 lib/zlib/contrib/masmx64/gvmat64.obj delete mode 100644 lib/zlib/contrib/masmx64/inffasx64.obj delete mode 100644 lib/zlib/contrib/masmx86/gvmat32.obj delete mode 100644 lib/zlib/contrib/masmx86/inffas32.obj Changeset truncated at 500 lines: diff --git a/lib/zlib/contrib/masmx64/gvmat64.obj b/lib/zlib/contrib/masmx64/gvmat64.obj deleted file mode 100644 index a49ca02..000 Binary files a/lib/zlib/contrib/masmx64/gvmat64.obj and /dev/null differ diff --git a/lib/zlib/contrib/masmx64/inffasx64.obj b/lib/zlib/contrib/masmx64/inffasx64.obj deleted file mode 100644 index 8df5d82..000 Binary files a/lib/zlib/contrib/masmx64/inffasx64.obj and /dev/null differ diff --git a/lib/zlib/contrib/masmx86/gvmat32.obj b/lib/zlib/contrib/masmx86/gvmat32.obj deleted file mode 100644 index ebb3262..000 Binary files a/lib/zlib/contrib/masmx86/gvmat32.obj and /dev/null differ diff --git a/lib/zlib/contrib/masmx86/inffas32.obj b/lib/zlib/contrib/masmx86/inffas32.obj deleted file mode 100644 index bd6664d..000 Binary files a/lib/zlib/contrib/masmx86/inffas32.obj and /dev/null differ -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8cd8aa6 libcli: Overflow array index read possible, in auth code. via 1406371 Revert "libcli: Overflow array index read possible, in auth code." from 538cbfe libcli: Overflow array index read possible, in auth code. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8cd8aa6686c21e8c43a6d14c0ae1a21954d6e8cd Author: Ira Cooper Date: Thu Feb 13 14:45:23 2014 -0500 libcli: Overflow array index read possible, in auth code. Changed the if condtion to detect when we'd improperly overflow. Coverity-Id: 1167990 Signed-off-by: Ira Cooper Reviewed-by: Stefan Metzmacher Autobuild-User(master): Ira Cooper Autobuild-Date(master): Mon Feb 24 11:56:38 CET 2014 on sn-devel-104 commit 14063719e0b21da438179f0bb02b8c9d948d2dbb Author: Ira Cooper Date: Mon Feb 24 14:16:00 2014 +0530 Revert "libcli: Overflow array index read possible, in auth code." This reverts commit 538cbfe0e90b7c7ed0f8421b323cac4dacd83f04. Signed-off-by: Ira Cooper --- Summary of changes: libcli/auth/netlogon_creds_cli.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c index 7e88255..472a452 100644 --- a/libcli/auth/netlogon_creds_cli.c +++ b/libcli/auth/netlogon_creds_cli.c @@ -1766,11 +1766,11 @@ struct tevent_req *netlogon_creds_cli_ServerPasswordSet_send(TALLOC_CTX *mem_ctx if (new_version != NULL) { struct NL_PASSWORD_VERSION version; - int32_t len = IVAL(state->samr_crypt_password.data, 512); - int32_t ofs = 512 - len; + uint32_t len = IVAL(state->samr_crypt_password.data, 512); + uint32_t ofs = 512 - len; uint8_t *p; - if (ofs < 12) { + if (len > 500) { tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER_MIX); return tevent_req_post(req, ev); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 538cbfe libcli: Overflow array index read possible, in auth code. via 72f9932 s3:printing: Fix a possible NULL dereference. via 68d5f27 s3:passdb: Fix the use of uninitialized scalar variable. from 2b77b07 s3/libsmb: Free memdup'd local variable http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 538cbfe0e90b7c7ed0f8421b323cac4dacd83f04 Author: Ira Cooper Date: Thu Feb 13 14:45:23 2014 -0500 libcli: Overflow array index read possible, in auth code. The values have to be signed here to allow for the values to go negative, to prevent the overflow. Coverity-Id: 1167990 Signed-off-by: Ira Cooper Reviewed-by: Stefan Metzmacher Autobuild-User(master): Ira Cooper Autobuild-Date(master): Mon Feb 24 07:23:03 CET 2014 on sn-devel-104 commit 72f9932d4f70f76360490b315f95aa8dedc98390 Author: Poornima Gurusiddaiah Date: Fri Feb 14 03:27:12 2014 + s3:printing: Fix a possible NULL dereference. Coverity-Id: 710708 Signed-off-by: Poornima Gurusiddaiah Reviewed-by: Ira Cooper Reviewed-by: Stefan Metzmacher commit 68d5f2746466e43148f19e668093a64e8c610a51 Author: Poornima Gurusiddaiah Date: Fri Feb 14 03:56:56 2014 + s3:passdb: Fix the use of uninitialized scalar variable. Coverity-id: 1107228,1107227 Signed-off-by: Poornima Gurusiddaiah Reviewed-by: Stefan Metzmacher Reviewed-by: Ira Cooper --- Summary of changes: libcli/auth/netlogon_creds_cli.c |4 ++-- source3/passdb/py_passdb.c | 10 ++ source3/printing/printspoolss.c |2 +- 3 files changed, 5 insertions(+), 11 deletions(-) Changeset truncated at 500 lines: diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c index d73335d..7e88255 100644 --- a/libcli/auth/netlogon_creds_cli.c +++ b/libcli/auth/netlogon_creds_cli.c @@ -1766,8 +1766,8 @@ struct tevent_req *netlogon_creds_cli_ServerPasswordSet_send(TALLOC_CTX *mem_ctx if (new_version != NULL) { struct NL_PASSWORD_VERSION version; - uint32_t len = IVAL(state->samr_crypt_password.data, 512); - uint32_t ofs = 512 - len; + int32_t len = IVAL(state->samr_crypt_password.data, 512); + int32_t ofs = 512 - len; uint8_t *p; if (ofs < 12) { diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c index 2d3b637..dec45c3 100644 --- a/source3/passdb/py_passdb.c +++ b/source3/passdb/py_passdb.c @@ -2483,7 +2483,6 @@ static PyObject *py_pdb_set_account_policy(pytalloc_Object *self, PyObject *args static PyObject *py_pdb_search_users(pytalloc_Object *self, PyObject *args) { TALLOC_CTX *frame = talloc_stackframe(); - NTSTATUS status; struct pdb_methods *methods; unsigned int acct_flags; struct pdb_search *search; @@ -2505,9 +2504,7 @@ static PyObject *py_pdb_search_users(pytalloc_Object *self, PyObject *args) } if (!methods->search_users(methods, search, acct_flags)) { - PyErr_Format(py_pdb_error, "Unable to search users, (%d,%s)", - NT_STATUS_V(status), - get_friendly_nt_error_msg(status)); + PyErr_Format(py_pdb_error, "Unable to search users"); talloc_free(frame); return NULL; } @@ -2550,7 +2547,6 @@ static PyObject *py_pdb_search_users(pytalloc_Object *self, PyObject *args) static PyObject *py_pdb_search_groups(pytalloc_Object *self) { TALLOC_CTX *frame = talloc_stackframe(); - NTSTATUS status; struct pdb_methods *methods; struct pdb_search *search; struct samr_displayentry *entry; @@ -2566,9 +2562,7 @@ static PyObject *py_pdb_search_groups(pytalloc_Object *self) } if (!methods->search_groups(methods, search)) { - PyErr_Format(py_pdb_error, "Unable to search groups, (%d,%s)", - NT_STATUS_V(status), - get_friendly_nt_error_msg(status)); + PyErr_Format(py_pdb_error, "Unable to search groups"); talloc_free(frame); return NULL; } diff --git a/source3/printing/printspoolss.c b/source3/printing/printspoolss.c index 26d8a00..5dba635 100644 --- a/source3/printing/printspoolss.c +++ b/source3/printing/printspoolss.c @@ -248,7 +248,7 @@ done: } } /* We need to delete the job from spoolss too */ - if (pf->jobid) { + if (pf && pf->jobid) { print_spool_terminate(fsp->conn, pf); } } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 490418d gpo: Fix CID 1034880 Resource leak via 4d97b5d gpo: Fix CID 1034881 Resource leak via b7420e4 ntvfs: Fix CID 1034883 Resource leak via 1444280 backupkey: Fix CID 1034885 Resource leak via 0e19812 smbd: Fix CID 1035365 Buffer not null terminated via 2a73a49 smbd: Fix CID 1035366 Buffer not null terminated via a60f513 smbd: Use fstring in conn_tdb.c via 3b8c3e5 smbd: Use fstring in conn_tdb.h via ea83ac6 smbd: Fix CID 1035478 Negative array index read via df8dff7 samdb: Fix CID 241968 Uninitialized pointer read via c6ca14a heimdal: Fix 241482 Resource leak via d2731ad ldb: Fix CID 241329 Array compared against 0 via 6b7b007 libsmb: Fix CID 241313 Array compared against 0 via c85deee smbd: Fix CID 1035434 Same on both sides via 43ac7e8 iniparser: Fix CID 241908 Copy into fixed size buffer via 1cae867 libsmb: Fix CID 1127343 Dead default in switch via 70dbb89 netapi: Fix CID 1127344 Uninitialized scalar variable via 4ddb9cf net: Fix CID 1035403 Unchecked return value via 55b0a16 registry: Fix Coverity ID 1034918 Wrong sizeof argument via ba370ae registry: Fix Coverity ID 1034917 Wrong sizeof argument via 4e80a30 registry: Fix Coverity ID 1034916 Wrong sizeof argument via 0c8d5df dsdb: Fix Coverity ID 1034907 Dereference before null check via 096358f oLschema2ldif: Add some NULL checks from 97bbd63 s4:torture:smb2: add new lease.upgrade3 test to test the contended upgrade http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 490418d6363d2735cd1d801f7b2bb804eb85b197 Author: Volker Lendecke Date: Sun Nov 10 19:45:11 2013 +0100 gpo: Fix CID 1034880 Resource leak Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper Autobuild-User(master): Ira Cooper Autobuild-Date(master): Mon Nov 11 22:59:10 CET 2013 on sn-devel-104 commit 4d97b5dcca827d6767857182772f4ced0fdd5da7 Author: Volker Lendecke Date: Sun Nov 10 19:43:48 2013 +0100 gpo: Fix CID 1034881 Resource leak Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper commit b7420e44b1f7e0e0f54cf9f329981bacf839f7c9 Author: Volker Lendecke Date: Sun Nov 10 19:41:15 2013 +0100 ntvfs: Fix CID 1034883 Resource leak Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper commit 144428058a73b059d7389915e310ff48fd591e59 Author: Volker Lendecke Date: Sun Nov 10 19:34:31 2013 +0100 backupkey: Fix CID 1034885 Resource leak Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper commit 0e19812782cd7a937de028494160ed3f5e8bac88 Author: Volker Lendecke Date: Sun Nov 10 11:58:58 2013 +0100 smbd: Fix CID 1035365 Buffer not null terminated Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper commit 2a73a4985eb4a7fcd5dc31aee66dfcd0d305d94b Author: Volker Lendecke Date: Sun Nov 10 11:57:37 2013 +0100 smbd: Fix CID 1035366 Buffer not null terminated Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper commit a60f513e896c35bf21eb54456f38771152611e81 Author: Volker Lendecke Date: Sun Nov 10 11:56:06 2013 +0100 smbd: Use fstring in conn_tdb.c It might be legacy, but as long as we have it, we can make use of it. Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper commit 3b8c3e5dde9a5324eb82496f036d3a88349c3894 Author: Volker Lendecke Date: Sun Nov 10 11:56:06 2013 +0100 smbd: Use fstring in conn_tdb.h It might be legacy, but as long as we have it, we can make use of it. Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper commit ea83ac6b0142e99b514f7c4a3a4b038c2e409a8d Author: Volker Lendecke Date: Sun Nov 10 11:48:17 2013 +0100 smbd: Fix CID 1035478 Negative array index read lp_parm_enum can return -1. Add error checking. Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper commit df8dff7dd27459dad337e66f3e2f75c47e28cc8c Author: Volker Lendecke Date: Sun Nov 10 10:06:18 2013 +0100 samdb: Fix CID 241968 Uninitialized pointer read Interestingly gcc does not catch this at all. Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper commit c6ca14a78b52eabc70f338d136a93ea9ff4e51e4 Author: Volker Lendecke Date: Sun Nov 10 09:45:38 2013 +0100 heimdal: Fix 241482 Resource leak Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper commit d2731ad5aae9f1fb8c1c6a65a61ef787e993b248 Author: Volker Lendecke Date: Sat Nov 9 21:29:24 2013 +0100 ldb: Fix CID 241329 Array compared against 0 u.generate.remote_names is an array, not a pointer Signed-off-by: Volker Lendecke Reviewed-by: Ira Cooper commit 6b7b007a67ce8ec4e2979f09ba1bdea903116924
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 88332df lib/param: fix line length of DEBUG statments touched in previous commit in set_variable() via b59fed0 lib/param: fix function name (set_variable) in debug statements via d084f5e lib/param: fix function name (lpcfg_file_list_changed) in a debug message from 382849a s3:smbd:durable: remove a TODO comment about write time updates http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 88332dfd9f636196e594173b62d05b0607e3c05b Author: Michael Adam Date: Mon Oct 29 15:16:04 2012 +0100 lib/param: fix line length of DEBUG statments touched in previous commit in set_variable() Signed-off-by: Michael Adam Reviewed-by: Ira Cooper Autobuild-User(master): Ira Cooper Autobuild-Date(master): Mon Oct 29 21:55:35 CET 2012 on sn-devel-104 commit b59fed0d5d7dceff3e5ab47a6f219849a24cff1b Author: Michael Adam Date: Mon Oct 29 14:52:50 2012 +0100 lib/param: fix function name (set_variable) in debug statements Signed-off-by: Michael Adam Reviewed-by: Ira Cooper commit d084f5e6a66accf223efb4f9a6fa4b2d0ca63ed6 Author: Michael Adam Date: Mon Oct 29 13:44:54 2012 +0100 lib/param: fix function name (lpcfg_file_list_changed) in a debug message Signed-off-by: Michael Adam Reviewed-by: Ira Cooper --- Summary of changes: lib/param/loadparm.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index b2e4218..2462796 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -1076,7 +1076,7 @@ static void add_to_file_list(struct loadparm_context *lp_ctx, bool lpcfg_file_list_changed(struct loadparm_context *lp_ctx) { struct file_lists *f; - DEBUG(6, ("lp_file_list_changed()\n")); + DEBUG(6, ("lpcfg_file_list_changed()\n")); for (f = lp_ctx->file_lists; f != NULL; f = f->next) { char *n2; @@ -1300,7 +1300,8 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr, case P_BOOL: { bool b; if (!set_boolean(pszParmValue, &b)) { - DEBUG(0,("lp_do_parameter(%s): value is not boolean!\n", pszParmValue)); + DEBUG(0, ("set_variable(%s): value is not " + "boolean!\n", pszParmValue)); return false; } *(bool *)parm_ptr = b; @@ -1310,7 +1311,8 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr, case P_BOOLREV: { bool b; if (!set_boolean(pszParmValue, &b)) { - DEBUG(0,("lp_do_parameter(%s): value is not boolean!\n", pszParmValue)); + DEBUG(0, ("set_variable(%s): value is not " + "boolean!\n", pszParmValue)); return false; } *(bool *)parm_ptr = !b; @@ -1339,8 +1341,8 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr, } } - DEBUG(0,("lp_do_parameter(%s): value is not " - "a valid size specifier!\n", pszParmValue)); + DEBUG(0, ("set_variable(%s): value is not " + "a valid size specifier!\n", pszParmValue)); return false; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6dbe0aa s3: Fix libnss_winbind.so's build on Illumos/Solaris from 8180522 s4 dns: Fix return code for deleted records http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6dbe0aad260d1f6e46e58871a7ce613ca27d0bf6 Author: Ira Cooper Date: Sun Sep 30 19:02:13 2012 + s3: Fix libnss_winbind.so's build on Illumos/Solaris Due to not building and linking in the winbind_nss_solaris bits in addition to the linux bits, nss was broken on Solaris. Autobuild-User(master): Ira Cooper Autobuild-Date(master): Sun Sep 30 22:56:30 CEST 2012 on sn-devel-104 --- Summary of changes: nsswitch/winbind_nss_solaris.c |6 ++ nsswitch/wscript_build | 21 ++--- 2 files changed, 20 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/nsswitch/winbind_nss_solaris.c b/nsswitch/winbind_nss_solaris.c index 5fb3764..92da859 100644 --- a/nsswitch/winbind_nss_solaris.c +++ b/nsswitch/winbind_nss_solaris.c @@ -26,6 +26,7 @@ #undef DEVELOPER + #include "winbind_client.h" #include #include @@ -34,6 +35,7 @@ #include #include "includes.h" #include + #if !defined(HPUX) #include #endif /*hpux*/ @@ -48,6 +50,10 @@ #define NSS_DEBUG(str) ; #endif +#if !defined(SMB_MALLOC_P) +#define SMB_MALLOC_P(type) (type *)malloc(sizeof(type)) +#endif + #define NSS_ARGS(args) ((nss_XbyY_args_t *)args) #ifdef HPUX diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build index 0802687..3931445 100644 --- a/nsswitch/wscript_build +++ b/nsswitch/wscript_build @@ -1,4 +1,5 @@ #!/usr/bin/env python +import Utils bld.SAMBA_LIBRARY('winbind-client', source='wb_common.c', @@ -13,13 +14,19 @@ bld.SAMBA_BINARY('nsstest', deps='replace dl' ) - -bld.SAMBA_LIBRARY('nss_winbind', - source='winbind_nss_linux.c', - deps='winbind-client', - realname='libnss_winbind.so.2', - vnum='2') - +if Utils.unversioned_sys_platform() == 'linux': + bld.SAMBA_LIBRARY('nss_winbind', + source='winbind_nss_linux.c', + deps='winbind-client', + realname='libnss_winbind.so.2', + vnum='2') + +if Utils.unversioned_sys_platform() == 'sunos': + bld.SAMBA_LIBRARY('nss_winbind', + source='winbind_nss_solaris.c winbind_nss_linux.c', + deps='winbind-client', + realname='libnss_winbind.so.2', + vnum='2') if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'): bld.SAMBA_LIBRARY('pamwinbind', -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0231575 waf: Make samba "ok" with directories for install being symlinks from a125ea7 vfs: fix acl_blob_get* in vfs_full_audit http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0231575709231eadd89761d966c1b8412950de00 Author: Ira Cooper Date: Thu Sep 20 19:38:12 2012 + waf: Make samba "ok" with directories for install being symlinks stat -> lstat conversion. This allows people for whom $PREFIX/var is a symlink to complete make install. Autobuild-User(master): Ira Cooper Autobuild-Date(master): Thu Sep 20 23:26:26 CEST 2012 on sn-devel-104 --- Summary of changes: buildtools/wafadmin/Utils.py |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafadmin/Utils.py b/buildtools/wafadmin/Utils.py index 41dad57..91ded93 100644 --- a/buildtools/wafadmin/Utils.py +++ b/buildtools/wafadmin/Utils.py @@ -15,7 +15,7 @@ Utilities, the stable ones are the following: import stat def h_file(filename): - st = os.stat(filename) + st = os.lstat(filename) if stat.S_ISDIR(st[stat.ST_MODE]): raise IOError('not a file') m = Utils.md5() m.update(str(st.st_mtime)) @@ -419,7 +419,7 @@ def pprint(col, str, label='', sep='\n'): def check_dir(dir): """If a folder doesn't exists, create it.""" try: - os.stat(dir) + os.lstat(dir) except OSError: try: os.makedirs(dir) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5e51f63 s3: Fix the vfs_solarisacl module to compile. from 88a5bff packaging: apply some solaris packaging fixes http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5e51f63e86ab0855daf9e822d48a12134bfb6f26 Author: Ira Cooper Date: Fri Sep 14 01:32:45 2012 + s3: Fix the vfs_solarisacl module to compile. This got broken with the recent VFS acl structure changes. Autobuild-User(master): Ira Cooper Autobuild-Date(master): Fri Sep 14 05:21:29 CEST 2012 on sn-devel-104 --- Summary of changes: source3/modules/vfs_solarisacl.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_solarisacl.c b/source3/modules/vfs_solarisacl.c index ff9f1a6..10b6f70 100644 --- a/source3/modules/vfs_solarisacl.c +++ b/source3/modules/vfs_solarisacl.c @@ -370,13 +370,13 @@ static bool smb_acl_to_solaris_acl(SMB_ACL_T smb_acl, switch(solaris_entry.a_type) { case USER: DEBUG(10, ("got tag type USER with uid %u\n", - (unsigned int)smb_entry->uid)); - solaris_entry.a_id = (uid_t)smb_entry->uid; + (unsigned int)smb_entry->info.user.uid)); + solaris_entry.a_id = (uid_t)smb_entry->info.user.uid; break; case GROUP: DEBUG(10, ("got tag type GROUP with gid %u\n", - (unsigned int)smb_entry->gid)); - solaris_entry.a_id = (uid_t)smb_entry->gid; + (unsigned int)smb_entry->info.group.gid)); + solaris_entry.a_id = (uid_t)smb_entry->info.group.gid; break; default: break; @@ -429,7 +429,7 @@ static SMB_ACL_T solaris_acl_to_smb_acl(SOLARIS_ACL_T solaris_acl, int count, SMB_ACL_T result; int i; - if ((result = sys_acl_init(0)) == NULL) { + if ((result = sys_acl_init()) == NULL) { DEBUG(10, ("error allocating memory for SMB_ACL\n")); goto fail; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 48b6c6a s3-waf: Fix the winbindd active directory idmap support build. from 2bdfd28 build: try to fix large file support for AIX http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 48b6c6a6f26f52b4c6389f2fc4f8e9fb3f63f03b Author: Ira Cooper Date: Thu Jun 7 20:34:33 2012 -0400 s3-waf: Fix the winbindd active directory idmap support build. This fixes the SAMBA3_MODULE for idmap_ad so it will actually attempt to build. Autobuild-User(master): Ira Cooper Autobuild-Date(master): Fri Jun 8 04:38:04 CEST 2012 on sn-devel-104 --- Summary of changes: source3/winbindd/wscript_build |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/wscript_build b/source3/winbindd/wscript_build index 3b5d1d3..d9b4d34 100644 --- a/source3/winbindd/wscript_build +++ b/source3/winbindd/wscript_build @@ -52,7 +52,7 @@ bld.SAMBA3_MODULE('idmap_ad', deps='IDMAP_AD', init_function='', internal_module=bld.SAMBA3_IS_STATIC_MODULE('idmap_ad'), - enabled=bld.SAMBA3_IS_ENABLED_MODULE('idmap_ad' and bld.env.HAVE_LDAP)) + enabled=bld.SAMBA3_IS_ENABLED_MODULE('idmap_ad') and bld.env.HAVE_LDAP) bld.SAMBA3_MODULE('idmap_rid', subsystem='idmap', -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e8601c0 s3-configure: Fix configure version information. from b211768 s3:rpc_server/dfs: pass allow_broken_path=true to create_junction() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e8601c02ba59fb12b46919a50702365ceee6aee1 Author: Ira Cooper Date: Wed May 23 09:40:11 2012 -0400 s3-configure: Fix configure version information. version.h moved from include -> include/autoconf. Autobuild-User: Ira Cooper Autobuild-Date: Thu May 24 01:34:24 CEST 2012 on sn-devel-104 --- Summary of changes: source3/m4/samba_version.m4 |8 1 files changed, 4 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/m4/samba_version.m4 b/source3/m4/samba_version.m4 index 8ee0232..f0e3b8a 100644 --- a/source3/m4/samba_version.m4 +++ b/source3/m4/samba_version.m4 @@ -8,18 +8,18 @@ dnl http://www.gnu.org/licenses/ dnl dnl -SMB_VERSION_STRING=`cat $srcdir/include/version.h | grep '#define SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2` +SMB_VERSION_STRING=`cat $srcdir/include/autoconf/version.h | grep '#define SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2` echo "SAMBA VERSION: ${SMB_VERSION_STRING}" -SAMBA_VERSION_GIT_COMMIT_FULLREV=`cat $srcdir/include/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_FULLREV' | cut -d ' ' -f3- | cut -d '"' -f2` +SAMBA_VERSION_GIT_COMMIT_FULLREV=`cat $srcdir/include/autoconf/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_FULLREV' | cut -d ' ' -f3- | cut -d '"' -f2` if test -n "${SAMBA_VERSION_GIT_COMMIT_FULLREV}";then echo "BUILD COMMIT REVISION: ${SAMBA_VERSION_GIT_COMMIT_FULLREV}" fi -SAMBA_VERSION_COMMIT_DATE=`cat $srcdir/include/version.h | grep 'SAMBA_VERSION_COMMIT_DATE' | cut -d ' ' -f3-` +SAMBA_VERSION_COMMIT_DATE=`cat $srcdir/include/autoconf/version.h | grep 'SAMBA_VERSION_COMMIT_DATE' | cut -d ' ' -f3-` if test -n "${SAMBA_VERSION_COMMIT_DATE}";then echo "BUILD COMMIT DATE: ${SAMBA_VERSION_COMMIT_DATE}" fi -SAMBA_VERSION_COMMIT_TIME=`cat $srcdir/include/version.h | grep 'SAMBA_VERSION_COMMIT_TIME' | cut -d ' ' -f3-` +SAMBA_VERSION_COMMIT_TIME=`cat $srcdir/include/autoconf/version.h | grep 'SAMBA_VERSION_COMMIT_TIME' | cut -d ' ' -f3-` if test -n "${SAMBA_VERSION_COMMIT_TIME}";then echo "BUILD COMMIT TIME: ${SAMBA_VERSION_COMMIT_TIME}" -- Samba Shared Repository
[SCM] Samba Website Repository - branch master updated
The branch, master has been updated via 96e7213 Added Ira Cooper to Samba Team contacts. from e3b85dc Add news links to the MS SMB2.2 interop event. http://gitweb.samba.org/?p=samba-web.git;a=shortlog;h=master - Log - commit 96e72133b295ac0c45fa56212f440a6b39b6a765 Author: Ira Cooper Date: Fri Mar 23 08:54:22 2012 -0500 Added Ira Cooper to Samba Team contacts. --- Summary of changes: team/index.html |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/team/index.html b/team/index.html index 000602a..7863078 100755 --- a/team/index.html +++ b/team/index.html @@ -53,6 +53,7 @@ mailing list and start contributing to the development of Samba. http://samba.org/~abartlet/";>Andrew Bartlett mailto:k...@samba.org";>Kai Blin mailto:a...@samba.org";>Alexander Bokovoy +mailto:i...@samba.org";>Ira Cooper http://samba.org/~sdanneman/";>Steven Danneman http://samba.org/~gd";>Günther Deschner mailto:sfre...@samba.org";>Steve French @@ -67,11 +68,11 @@ mailing list and start contributing to the development of Samba. mailto:jlay...@samba.org";>Jeff Layton mailto:vlen...@samba.org";>Volker Lendecke mailto:h...@samba.org";>Herb Lewis -mailto:derr...@samba.org";>Derrell Lipman +mailto:derr...@samba.org";>Derrell Lipman mailto:kame...@samba.org";>Kamen Mazdrashki mailto:j...@samba.org";>Jim McDonough mailto:me...@samba.org";>Stefan Metzmacher -- Samba Website Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e64b118 s3: Update waf build to include missed dependancy on Lion. via b990279 util: Add --disable-fault-handling. from 48c2f80 libsmbclient-raw: Install smb_composite.h. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e64b1188bc7a6e42eb4d1d91e0c2a5a8a3fc02d3 Author: Ira Cooper Date: Wed Mar 14 20:43:46 2012 -0400 s3: Update waf build to include missed dependancy on Lion. Autobuild-User: Ira Cooper Autobuild-Date: Thu Mar 15 07:34:43 CET 2012 on sn-devel-104 commit b990279304b5e2b2ee0f64480cb09eda33f76beb Author: Ira Cooper Date: Wed Mar 14 12:56:02 2012 -0400 util: Add --disable-fault-handling. On some platforms you can not debug coredumps after the default signal handler gets done dumping core. This allows waf to have an option to disable our default signal handler. --- Summary of changes: lib/util/fault.c |2 ++ lib/util/wscript |3 +++ lib/util/wscript_configure|3 +++ source3/configure.in |7 +++ source3/lib/pthreadpool/wscript_build |2 +- wscript |1 + 6 files changed, 17 insertions(+), 1 deletions(-) create mode 100644 lib/util/wscript Changeset truncated at 500 lines: diff --git a/lib/util/fault.c b/lib/util/fault.c index 7fe081d..b3527bb 100644 --- a/lib/util/fault.c +++ b/lib/util/fault.c @@ -96,6 +96,7 @@ void fault_setup(void) if (fault_state.disabled) { return; } +#if !defined(HAVE_DISABLE_FAULT_HANDLING) #ifdef SIGSEGV CatchSignal(SIGSEGV, sig_fault); #endif @@ -105,6 +106,7 @@ void fault_setup(void) #ifdef SIGABRT CatchSignal(SIGABRT, sig_fault); #endif +#endif } _PUBLIC_ const char *panic_action = NULL; diff --git a/lib/util/wscript b/lib/util/wscript new file mode 100644 index 000..d296e75 --- /dev/null +++ b/lib/util/wscript @@ -0,0 +1,3 @@ +def set_options(opt): +''' This is a bit strange, but disable is the flag, not enable. ''' +opt.add_option('--disable-fault-handling', action='store_true', dest='disable_fault_handling', help=('disable the fault handlers'), default=False) diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure index fdaf67a..ad55476 100644 --- a/lib/util/wscript_configure +++ b/lib/util/wscript_configure @@ -1,5 +1,8 @@ #!/usr/bin/env python +import Options +if Options.options.disable_fault_handling: +conf.DEFINE('HAVE_DISABLE_FAULT_HANDLING',1) # backtrace could be in libexecinfo or in libc conf.CHECK_FUNCS_IN('backtrace backtrace_symbols', 'execinfo', checklibc=True, headers='execinfo.h') diff --git a/source3/configure.in b/source3/configure.in index 611e1d8..51e163d 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -6799,6 +6799,7 @@ if test x"$enable_pthreadpool" = x"yes" -a x"$samba_cv_HAVE_PTHREAD" = x"yes"; t fi fi + # # Check to see if we should use the included iniparser @@ -6834,6 +6835,12 @@ AC_SUBST(BUILD_INIPARSER) AC_SUBST(INIPARSERLIBS) AC_SUBST(FLAGS1) +AC_ARG_ENABLE(fault-handler,[AS_HELP_STRING([--disable-fault-handler], [Disable the default handler])]) + +if test x"$enable_fault_handler" = x"no"; then + AC_DEFINE(HAVE_DISABLE_FAULT_HANDLER, 1, [Disable the default signal handler]) +fi + ### # Check for different/missing (set|get|end)netgrent prototypes CFLAGS_SAVE=$CFLAGS diff --git a/source3/lib/pthreadpool/wscript_build b/source3/lib/pthreadpool/wscript_build index 611ff5a..5488c3a 100644 --- a/source3/lib/pthreadpool/wscript_build +++ b/source3/lib/pthreadpool/wscript_build @@ -2,7 +2,7 @@ bld.SAMBA3_SUBSYSTEM('PTHREADPOOL', source='pthreadpool.c', - deps='pthread rt', + deps='pthread rt replace', enabled=bld.env.WITH_PTHREADPOOL) bld.SAMBA3_BINARY('pthreadpooltest', diff --git a/wscript b/wscript index e1fe953..e64e509 100755 --- a/wscript +++ b/wscript @@ -30,6 +30,7 @@ def set_options(opt): opt.RECURSE('lib/uid_wrapper') opt.RECURSE('pidl') opt.RECURSE('source3') +opt.RECURSE('lib/util') gr = opt.option_group('developer options') gr.add_option('--enable-build-farm', -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 98210e2 s3-nsswitch: Fix warnings on Solaris. from a0e44c3 lib/util: Add hex_encode_buf http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 98210e25e5143cec30b1e4d7a981451a6232f913 Author: Ira Cooper Date: Sun Feb 5 09:47:16 2012 -0500 s3-nsswitch: Fix warnings on Solaris. Add "system/passwd.h" so struct group is declared. Autobuild-User: Ira Cooper Autobuild-Date: Mon Feb 6 18:28:53 CET 2012 on sn-devel-104 --- Summary of changes: nsswitch/winbind_nss_solaris.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/nsswitch/winbind_nss_solaris.h b/nsswitch/winbind_nss_solaris.h index 0113305..f0cc099 100644 --- a/nsswitch/winbind_nss_solaris.h +++ b/nsswitch/winbind_nss_solaris.h @@ -25,6 +25,7 @@ #include #include #include +#include "system/passwd.h" typedef nss_status_t NSS_STATUS; -- Samba Shared Repository