Created attachment 6367 [details] Patch When connecting to a DFS share using Nautilus on Ubuntu 10.04, I can only see part of the directory tree. Take the example of a share with a DFS root at X, and sub directories A, B, and C all on different servers. I can connect to X, and see A, B, and C, but directories A, B, and C are all shown as empty. If I directly connect to X/A, then I can see the files and directories in and below A. Using smbclient directly from the command line gives the same behaviour. The server is an EMC Celerra NAS NSG-8 with NAS version 5.6.50. I traced the code. What I see is that in the function cli_dfs_get_referal in libsmb/clidfs.c two components of the path are returned: one that doesn't end in a \, and the other that doesn't start with a \. When the two paths are put together in the function cli_resolve_path (in the same source file), no \ is put between the components, which leads to smbclient not finding the directory. I made a patch on the v3-4-test branch of the Samba git repository. It seems to also patch the current stable 3.5.8 version. I've attached the patch. Note that I don't have the resources to test it against anything but the Celerra NAS. I also installed 3.5.8, confirmed that the bug exists in 3.5.8, and that the patch works on 3.5.8. Here's what I posted with the Ubuntu bug: Is it a regression ? Did this use to work properly with a previous release ? Not as far as I know. What version of samba packages are used ? Please give the output of: dpkg-query -W -f='${Package} ${Version} ${Source} ${Status}\n' | grep samba libsmbclient 2:3.4.7~dfsg-1ubuntu3.5 samba install ok installed libwbclient0 2:3.4.7~dfsg-1ubuntu3.5 samba install ok installed samba-common 2:3.4.7~dfsg-1ubuntu3.5 samba install ok installed samba-common-bin 2:3.4.7~dfsg-1ubuntu3.5 samba install ok installed smbclient 2:3.4.7~dfsg-1ubuntu3.5 samba install ok installed smbfs 2:3.4.7~dfsg-1ubuntu3.5 samba install ok installed winbind 2:3.4.7~dfsg-1ubuntu3.5 samba install ok installed How is the remote share accessed from the Ubuntu system? nautilus (or other GUI client) YES smbclient (from the command line) YES cifs filesystem mount (from /etc/fstab or a mount command) YES If nautilus (or another GUI client) is used to access the remote share, can the share be accessed with the smbclient command line utility ? NO To test: install the samba-client package try to connect to the remote system from the command line: smbclient //remote_system/share_name Connection works, but crossing to another server through DFS doesn't If the share requires a specific username/password, try using the "-U" parameter (for example, use "-U ntdomain\\user"). smbclient doesn't work either. I have tried all combinations of ways to authenticate. With -d 10 I'm seeing messages that make me reasonably confident it's not an authentication problem (but it could be, I suppose). If a cifs mount is used In that case please also provide: the content of the file /etc/fstab, or the command line used to mount the remote share if the share is manually mounted. sudo mount -t cifs --verbose -o user=my-domain/my-username //my-server/my-share /mnt mount works. Nautilus, gvfs-mount and smbclient don't. the content of the file /proc/fs/cifs/DebugData What is the remote server ? In all cases, please include the output of the following smbclient command: smbclient -L //remote_system This should give us the remote server version. Also include on what kind of machine the share is located (Windows 2003 Server, Ubuntu 8.04, NAS box model...) It's an EMC Celerra NAS NSG-8 with NAS version 5.6.50 Here's the output of the smbclient -L command, edited to remove information that my organization wouldn't want me to share with the world: Domain=[my-domain] OS=[EMC-SNAS:T5.6.50.2] Server=[my-server] Sharename Type Comment --------- ---- ------- my-share Disk DFS01 root share C$ Disk Root Service IPC$ IPC IPC Service Domain=[my-domain] OS=[EMC-SNAS:T5.6.50.2] Server=[my-server] Server Comment --------- ------- Workgroup Master --------- -------
Comment on attachment 6367 [details] Patch Looks correct and safe to me. Jeremy? Volker
Comment on attachment 6367 [details] Patch Looks good to me.
Re-assigning to Karolin for inclusion in 3.5.next. Jeremy.
Pushed to v3-5-test. Will be included in the next release. Closing out bug report. Thanks!