]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
homework-fscrypt: pass the right error variable
authorDavid Tardon <dtardon@redhat.com>
Tue, 7 May 2024 11:49:31 +0000 (13:49 +0200)
committerDavid Tardon <dtardon@redhat.com>
Tue, 7 May 2024 12:02:08 +0000 (14:02 +0200)
src/home/homework-fscrypt.c

index 781fe01f9cde4baf01bb514a38fdd0953a23a09a..46a77568738223f2af1529db249feb168c91cb2f 100644 (file)
@@ -212,7 +212,7 @@ static int fscrypt_setup(
 
         r = flistxattr_malloc(setup->root_fd, &xattr_buf);
         if (r < 0)
-                return log_error_errno(errno, "Failed to retrieve xattr list: %m");
+                return log_error_errno(r, "Failed to retrieve xattr list: %m");
 
         NULSTR_FOREACH(xa, xattr_buf) {
                 _cleanup_free_ void *salt = NULL, *encrypted = NULL;
@@ -635,7 +635,7 @@ int home_passwd_fscrypt(
 
         r = flistxattr_malloc(setup->root_fd, &xattr_buf);
         if (r < 0)
-                return log_error_errno(errno, "Failed to retrieve xattr list: %m");
+                return log_error_errno(r, "Failed to retrieve xattr list: %m");
 
         NULSTR_FOREACH(xa, xattr_buf) {
                 const char *nr;