GNOME Bugzilla – Bug 356547
properties confused when the same folder is shared by nfs and smb
Last modified: 2007-12-12 00:56:09 UTC
That bug has been described on https://launchpad.net/distros/ubuntu/+source/gnome-system-tools/+bug/48481 "It seems that shares-admin does not work when you share the same folder on both networks (SMB and NFS): the two entries appear but whatever the one you choose to edit, you fall in configuring the SMB one. However, adding a share with NFS for a folder that is already shared over SMB works and shares-admin keeps the correct settings for SMB and NFS when it saves them. ... > Thanks for your bug. What version of Ubuntu do you use? Your description is confusing. You first say if a share is using SMB and NFS you can't configure the SMB one and then that if it's already using NFS and you set up SMB it's work. Is it dependant of the order then? Could you clarify what you do and what is the issue? ... I use Ubuntu Dapper (kernel 2.6.15-26-k7) and I think I already upgraded to Dapper at the time of that bug report. I use shares-admin on my PC to manage the shared folders on both NFS and SMB as my laptop is also under Ubuntu but the computer of my father is under Windows, and I want to share the same forlders on both networks. But now that everything is configured, if I want to modify the configuration of any shared forlder, I can only do it for the SMB network and not for NFS, as even by selecting the NFS entry and clicking on "Properties" it gives me the properties of the SMB entry - and selecting "NFS" shows an empty NFS configuration. In fact it is effectively dependant of the order, as adding a new SMB for a folder already shared on NFS and then trying to configure the new one makes it fall down to NFS - but as shares-admin seems to load the SMB config first, It will be the opposite next time. However I can all the same add or remove shared folders without any problem. ..."
Created attachment 93559 [details] [review] Specify the selected share when editing its properties The problem is that the shares-admin tool assumes that there is only one share for a given pathname and thus share_settings_dialog_run grabs the info for the first matching share. This assumption is incorrect when sharing the same directory on both NFS and SMB. I'm attaching a patch which fixes the specific problem.
I've just committed the patch after renaming share_settings_dialog_run() to share_settings_dialog_run_for_iter(). Thanks a lot for the patch!