<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>82</bug_id>
          
          <creation_ts>2010-02-23 17:28:03 +0000</creation_ts>
          <short_desc>Dismissing the dialog asking for sudo password breaks interaction</short_desc>
          <delta_ts>2010-12-28 23:25:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Anjuta Plugin</product>
          <component>anjuta-plugin</component>
          <version>0.9</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>0.9 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joshua Lock - Disabled">josh</reporter>
          <assigned_to name="Scott Garman">scott.a.garman</assigned_to>
          <cc>josh</cc>
    
    <cc>liping.ke</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>yongkang.you</cc>
    
    <cc>yp.ap.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          <cf_verified>Program Management</cf_verified>
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>8034</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2010-02-23 17:28:03 +0000</bug_when>
    <thetext>If a user dismisses the dialog box requesting the sudo password (triggered by Start QEMU menu entry) QEMU is not started but the UI is put in the ready state (Deploy, Shutdown QEMU, etc menus active).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8452</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2010-04-16 15:17:40 +0000</bug_when>
    <thetext>To clarify, if the dialog box is dismissed (or the sudo password fails) we need the UI to be in a usable state.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8671</commentid>
    <comment_count>2</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2010-05-19 02:47:30 +0000</bug_when>
    <thetext>Hi, Jessica and Josh

This problem is much more complex than I originally thought.
After dig into poky sdk plugin, anjuta IDE as well as gnome related code, I think this might not be the problem of poky SDK plugin, but rather anjuta IDE limitation.

1)  In SDK, it register a callback g_signal_connect (priv-&gt;launcher, &quot;child-exited&quot;, (GCallback)launcher_child_exited_cb, btq); When sudo qemu process exists, the menu will be  enable again. It’s good.
2)  When anjuta_launcher_execute_v to start qemu, two parent/son process is created: parent process run as lke /bin/bash, it will start son process as root sudo qemu. Then anjuta IDE will scan tty output. When output saw terminal tty output “password”, then password dialog appears. If we input password correctly, qemu launchers. Everything is fine. When qemu exited, the callback auncher_child_exited_cb will re-enable “start qemu” menu correctly. But if we click cancel, accident happens. In Anjuta plugin, it will do _reset ops. It did kill the parent process running as lke (bash), but the son process (sudo qemu) still there. Then the callback will never be called launcher_child_exited_cb, it listens the termination of root sudo qemu process. So “start qemu” button will never be re-enabled again. That’s the problem.

3) Actually Anjuta IDE is running as lke, it’s also not reasonable to make it kill this root sudo process unless you know the password (not cancelling), so this is the problem.
4) In fact I think this password dialog should not be yes/cancel model. Since when you do sudo in terminal, you have to input password and you never be able to “cancel”. After three times failure, the two process will all exist normally. Then  everything is fine. To emulate this terminal tty input, the password dialog should only have “input” model. If user did not input anything, let the dialog running. If user click close/cancel, it should be something like input empty “” just as tty terminal does. 

So I feel it’s actually not the bug of plugin, but rather Anjuta IDE. Your ideas?

Thanks&amp; Regards,
criping
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8678</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2010-05-19 11:53:43 +0000</bug_when>
    <thetext>I&apos;d suggest we file a bug with upstream explaining, in brief, our situation (with a link to this bug report) and open a discussion with them for a solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8686</commentid>
    <comment_count>4</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2010-05-20 03:29:10 +0000</bug_when>
    <thetext>work around for this:
If you really want to make this &quot;cancel&quot; work while anjuta IDE still has this limitation, please try:

adding a &quot;sudo&quot; line in poky-qemu bash script, make this script running as root before running qemu, so that passwork dialog cancel will only kill this process (qemu is not started).Everything will be fine.

As for Anjuta IDE limitation, I will fire a bug in anjuta bugzilla. The bug number will be written here after I successfully fire it.

For the bug itself, it will not be fixed. You can try the work around if needed.

Thanks&amp; Regards,
criping</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8687</commentid>
    <comment_count>5</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2010-05-20 03:41:13 +0000</bug_when>
    <thetext>For Anjuta IDE related bug status, please refer to https://bugzilla.gnome.org/show_bug.cgi?id=619156
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8691</commentid>
    <comment_count>6</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2010-05-20 11:30:05 +0000</bug_when>
    <thetext>I&apos;m changing this resolution to later, I absolutely think it&apos;s something we should fix.

If the upstream isn&apos;t amenable to a fix we should implement the workaround, let&apos;s keep this bug open to track the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8933</commentid>
    <comment_count>7</comment_count>
    <who name="Yongkang You">yongkang.you</who>
    <bug_when>2010-07-05 22:45:30 +0000</bug_when>
    <thetext>We won&apos;t use resolve/later for track this bug. So just reopen this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8977</commentid>
    <comment_count>8</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2010-07-13 22:43:43 +0000</bug_when>
    <thetext>upstream did not have response yet. we can work around it by simply add sudo in
poky-qemu last line like 

- . $INTERNALSCRIPT
+ sudo . $INTERNALSCRIPT

not knowing whether this could be done in M2...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8978</commentid>
    <comment_count>9</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2010-07-13 22:44:11 +0000</bug_when>
    <thetext>Just got latest feedback from Anjuta:

https://bugzilla.gnome.org/show_bug.cgi?id=619156
  anjuta | libanjuta | unspecified

--- Comment #5 from Johannes Schmid &lt;jhs@gnome.org&gt; 2010-06-29 08:50:16 UTC ---
Could you get around this problem somehow? I really don&apos;t see a way how to fix
that properly without giving the users annoying password dialogs when they
already cancelled things.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9008</commentid>
    <comment_count>10</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2010-07-16 06:45:20 +0000</bug_when>
    <thetext>I&apos;d like to get Richard&apos;s feedback on this change to the script. I don&apos;t think it would break anything but I&apos;m not certain.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9490</commentid>
    <comment_count>11</comment_count>
    <who name="liping Ke">liping.ke</who>
    <bug_when>2010-09-01 00:23:47 +0000</bug_when>
    <thetext>Now it&apos;s runqemu-unfs. I am not sure in which point to add &quot;sudo&quot;. But I think this is not a good fix from the point of security. Since anjuta is not our focus, I suggest marking this problem as &quot;wont&apos; fix&quot;.


Not sure whether it&apos;s acceptable.

Thanks&amp; Regards,
criping</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9993</commentid>
    <comment_count>12</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2010-09-28 17:06:00 +0000</bug_when>
    <thetext>On Scott&apos;s qemu clean up task list, he&apos;ll create a script to setup tap device pool for qemu instance to bind with.  Once that&apos;s in place, we shouldn&apos;t need sudo for running poky-qemu</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10212</commentid>
    <comment_count>13</comment_count>
    <who name="Scott Garman">scott.a.garman</who>
    <bug_when>2010-10-07 14:22:28 +0000</bug_when>
    <thetext>The tap device creation script is called poky-gen-tapdevs and is included as of commit 8532405c1d6b2184ca88922506b725110a1f7627. Also take note that poky-qemu has replaced runqemu as the Poky QEMU control script.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11100</commentid>
    <comment_count>14</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2010-12-13 03:35:31 +0000</bug_when>
    <thetext>Verify this bug is fixed</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>