Bug 473683

Summary: YaST sudo adds a space to command parameters
Product: [openSUSE] openSUSE 11.1 Reporter: Jason Craig <os-dev>
Component: YaST2Assignee: Katarina Machalkova <kmachalkova>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Minor    
Priority: P3 - Medium    
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Jason Craig 2009-02-07 21:41:32 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.5) Gecko/2008121300 SUSE/3.0.5-1.1 Firefox/3.0.5

When creating sudo rules in YaST, if you enter a command with parameters and then later edit this command, a space is added to the front of the parameters list.  Every time you edit the command, another space will be added to the front of the parameters.

Reproducible: Always

Steps to Reproduce:
1. Create a sudo rule using YaST.
2. Add a command to the rule.  Mine was calling /bin/cp as root.  Give the command some parameters.
3. Click OK to finish the rule.
4. Edit the rule.  Edit the command.  Notice that a space is added before the command line parameters.
Actual Results:  
A space is added to the beginning of the parameters each time the command is added.

Expected Results:  
I assume the reason why this happens in the first place is that one wants a space at the beginning of the parameters, but it should be checked that whitespace isn't already there.  If it is, don't add a space.
Comment 1 Jason Craig 2009-02-07 21:42:57 UTC
Sorry, under "Actual Results" I mean to say "A space is added to the beginning of the parameters each time the command is edited."
Comment 2 Katarina Machalkova 2009-02-27 15:10:41 UTC
Fixed in yast2-sudo 2.18.1