184595 Commits

Author SHA1 Message Date
Jamey Sharp
f7c776760b nixos/nscd: only drop privs after nss module init
NixOS usually needs nscd just to have a single place where
LD_LIBRARY_PATH can be set to include all NSS modules, but nscd is also
useful if some of the NSS modules need to read files which are only
accessible by root.

For example, nixos/modules/config/ldap.nix needs this when
  users.ldap.enable = true;
  users.ldap.daemon.enable = false;
and users.ldap.bind.passwordFile exists. In that case, the module
creates an /etc/ldap.conf which is only readable by root, but which the
NSS module needs to read in order to find out what LDAP server to
connect to and with what credentials.

If nscd is started as root and configured with the server-user option in
nscd.conf, then it gives each NSS module the opportunity to initialize
itself before dropping privileges. The initialization happens in the
glibc-internal __nss_disable_nscd function, which pre-loads all the
configured NSS modules for passwd, group, hosts, and services (but not
netgroup for some reason?) and, for each loaded module, calls an init
function if one is defined. After that finishes, nscd's main() calls
nscd_init() which ends by calling finish_drop_privileges().

There are provisions in systemd for using DynamicUser with a service
which needs to drop privileges itself, so this patch does that.
2019-07-07 08:43:41 -07:00
Jamey Sharp
c38fa99757 nixos/nscd: don't need to specify username
Thanks to @arianvp for pointing out that when DynamicUser is true,
systemd defaults the value of User to be the name of the unit, which in
this case is already "nscd".
2019-07-06 09:24:49 -07:00
Jamey Sharp
4c64375e91 nixos/nscd: delete redundant nscd.conf options
These options were being set to the same value as the defaults that are
hardcoded in nscd. Delete them so it's clear which settings are actually
important for NixOS.

One exception is `threads 1`, which is different from the built-in
default of 4. However, both values are equivalent because nscd forces
the number of threads to be at least as many as the number of kinds of
databases it supports, which is 5.
2019-07-03 15:34:44 -07:00
Jamey Sharp
de251704d6 nixos/nscd: run with a dynamic user
nscd doesn't create any files outside of /run/nscd unless the nscd.conf
"persistent" option is used, which we don't do by default. Therefore it
doesn't matter what UID/GID we run this service as, so long as it isn't
shared with any other running processes.

/run/nscd does need to be owned by the same UID that the service is
running as, but systemd takes care of that for us thanks to the
RuntimeDirectory directive.

If someone wants to turn on the "persistent" option, they need to
manually configure users.users.nscd and systemd.tmpfiles.rules so that
/var/db/nscd is owned by the same user that nscd runs as.

In an all-defaults boot.isContainer configuration of NixOS, this removes
the only user which did not have a pre-assigned UID.
2019-07-03 13:27:29 -07:00
Jamey Sharp
597563d248 nixos/nscd: let systemd manage directories
Previously this module created both /var/db/nscd and /run/nscd using
shell commands in a preStart script. Note that both of these paths are
hard-coded in the nscd source. (Well, the latter is actually
/var/run/nscd but /var/run is a symlink to /run so it works out the
same.)

/var/db/nscd is only used if the nscd.conf "persistent" option is turned
on for one or more databases, which it is not in our default config
file. I'm not even sure persistent mode can work under systemd, since
`nscd --shutdown` is not synchronous so systemd will always
unceremoniously kill nscd without reliably giving it time to mark the
databases as unused. Nonetheless, if someone wants to use that option,
they can ensure the directory exists using systemd.tmpfiles.rules.

systemd can create /run/nscd for us with the RuntimeDirectory directive,
with the added benefit of causing systemd to delete the directory on
service stop or restart. The default value of RuntimeDirectoryMode is
755, the same as the mode which this module was using before.

I don't think the `rm -f /run/nscd/nscd.pid` was necessary after NixOS
switched to systemd and used its PIDFile directive, because systemd
deletes the specified file after the service stops, and because the file
can't persist across reboots since /run is a tmpfs. Even if the file
still exists when nscd starts, it's only a problem if the pid it
contains has been reused by another process, which is unlikely. Anyway,
this change makes that deletion even less necessary, because now systemd
deletes the entire /run/nscd directory when the service stops.
2019-07-03 12:39:48 -07:00
Jamey Sharp
93f185df65 nixos/nscd: no longer need to wait for readiness
This postStart step was introduced on 2014-04-24 with the comment that
"Nscd forks into the background before it's ready to accept
connections."

However, that was fixed upstream almost two months earlier, on
2014-03-03, with the comment that "This, along with setting the nscd
service type to forking in its systemd configuration file, allows
systemd to be certain that the nscd service is ready and is accepting
connections."

The fix was released several months later in glibc 2.20, which was
merged in NixOS sometime before 15.09, so it certainly should be safe to
remove this workaround by now.
2019-07-03 12:26:47 -07:00
Matthias Beyer
48afae7da7 way-cooler: Mark as broken (#64138)
The project is in full-rewrite state, which also breaks backwards
compatibility.
Right now, the project README warns that way-cooler is not usable in its
current state.

Thus mark this as broken, so die-hard users can still use it.

This patch should be reverted as soon as there is a new release.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-07-03 18:51:02 +02:00
Alyssa Ross
4cab72953c
gnupg: vendor SKS patch
This quickly became a 404 upstream.

Fixes https://github.com/NixOS/nixpkgs/64256.
2019-07-03 16:39:28 +00:00
Matthew Bauer
d505283766
Merge pull request #64233 from solson/wla-dx-9.8
wla-dx: git-2017-06-05 -> 9.8
2019-07-03 11:58:22 -04:00
Nahum Shalman
7bd65a15f0 jsonnet: ship new jsonnetfmt binary 2019-07-03 15:17:46 +00:00
Mario Rodas
a1a45ba334
Merge pull request #64094 from xrelkd/update/parity
parity: 2.4.8 -> 2.4.9, parity-beta: 2.5.3 -> 2.5.4
2019-07-03 10:16:11 -05:00
Edmund Wu
4a79bedfd2 nvidia_x11.settings.libXNVCtrl: set OUTPUTDIR for build 2019-07-03 17:20:05 +03:00
Mario Rodas
184f1044f1
Merge pull request #63846 from xrelkd/update/cargo-make
cargo-make: 0.20.0 -> 0.21.0
2019-07-03 08:10:18 -05:00
Mario Rodas
56a0c7dc48
Merge pull request #64229 from r-ryantm/auto-update/worker
worker: 3.15.4 -> 4.0.0
2019-07-03 08:04:20 -05:00
Tim Steinbach
d86f42adcc
linux: 5.1.15 -> 5.1.16 2019-07-03 08:58:01 -04:00
Tim Steinbach
bf9a276824
linux: 4.19.56 -> 4.19.57 2019-07-03 08:57:07 -04:00
Tim Steinbach
b9fee38699
linux: 4.14.131 -> 4.14.132 2019-07-03 08:56:35 -04:00
Ryan Mulligan
67d7c5967d
Merge pull request #64106 from r-ryantm/auto-update/pcm
pcm: 201710 -> 201902
2019-07-03 05:55:29 -07:00
Mario Rodas
b519801a08
Merge pull request #64244 from marsam/fix-pytest-mock
pythonPackages.pytest-mock: fix build
2019-07-03 07:53:49 -05:00
Mario Rodas
b152f53fb6
Merge pull request #63989 from lilyball/cocoapods
cocoapods: 1.7.2 -> 1.7.3
2019-07-03 07:51:19 -05:00
Ryan Mulligan
83143ac4c2
Merge pull request #64084 from r-ryantm/auto-update/mkvtoolnix
mkvtoolnix: 34.0.0 -> 35.0.0
2019-07-03 05:48:39 -07:00
Mario Rodas
6d3f8470b1
Merge pull request #64010 from r-ryantm/auto-update/docker-compose
docker-compose: 1.24.0 -> 1.24.1
2019-07-03 07:47:50 -05:00
Mario Rodas
f88385db2d
Merge pull request #64130 from r-ryantm/auto-update/python3.7-dropbox
python37Packages.dropbox: 9.3.0 -> 9.4.0
2019-07-03 07:31:50 -05:00
Mario Rodas
5923cdd539
pythonPackages.pytest-mock: fix build 2019-07-03 07:26:56 -05:00
Peter Romfeld
05c9a3c798 beamPackages.hex: 0.17.1 -> 0.19.0 2019-07-03 07:24:38 -04:00
Michael Weiss
1834b4feed
jekyll: 3.8.5 -> 3.8.6 (security)
There was a minor security issue (no CVE) [0]:
> Security Fixes
> - Theme gems: ensure directories aren't symlinks (#7424)

More details: https://github.com/jekyll/jekyll/pull/7419

[0]: https://github.com/jekyll/jekyll/releases
2019-07-03 13:04:32 +02:00
Aaron Andersen
8d7dc105b1
Merge pull request #63931 from aanderse/phpfpm
phpfpm: revert #63156
2019-07-03 07:04:17 -04:00
Aaron Andersen
04c57357b2
Merge pull request #63656 from killercup/dua-2.1.3
dua: init at 2.1.5
2019-07-03 07:03:12 -04:00
Franz Pletz
6160a4ad69
Merge pull request #64239 from garbas/remove-me-since-i-dont-have-much-time
Remove me (garbas) as maintainer from packages
2019-07-03 10:44:08 +00:00
Aaron Andersen
9f2518da59
Merge pull request #64199 from thorstenweber83/fix-mysql-test
nixos/mysql: fix mysql test after #63862
2019-07-03 06:27:40 -04:00
Aaron Andersen
ec80ffc621
Merge pull request #62061 from aanderse/nagios
nixos/nagios: module updates
2019-07-03 06:19:35 -04:00
Pascal Hertleif
b8b0dac23c dua: init at 2.1.5
> A tool to conveniently learn about the disk usage of directories, fast!
2019-07-03 11:52:17 +02:00
talyz
732af03ace networkmanager: Documentation cleanup.
- Refer to external documentation for dns option
- Clean up macAddress option
- Improve references
2019-07-03 09:40:05 +00:00
talyz
80acb28bee networkmanager: Add rc-manager option
Add an option to set the rc-manager parameter in NetworkManager.conf,
which controls how NetworkManager handles resolv.conf. This sets the
default rc-manager to "resolvconf", which solves #61490. It
additionally allows the user to change rc-manager without interference
from configuration activations.
2019-07-03 09:40:05 +00:00
Rok Garbas
65781e204d
Remove me (garbas) as maintainer since I don't have much time to maintain anything 2019-07-03 11:27:39 +02:00
Pascal Wittmann
2850832e67
Merge pull request #64105 from r-ryantm/auto-update/parallel
parallel: 20190522 -> 20190622
2019-07-03 11:10:00 +02:00
Pascal Hertleif
8e9851ff5c maintainers: add killercup 2019-07-03 10:50:07 +02:00
R. RyanTM
01e07b1996 slurp: 1.1.0 -> 1.2.0
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/slurp/versions
2019-07-03 09:32:33 +02:00
R. RyanTM
bc6fae8842 sqlcipher: 4.1.0 -> 4.2.0
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/sqlcipher/versions
2019-07-03 09:32:21 +02:00
R. RyanTM
d546e77e54 sshguard: 2.3.1 -> 2.4.0
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/sshguard/versions
2019-07-03 09:32:08 +02:00
R. RyanTM
32987d9014 teamspeak_server: 3.7.1 -> 3.8.0
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/teamspeak-server/versions
2019-07-03 09:31:53 +02:00
R. RyanTM
7024fc36f8 teamviewer: 14.2.8352 -> 14.3.4730
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/teamviewer/versions
2019-07-03 09:31:42 +02:00
R. RyanTM
57a2724672 abcmidi: 2019.06.06 -> 2019.06.14
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/abcmidi/versions
2019-07-03 09:31:00 +02:00
R. RyanTM
e8ee15f56e gitAndTools.diff-so-fancy: 1.2.5 -> 1.2.6
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/diff-so-fancy/versions
2019-07-03 09:30:31 +02:00
R. RyanTM
45ae520de0 linuxPackages.evdi: 1.6.0 -> 1.6.1
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/evdi/versions
2019-07-03 09:29:54 +02:00
R. RyanTM
f50590912d fldigi: 4.1.03 -> 4.1.04
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/fldigi/versions
2019-07-03 09:28:42 +02:00
R. RyanTM
2239512aa2 link-grammar: 5.6.1 -> 5.6.2
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/link-grammar/versions
2019-07-03 09:28:13 +02:00
Jonathan Ringer
3c00c7239d devpi-server: 4.4.0 -> 4.9.0 2019-07-03 09:19:38 +02:00
Jonathan Ringer
5e85d08484 pythonPackages.strictyaml: init at 1.0.1 2019-07-03 09:19:38 +02:00
R. RyanTM
467ce7b534 di: 4.47 -> 4.47.1
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/di/versions
2019-07-03 09:14:17 +02:00