lix/src/libutil
jade e3b702fa22 Actually try making a userns before assuming they don't work
If unprivileged userns are *believed* to be disabled (such as with
"kernel.unprivileged_userns_clone = 0"), Lix would previously *give up*
on trying to use a user namespace before actually trying it, even if, in
cases such as unprivileged_userns_clone, it would actually be allowed
since Nix has CAP_SYS_ADMIN when running as daemon.

(see, e.g. 25d4709a4f)

We changed it to actually try it first, and then diagnose possible
causes, and also to be more loud about the whole thing, using warnings
instead of debugs. These warnings will only print on the first build run
by the daemon, which is, tbh, eh, shrug.

This is what led to us realizing that no-userns was a poorly exercised
condition.

Change-Id: I8e4f21afc89c574020dc7e89a560cc740ce6573a
2024-05-05 00:37:24 +00:00
..
args pragma once and ///@file everything missing it 2024-04-08 15:40:12 -07:00
abstract-setting-to-json.hh HOT SALE: 15% off your build times! 2024-03-27 03:52:57 +00:00
ansicolor.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
archive.cc libutil: make AutoCloseFD a better resource 2024-03-18 15:42:52 -06:00
archive.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
args.cc HOT SALE: 15% off your build times! 2024-03-27 03:52:57 +00:00
args.hh Merge pull request #8817 from iFreilicht/flake-update-lock-overhaul 2024-03-25 17:36:24 -06:00
box_ptr.hh Add box_ptr: nonnull unique_ptr with value semantics 2024-03-11 01:04:52 -07:00
callback.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
canon-path.cc Backport SourcePath from the lazy-trees branch 2023-04-06 13:15:50 +02:00
canon-path.hh Merge remote-tracking branch 'upstream/master' into source-path 2023-04-17 11:41:50 +02:00
cgroup.cc Delete hasPrefix and hasSuffix from the codebase 2024-03-17 20:17:19 -07:00
cgroup.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
chunked-vector.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
closure.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
comparator.hh Merge pull request #9582 from pennae/misc-opts 2024-03-04 07:32:31 +01:00
compression.cc util.hh: split out signals stuff 2024-03-11 00:52:09 -07:00
compression.hh Rename and protect BufferedSink::write 2023-04-07 09:21:50 +02:00
compute-levels.cc Add x86_64 compute levels as additional system types 2021-02-22 09:11:15 +01:00
compute-levels.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
config-impl.hh Merge pull request #9299 from tfc/config-improvements 2024-03-04 05:36:42 +01:00
config.cc Add PathsSetting 2024-04-07 18:22:15 -07:00
config.hh docs: redo content generation for mdbook and manual 2024-04-11 13:32:06 +00:00
english.cc Unify and refactor value printing 2024-03-09 03:50:06 +01:00
english.hh pragma once and ///@file everything missing it 2024-04-08 15:40:12 -07:00
error.cc libutil: remove exception handling workingness check 2024-03-19 06:09:42 -06:00
error.hh libutil: remove exception handling workingness check 2024-03-19 06:09:42 -06:00
escape-char.cc Move DebugChar into its own file 2024-03-28 15:54:12 -07:00
escape-char.hh pragma once and ///@file everything missing it 2024-04-08 15:40:12 -07:00
escape-string.cc Add EscapeStringOptions and escapeString tests 2024-04-03 16:25:54 +00:00
escape-string.hh pragma once and ///@file everything missing it 2024-04-08 15:40:12 -07:00
exit.cc :quit in the debugger should quit the whole program 2024-03-09 10:17:26 -07:00
exit.hh pragma once and ///@file everything missing it 2024-04-08 15:40:12 -07:00
experimental-features-json.hh HOT SALE: 15% off your build times! 2024-03-27 03:52:57 +00:00
experimental-features.cc HOT SALE: 15% off your build times! 2024-03-27 03:52:57 +00:00
experimental-features.hh HOT SALE: 15% off your build times! 2024-03-27 03:52:57 +00:00
filesystem.cc libstore/build: just copy the magic /etc files into the sandbox 2024-04-13 12:43:19 +03:00
finally.hh libutil: guard Finally against invalid exception throws 2024-04-05 20:13:02 +00:00
fmt.hh abort with a descriptive message on bad HintFmt usage 2024-04-15 23:09:16 +00:00
git.cc Fix the parsing of the sourcehut refs file 2022-05-04 14:38:59 +02:00
git.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
hash.cc Merge pull request #7732 from hercules-ci/make-initLibStore-viable-alternative 2023-04-17 08:04:41 -04:00
hash.hh Rename and protect BufferedSink::write 2023-04-07 09:21:50 +02:00
hilite.cc Fix incorrect comment in hiliteMatches 2022-06-05 20:30:18 +02:00
hilite.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
input-accessor.hh Merge pull request #9634 from 9999years/combine-abstract-pos-and-pos 2024-03-05 23:46:18 -07:00
json-impls.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
json-utils.cc Fix derivation load assertion errors 2023-08-05 01:34:30 +02:00
json-utils.hh fix: nlohmann::adl_serializer for std::optional (#9147) 2024-03-04 07:11:25 +01:00
local.mk Overhaul completions, redo #6693 (#8131) 2024-03-25 15:30:36 +00:00
logging-json.hh HOT SALE: 15% off your build times! 2024-03-27 03:52:57 +00:00
logging.cc Fix various clang-tidy lints 2024-03-29 20:26:38 -07:00
logging.hh Merge "Remove HintFmt::operator%" into main 2024-03-29 01:13:45 +00:00
lru-cache.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
meson.build implement parsing human-readable names from URLs 2024-04-30 18:11:14 -06:00
monitor-fd.hh util.hh: split out signals stuff 2024-03-11 00:52:09 -07:00
namespaces.cc Actually try making a userns before assuming they don't work 2024-05-05 00:37:24 +00:00
namespaces.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
pool.hh Revert "libutil: drop Pool resources on exceptional free" 2024-04-05 20:13:02 +00:00
position.cc match line endings used by parser and error reports 2024-03-18 16:12:46 +01:00
position.hh match line endings used by parser and error reports 2024-03-18 16:12:46 +01:00
print-elided.cc Move escapeString to its own file 2024-03-29 16:26:29 -07:00
print-elided.hh pragma once and ///@file everything missing it 2024-04-08 15:40:12 -07:00
ref.hh Merge pull request #9634 from 9999years/combine-abstract-pos-and-pos 2024-03-05 23:46:18 -07:00
references.cc Don't assume the type of string::size_type 2023-06-15 21:24:14 +02:00
references.hh Don't assume the type of string::size_type 2023-06-15 21:24:14 +02:00
regex-combinators.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
regex.cc gc: Find roots using libproc on Darwin 2024-04-25 23:24:21 -04:00
regex.hh gc: Find roots using libproc on Darwin 2024-04-25 23:24:21 -04:00
repair-flag.hh Merge pull request #9634 from 9999years/combine-abstract-pos-and-pos 2024-03-05 23:46:18 -07:00
serialise.cc Revert "libutil: drop Fs{Source,Sink}::good" 2024-04-05 20:13:02 +00:00
serialise.hh Revert "libutil: drop Fs{Source,Sink}::good" 2024-04-05 20:13:02 +00:00
shlex.cc Move shell_words into its own file 2024-03-26 16:44:04 -07:00
shlex.hh pragma once and ///@file everything missing it 2024-04-08 15:40:12 -07:00
signals.cc util.hh: split out signals stuff 2024-03-11 00:52:09 -07:00
signals.hh util.hh: split out signals stuff 2024-03-11 00:52:09 -07:00
source-path.cc Fix various clang-tidy lints 2024-03-29 20:26:38 -07:00
source-path.hh Add pre-commit checks 2024-03-29 22:57:40 -07:00
split.hh Delete hasPrefix and hasSuffix from the codebase 2024-03-17 20:17:19 -07:00
suggestions.cc Implement operator<< for Suggestions 2022-03-07 10:09:10 +01:00
suggestions.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
sync.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
tarfile.cc Merge pull request #9557 from bryanhonof/bryanhonof.fix-apple-double-shenanigans 2024-03-04 07:11:25 +01:00
tarfile.hh TarArchive: Remove a duplicate constant and increase the buffer size 2023-04-25 16:43:10 +02:00
thread-pool.cc Add pre-commit checks 2024-03-29 22:57:40 -07:00
thread-pool.hh Finish converting existing comments for internal API docs (#8146) 2023-04-07 13:55:28 +00:00
topo-sort.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
types.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
url-name.cc getNameFromURL(): Support uppercase characters in attribute names 2024-05-02 12:02:28 -06:00
url-name.hh implement parsing human-readable names from URLs 2024-04-30 18:11:14 -06:00
url-parts.hh implement parsing human-readable names from URLs 2024-04-30 18:11:14 -06:00
url.cc implement parsing human-readable names from URLs 2024-04-30 18:11:14 -06:00
url.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
util.cc libutil: make rewriteStrings sound 2024-05-03 00:50:31 +00:00
util.hh libutil: make rewriteStrings sound 2024-05-03 00:50:31 +00:00
variant-wrapper.hh Fixing #7479 2023-08-18 11:44:00 -04:00
xml-writer.cc xml-writer: Remove std aliases 2022-02-25 16:13:02 +01:00
xml-writer.hh Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00