Bug 31440

Summary: sudo pkg info (Summary, Description) says it is to run commands as root, whereas other eligible other users can be specified
Product: Mageia Reporter: Paul Blackburn <paul.blackburn>
Component: RPM PackagesAssignee: All Packagers <pkg-bugs>
Status: NEW --- QA Contact:
Severity: minor    
Priority: Low CC: davidwhodgins, luigiwalser
Version: CauldronKeywords: UPSTREAM
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: sudo-1.9.5p2-2.1.mga8.src.rpm CVE:
Status comment:

Description Paul Blackburn 2023-01-20 18:09:29 CET
Description of problem:
The description provided when "urpmi -i sudo" is misleading because it states that "run some (or all) commands as root".

While the man page for sudo clearly states:
"sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy."

So, it is misleading because it implies it is only to access root privilege but it actually enables "superuser or _another_user_" privilege

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


How reproducible: Happens every time


Steps to Reproduce:
1. Run: urpmq -i sudo

2. Observe text of descrption where it states:
"Description :
Sudo (superuser do) allows a system administrator to give certain users (or
groups of users) the ability to run some (or all) commands as root".

3. Contrast this with the sudo man page which states:
"sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy."

So: "as root" != "as the superuser or another user"
Comment 1 sturmvogel 2023-01-20 18:21:55 CET
Our package description is a 1:1 copy of the description provided by the sudo developer.

From https://www.sudo.ws/about/intro/
"Sudo (su “do”) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments."

Our package description:
"Sudo (superuser do) allows a system administrator to give certain users (or
groups of users) the ability to run some (or all) commands as root while
logging all commands and arguments.

So?
Comment 2 sturmvogel 2023-01-20 18:24:39 CET
So you need to file an upstream bug that sudos manpage doesn't match with the general description from the dev.

https://bugzilla.sudo.ws/index.cgi
Comment 3 Paul Blackburn 2023-01-20 19:36:46 CET
Hello Frank,

No, that is incorrect. I suggest you read the man page.

sudo may be used to access "another user" (or a specific group) privilege.

It is *not* restricted to granting access only as superuser (root).



The problem here is that the description "urpmq -i sudo" is suggesting it is for accessing just superuser (root).

Most people would probably think that sudo is all about getting superuser (root) but there is more to it than that.
Comment 4 sturmvogel 2023-01-20 20:07:58 CET
Please read again the link which i provided. This is an upstream (minor) issue as the sudo developers provide two different descriptions of their package. So you should file an upstream bug. Mageia has chosen the first description as many other linux distributions too (OpenMandriva, Fedora, AlmaLinux, Amazon Linux, CentOS, PCLinuxOS, Rocky Linux, Solus, ...). So you are barking at the wrong tree (Mageia)...

Here again two links for the same package (sudo) from the same homepage and developer:

https://www.sudo.ws/about/intro/
"Sudo (su “do”) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments. Sudo operates on a per-command basis, it is not a replacement for the shell."

https://www.sudo.ws/docs/man/sudo.man/
"sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. The invoking user's real (not effective) user-ID is used to determine the user name with which to query the security policy.
Comment 5 Lewis Smith 2023-01-20 20:19:59 CET
Gentlemen, please.
Paul is actually right: the sudo man page makes it clear (but you do have to read a lot of it) that you can invoke cammsnd as any specified - & allowed - user; but the defa
Comment 6 Lewis Smith 2023-01-20 20:36:41 CET
default is root. -u for a different user.

The complaint is just about the wording in the package Summary & Description which does not make that clear. My Cauldron system is at this moment not giving full urpmq information, just:
"Summary     : Allows command execution as root for specified users"
which theme is continued in the reported Description comment 0.
I suppose it should be corrected. The bug is marked 'minor'.

It would have been handy to bundle this small point with bug 31439.
Assigning globally as sudo has no one maintainer.

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=31439
Assignee: bugsquad => pkg-bugs
Summary: "urpmq -i sudo" gives misleading statement about sudo: "run some (or all) commands as root" => sudo pkg info (Summary, Description) says it is to run commands as root, whereas other eligible other users can be specified
Version: 8 => Cauldron
Whiteboard: (none) => MGA8TOO

Comment 7 Dave Hodgins 2023-01-21 01:11:26 CET
Root privileges are required to run programs as another user or group,
so being able to run programs as another user is just an example of
the things that can be done with root privileges.

Lowering the priority.

Priority: Normal => Low
CC: (none) => davidwhodgins

Comment 8 Paul Blackburn 2023-01-21 02:38:07 CET
Hello Dave,
The issue here is not about whether root privileges are required.

This is an issue of misleading documentation (from "urpmq -i sudo") vis-a-vis the man page for sudo.

Specifically that "urpmq -i sudo" states:

"run some (or all) commands as root".
                            =======

NB: nothing in this suggests that sudo can be used to run a command as a non-root user or a particular group. It seems to suggest it is just for running commands as root.


While, man sudo states:

"sudo allows a permitted user to execute a command as the _superuser_or_another_user, as specified by the security policy."               

The man sudo description goes on to show in the Examples section both for specific user and group privilege:

exhibit-a: (non-root user)

"
     To edit the index.html file as user www:

           $ sudoedit -u www ~www/htdocs/index.html
"

exhibit-b: (group)

"
     To view system logs only accessible to root and users in the adm group:

           $ sudo -g adm more /var/log/syslog
"


So, in summary, the description from "urpmq -i sudo" only mentions root
but in reality sudo can do more.

This is a documentation error of ommission. One would not expect a fully detailed explanation in the output from "urpmq -i sudo" but equally one might expect a little bit more than "run some (or all) commands as root".
Comment 9 Jani Välimaa 2023-01-21 15:13:08 CET
Would it be possible to get a proposal for the fix?

I would also suggest reporting this to upstream. Pkg maintainers should not need to check (read: are not checking) if the upstream pkg summary or description is in match what the man pages are saying or vice versa.
Comment 10 Paul Blackburn 2023-01-21 16:43:39 CET
Hello Jani,
Thanks. I drafted 3 alternatives for consideration/modification.

link: https://pastebin.com/EdYLps5y

HTH
Comment 11 Dave Hodgins 2023-01-21 21:27:32 CET
I'm not in favor of fixing this cosmetic issue until the change is accepted
upstream.
Comment 12 Paul Blackburn 2023-01-22 00:13:49 CET
what is the procedure for notiying upstream?
Comment 13 Paul Blackburn 2023-01-22 00:14:32 CET
s/notiying/notifying/
Comment 14 Dave Hodgins 2023-01-22 05:20:34 CET
Register at https://bugzilla.sudo.ws/index.cgi and file a bug report there.

Keywords: (none) => UPSTREAM

Comment 15 Paul Blackburn 2023-01-22 13:34:29 CET
filed bug report upstream
https://bugzilla.sudo.ws/show_bug.cgi?id=1044
Comment 16 sturmvogel 2023-01-22 14:57:47 CET
Thanks for reporting this upstream. 

It would have been wise to point out that the informations given by the developer, differs between their "about" and "man" page.

Your report looks now like that "urpmq -i sudo" yields a wrong result, which is not the case, as we use the actual package description which is provided by the developer on their "about" page.
Comment 17 Paul Blackburn 2023-01-22 16:44:32 CET
received email notification from upstream: issue resolved
Comment 18 David Walser 2023-01-23 22:31:37 CET
What's the change that needs to be made to the package then (note: will only be done for Cauldron).

CC: (none) => luigiwalser
See Also: https://bugs.mageia.org/show_bug.cgi?id=31439 => (none)
Whiteboard: MGA8TOO => (none)

Comment 19 Paul Blackburn 2023-01-24 00:53:54 CET
Hello David,

Upstream have updated: https://www.sudo.ws/about/intro/

Previously, it read:

"Sudo (su “do”) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments."

After they resolved https://bugzilla.sudo.ws/show_bug.cgi?id=1044 it now reads:

"Sudo (su “do”) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as the superuser or another user, while logging all commands and arguments."


To be pedantic: where they have "superuser or another user" it should more accurately read ""superuser or another user or member of specific group".

Also, for reference, comment 10 has alternate wording for consideration.
( from comment 10: link to: https://pastebin.com/EdYLps5y )