You are not logged in.

#1 2023-12-18 05:05:23

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 243

[SOLVED] opensmtpd group IDs collision

opensmtpd-7.4.0p1-1 installs files with hardcoded group IDs:

$ cat /usr/lib/sysusers.d/opensmtpd.conf 
u smtpd 91 "SMTP Daemon" -
u smtpq 92 "SMTP Queue"  -
$
$ bsdtar -tvf /var/cache/pacman/pkg/opensmtpd-7.4.0p1-1-x86_64.pkg.tar.zst | grep ' usr/bin/smtpctl'
-r-xr-sr-x  0 root   92     581400 лис 16 15:37 usr/bin/smtpctl

My system already has groups with ID 91 and 92:

$ grep :9[12]: /etc/group
video:x:91:
audio:x:92:

And smtpq group has another ID:

$ grep smtpq /etc/group
smtpq:x:969:

Therefore mail command fails:

$ echo "Test" | mail -s "test" dimich
sendmail: this program must be setgid smtpq
/home/dimich/dead.letter 8/133
mail: ... message not sent

I worked around sendmail issue temporarely by 'chgrp smtpq /usr/bin/smtpqctl', but it's not a solution.

How to resolve this collision properly and not to get the system into non-consistent state?

I'm going to remove 'video' and 'audio' groups and reinstall systemd allowing it to create these groups from /usr/lib/sysusers.d/basic.conf with some new IDs. Then reinstall opensmtpd. Is this correct way? Is it guaranteed new IDs will not collide with package hardcoded IDs in the future?
What if some another package install sysusers.d rule with hardcoded IDs which already exist?

Last edited by dimich (2023-12-29 15:42:33)

Offline

#2 2023-12-29 11:07:39

ua4000
Member
Registered: 2015-10-14
Posts: 421

Re: [SOLVED] opensmtpd group IDs collision

My suggestion is to open a bug report for opensmtpd package,
https://archlinux.org/packages/extra/x86_64/opensmtpd/ has a link to "Bug reports",

Offline

#3 2023-12-29 15:09:36

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 243

Re: [SOLVED] opensmtpd group IDs collision

ua4000 wrote:

My suggestion is to open a bug report for opensmtpd package

That was my first intention. But i'm not sure whether it's a bug or i encountered with transition issue which just requires manual intervention.
As i can see in /usr/lib/sysusers.d/, many packages install users and groups with pre-defined IDs. I suspect there is some Arch-specific guideline for explicit IDs allocation for official packages to avoid conflicts. But found nothing related on wiki yet.

Offline

#4 2023-12-29 15:38:00

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,969

Re: [SOLVED] opensmtpd group IDs collision

https://wiki.archlinux.org/title/Users_ … emd_groups
https://wiki.archlinux.org/title/Develo … D_Database

Audio 91 and Video 92 used to belong to the filesystem package but were moved to the systemd package and made dynamic years ago.

This doesn't look an opensmtpd package issue at all.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2023-12-29 15:59:35

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 243

Re: [SOLVED] opensmtpd group IDs collision

That's i was looking for. Thank you!

Lone_Wolf wrote:

Audio 91 and Video 92 used to belong to the filesystem package but were moved to the systemd package and made dynamic years ago.

My system is installed more than 10 years ago, then upgraded only. So video/audio groups remained from pre-systemd epoch.

Offline

Board footer

Powered by FluxBB