The Samba-Bugzilla – Attachment 15904 Details for
Bug 14343
vfs_full_audit panics when accessing Samba
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for master.
bug-14343 (text/plain), 4.46 KB, created by
Jeremy Allison
on 2020-04-10 21:24:22 UTC
(
hide
)
Description:
git-am fix for master.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2020-04-10 21:24:22 UTC
Size:
4.46 KB
patch
obsolete
>From 3b403d5b073e6931a6ad61a15fcb8f4e85c61bcb Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Fri, 10 Apr 2020 13:27:18 -0700 >Subject: [PATCH 1/2] s3: VFS: full_audit. Add missing fcntl entry in > vfs_op_names[] array. > >Found by yannick@in2ip.nl. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14343 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source3/modules/vfs_full_audit.c | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c >index 1ea58a0ffab..f8eef6eb1df 100644 >--- a/source3/modules/vfs_full_audit.c >+++ b/source3/modules/vfs_full_audit.c >@@ -293,6 +293,7 @@ static struct { > { SMB_VFS_OP_FALLOCATE,"fallocate" }, > { SMB_VFS_OP_LOCK, "lock" }, > { SMB_VFS_OP_KERNEL_FLOCK, "kernel_flock" }, >+ { SMB_VFS_OP_FCNTL, "fcntl" }, > { SMB_VFS_OP_LINUX_SETLEASE, "linux_setlease" }, > { SMB_VFS_OP_GETLOCK, "getlock" }, > { SMB_VFS_OP_SYMLINKAT, "symlinkat" }, >-- >2.20.1 > > >From e23a947757eeb267a69dc8b8a0c4dc8b808cda95 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Fri, 10 Apr 2020 14:14:25 -0700 >Subject: [PATCH 2/2] s3: VFS: Add cmocka test for vfs_full_audit to make sure > all arrays are correct. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14343 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source3/modules/test_vfs_full_audit.c | 49 +++++++++++++++++++++++++++ > source3/modules/wscript_build | 5 +++ > source3/selftest/tests.py | 4 +++ > 3 files changed, 58 insertions(+) > create mode 100644 source3/modules/test_vfs_full_audit.c > >diff --git a/source3/modules/test_vfs_full_audit.c b/source3/modules/test_vfs_full_audit.c >new file mode 100644 >index 00000000000..cdfee86b09c >--- /dev/null >+++ b/source3/modules/test_vfs_full_audit.c >@@ -0,0 +1,49 @@ >+/* >+ * Unix SMB/CIFS implementation. >+ * >+ * Unit test for entries in vfs_full_audit arrays. >+ * >+ * Copyright (C) Jeremy Allison 2020 >+ * >+ * 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/>. >+ */ >+ >+/* Needed for static build to complete... */ >+#include "includes.h" >+#include "smbd/smbd.h" >+NTSTATUS vfs_vfs_full_audit_init(TALLOC_CTX *ctx); >+ >+#include "vfs_full_audit.c" >+#include <cmocka.h> >+ >+static void test_full_audit_array(void **state) >+{ >+ unsigned i; >+ >+ for (i=0; i<SMB_VFS_OP_LAST; i++) { >+ assert_non_null(vfs_op_names[i].name); >+ assert_int_equal(vfs_op_names[i].type, i); >+ } >+} >+ >+int main(int argc, char **argv) >+{ >+ const struct CMUnitTest tests[] = { >+ cmocka_unit_test(test_full_audit_array), >+ }; >+ >+ cmocka_set_message_output(CM_OUTPUT_SUBUNIT); >+ >+ return cmocka_run_group_tests(tests, NULL, NULL); >+} >diff --git a/source3/modules/wscript_build b/source3/modules/wscript_build >index 2d81357c513..1f2d2d3acb6 100644 >--- a/source3/modules/wscript_build >+++ b/source3/modules/wscript_build >@@ -91,6 +91,11 @@ bld.SAMBA3_MODULE('vfs_full_audit', > internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_full_audit'), > enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_full_audit')) > >+bld.SAMBA3_BINARY('test_vfs_full_audit', >+ source='test_vfs_full_audit.c', >+ deps='smbd_base cmocka', >+ for_selftest=True) >+ > bld.SAMBA3_MODULE('vfs_fake_perms', > subsystem='vfs', > source='vfs_fake_perms.c', >diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py >index 1ceb0a5ad5f..568434a208c 100755 >--- a/source3/selftest/tests.py >+++ b/source3/selftest/tests.py >@@ -506,6 +506,10 @@ plantestsuite("samba3.test_vfs_widelinks", "none", > [os.path.join(bindir(), "test_vfs_widelinks"), > "$SMB_CONF_PATH"]) > >+plantestsuite("samba3.test_vfs_full_audit", "none", >+ [os.path.join(bindir(), "test_vfs_full_audit"), >+ "$SMB_CONF_PATH"]) >+ > plantestsuite( > "samba3.resolvconf", "none", > [os.path.join(samba3srcdir, "script/tests/test_resolvconf.sh")]) >-- >2.20.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 14343
:
15903
|
15904
|
15905
|
15913