Samba usershares in lower-case

Bug #222734 reported by IceWil
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
samba
Fix Released
Medium
samba (Ubuntu)
Low
Unassigned

Bug Description

Samba usershares created with Nautilus are in lower-case.

Steps to reproduce :

1 - Right-click on a folder ("My Shared Folder" for example) and share it with Samba
2 - Go to smb://localhost/ in Nautilus
3 - See that "My Shared Folder" becomes "my shared folder"

Hardy Heron (64-bit)

IceWil (icewil)
description: updated
Revision history for this message
Chow Loong Jin (hyperair) wrote :

I'm reassigning this to samba, because this is a bug of the 'net' utility, not nautilus-share.

affects: nautilus-share (Ubuntu) → samba (Ubuntu)
Revision history for this message
Thierry Carrez (ttx) wrote :

Reproduced on Jaunty:

$ net usershare add "My Shared Folder" "/home/user/My Shared Folder"
$ net usershare list
my shared folder

Workaround:
$ mv "/var/lib/samba/usershares/my shared folder" "/var/lib/samba/usershares/My Shared Folder"
$ net usershare list
My Shared Folder

Changed in samba (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Thierry Carrez (ttx) wrote :

This is apparently done by design (sharename = strdup_lower(argv[0]) in net_usershare.c), so we cannot change it on our side without introducing a behavior change with upstream. I'd suggest to bring this up on Samba bugzilla if you want to convince them to change how this tool should behave ?
See https://bugzilla.samba.org

Changed in samba:
status: Unknown → Confirmed
Revision history for this message
Jeremy Allison (jra-samba) wrote :

The reason the sharename is lowercased is so we can tell immediately if another usershare exists using a case-variant of the same name (SMB shares are case insensitive). In order to fix this (it's not an issue in the server code as far as I can see) the usershare creation code would have to scan the entire directory to look for case-differing versions of the new sharename, and replace them if needed.

Jeremy.

Revision history for this message
Jeremy Allison (jra-samba) wrote :

I have a fix for this I'm planning to add into 3.6.0. Can't go in earlier as it's going to need an upgrade to the on-disk format of the share security tdb.
I'll update this bug once the new code has been tested.

Thanks !

Jeremy.

Revision history for this message
Thierry Carrez (ttx) wrote :

Thanks Jeremy !

Changed in samba (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Jeremy Allison (jra-samba) wrote :

I have fixed this in the upstream tree (see the patch added to Samba bug #7240). Please test the Samba master git branch (as this will become 3.6.0) to ensure it works with nautilus share.

Jeremy.

Changed in samba:
status: Confirmed → In Progress
Changed in samba:
status: In Progress → Fix Released
Changed in samba:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.