opencontainers / umoci

umoci modifies Open Container images
https://umo.ci
Apache License 2.0
743 stars 98 forks source link

support inspecting `user.rootlesscontainers` xattr #346

Open AkihiroSuda opened 4 years ago

AkihiroSuda commented 4 years ago

We should have a utility command to show the user.rootlesscontainers xattr value in a human-readable format.

e.g.

$ id -u
1001

$ ls -ln /path/to/bundle/etc/
...
-rw-r----- 1 1001 1001 422 May 29 23:20 shadow

$ getfattr -d -e hex -m user.rootlesscontainers /path/to/bundle/rootfs/etc/shadow 
...
user.rootlesscontainers=0xdeadbeef...

$ umoci ls-bundle /path/to/bundle/etc/
-rw-r----- 1 0 42 422 May 29 23:20 shadow
cyphar commented 4 years ago

Not a bad idea -- though it'd probably be called something like umoci raw rootless-ls.