From bca3e931c24b676ec37d894dfcd94b6959f7f60a Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Thu, 25 Jun 2026 22:24:52 +0200 Subject: [PATCH 1/3] src/useradd.c: usage(): wfix Make the text consistent, to help translators. Closes: Reported-by: Rafael Fontenelle Signed-off-by: Alejandro Colomar --- src/groupmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/groupmod.c b/src/groupmod.c index e535a9e882..0ad7a30730 100644 --- a/src/groupmod.c +++ b/src/groupmod.c @@ -126,7 +126,7 @@ static void usage (int status) (void) fputs (_(" -g, --gid GID change the group ID to GID\n"), usageout); (void) fputs (_(" -h, --help display this help message and exit\n"), usageout); (void) fputs (_(" -n, --new-name NEW_GROUP change the name to NEW_GROUP\n"), usageout); - (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), usageout); + (void) fputs (_(" -o, --non-unique allow using a duplicate (non-unique) GID\n"), usageout); (void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n" " PASSWORD\n"), usageout); (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); From 2ebe3e178ae9ff55815fa7034e2a4f5b82402f67 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Thu, 25 Jun 2026 22:27:11 +0200 Subject: [PATCH 2/3] src/: usage(): tfix Fixes: 1ed06fee4c8d (2026-02-25; "usermod: Add option to automatically find subordinate IDs") Fixes: 3f7a72e9677b (2022-08-01; "useradd: add -F option for updating /etc/sub[ig]id for system accounts") Closes: Reported-by: Rafael Fontenelle Signed-off-by: Alejandro Colomar --- src/useradd.c | 2 +- src/usermod.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/useradd.c b/src/useradd.c index e6c80bd6f1..d35c7e43fa 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -909,7 +909,7 @@ static void usage (int status) (void) fputs (_(" -e, --expiredate EXPIRE_DATE expiration date of the new account\n"), usageout); (void) fputs (_(" -f, --inactive INACTIVE password inactivity period of the new account\n"), usageout); #ifdef ENABLE_SUBIDS - (void) fputs (_(" -F, --add-subids-for-system add entries to sub[ud]id even when adding a system user\n"), usageout); + (void) fputs (_(" -F, --add-subids-for-system add entries to sub[ug]id even when adding a system user\n"), usageout); #endif (void) fputs (_(" -g, --gid GROUP name or ID of the primary group of the new\n" " account\n"), usageout); diff --git a/src/usermod.c b/src/usermod.c index 3afe19ea4c..d0a6158cf6 100644 --- a/src/usermod.c +++ b/src/usermod.c @@ -455,7 +455,7 @@ usage (int status) (void) fputs (_(" -V, --del-subuids FIRST-LAST remove range of subordinate uids\n"), usageout); (void) fputs (_(" -w, --add-subgids FIRST-LAST add range of subordinate gids\n"), usageout); (void) fputs (_(" -W, --del-subgids FIRST-LAST remove range of subordinate gids\n"), usageout); - (void) fputs (_(" -S, --add-subids add entries to sub[ud]id based on system defaults\n"), usageout); + (void) fputs (_(" -S, --add-subids add entries to sub[ug]id based on system defaults\n"), usageout); #endif /* ENABLE_SUBIDS */ #ifdef WITH_SELINUX (void) fputs (_(" -Z, --selinux-user SEUSER new SELinux user mapping for the user account\n"), usageout); From 019b6a1c58a5eb7ee00eb38fb259abc13d9d9d4a Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Thu, 25 Jun 2026 22:28:59 +0200 Subject: [PATCH 3/3] src/: Simplify error strings Avoid language that would need translation. Move language that would need translation to a separate argument. Closes: Reported-by: Rafael Fontenelle Signed-off-by: Alejandro Colomar --- src/useradd.c | 12 ++++++------ src/vipw.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/useradd.c b/src/useradd.c index d35c7e43fa..1d712fd4c8 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -2304,13 +2304,13 @@ static void create_home(const struct option_flags *flags) } if (chown(path, 0, 0) < 0) { fprintf(stderr, - _("%s: warning: chown on `%s' failed: %m\n"), - Prog, path); + "%s: %s: chown(%s): %m\n", + Prog, _("warning"), path); } if (chmod(path, 0755) < 0) { fprintf(stderr, - _("%s: warning: chmod on `%s' failed: %m\n"), - Prog, path); + "%s: %s: chmod(%s): %m\n", + Prog, _("warning"), path); } } free(bhome); @@ -2319,8 +2319,8 @@ static void create_home(const struct option_flags *flags) mode = getdef_num("HOME_MODE", 0777 & ~getdef_num("UMASK", GETDEF_DEFAULT_UMASK)); if (chmod(prefix_user_home, mode)) { - fprintf(stderr, _("%s: warning: chown on '%s' failed: %m\n"), - Prog, path); + fprintf(stderr, "%s: %s: chown(%s): %m\n", + Prog, _("warning"), path); } home_added = true; #ifdef WITH_AUDIT diff --git a/src/vipw.c b/src/vipw.c index 76edd42a52..05c2935fcd 100644 --- a/src/vipw.c +++ b/src/vipw.c @@ -314,15 +314,15 @@ vipwedit (const char *file, int (*file_lock) (void), int (*file_unlock) (bool)) status = system (buf); if (-1 == status) { - fprintf(stderr, _("%s: %s: %s\n"), Prog, editor, strerrno()); + fprintf(stderr, "%s: %s: %s\n", Prog, editor, strerrno()); exit (1); } else if ( WIFEXITED (status) && (WEXITSTATUS (status) != 0)) { - fprintf (stderr, _("%s: %s returned with status %d\n"), + fprintf(stderr, "%s: %s: WEXITSTATUS(): %d\n", Prog, editor, WEXITSTATUS (status)); exit (WEXITSTATUS (status)); } else if (WIFSIGNALED (status)) { - fprintf (stderr, _("%s: %s killed by signal %d\n"), + fprintf(stderr, "%s: %s: WTERMSIG(): %d\n", Prog, editor, WTERMSIG (status)); exit (1); } else {