anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone
803fb7
From 7d6f53ece9b0a397ee2f8bdaa1a52ef2f03bd81f Mon Sep 17 00:00:00 2001
803fb7
From: Michal Sekletar <msekleta@redhat.com>
803fb7
Date: Tue, 9 Aug 2016 13:02:37 +0200
803fb7
Subject: [PATCH] install: do not crash when processing empty (masked) unit
803fb7
 file
803fb7
803fb7
Related: #1159308
803fb7
---
803fb7
 src/shared/install.c | 2 +-
803fb7
 1 file changed, 1 insertion(+), 1 deletion(-)
803fb7
803fb7
diff --git a/src/shared/install.c b/src/shared/install.c
803fb7
index f190dbfab..f7f9866f4 100644
803fb7
--- a/src/shared/install.c
803fb7
+++ b/src/shared/install.c
803fb7
@@ -996,7 +996,7 @@ static int unit_file_load(
803fb7
         if (fstat(fd, &st) < 0)
803fb7
                 return -errno;
803fb7
         if (null_or_empty(&st)) {
803fb7
-               info->type = UNIT_FILE_MASKED;
803fb7
+               info->type = UNIT_FILE_TYPE_MASKED;
803fb7
                 return 0;
803fb7
         }
803fb7
         if (S_ISDIR(st.st_mode))