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

exim: unconditionally build with dsearch lookups enabled #102217

Merged
merged 1 commit into from Nov 1, 2020

Conversation

pkern
Copy link
Contributor

@pkern pkern commented Oct 31, 2020

Motivation for this change

dsearch is required to do untainted lookups in directories. There's no reason not to build it in and it's a standard feature in other distributions. While it's been there forever the security changes around tainted inputs make its availability crucial.

Before:

$ nix-env -iA nixpkgs.exim
installing 'exim-4.94'
$ exim -C /dev/null -be '${lookup {passwd} dsearch {/etc}}' 
Failed: unknown lookup type "dsearch"

After:

/nix/store/wkyzw58lwlm7n72f93fph8fal39kiw6a-exim-4.94$ bin/exim -C /dev/null -be '${lookup {passwd} dsearch {/etc}}' 
passwd
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)

  • Built on platform(s)

    • NixOS

    NOTE: Tested using a local override instead of the real deal:

    exim = pkgs.exim.overrideDerivation (oldAttrs: {
      preBuild = ''
        ${oldAttrs.preBuild}
        echo "LOOKUP_DSEARCH=yes" >> Local/Makefile
      '';
    });
    
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)

  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"

  • Tested execution of all binary files (usually in ./result/bin/)

  • Determined the impact on package closure size (by running nix path-info -S before and after)

  • Ensured that relevant documentation is up to date

  • Fits CONTRIBUTING.md.

dsearch is required to do untainted lookups in directories. There's
no reason not to build it in and it's a standard feature in other
distributions.
@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 102217 run on x86_64-linux 1

1 package built:
  • exim

Copy link
Member

@dasJ dasJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL I'm maintaining this package

@ajs124
Copy link
Member

ajs124 commented Nov 1, 2020

There's no reason not to build it in and it's a standard feature in other distributions

I guess the only reason not to built it is that you're not using this feature, which e.g. @dasJ and I aren't.

@pkern Is there any kind of useful "standard exim featureset" defined anywhere? I know distributions like debian or suse ship very complex exim configs, which I'm sure require all kinds of features, but I don't think that is something we want to start doing.

@pkern
Copy link
Contributor Author

pkern commented Nov 1, 2020

dsearch is one of the mechanisms that is a completely standalone C implementation shipped by exim and doesn't include any external libraries. Plus the whole tainting changes make it crucial to have IMO (I use it to find the appropriate DKIM key on disk - which broke when coming from Ubuntu because of the newer security changes).

It's unfortunate that exim coped out on the whole question of standard feature set. I'd caution against equating "very complex exim configs" - which NixOS currently sidesteps completely with its "bring your own config" setup - with build time feature config. Debian does ship two flavors (light and heavy) and even has some support in the source package to do custom builds.

The light build includes cdb, dsearch, passwd, and oddly enough NIS. All of these are implemented using just glibc and don't pull in extra dependencies. Heavy is simply everything and I think NixOS' current setup of allowing to pull in specific backends makes way more sense here.

The current approach of letting users introduce conditionals beyond what's implementable without additional dependencies seems fine to me. I don't think dsearch should be subjected to that, precisely because it's completely self-contained.

@ajs124 ajs124 merged commit 58d1f49 into NixOS:master Nov 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 this pull request may close these issues.

None yet

4 participants