Skip to content

Build process turns hardlinks into symlinks #744

Description

@jethrogb

On Ubuntu, the rust-coreutils multi-call binary (similar to busybox) uses hardlinks for each of the utilities. It also uses an Ubuntu-specific patch that requires /proc/self/exe to point to a file with the same name as argv[0].

When using nitro-cli build-enclave to convert a container with this package installed, the hardlinks get converted into symlinks. This then results in the coreutils binaries not working at all:

root@(none):~# ls -la /usr/bin/mkdir
Security violation: Requested utility `ls` does not match executable name:
  /usr/bin/coreutils
root@(none):~# /bin/busybox ls -la /usr/bin/mkdir
lrwxrwxrwx    1 root     root            32 Sep 26 18:16 /usr/bin/mkdir -> ../lib/cargo/bin/coreutils/mkdir
root@(none):~# /bin/busybox ls -la /usr/bin/../lib/cargo/bin/coreutils/mkdir
lrwxrwxrwx    1 root     root            25 Oct 22 10:39 /usr/bin/../lib/cargo/bin/coreutils/mkdir -> ../../../../bin/coreutils

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions