Bug 621618

Summary: Enabling the "Allow Guest Access" Setting in the Yast2 Samba Module Fails
Product: [openSUSE] openSUSE 11.4 Reporter: Forgotten User xs3PtXj4XH <forgotten_xs3PtXj4XH>
Component: YaST2Assignee: Jiří Suchomel <jsuchome>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: jsuchome, pdedecker, rolf.schmidt
Version: RC 1   
Target Milestone: ---   
Hardware: PC   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Yast2 Error Dialogue Content 1
Yast2 Error Dialogue Content 2
patch for /usr/share/YaST2/include/samba-server/dialogs.ycp

Description Forgotten User xs3PtXj4XH 2010-07-12 15:11:54 UTC
Created attachment 375297 [details]
Yast2 Error Dialogue Content 1

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.6) Gecko/20100626 SUSE/3.6.6-1.2 Firefox/3.6.6

Attempting to enable "Allow Guest Access" in the Yast2 Samba Module fails when the user clicks "OK" to finalise their settings.  If the user only clicks on "Allow Guest Access" and then clicks "OK", this checkbox is empty the next time the module is started.  It also occasionally appears to produce a Perl error (attached), but I cannot reproduce this reliably.  If the user clicks "Allow Users To Share Their Directories" and THEN clicks "Allow Guest Access", the setting stays, but the next time the Samba module is opened, clicking on "Cancel" produces another Perl error (also attached).

Reproducible: Sometimes

Steps to Reproduce:
1. Start the Yast2 Samba Module
2. Make some changes and then click on "Allow Guest Access"
3. Click "OK".
Actual Results:  
An error dialogue is sometimes produced mentioning that "Switch will be removed from the Perl core distribution in the next major release".  Additionally, the "Allow Guest Access" setting does not appear to stay checked unless "Allow Users To Share Their Directories" is also checked.

Expected Results:  
The check mark stays in place and no errors are produced.
Comment 1 Forgotten User xs3PtXj4XH 2010-07-12 15:12:57 UTC
Created attachment 375298 [details]
Yast2 Error Dialogue Content 2

Second error dialogue content attachment added.
Comment 2 Jiří Suchomel 2010-07-13 09:17:51 UTC
Samba Server uses SharesTerm function from samba-client, but I do not see if it actually reads the value of `guest_ch checkbox... maybe that is the problem?
Comment 3 Forgotten User xs3PtXj4XH 2010-07-13 15:44:29 UTC
Well certainly if "Guest Access" has to be used in conjunction with "Allow Users", then it should remain greyed-out until "Allow Users" is checked.  I have noticed that although the checkbox is empty the next time the Samba module is loaded, the relevant line does seem to be added to the samba configuration file.  Nevertheless, that doesn't explain the strange Perl errors.
Comment 4 Forgotten User xs3PtXj4XH 2010-08-07 16:49:54 UTC
This is frustrating.  I can't reliably reproduce the Perl error messages.  I still get them in 11.3 Final, but MUCH less frequently.  I also can't seem to discover any exact combination of steps that will trigger this.
Comment 5 Forgotten User xs3PtXj4XH 2010-12-13 16:14:20 UTC
I have reproduced this bug in 11.4 M4.  This time it was triggered by clicking the "Cancel" button in the Samba module.  The error text was as follows:

Switch will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at /usr/share/YaST2/modules/SambaServer.pm, line 17.
Comment 6 Forgotten User xs3PtXj4XH 2010-12-30 19:04:01 UTC
Bug is still present in 11.4 M5.  I can trigger it more reliably by starting the Samba module and setting a non-default Workgroup and Identity, and setting Samba to start automatically (and opening the firewall ports) and then saving.  The next time I open the Samba module, if I click "Cancel" immediately, the bug is triggered.
Comment 7 Forgotten User xs3PtXj4XH 2011-01-30 17:02:01 UTC
Is there any further information available on the status of this bug?
Comment 8 Lukas Ocilka 2011-01-31 13:43:54 UTC
Oh, I thought I've removed all of them :-/
Will fix it if I find some time.
Comment 9 Forgotten User xs3PtXj4XH 2011-01-31 14:22:05 UTC
Thanks Lukas. I'll keep poking around and trying to see if I can still trigger the bug.  I'll update if that is the case.
Comment 10 Pieter De Decker 2011-02-20 13:14:44 UTC
Still reproduceable in RC1.
Comment 11 Forgotten User xs3PtXj4XH 2011-02-20 16:54:18 UTC
Could you give a description of how you triggered the bug Pieter?
Comment 12 Pieter De Decker 2011-02-20 17:04:18 UTC
I just start the Samba server config, check the "Allow guest access" box and click OK. When I come back, the option is no longer checked.
Comment 14 Jiří Suchomel 2011-03-30 09:28:52 UTC
Created attachment 422137 [details]
patch for /usr/share/YaST2/include/samba-server/dialogs.ycp

Could you please patch your  /usr/share/YaST2/include/samba-server/dialogs.ycp and try again?
Comment 15 Jiří Suchomel 2011-04-05 14:08:37 UTC
patch submitted with new package to Factory
Comment 16 Bernhard Wiedemann 2011-04-28 11:49:38 UTC
This is an autogenerated message for OBS integration:
This bug (621618) was mentioned in
https://build.opensuse.org/request/show/66113
Comment 17 Forgotten User xs3PtXj4XH 2011-05-03 15:04:27 UTC
Jiri, thankyou for submitting a patch.  I see the patch has made it into Factory, but not openSuSE 11.4 yet.  Is this planned?
Comment 18 Jiří Suchomel 2011-05-04 06:05:02 UTC
(In reply to comment #17)
> Jiri, thankyou for submitting a patch.  I see the patch has made it into
> Factory, but not openSuSE 11.4 yet.  Is this planned?

Could you try to test the patch from comment 14 manually? Just save it to file (e.g. 'dialogs.patch'), backup your original /usr/share/YaST2/include/samba-server/dialogs.ycp and patch it using 'patch  /usr/share/YaST2/include/samba-server/dialogs.ycp < dialogs.patch' call. Than run YaST again.

If you confirm it works, we might go and release new package as online update...
Comment 19 Forgotten User xs3PtXj4XH 2011-05-18 19:15:34 UTC
The file you supplied does appear to change the behaviour of the user interface to work as expected.  I haven't tested actual guest access when this setting is enabled, but I assume this patch/issue only applies to the user interface.
Comment 20 Jiří Suchomel 2011-06-28 09:37:53 UTC
*** Bug 675097 has been marked as a duplicate of this bug. ***