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 Resources' 4. Click on 'INVENTORY' and select the option 'OVERVIEW' 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:
Created attachment 369182 [details] screenshot for exception
This bug is also reproducible in sudoers and cron plugin.
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": /files/etc/cron.d/bld101_6(root) File "/etc/cron.d/bld101_6/error/lens": /usr/share/augeas/lenses/dist/cron.aug:134.10-.49 File "/etc/cron.d/bld101_6/error/message": Short iteration -> net.augeas.AugeasException:save failed
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs. keyword: new = Tracking + FutureFeature + SubBug
making sure we're not missing any bugs in rhq_triage
reducing priority/severity - not an enterprise plugin.