Bug 537062

Summary: samba: add share resource fail if added with special characters (for example:test's”t#$%*) input for 'Resource Name' and 'Name' fields from iManage UI
Product: [Other] RHQ Project Reporter: Rajan Timaniya <rtimaniy>
Component: ConfigurationAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 1.4CC: cwelton, jshaughn, skondkar, whayutin
Target Milestone: ---Keywords: SubBug
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-16 09:52:44 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
screenshot for exception none

Description Rajan Timaniya 2009-11-12 06:12:21 EST
Description of problem:
add share resource fail if added with special characters (for example:test's”t#$%*) input for 'Resource Name' and 'Name' fields from iManage UI

Test case: https://engineering.redhat.com/trac/IntegratedMgmtQE/wiki/Spearhead_RHEL_config_samba_Testplan (User_story_278:Testcase -14)

Version-Release number of selected component (if applicable):
version: 1.4.0-SNAPSHOT

How reproducible:

Steps to Reproduce:
1. Log in to imanage
2. Click on Overview and then Dashboard
3. Click on 'Samba Server' under the 'Recently Added  
4. Click on 'INVENTORY' and select the option 
5. In 'Child Resources' there is selection box to select 
     '- Samba Share' or 'Services'. Select '- Samba Share' 
     and click on 'OK' button
6. To create new samba share, input given below 
     values and then click on 'SUBMIT' button
     Resource Name: test's”t#$%*
     Name: test's”t#$%*
     Path: /tmp/myshare
     Comment: myshare
     Browseable : Yes
     Read only: Yes
     Printable: Yes
     Guest ok: Yes
     Valid Users: testboy, rhqadmin
Actual results:
add resource fail with following exception
net.augeas.AugeasException: exists failed
	at net.augeas.Augeas.processLastCall(Augeas.java:396)
	at net.augeas.Augeas.exists(Augeas.java:222)
	at org.rhq.plugins.augeas.AugeasConfigurationComponent.createResource(AugeasConfigurationComponent.java:172)
	at org.rhq.plugins.samba.SambaServerComponent.createResource(SambaServerComponent.java:61)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)

Expected results:
There should be a user error/alert message.

Additional info:
Comment 1 Rajan Timaniya 2009-11-12 06:14:28 EST
Created attachment 369182 [details]
screenshot for exception
Comment 2 Sunil Kondkar 2009-12-10 07:02:32 EST
This bug is also reproducible in sudoers and cron plugin.
Comment 3 Sunil Kondkar 2009-12-24 04:48:42 EST
In cron plugin, it is observed that if user inputs any junk data in 'Name' and 'Value' fields for environment settings, the crontab creation shows failure status.

Steps to reproduce:
1. Login to Imanage UI.
2. Navigate to the 'Inventory' tab of cron resource.
3. Click on OK button to create new cron tab.
4. Enter the resource name as /etc/cron.d/bld101_6 and click on the button 'Add New' for environment settings.
5. Add junk values as in 'Name' field add input 'asdasdasd'.
6. In 'Value' field, add value as 'sadasdasdas'.
7. Click on OK button.
8. Click on Submit button.

It displays below error when clicked on 'Failure' link in 'History' subtab.

java.lang.RuntimeException:File "/etc/cron.d/bld101_6/error/path":
File "/etc/cron.d/bld101_6/error/lens":
File "/etc/cron.d/bld101_6/error/message":
Short iteration
 -> net.augeas.AugeasException:save failed
Comment 4 wes hayutin 2010-02-16 11:56:34 EST
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

new = Tracking + FutureFeature + SubBug
Comment 5 wes hayutin 2010-02-16 12:01:44 EST
making sure we're not missing any bugs in rhq_triage
Comment 6 Corey Welton 2010-10-06 23:03:45 EDT
reducing priority/severity - not an enterprise plugin.