Skip to content

stdbuf cannot use libstdbuf on the same directory if /proc is masked #11134

Description

@oech3
$ run0 mv /usr/lib/uutils-coreutils/libstdbuf.so -t /tmp
$ cp /usr/bin/stdbuf -t /tmp
$ unshare -rm bash -c "mount -t tmpfs tmpfs /proc && /tmp/stdbuf -oL true"
stdbuf: External libstdbuf not found at configured path: /usr/lib/uutils-coreutils/libstdbuf.so

$ unshare -rm bash -c "mount -t tmpfs tmpfs /proc && /tmp/gnu-stdbuf -oL true"
# success

I believe it is because std::env::current_exe() requires /proc/self/exe:

if let Ok(exe_path) = std::env::current_exe() {

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions