[FS#1346] Procd does not respect a user's groups when using parameter user -- second try

LEDE Bugs lede-bugs at lists.infradead.org
Sat Feb 10 14:13:13 PST 2018


A new Flyspray task has been opened.  Details are below. 

User who did this - Alexander Lochmann (flipreverse) 

Attached to Project - OpenWrt/LEDE Project
Summary - Procd does not respect a user's groups when using parameter user  -- second try
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details -  Hi folks!

I’m referring to git revision 4b3ffecf2b.
Using this, procd does *not* respect a user’s groups (/etc/group) when starting a service.
In my case, I want a particular service running as a particular user (procd_set_param user foo). The user is a member of several groups, and they are needed when running that service.
Suppose user foo is in primary group bar, and in groups exampleA and exampleB.
The service runs as user foo, and as *primary* group bar. However, the service does not have the gids of exampleA and exampleB set as described in /etc/group. I verified it by using a wrapper script which wrote the output of ‘id’ to a file.

Steps to reproduce:
1. Create a user foo having primary group bar, and is a member of group exampleA and exampleB..
2. Write a short bash script which write the output of ‘id’ to a file.
3. Create a service that starts the aforementioned script.
4. Have a look at the output. It should say something like this: uid=XXX(foo) gid=xxx(foo).

I expect it to be: uid=XXX(foo) gid=XXX(bar) groups=XXX(exampleA) groups=XXX(exampleb).

Cheers,
Alex 

P.S.: I've already posted that isse as #988 (https://bugs.openwrt.org/index.php?do=details&task_id=988). It was closed due to my very late response.

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=1346



More information about the lede-bugs mailing list