diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-10-09 22:25:32 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-10-09 22:25:32 +0200 |
commit | 96ede2601f27cd5fe52eed96b873bef55cd0ce23 (patch) | |
tree | 0c9812fd9196b9e2e5a186e328c25d65e2ef8ee5 /src | |
parent | 7a69007a24cfff30158ea80665cb6c3c9d3251b0 (diff) |
detect-virt: install with fs caps by default to allow unprivileged access
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/virt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/virt.c b/src/shared/virt.c index 6e44794496..fc62c72328 100644 --- a/src/shared/virt.c +++ b/src/shared/virt.c @@ -159,10 +159,10 @@ int detect_container(const char **id) { /* Unfortunately many of these operations require root access * in one way or another */ - if (geteuid() != 0) - return -EPERM; - - if (running_in_chroot() > 0) { + r = running_in_chroot(); + if (r < 0) + return r; + if (r > 0) { if (id) *id = "chroot"; |