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

nextcloud module: document process for using with pgsql unix auth #50115

Merged
merged 1 commit into from Nov 10, 2018

Conversation

Ekleog
Copy link
Member

@Ekleog Ekleog commented Nov 10, 2018

Motivation for this change

Had to fiddle around for a bit before finding the solution, so let's make it more discoverable :)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • 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 nox --run "nox-review wip"
  • 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)
  • Fits CONTRIBUTING.md.

@infinisil
Copy link
Member

From the docs:

Your host server name, for example localhost, hostname, hostname.example.com, or the IP address. To specify a port use hostname:####; to specify a Unix socket use localhost:/path/to/socket.

So is /tmp the same as localhost:/tmp? Maybe you could even add all of the above to the description.

@Ekleog
Copy link
Member Author

Ekleog commented Nov 10, 2018

The docs of version 14 (here) don't state localhost:/path/to/socket but just /path/to/socket :) Also, I had to lsof $(pidof -s postgresql) to figure out the /tmp, so it was on this point I was trying to insist.

As for the other possibilities, they're all standard across all host options of all services, aren't they?

@infinisil
Copy link
Member

I see. But how can postgresql have its socket on /tmp itself?

@Ekleog
Copy link
Member Author

Ekleog commented Nov 10, 2018

It's actually /tmp/.s.PGSQL.5432, and the .s.PGSQL.5432 is automatically added by Nextcloud. Actually, I wanted to try to investigate whether that's not a security issue, as distributions usually place it in /run/postgresql/.s.PGSQL.5432, but didn't find the time to do it yet.

@Ekleog
Copy link
Member Author

Ekleog commented Nov 10, 2018

(BTW, if setting it to /tmp/.s.PGSQL.5432, as I did initially, then it tried to open /tmp/.s.PGSQL.5432/.s.PGSQL.5432 and failed with it)

Do you think I could word this more clearly? I was thinking the minimal explanation of how to do it with postgresql would avoid cluttering the option documentation, but maybe it deserves a sentence to explain why /tmp?

@Mic92 Mic92 merged commit 4ec41a9 into NixOS:master Nov 10, 2018
@Mic92
Copy link
Member

Mic92 commented Nov 10, 2018

I think the docs are precise what the value should be.

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