|
Zbigniew Jędrzejewski-Szmek |
47c564 |
From 0b37b2b7a3fe8e8f96f368848ff46db325a59e70 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
From: Tero Roponen <tero.roponen@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Date: Tue, 25 Feb 2014 17:19:35 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Subject: [PATCH] nspawn: fix detection of missing /proc/self/loginuid
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Running 'systemd-nspawn -D /srv/Fedora/' gave me this error:
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Failed to read /proc/self/loginuid: No such file or directory
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Container Fedora failed with error code 1.
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
This patch fixes the problem.
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
(cherry picked from commit 13e8ceb84e56907d73b6b07418deb37faaf0e66d)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
src/nspawn/nspawn.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
index de74a43..84b7276 100644
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
--- a/src/nspawn/nspawn.c
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+++ b/src/nspawn/nspawn.c
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
@@ -1341,7 +1341,7 @@ static int reset_audit_loginuid(void) {
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
return 0;
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
r = read_one_line_file("/proc/self/loginuid", &p);
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
- if (r == -EEXIST)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+ if (r == -ENOENT)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
return 0;
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
if (r < 0) {
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
log_error("Failed to read /proc/self/loginuid: %s", strerror(-r));
|