1
0
mirror of https://github.com/projectatomic/bubblewrap.git synced 2026-02-05 15:45:22 +01:00

191 Commits

Author SHA1 Message Date
Joel Pelaez Jorge
80075f3510 Reset SIGCHLD action to SIG_DFL
Signed-off-by: Joel Pelaez Jorge <joel.pelaez.jorge@gmail.com>
2026-01-22 14:12:07 -05:00
J. Neuschäfer
e023f36f70 Fix grammar in error message
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
2025-07-31 21:08:05 +02:00
Ryan Hendrickson
f371022ad6 Add --overlay and related options
This commit adds --overlay, --tmp-overlay, --ro-overlay, and
--overlay-src options to enable bubblewrap to create overlay mounts.
These options are only permitted when bubblewrap is not installed
setuid.

Resolves: https://github.com/containers/bubblewrap/issues/412
Co-authored-by: William Manley <will@williammanley.net>
Signed-off-by: Ryan Hendrickson <ryan.hendrickson@alum.mit.edu>
[smcv: Fix merge conflicts with #660]
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-15 14:22:56 -04:00
Simon McVittie
47ff41eb90 Use stdbool.h for booleans
We don't need to reinvent these, especially in a confusing form
(bool type like stdbool.h, but TRUE and FALSE constants like GLib).
stdbool.h was available in the gcc 4.6 that is the default compiler in
Ubuntu 12.04, more than a decade ago, so it seems sufficiently
ubiquitous.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-08 13:35:20 +01:00
Simon McVittie
0c9646573f Handle EINTR when doing I/O on files or sockets
If a blocking operation is interrupted by a signal, including SIGCHLD,
various things can fail with EINTR. This is not a "real" error and can
result in spurious failures.

Resolves: https://github.com/containers/bubblewrap/issues/657
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-03 17:55:37 +01:00
Simon McVittie
654a25d408 utils: Move TEMP_FAILURE_RETRY reimplementation here
This will allow it to be used in more places.

Helps: https://github.com/containers/bubblewrap/issues/657
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-10-03 17:55:37 +01:00
Simon McVittie
89ae6b10a4 Add new --level-prefix option
This prepends a severity level such as <3> to each line of diagnostic
output, with numeric severity levels taken from matching syslog(3)
(such as LOG_ERR = 3), so that the diagnostic output can be parsed by
tools like `logger --prio-prefix` and `systemd-cat --level-prefix=1`
that support that encoding.

The facility (LOG_USER, etc.) is not included, since it makes little
sense to vary on a per-message basis. logger(1) supports prefixes
with or without a facility, and systemd-cat(1) only supports prefixes
without a facility, so this is compatible with both.

A future version of Steam's pressure-vessel is likely to use this to
make warnings and fatal errors from bubblewrap more visible.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-15 15:01:35 +01:00
Simon McVittie
9b9fa15a72 utils: Put nearly all diagnostic output through a common log function
This takes a syslog-style severity level, allowing a larger program
that runs bwrap and reads a pipe from its stderr to filter or highlight
messages  based on the severity.

Take the opportunity to make the __debug__ macro (which normally expands
to nothing, but can be enabled by changing a `#if 0` to `#if 1`) less
weird and easier to use, by taking it out of the reserved-for-the-compiler
namespace, adding a newline automatically, and not requiring nested
parentheses.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-15 15:01:00 +01:00
Alexander Larsson
a253257cd2 Add --bind-fd and --ro-bind-fd to let you bind a O_PATH fd.
This is useful for example if you for some reason don't have the real
path. It is also a way to make bind-mounts race-free (i.e. to have the
mount actually be the thing you wanted to be mounted, avoiding issues
where some other process replaces the target in parallel with the bwrap
launch.

Unfortunately due to some technical details we can't actually directly
mount the dirfd, as they come from different user namespace which is not
permitted, but at least we can delay resolving the fd to a path as much as
possible, and then validate after mount that we actually mounted the right
thing.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2024-07-16 18:14:03 +01:00
Alexander Larsson
83af951948 Fix SetupOpFlag value to be proper format
For some reason the second flags is "2<<0", but really flags should
be 1<<N, and in this case 1<<1. Both happen to be the same value, so its
not like this matter deeply, but lets fix it if we do later changes.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2024-06-18 10:06:03 +02:00
Christian Göttsche
9aa1b3636b Rework xcalloc
Pass the first parameter to calloc(3) to perform the overflow check.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2024-02-02 19:53:08 +01:00
Jakob Kaivo
4109d59251 Make --symlink idempotent
When creating symlinks specified with --symlink, check errno if
creation fails. If the reason was EEXIST, check the path of the
existing symlink. If it matches what was desired, continue as
normal.

Resolves: containers/bubblewrap#549
Signed-off-by: Jakob Kaivo <jkk@ung.org>
[Anders Blomdell: use readlink_malloc()]
[smcv: Squash multiple changes into one; coding style fixes]
Co-authored-by: Anders Blomdell
Co-authored-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-01-31 16:10:07 +00:00
Simon McVittie
68a0330ce4 utils: Add a specialized function to print errno for mount(2)
mount(2) uses ENOSPC to represent an arbitrary anti-denial-of-service
limit being exceeded, which is outside the usual meaning of
"No space left on device". We can make this clearer by catching that
particular failure mode and giving users a hint.

Reference: https://bugzilla.kernel.org/show_bug.cgi?id=218336
Resolves: https://github.com/ValveSoftware/steam-runtime/issues/637
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-01-03 15:31:51 +00:00
Simon McVittie
97468426be Merge pull request #600 from swick/wip/get-newroot-path
utils: Move get_newroot_path to utils
2023-10-01 13:01:38 +01:00
Jonathan Wright
4303430642 Add --argv0 option
Fixes containers/bubblewrap#91

Add the ability to overwrite argv[0] when starting a process in a
container. Using --argv0 to be consistent with ld.so --argv0.

Overwriting argv[0] is useful as some tools change their behavior based
on the value of argv[0]. For example, when bash is symlinked to sh it
behaves as sh. Similarly, unxz is a symlink to xz and changes the
default from compressing to decompressing. An extreme example is on many
systems, date, df, cat and so on are all symlinks to the coreutils
binary.

Example usage: bwrap --bind / / --argv0 sh bash

Signed-off-by: Jonathan Wright <quaggy@gmail.com>
2023-09-30 14:23:18 -07:00
Sebastian Wick
b367272d59 utils: Move get_newroot_path to utils
We already have `get_oldroot_path` in utils, so let's be consistent
about this.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-09-28 18:25:37 +02:00
Christian Göttsche
ab5eb5c3f5 Declare file local variables static
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2023-02-28 21:53:52 +01:00
Christian Göttsche
15ef38c4e3 Avoid implicit conversions
Found by running under pedantic UBSAN:

    ../bubblewrap.c:968:21: runtime error: implicit conversion from type 'int' of value -1 (32-bit, signed) to type 'uid_t' (aka 'unsigned int') changed the value to 4294967295 (32-bit, unsigned)
    ../bubblewrap.c:1210:28: runtime error: implicit conversion from type 'int' of value -41 (32-bit, signed) to type 'unsigned int' changed the value to 4294967255 (32-bit, unsigned)
    ../bubblewrap.c:1215:28: runtime error: implicit conversion from type 'int' of value -41 (32-bit, signed) to type 'unsigned int' changed the value to 4294967255 (32-bit, unsigned)

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2023-02-28 21:53:45 +01:00
Christian Göttsche
2ae2ec3542 Enable and resolve sign comparisson warnings
Comparisson of different signedness can result in unexpected results due
to implicit conversions.

    ../network.c:81:34: warning: comparison of integer expressions of different signedness: ‘__u32’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]
       81 |           if (rheader->nlmsg_seq != seq_nr)
          |                                  ^~
    ../network.c:83:34: warning: comparison of integer expressions of different signedness: ‘__u32’ {aka ‘unsigned int’} and ‘__pid_t’ {aka ‘int’} [-Wsign-compare]
      83 |           if (rheader->nlmsg_pid != getpid ())
          |                                  ^~

    ../bind-mount.c:268:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
      268 |       assert (i < n_lines);
          |                 ^
    ../bind-mount.c:309:13: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
      309 |   assert (i == n_lines);
          |             ^~
    ../bind-mount.c:318:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
      318 |   for (i = 0; i < n_lines; i++)
          |                 ^
    ../bind-mount.c:321:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
      321 |   for (i = 0; i < n_lines; i++)
          |                 ^

    ../utils.c:818:19: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘ssize_t’ {aka ‘long int’} [-Wsign-compare]
      818 |   while (size - 2 < n);
          |                   ^

    ../bubblewrap.c:489:13: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
      489 |   assert (j < sizeof(dont_close)/sizeof(*dont_close));
          |             ^
    ../bubblewrap.c:994:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uid_t’ {aka ‘unsigned int’} [-Wsign-compare]
      994 |       if (setfsuid (-1) != real_uid)
          |                         ^~
    ../bubblewrap.c:1042:61: warning: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
     1042 |       if (write (privileged_op_socket, buffer, buffer_size) != buffer_size)
          |                                                             ^~
    ../bubblewrap.c:1232:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
     1232 |           for (i = 0; i < N_ELEMENTS (cover_proc_dirs); i++)
          |                         ^
    ../bubblewrap.c:1260:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
     1260 |           for (i = 0; i < N_ELEMENTS (devnodes); i++)
          |                         ^
    ../bubblewrap.c:1272:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
     1272 |           for (i = 0; i < N_ELEMENTS (stdionodes); i++)
          |                         ^
    ../bubblewrap.c: In function ‘read_priv_sec_op’:
    ../bubblewrap.c:1556:15: warning: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]
     1556 |   if (rec_len < sizeof (PrivSepOp))
          |               ^
    ../bubblewrap.c:1626:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
     1626 |   if (*total_parsed_argc_p > MAX_ARGS)
          |                            ^
    ../bubblewrap.c:1681:40: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
     1681 |               if (*total_parsed_argc_p > MAX_ARGS)
          |                                        ^
    ../bubblewrap.c:2265:31: warning: comparison of integer expressions of different signedness: ‘uid_t’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]
     2265 |           if (opt_sandbox_uid != -1)
          |                               ^~
    ../bubblewrap.c:2285:31: warning: comparison of integer expressions of different signedness: ‘gid_t’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]
     2285 |           if (opt_sandbox_gid != -1)
          |                               ^~
    ../bubblewrap.c:2678:23: warning: comparison of integer expressions of different signedness: ‘uid_t’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]
     2678 |   if (opt_sandbox_uid == -1)
          |                       ^~
    ../bubblewrap.c:2680:23: warning: comparison of integer expressions of different signedness: ‘gid_t’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]
     2680 |   if (opt_sandbox_gid == -1)
          |                       ^~

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2023-02-28 21:53:19 +01:00
Simon McVittie
2f873fa8ae Attempt to clarify error message for missing CONFIG_SECCOMP_FILTER
General-purpose desktop distributions are compiled with CONFIG_SECCOMP
and CONFIG_SECCOMP_FILTER, but vendor kernels for phones and other
assorted embedded devices don't necessarily enable these options. These
kernels are unsuitable for running Flatpak, or anything else that relies
on `bwrap --seccomp` or `bwrap --add-seccomp-fd`.

Missing CONFIG_SECCOMP or CONFIG_SECCOMP_FILTER is not the *only* reason
why we could get EINVAL here: I think we'd also get EINVAL if the seccomp
program is syntatically invalid. However, it's a relatively likely reason,
so it seems worth providing a hint.

Helps: flatpak/flatpak#3069
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-01-23 11:29:13 +00:00
Simon McVittie
b5f672355b Add --assert-userns-disabled option
We can't combine --disable-userns with entering an existing user
namespace via --userns if the existing user namespace was created with
--disable-userns, because its ability to create nested user namespaces
has already been disabled. However, the next best thing is to verify
that we are already in the desired state.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-01-03 11:04:09 +01:00
Simon McVittie
b33c333bcb Add an option to disable nested user namespaces by setting limit to 1
Some use-cases of bubblewrap want to ensure that the subprocess can't
further re-arrange the filesystem namespace, or do other more complex
namespace modification. For example, Flatpak wants to prevent sandboxed
processes from altering their /proc/$pid/root/.flatpak-info, so that
/.flatpak-info can safely be used as an indicator that a process is part
of a Flatpak app.

This approach was suggested by lukts30 on containers/bubblewrap#452.
The sysctl-controlled maximum numbers of namespaces are themselves
namespaced, so we can disable nested user namespaces by setting the
limit to 1 and then entering a new, nested user namespace. The resulting
process loses its privileges in the namespace where the limit was set
to 1, so it is unable to move the limit back up.

Co-authored-by: Alexander Larsson <alexl@redhat.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-01-03 11:04:09 +01:00
Simon McVittie
73911524a4 Fix copy/paste error in help for --pidns
--pidns acts on a pid namespace, not a user namespace.

Resolves: https://github.com/containers/bubblewrap/issues/531
Thanks: hadess
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-27 18:15:48 +01:00
Simon McVittie
d41edb969a Merge pull request #509 from tomsmeding/tmpfs-size
Add --size option to control size of a --tmpfs
2022-10-26 21:43:25 +01:00
Tom Smeding
494b269a69 Add --size option to control size of a --tmpfs
Signed-off-by: Tom Smeding <tom@tomsmeding.com>
2022-10-26 19:46:59 +02:00
Simon McVittie
020a9eef6f Merge pull request #487 from smcv/better-enospc-message
Improve error message when clone() fails with ENOSPC
2022-10-03 11:28:20 +01:00
Simon McVittie
010bde7f37 bind-mount: Include failing path in error message
Prompted by flatpak/flatpak#4731, in which a misconfigured SMB automount
was failing to be remounted with ENODEV. This would have been easier to
debug if we knew which path could not be remounted.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-08-16 11:39:58 +02:00
Tom Smeding
89d64eee9d Prepare for multiple different modifier options
Signed-off-by: Tom Smeding <tom@tomsmeding.com>
2022-05-14 13:45:41 +02:00
Simon McVittie
8f5b370696 Silence -Wunused-but-set-variable with clang
This variable is only used for lifetime tracking (autocleanup), but
clang warns on that.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-04-05 14:34:47 +01:00
Simon McVittie
a2b58048b9 Improve error message when clone() fails with ENOSPC
In particular, this would have given #371 a clearer error message.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-03-22 17:37:07 +00:00
rusty-snake
0affc2464b Fix --add-seccomp-fd argument name in usage
--help shows --add-seccomp instead of --add-seccomp-fd which is the
correct argument.

Signed-off-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
2022-03-22 17:00:13 +01:00
Simon McVittie
4914bc8a18 Use HEAD to refer to other projects' default branches in documentation
This makes the URL independent of the name they have chosen for their
default branches.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-13 21:06:50 +00:00
Simon McVittie
d625fda8da Allow loading more than one seccomp program
This will allow Flatpak to combine an allow-list (default-deny) of
known system calls with a deny-list (default-allow) of system calls
that are undesired.

Resolves: https://github.com/containers/bubblewrap/issues/453
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-01-31 17:10:10 +00:00
Simon McVittie
c267db3295 Generalize linked lists of LockFile and SetupOp
I'm about to add a third linked list, for seccomp programs, which would
seem like too much duplication.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-01-31 17:10:06 +00:00
Phaedrus Leeds
f7dbb36cd1 Handle argc == 0 better
Unfortunately it's possible for argc to be 0, so error out pretty early
on in that case. I don't think this is a security issue in this case.

Signed-off-by: Phaedrus Leeds <mwleeds@protonmail.com>
2022-01-31 08:46:10 -08:00
a1346054
366564eaa0 Fix spelling
Signed-off-by: a1346054 <36859588+a1346054@users.noreply.github.com>
2021-10-14 14:40:10 +02:00
Simon McVittie
bdb17e3e07 bubblewrap: Avoid a -Wjump-misses-init false-positive
When building with -Wjump-misses-init as part of a larger project, gcc
reports that we jump past initialization of cover_proc_dirs. This is
technically true, but we only use this variable in the case where it's
initialized, so that's harmless.

However, we can avoid this altogether by making the array static and
constant, which allows it to be moved from initialized data to read-only
data.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-11 09:59:10 +02:00
Simon McVittie
0d369cdfd9 main: Warn when non-repeatable options are repeated
A user might reasonably expect that `bwrap --seccomp 3 --seccomp 4 ...`
would load seccomp programs from both fds 3 and 4, but in fact it only
loads the program from fd 4.

Helps: https://github.com/containers/bubblewrap/issues/453
Resolves: https://github.com/containers/bubblewrap/issues/454
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-10 13:07:32 +01:00
Simon McVittie
a6c90c516b Add SPDX-License-Identifier for files that already specify license
This is a step towards REUSE compliance. Third-party files that we do
not otherwise edit (git.mk, m4/attributes.m4) are excluded here.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-31 12:32:40 +01:00
Simon McVittie
14069395a3 Document --chmod in --help
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-23 23:06:38 +01:00
Simon McVittie
7f38ab6cf1 bind_mount: Return an error code, and provide a way to display it
This gives us better diagnostic messages on failure, particularly for
BIND_MOUNT_ERROR_FIND_DEST_MOUNT where we previously said "Invalid
argument".

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-23 19:01:57 +01:00
Simon McVittie
b6ee19a03d Handle all enum values in switch
This makes it clearer that we have thought about whether they need
symlinks for source resolved, and concluded that they do not.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-23 19:01:51 +01:00
Colin Walters
136b3166bb Merge pull request #401 from smcv/clearenv
Add --clearenv option
2021-06-23 09:29:52 -04:00
Simon McVittie
80dc9b5e86 Merge pull request #403 from RyuzakiKK/case_insensitive_fs
Add support for bind-mount on case-insensitive filesystems
2021-06-23 10:17:42 +01:00
Simon McVittie
8f72ceb2c4 Add --clearenv option
This allows environment variables to be set when running bwrap itself
(perhaps a custom LD_LIBRARY_PATH), but cleared for the command that
runs in the container, without having to enumerate all the variables.

Because PWD is set later, as a side-effect of changing directory, this
actually clears everything except PWD.

A portable program would check for clearenv() (and if not found, fall
back to using environ = NULL), but bubblewrap is Linux-specific, and
Linux C libraries (at least glibc and musl) do have clearenv().

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-22 17:57:35 +01:00
Simon McVittie
40815dc6b5 Implement --perms and --chmod
This allows files and directories created programmatically by bubblewrap
to be made less permissive (as requested in #346) or more permissive
(as requested in #131 and #329).

Resolves: https://github.com/containers/bubblewrap/issues/131
Resolves: https://github.com/containers/bubblewrap/issues/329
Resolves: https://github.com/containers/bubblewrap/issues/346
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-06-10 19:04:20 +01:00
Simon McVittie
29a18ead61 Merge pull request #410 from haraldkubota/zsh_completion
Add zsh completion
2021-06-10 18:55:16 +01:00
Harald Kubota
6e4c8bb12d Typo fix 2021-04-25 13:06:19 +09:00
Simon McVittie
411135b279 Create files as mount points with read-only permissions
If two mount namespaces can both see a directory, and we bind-mount a
non-directory into that directory, we have to create a non-directory
to mount it onto:

    $ ls -l ~/tmp/mountpoint
    ls: cannot access '/home/smcv/tmp/mountpoint': No such file or directory
    $ bwrap --bind / / --bind /etc/os-release ~/tmp/mountpoint true
    $ ls -l ~/tmp/mountpoint
    -rw-rw-rw- 1 smcv smcv 0 Feb 16 10:27 /home/smcv/tmp/mountpoint

The mount point is currently created as an empty world-writable file,
but this doesn't seem like a least-astonishment thing to do.
Create it with read-only permissions instead, to make it clearer that
it's just a placeholder and prevent other users from filling it.

Resolves: https://github.com/containers/bubblewrap/issues/337
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-04-07 12:46:30 +01:00
Ludovico de Nittis
04c0ca17ad Add support for bind-mount on case-insensitive filesystems
If we are using a case-insensitive filesystem the bind-mount operation
might fail when `/proc/self/mountinfo` is checked.

In a case-insensitive filesystem, if we ask to mount a certain
directory, e.g. '/CI_fs/foo', the kernel might add its entry in
`mountinfo` as '/CI_fs/FOO'. This happens because the kernel populates
`mountinfo` with whatever case combination first appeared in the dcache.

With this patch we open the requested path and look at its
`/proc/self/fd`, using readlink(), to get the path case combination that
the kernel is also expected to be using.

Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
2021-02-16 13:46:10 +01:00