Created attachment 15903 [details] Panic fix patch While trying out Samba 4.12.1 on Debian Buster I seem to have found a bug in the full_audit VFS module. When trying to open the Samba server in my file browser (Gnome3's Files) it gave me an error and the following PANIC is thrown: [2020/04/10 10:52:20.242346, 0] ../../source3/lib/util.c:830(smb_panic_s3) PANIC (pid 16323): vfs_full_audit.c: name table not in sync with vfs_op_type enums While comparing the enum and array I found that "SMB_VFS_OP_FCNTL" was missing in the array. The following patch adds it to the array, after this the full_audit VFS module seems to work as expected: --- ../temp/samba-4.12.1/source3/modules/vfs_full_audit.c 2020-02-28 09:59:35.000000000 +0100 +++ source3/modules/vfs_full_audit.c 2020-04-10 11:08:39.246639916 +0200 @@ -295,6 +295,7 @@ { 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" }, How to reproduce: - Get Samba 4.12.1 on Debian Buster, compile it - In smb.conf under [global] add: vfs objects = full_audit full_audit:prefix = %u|%I|%m|%S full_audit:success = mkdir rename unlink rmdir open pwrite full_audit:failure = none full_audit:facility = local7 full_audit:priority = NOTICE - Start smbd.service - Access a share Actual results: Not able to access the share Expected results: Get a directory listing of whatever share I'm accessing
Good catch, thanks. Sorry for the problem. I'll get this into master and then back-ported to 4.12.next.
Created attachment 15904 [details] git-am fix for master. OK, here's what I've got in gitlab-CI for this. It adds a test that should make sure we don't ever fail to add the values to the correct array again.
Created attachment 15905 [details] git-am fix for master Fixed static declaration.
Created attachment 15913 [details] git-am fix for 4.12.next. Cherry-picked and back-ported from master. Only needed in 4.12.next.
I like the use of the unit test to validate the arrays, nice work!
*** Bug 14347 has been marked as a duplicate of this bug. ***
Pushed to autobuild-v4-12-test.
Pushed to v4-12-test. Closing out bug report. Thanks!