summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2016-01-21 16:28:19 +0100
committerDaniel Mack <github@zonque.org>2016-01-21 16:28:19 +0100
commite77435f2b09f4e9e7f2b12cc89273ef53910f3e7 (patch)
treec7e0bf4f5b45ea4b12248e27f2ec3bd65c7a1cc0 /src
parent390be1c86af3b8217d4ec53c45f789f4d1995ee8 (diff)
parent65d60552f2f1c198df06acef80431cbc460fbab6 (diff)
Merge pull request #1359 from jengelh/ue
sysusers: help useless error message
Diffstat (limited to 'src')
-rw-r--r--src/sysusers/sysusers.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
index a7e8187f4f..90a2111ec5 100644
--- a/src/sysusers/sysusers.c
+++ b/src/sysusers/sysusers.c
@@ -410,11 +410,13 @@ static int write_files(void) {
i = hashmap_get(groups, gr->gr_name);
if (i && i->todo_group) {
+ log_error("%s: Group \"%s\" already exists.", group_path, gr->gr_name);
r = -EEXIST;
goto finish;
}
if (hashmap_contains(todo_gids, GID_TO_PTR(gr->gr_gid))) {
+ log_error("%s: Detected collision for GID %d.", group_path, gr->gr_gid);
r = -EEXIST;
goto finish;
}
@@ -482,6 +484,7 @@ static int write_files(void) {
i = hashmap_get(groups, sg->sg_namp);
if (i && i->todo_group) {
+ log_error("%s: Group \"%s\" already exists.", gshadow_path, sg->sg_namp);
r = -EEXIST;
goto finish;
}
@@ -548,11 +551,13 @@ static int write_files(void) {
i = hashmap_get(users, pw->pw_name);
if (i && i->todo_user) {
+ log_error("%s: User \"%s\" already exists.", passwd_path, pw->pw_name);
r = -EEXIST;
goto finish;
}
if (hashmap_contains(todo_uids, UID_TO_PTR(pw->pw_uid))) {
+ log_error("%s: Detected collision for UID %d.", passwd_path, pw->pw_uid);
r = -EEXIST;
goto finish;
}