Bug 733149 - Daemon GIDs default to UIDs, not primary GIDs
Summary: Daemon GIDs default to UIDs, not primary GIDs
Keywords:
Status: CLOSED DUPLICATE of bug 723892
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-24 21:57 UTC by Garrett Holmstrom
Modified: 2011-08-25 00:03 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-25 00:03:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Garrett Holmstrom 2011-08-24 21:57:46 UTC
Description of problem:
Services that supply User= directives but not Group= directives in their service files end up with processes that have GIDs equal to their UIDs instead of the given users' primary GIDs as systemd.exec(5) suggests.  For example, if a service file refers to a user with UID 1 and GID 2 and it does not explicitly specify a group, the resulting process will have GID 1.


Version-Release number of selected component (if applicable):
systemd-26-8.fc15.x86_64


How reproducible:
Always


Steps to Reproduce:
1. groupadd -g 255 testgroup
2. useradd -g 255 -u 256 testuser
3. echo -e '#!/bin/sh\nlogger `id`' > /usr/bin/log_id.sh
4. cat > /etc/systemd/system/bugtest.service << EOF
[Unit]
Description=Bug test

[Service]
Type=oneshot
User=testuser
ExecStart=/usr/bin/log_id.sh
EOF
5. systemctl start bugtest.service
6. grep testuser /var/log/messages


Actual results:
logger: uid=256(testuser) gid=256 groups=255(testgroup),256


Expected results:
logger: uid=256(testuser) gid=255(testgroup) groups=255(testgroup)

Comment 1 Lennart Poettering 2011-08-25 00:03:14 UTC

*** This bug has been marked as a duplicate of bug 723892 ***


Note You need to log in before you can comment on or make changes to this bug.