Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use alias wrapper only if it is really needed #946

Closed
racke opened this issue May 25, 2020 · 4 comments · Fixed by #1015
Closed

Use alias wrapper only if it is really needed #946

racke opened this issue May 25, 2020 · 4 comments · Fixed by #1015

Comments

@racke
Copy link
Contributor

racke commented May 25, 2020

This is a follow up to #943. It is established security practice to only elevate privileges if really needed. Currently we always call the wrapper instead of the newaliases program, which is a bad idea.

Especially as the wrapper is usually not needed. With postfix you are usually running postmap. Exim can use plain text files, so it doesn't need any newaliases program.

So we could call the program directly (at least in the default configuration).

Does that make sense?

@racke
Copy link
Contributor Author

racke commented May 25, 2020

I also think the following condition in Sympa::Aliases::Template is not a good design pattern for a two step process (update alias file, newaliases program).


    return 0
        if lc Conf::get_robot_conf($list->{'domain'}, 'sendmail_aliases') eq
        'none';

My suggestion would be to have one configuration parameter for each task.

@ikedas
Copy link
Member

ikedas commented Oct 8, 2020

See also #1009

@racke
Copy link
Contributor Author

racke commented Oct 10, 2020

I suggest we should cataloguing in which cases we really need to use the wrapper. For most cases we can probably recommend to use configure flags --disable-setuid_fcgi and --disable-setuid_queue.

@racke
Copy link
Contributor Author

racke commented Oct 12, 2020

Also now with the environment cleaned out in the alias wrapper we have the detrimental effect that SYMPALIB is not passed on. Thus sympa_newaliases.pl fails in a cpanm/locallib setup as the script doesn't find the needed Perl modules.

But we don't need the wrapper for Postfix or Exim if the permissions are set up correctly.

racke added a commit to racke/sympa that referenced this issue Oct 12, 2020
This allows you to invoke the command from "sendmail_aliases" without using the wrapper (sympa-community#946).
racke added a commit to racke/sympa that referenced this issue Oct 12, 2020
This allows you to invoke the command from "sendmail_aliases" without using the wrapper (sympa-community#946).
@ikedas ikedas added this to the 6.2.60 milestone Nov 17, 2020
ikedas added a commit that referenced this issue Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants