SMB broken after update to 12.0-U6.1

Astrodonkey

Explorer
Joined
Jul 18, 2017
Messages
72
Hi, I updated my system from 12.0-U6 to 12.0-U6.1 yesterday and can't get SMB to work anymore. I've restarted the smb service and the machine to no avail.

log.smbd shows the following, does anyone know what's going on?
[2021/11/12 06:34:54.957673, 0] ../../source3/smbd/vfs.c:380(smbd_vfs_init)
smbd_vfs_init: widelinks enabled and vfs_init_custom failed for vfs_widelinks module
[2021/11/12 06:34:54.957680, 0] ../../source3/smbd/service.c:637(make_connection_snum)
make_connection_snum: vfs_init failed for service torrent
[2021/11/12 06:34:54.958157, 0] ../../lib/util/modules.c:49(load_module)
Error loading module '/usr/local/lib/shared-modules/vfs/widelinks.so': Cannot open "/usr/local/lib/shared-modules/vfs/widelinks.so"
[2021/11/12 06:34:54.958173, 0] ../../source3/smbd/vfs.c:186(vfs_init_custom)

If I revert back to 12.0-U6 everything is fine.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
According to the log, you've got wide links enabled in your config. 12.0-U6.1 upgraded to Samba 4.15 to address a security issue. Per the Samba 4.15 Release Notes, this functionality was moved out of the main Samba core daemon into a VFS module. Unfortunately, this VFS module doesn't appear to be shipped with 12.0-U6.1.

Do you need this functionality? This slows down Samba quite a lot, and can introduce security issues.
 
Last edited:

Astrodonkey

Explorer
Joined
Jul 18, 2017
Messages
72
Do you need this functionality? This slows down Samba quite a lot, and can introduce security issues.
Yes, I am using this functionality to map two different datasets under a single SMB share. I can probably find a way to eliminate this dependency, but I'd rather not have to go through that unless it's absolutely necessary.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Yes, I am using this functionality to map two different datasets under a single SMB share. I can probably find a way to eliminate this dependency, but I'd rather not have to go through that unless it's absolutely necessary.
Please try to do so. According to that Samba release note, wide links will be deprecated and removed in a future version.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
You can use nullfs mounts on FreeBSD or bind mounts on Linux. `widelinks` are horribly insecure, but his was an oversight on my part. I will fix for U7.
 

Astrodonkey

Explorer
Joined
Jul 18, 2017
Messages
72
You can use nullfs mounts on FreeBSD or bind mounts on Linux. `widelinks` are horribly insecure, but his was an oversight on my part. I will fix for U7.
Thank you, appreciate it. I'll come up with a migration plan...
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Thank you, appreciate it. I'll come up with a migration plan...
You can look up `nullfs` manpage. Doing this with datasets from CLI is generally "not supported", but possible if you know what you're doing. It will let you achieve the same as what you did with your symlink, but without having to enable widelinks. Otherwise you can wait until U7. In the big picture though, it would be a good idea to think of a migration plan away from using this feature.
 

A.Petrov

Cadet
Joined
Nov 13, 2021
Messages
2
It will let you achieve the same as what you did with your symlink
Not exactly. With ln we can acheive mapping for the directly files, when with nullfs it is possible only with the directories(folders).

main purpose for using vfs - is organize for the sharings to end users with unsorted/complex locations for source content. Personally my case - is on-boot (cron/other events) map locations for mediacontent located on different pools in single samba share. script which I am use for this is in code block
Code:
#!/usr/local/bin/bash
make_links() {
    source="$1"
    target=$2
    if [ ! -e "$target" ]; then
        echo "No tagret detected. Create"
        mkdir -p "$target"
    fi
    echo "linking... $source"
    find $source -type f -or -type d -maxdepth 0 | while read fname; do
        path=`dirname "$fname"`
        name=`basename "$fname"`
        if [ ! -L "$target/$name" ]; then
            `ln -s "$path/$name" "$target/$name"`
        fi
    done
    echo "checking... $target"
    find $target/* -type l -maxdepth 0 | while read fname; do
        if [ ! -e "$fname" ]; then
            echo "entry lost: $fname"
            rm "$fname"
        fi
    done
}

make_links "/mnt/VOL5/*"                        "/mnt/system/shares/Сериалы"
make_links "/mnt/VOL6/*"                        "/mnt/system/shares/Сериалы"
make_links "/mnt/VOL8/*"                        "/mnt/system/shares/Сериалы"
make_links "/mnt/VOL1/Serials/*"                "/mnt/system/shares/Сериалы"

make_links "/mnt/VOL9/Сериалы_HD/*"             "/mnt/system/shares/Мультфильмы/HD"
make_links "/mnt/VOL2/Cartoons_light/*"         "/mnt/system/shares/Мультфильмы/SD"
make_links "/mnt/VOL9/Голливуд/*"               "/mnt/system/shares/Мультфильмы/Голливуд"
make_links "/mnt/VOL9/Полнометражные/*"         "/mnt/system/shares/Мультфильмы/Полнометражные"
make_links "/mnt/VOL9/Песенки/*"                "/mnt/system/shares/Мультфильмы/Песенки"

make_links "/mnt/VOL2/DVD/*"                    "/mnt/system/shares/Фильмы/DVD"
make_links "/mnt/VOL3/Movies\(BD\)/*"           "/mnt/system/shares/Фильмы/BD"
make_links "/mnt/VOL3/Documentary/*"            "/mnt/system/shares/Фильмы/Документальное"
make_links "/mnt/VOL3/Movies\(BDRip\)/*"        "/mnt/system/shares/Фильмы/HD"
make_links "/mnt/VOL7/*"                        "/mnt/system/shares/Фильмы/HD"
make_links "/mnt/VOL3/Movies\(Rips\)/*"         "/mnt/system/shares/Фильмы/SD"
root@tools:/mnt/VOL1/WareHouse# 

 

Henning Kessler

Contributor
Joined
Feb 10, 2015
Messages
143
mmmh my machine is core dumping and I don't have wide_links enabled ;-) Seams to be an issue with `vfs_full_audit` here is my log:
Code:
[2021/11/15 12:07:22.611620,  1] ../../source3/librpc/crypto/gse.c:666(gse_get_server_auth_token)
  gss_accept_sec_context failed with [ Miscellaneous failure (see text): Failed to find cifs/HOST.DOMAIN@DOMAIN(kvno 2) in keytab MEMORY:cifs_srv_keytab (aes256-cts-hmac-sha1-96)]
[2021/11/15 12:07:22.611739,  1] ../../auth/gensec/spnego.c:1245(gensec_spnego_server_negTokenInit_step)
  gensec_spnego_server_negTokenInit_step: gse_krb5: parsing NEG_TOKEN_INIT content failed (next[(null)]): NT_STATUS_LOGON_FAILURE
[2021/11/15 12:07:23.124342,  1] ../../source3/printing/printer_list.c:234(printer_list_get_last_refresh)
  Failed to fetch record!
[2021/11/15 12:07:23.124400,  1] ../../source3/smbd/server_reload.c:66(delete_and_reload_printers)
  pcap cache not loaded
[2021/11/15 12:07:26.929007,  0] ../../lib/util/fault.c:159(smb_panic_log)
  ===============================================================
[2021/11/15 12:07:26.929058,  0] ../../lib/util/fault.c:163(smb_panic_log)
  INTERNAL ERROR: vfs_full_audit.c: name table not in sync with vfs_op_type enums
   in pid 3258 (4.13.14)
[2021/11/15 12:07:26.929121,  0] ../../lib/util/fault.c:168(smb_panic_log)
  If you are running a recent Samba version, and if you think this problem is not yet fixed in the latest versions, please consider reporting this bug, see https://wiki.samba.org/index.php/Bug_Reporting
[2021/11/15 12:07:26.929164,  0] ../../lib/util/fault.c:169(smb_panic_log)
  ===============================================================
[2021/11/15 12:07:26.929347,  0] ../../lib/util/fault.c:171(smb_panic_log)
  PANIC (pid 3258): vfs_full_audit.c: name table not in sync with vfs_op_type enums
   in 4.13.14
[2021/11/15 12:07:26.930930,  0] ../../lib/util/fault.c:275(log_stack_trace)
  BACKTRACE: 26 stack frames:
   #0 0x801b21787 <log_stack_trace+0x37> at /usr/local/lib/samba4/libsamba-util.so.0
   #1 0x801b2185e <smb_panic+0xe> at /usr/local/lib/samba4/libsamba-util.so.0
   #2 0x815ffd662 <samba_init_module+0x3882> at /usr/local/lib/shared-modules/vfs/full_audit.so
   #3 0x815ffa07c <samba_init_module+0x29c> at /usr/local/lib/shared-modules/vfs/full_audit.so
   #4 0x81620d613 <samba_init_module+0x133> at /usr/local/lib/shared-modules/vfs/fruit.so
   #5 0x801767cef <make_connection_smb2+0x7df> at /usr/local/lib/samba4/private/libsmbd-base-samba4.so
   #6 0x801767567 <make_connection_smb2+0x57> at /usr/local/lib/samba4/private/libsmbd-base-samba4.so
   #7 0x80177f221 <smbd_smb2_request_process_tcon+0x651> at /usr/local/lib/samba4/private/libsmbd-base-samba4.so
   #8 0x801775918 <smbd_smb2_request_dispatch+0x14d8> at /usr/local/lib/samba4/private/libsmbd-base-samba4.so
   #9 0x80177a0a2 <smbd_smb2_process_negprot+0x2342> at /usr/local/lib/samba4/private/libsmbd-base-samba4.so
   #10 0x802ea99dc <tevent_common_invoke_fd_handler+0x8c> at /usr/local/lib/samba4/private/libtevent.so.0
   #11 0x802eafa0a <tevent_add_aio_fsync+0x65a> at /usr/local/lib/samba4/private/libtevent.so.0
   #12 0x802eae4cd <tevent_cleanup_pending_signal_handlers+0x21d> at /usr/local/lib/samba4/private/libtevent.so.0
   #13 0x802ea8c01 <_tevent_loop_once+0xe1> at /usr/local/lib/samba4/private/libtevent.so.0
   #14 0x802ea8e62 <tevent_common_loop_wait+0x32> at /usr/local/lib/samba4/private/libtevent.so.0
   #15 0x802eae53d <tevent_cleanup_pending_signal_handlers+0x28d> at /usr/local/lib/samba4/private/libtevent.so.0
   #16 0x801763c92 <smbd_process+0x932> at /usr/local/lib/samba4/private/libsmbd-base-samba4.so
   #17 0x102bf6c <main+0x444c> at /usr/local/sbin/smbd
   #18 0x802ea99dc <tevent_common_invoke_fd_handler+0x8c> at /usr/local/lib/samba4/private/libtevent.so.0
   #19 0x802eafa0a <tevent_add_aio_fsync+0x65a> at /usr/local/lib/samba4/private/libtevent.so.0
   #20 0x802eae4cd <tevent_cleanup_pending_signal_handlers+0x21d> at /usr/local/lib/samba4/private/libtevent.so.0
   #21 0x802ea8c01 <_tevent_loop_once+0xe1> at /usr/local/lib/samba4/private/libtevent.so.0
   #22 0x802ea8e62 <tevent_common_loop_wait+0x32> at /usr/local/lib/samba4/private/libtevent.so.0
   #23 0x802eae53d <tevent_cleanup_pending_signal_handlers+0x28d> at /usr/local/lib/samba4/private/libtevent.so.0
   #24 0x102a4af <main+0x298f> at /usr/local/sbin/smbd
   #25 0x1029998 <main+0x1e78> at /usr/local/sbin/smbd
[2021/11/15 12:07:26.931372,  0] ../../source3/lib/dumpcore.c:315(dump_core)
  dumping core in /var/db/system/cores
[2021/11/15 12:07:27.499208,  0] ../../lib/util/fault.c:159(smb_panic_log)
  ===============================================================
[2021/11/15 12:07:27.499261,  0] ../../lib/util/fault.c:163(smb_panic_log)
  INTERNAL ERROR: vfs_full_audit.c: name table not in sync with vfs_op_type enums
   in pid 3261 (4.13.14)
[2021/11/15 12:07:27.499294,  0] ../../lib/util/fault.c:168(smb_panic_log)
  If you are running a recent Samba version, and if you think this problem is not yet fixed in the latest versions, please consider reporting this bug, see https://wiki.samba.org/index.php/Bug_Reporting
[2021/11/15 12:07:27.499358,  0] ../../lib/util/fault.c:169(smb_panic_log)
  ===============================================================
[2021/11/15 12:07:27.499550,  0] ../../lib/util/fault.c:171(smb_panic_log)
  PANIC (pid 3261): vfs_full_audit.c: name table not in sync with vfs_op_type enums
   in 4.13.14
[2021/11/15 12:07:27.501054,  0] ../../lib/util/fault.c:275(log_stack_trace)
  BACKTRACE: 26 stack frames:
   #0 0x801b21787 <log_stack_trace+0x37> at /usr/local/lib/samba4/libsamba-util.so.0
   #1 0x801b2185e <smb_panic+0xe> at /usr/local/lib/samba4/libsamba-util.so.0
   #2 0x815f57662 <samba_init_module+0x3882> at /usr/local/lib/shared-modules/vfs/full_audit.so
   #3 0x815f5407c <samba_init_module+0x29c> at /usr/local/lib/shared-modules/vfs/full_audit.so
   #4 0x816167613 <samba_init_module+0x133> at /usr/local/lib/shared-modules/vfs/fruit.so
   #5 0x801767cef <make_connection_smb2+0x7df> at /usr/local/lib/samba4/private/libsmbd-base-samba4.so
   #6 0x801767567 <make_connection_smb2+0x57> at /usr/local/lib/samba4/private/libsmbd-base-samba4.so
   #7 0x80177f221 <smbd_smb2_request_process_tcon+0x651> at /usr/local/lib/samba4/private/libsmbd-base-samba4.so
   #8 0x801775918 <smbd_smb2_request_dispatch+0x14d8> at /usr/local/lib/samba4/private/libsmbd-base-samba4.so
   #9 0x80177a0a2 <smbd_smb2_process_negprot+0x2342> at /usr/local/lib/samba4/private/libsmbd-base-samba4.so
   #10 0x802ea99dc <tevent_common_invoke_fd_handler+0x8c> at /usr/local/lib/samba4/private/libtevent.so.0
   #11 0x802eafa0a <tevent_add_aio_fsync+0x65a> at /usr/local/lib/samba4/private/libtevent.so.0
   #12 0x802eae4cd <tevent_cleanup_pending_signal_handlers+0x21d> at /usr/local/lib/samba4/private/libtevent.so.0
   #13 0x802ea8c01 <_tevent_loop_once+0xe1> at /usr/local/lib/samba4/private/libtevent.so.0
   #14 0x802ea8e62 <tevent_common_loop_wait+0x32> at /usr/local/lib/samba4/private/libtevent.so.0
   #15 0x802eae53d <tevent_cleanup_pending_signal_handlers+0x28d> at /usr/local/lib/samba4/private/libtevent.so.0
   #16 0x801763c92 <smbd_process+0x932> at /usr/local/lib/samba4/private/libsmbd-base-samba4.so
   #17 0x102bf6c <main+0x444c> at /usr/local/sbin/smbd
   #18 0x802ea99dc <tevent_common_invoke_fd_handler+0x8c> at /usr/local/lib/samba4/private/libtevent.so.0
   #19 0x802eafa0a <tevent_add_aio_fsync+0x65a> at /usr/local/lib/samba4/private/libtevent.so.0
   #20 0x802eae4cd <tevent_cleanup_pending_signal_handlers+0x21d> at /usr/local/lib/samba4/private/libtevent.so.0
   #21 0x802ea8c01 <_tevent_loop_once+0xe1> at /usr/local/lib/samba4/private/libtevent.so.0
   #22 0x802ea8e62 <tevent_common_loop_wait+0x32> at /usr/local/lib/samba4/private/libtevent.so.0
   #23 0x802eae53d <tevent_cleanup_pending_signal_handlers+0x28d> at /usr/local/lib/samba4/private/libtevent.so.0
   #24 0x102a4af <main+0x298f> at /usr/local/sbin/smbd
   #25 0x1029998 <main+0x1e78> at /usr/local/sbin/smbd
[2021/11/15 12:07:27.501846,  0] ../../source3/lib/dumpcore.c:315(dump_core)
  dumping core in /var/db/system/cores
 

CarlB

Dabbler
Joined
Jan 30, 2018
Messages
40
Any suggested reading on correcting this? I wasn't aware I was using a feature that is soon to be deprecated, but all my SMB shares broke as well.
 

CarlB

Dabbler
Joined
Jan 30, 2018
Messages
40
1) switch boot-environment to start from unaffected U6: Changing Boot Environments
2) wait until U7 is released (with corrections of missed library)
3) plan to migrate your share environment from ln to mount_nullfs as soon as possible
4) write a boot-script to remount nullfs bindings and attach it as post-boot task: Init/Shutdown Scripts
"plan to migrate your share environment from ln to mount_nullfs as soon as possible"

This is the part I'm totally unfamiliar with.
 

Henning Kessler

Contributor
Joined
Feb 10, 2015
Messages
143
And those steps only partly help for my issue with full audit...
 

Henning Kessler

Contributor
Joined
Feb 10, 2015
Messages
143
By they way I could replicate the same problem on a different system
 
Top