Improve error reporting.

* src/useradd.c: Change message in case of find_new_sub_uids /
	find_new_sub_gids failure. This complements the messages already
	provided by these APIs.
This commit is contained in:
Nicolas François 2013-08-13 00:13:12 +02:00
parent bfbd83239e
commit 9126425a21
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2013-08-13 Nicolas François <nicolas.francois@centraliens.net>
* src/useradd.c: Change message in case of find_new_sub_uids /
find_new_sub_gids failure. This complements the messages already
provided by these APIs.
2013-08-13 Nicolas François <nicolas.francois@centraliens.net> 2013-08-13 Nicolas François <nicolas.francois@centraliens.net>
* lib/subordinateio.c: Fix handling of boundaries. * lib/subordinateio.c: Fix handling of boundaries.

View File

@ -2179,16 +2179,16 @@ int main (int argc, char **argv)
if (is_sub_uid) { if (is_sub_uid) {
if (find_new_sub_uids(user_name, &sub_uid_start, &sub_uid_count) < 0) { if (find_new_sub_uids(user_name, &sub_uid_start, &sub_uid_count) < 0) {
fprintf (stderr, fprintf (stderr,
_("%s: can't find subordinate user range\n"), _("%s: can't create subordinate user IDs\n"),
Prog); Prog);
fail_exit(E_SUB_UID_UPDATE); fail_exit(E_SUB_UID_UPDATE);
} }
} }
if (is_sub_gid) { if (is_sub_gid) {
if (find_new_sub_gids(user_name, &sub_gid_start, &sub_gid_count) < 0) { if (find_new_sub_gids(user_name, &sub_gid_start, &sub_gid_count) < 0) {
fprintf (stderr, fprintf (stderr,
_("%s: can't find subordinate group range\n"), _("%s: can't create subordinate group IDs\n"),
Prog); Prog);
fail_exit(E_SUB_GID_UPDATE); fail_exit(E_SUB_GID_UPDATE);
} }
} }