<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Clarify the xdg-su man page"
href="https://bugs.freedesktop.org/show_bug.cgi?id=57921">57921</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>portland-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clarify the xdg-su man page
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Reporter</th>
<td>fgouget@codeweavers.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Component</th>
<td>xdg-utils
</td>
</tr>
<tr>
<th>Product</th>
<td>Portland
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=71040" name="attach_71040" title="Better check the -u and -c options and document -c">attachment 71040</a> <a href="attachment.cgi?id=71040&action=edit" title="Better check the -u and -c options and document -c">[details]</a></span>
Better check the -u and -c options and document -c
The xdg-su man page says:
<span class="quote">> xdg-su [-u user] -c command</span >
>
<span class="quote">> xdg-su provides a graphical dialog that prompts the user for a
> password to run command as user or as root if no user was specified.</span >
The '-c' option is not documented and this does not clearly say if one should
use 'xdg-su -c echo HelloWorld' or 'xdg-su -c "echo HelloWorld"'.
The example at the end of the page seems to imply the latter but then it's only
one example and one may think that a second example could show that the other
option is valid too.
<span class="quote">> xdg-su -u root -c "/opt/shinythings/bin/install-GUI --install fast"</span >
I'll further note that the situation is muddied by the fact that
xdg-su -c sh -c 'echo HelloWorld'
is equivalent to
xdg-su -c foo -c 'echo HelloWorld'
and to
xdg-su -c 'echo HelloWorld'
due to the limited parameter checking.
I'm attaching a patch as a starting point for a fix.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>