[Samba] Re: Sorting directory lists (again)

Andy Kelk andykelk at gmail.com
Tue Dec 30 04:24:53 GMT 2008


2008/12/29 Andy Kelk <andykelk at gmail.com>:

> I guess another alternative would be to have a Samba VFS that sorts
> the readdir output before passing it on. Can anyone comment on this as
> a possible solution and whether it has been accomplished before?

I've implemented something which (I think) will do this.
Unfortunately, as a first time vfs author, I'm having trouble getting
it to install correctly. I have it built and linked as a .so file. I
have moved it into my /usr/lib/samba/vfs directory. I have added it to
a section of my smb.conf file ("vfs objects = sorted"). When trying to
access that share, I get a NT_STATUS_BAD_NETWORK_NAME error. The log
shows:

[2008/12/30 15:23:10,  3] smbd/vfs.c:vfs_init_custom(130)
  Initialising custom vfs hooks from [sorted]
[2008/12/30 15:23:10, 10] smbd/vfs.c:vfs_find_backend_entry(48)
  vfs_find_backend_entry called for sorted
[2008/12/30 15:23:10,  5] lib/module.c:smb_probe_module(111)
  Probing module 'sorted'
[2008/12/30 15:23:10,  5] lib/module.c:smb_probe_module(130)
  Probing module 'sorted': Trying to load from /usr/lib/samba/vfs/sorted.so
[2008/12/30 15:23:10,  2] lib/module.c:do_smb_load_module(64)
  Module '/usr/lib/samba/vfs/sorted.so' loaded
[2008/12/30 15:23:10, 10] smbd/vfs.c:vfs_find_backend_entry(48)
  vfs_find_backend_entry called for sorted_transparent
[2008/12/30 15:23:10,  5] smbd/vfs.c:smb_register_vfs(86)
  Successfully added vfs backend 'sorted_transparent'
[2008/12/30 15:23:10, 10] smbd/vfs.c:vfs_find_backend_entry(48)
  vfs_find_backend_entry called for sorted
[2008/12/30 15:23:10,  0] smbd/vfs.c:vfs_init_custom(176)
  Can't find a vfs module [sorted]
[2008/12/30 15:23:10,  0] smbd/vfs.c:smbd_vfs_init(317)
  smbd_vfs_init: vfs_init_custom failed for sorted

Anyone able to shed some light on what I might be doing wrong? This is
on Ubuntu Intrepid using Samba 3.2.3.

Many thanks

Andy


More information about the samba mailing list