detect-virt: install with fs caps by default to allow unprivileged access

This commit is contained in:
Lennart Poettering
2012-10-09 22:25:32 +02:00
parent 7a69007a24
commit 96ede2601f
3 changed files with 12 additions and 4 deletions
+4 -4
View File
@@ -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";