summaryrefslogtreecommitdiffstats
path: root/src/shared/userdb-dropin.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/shared/userdb-dropin.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/shared/userdb-dropin.c b/src/shared/userdb-dropin.c
index 5d79f4688a..309f33b5b5 100644
--- a/src/shared/userdb-dropin.c
+++ b/src/shared/userdb-dropin.c
@@ -57,13 +57,14 @@ static int load_user(
}
r = json_parse_file(NULL, j, JSON_PARSE_SENSITIVE, &privileged_v, NULL, NULL);
- if (ERRNO_IS_PRIVILEGE(r))
- have_privileged = false;
- else if (r == -ENOENT)
- have_privileged = true; /* if the privileged file doesn't exist, we are complete */
- else if (r < 0)
- return r;
- else {
+ if (r < 0) {
+ if (ERRNO_IS_PRIVILEGE(r))
+ have_privileged = false;
+ else if (r == -ENOENT)
+ have_privileged = true; /* if the privileged file doesn't exist, we are complete */
+ else
+ return r;
+ } else {
r = json_variant_merge(&v, privileged_v);
if (r < 0)
return r;
@@ -201,13 +202,14 @@ static int load_group(
}
r = json_parse_file(NULL, j, JSON_PARSE_SENSITIVE, &privileged_v, NULL, NULL);
- if (ERRNO_IS_PRIVILEGE(r))
- have_privileged = false;
- else if (r == -ENOENT)
- have_privileged = true; /* if the privileged file doesn't exist, we are complete */
- else if (r < 0)
- return r;
- else {
+ if (r < 0) {
+ if (ERRNO_IS_PRIVILEGE(r))
+ have_privileged = false;
+ else if (r == -ENOENT)
+ have_privileged = true; /* if the privileged file doesn't exist, we are complete */
+ else
+ return r;
+ } else {
r = json_variant_merge(&v, privileged_v);
if (r < 0)
return r;