Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 839066 - mail-filter/postfwd should remove uid / gid support
Summary: mail-filter/postfwd should remove uid / gid support
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Marc Schiffbauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-18 02:50 UTC by Benny Pedersen
Modified: 2022-11-10 01:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benny Pedersen 2022-04-18 02:50:17 UTC
as it should only run as postfwd user / postfwd group
Comment 1 genBTC 2022-04-18 03:29:12 UTC
This is the point they want to convey:

<Vierdo> so why is acct-group/postfwd / acct-user/postfwd in portage ? :(
<Vierdo> openrc should not start it as root
<Vierdo> postfwd should not be coded with need to start as root

They want to run it non-root, and they say this is happening:

Apr 18 00:38:37 tux postfwd3/master[4214]: postfwd3 2.03 starting [daemons: server]
Apr 18 00:38:37 tux postfwd3/master[4214]: Started server at pid 4307
Apr 18 00:38:37 tux postfwd3/policy[4307]: 2022/04/18-00:38:37 postfwd3::server (type Net::Server::Multiplex) starting! pid(4307)
Apr 18 00:38:37 tux postfwd3/policy[4307]: Binding to TCP port 10040 on host 127.0.0.1 with IPv4
Apr 18 00:38:37 tux postfwd3/policy[4307]: Setting gid to "65534 65534"
Apr 18 00:38:37 tux postfwd3/policy[4307]: FATAL: Couldn't become gid "65534": Operation not permitted?
Apr 18 00:38:37 tux postfwd3/policy[4307]: Couldn't become gid "65534": Operation not permitted
Apr 18 00:38:37 tux postfwd3/policy[4307]: ready for input


I cannot confirm or deny what is going wrong , but I am trying to bridge a language barrier from IRC to bugzilla to help understand this persons bug.
GL
Comment 2 Marc Schiffbauer gentoo-dev 2022-11-10 01:26:34 UTC
What is your problem?

The ebuild defaults to let postfwd run as postfwd user.

Ths only thing I can spot: The systemd service uses postfwd's "--user" and "--group" options on start the daemon whereas the OpenRC init script uses start-stop-daemons facility to change UID/GID and does not use postfwds options at all (so there is not need to change uid/gid).