Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 69d0c1404c17
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 5a9eaf02ae3c
Choose a head ref
  • 5 commits
  • 6 files changed
  • 2 contributors

Commits on Mar 15, 2019

  1. postgresql: Move socket dir to /run/postgresql

    The default, which is /tmp, has a few issues associated with it:
    
    One being that it makes it easy for users on the system to spoof a
    PostgreSQL server if it's not running, causing applications to connect
    to their provided sockets instead of just failing to connect.
    
    Another one is that it makes sandboxing of PostgreSQL and other services
    unnecessarily difficult. This is already the case if only PrivateTmp is
    used in a systemd service, so in order for such a service to be able to
    connect to PostgreSQL, a bind mount needs to be done from /tmp to some
    other path, so the service can access it. This pretty much defeats the
    whole purpose of PrivateTmp.
    
    We regularily run into issues with this in the past already (one example
    would be #24317) and with the new
    systemd-confinement mode upcoming in
    #57519, it makes it even more
    tedious to sandbox services.
    
    I've tested this change against all the postgresql NixOS VM tests and
    they still succeed and I also grepped through the source tree to replace
    other occasions where we might have /tmp hardcoded. Luckily there were
    very few occasions.
    
    Signed-off-by: aszlig <aszlig@nix.build>
    Cc: @ocharles, @thoughtpolice, @danbst
    aszlig committed Mar 15, 2019
    Copy the full SHA
    ef55378 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2019

  1. nixos/manual: Document PostgreSQL socket change

    This is a backwards-incompatible change and while it won't probably
    affect a whole lot of users, it makes sense to give them a heads-up
    anyway.
    
    Signed-off-by: aszlig <aszlig@nix.build>
    aszlig committed Mar 16, 2019
    Copy the full SHA
    116bdc9 View commit details
    Browse the repository at this point in the history
  2. postgresql: Only use /run/postgresql on Linux

    We only have /run on modern GNU/Linux systems and it's not necessarily
    the case for Mac OS X or *BSD, so let's add the patch only if
    stdenv.isLinux.
    
    Thanks to @danbst for catching this.
    
    Signed-off-by: aszlig <aszlig@nix.build>
    aszlig committed Mar 16, 2019
    Copy the full SHA
    f510601 View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2019

  1. Copy the full SHA
    40cc269 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #57677 from aszlig/postgresql-socket-in-run

    postgresql: Move socket dir to /run/postgresql
    danbst committed Mar 24, 2019
    Copy the full SHA
    5a9eaf0 View commit details
    Browse the repository at this point in the history