]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
loopback: use ERRNO_IS_PRIVILEGE() where appropriate 24495/head
authorLennart Poettering <lennart@poettering.net>
Mon, 29 Aug 2022 13:11:09 +0000 (15:11 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 29 Aug 2022 13:15:08 +0000 (15:15 +0200)
src/shared/loopback-setup.c

index 0092289022bcff32af64808677ebdf89d7417a92..dae78cde89685cd1224c47d64c1984639cb8f7b8 100644 (file)
@@ -208,7 +208,7 @@ int loopback_setup(void) {
                 /* If we lack the permissions to configure the loopback device,
                  * but we find it to be already configured, let's exit cleanly,
                  * in order to supported unprivileged containers. */
-                if (state_up.rcode == -EPERM && check_loopback(rtnl))
+                if (ERRNO_IS_PRIVILEGE(state_up.rcode) && check_loopback(rtnl))
                         return 0;
 
                 return log_warning_errno(state_up.rcode, "Failed to configure loopback network device: %m");