]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
textual: give seven error messages the same form as two others
authorBenno Schulenberg <bensberg@telfort.nl>
Sun, 9 Feb 2025 08:23:24 +0000 (09:23 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 10 Feb 2025 11:36:57 +0000 (12:36 +0100)
The form with the parentheses is easier for translators: it indicates
that the preceding text is not a translatable word.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
login-utils/newgrp.c
sys-utils/nsenter.c
sys-utils/unshare.c

index b9b620ed7526f6b98355d7788ad895ac0b2f8207..ba3777b36c4dd25eb690e4a7159de53dae84b5e7 100644 (file)
@@ -219,7 +219,7 @@ int main(int argc, char *argv[])
 
        if (argc <= optind) {
                if (setgid(pw_entry->pw_gid) < 0)
-                       err(EXIT_FAILURE, _("setgid failed"));
+                       err(EXIT_FAILURE, _("setgid() failed"));
        } else {
                errno = 0;
                if (!(gr_entry = getgrnam(argv[optind++]))) {
@@ -231,11 +231,11 @@ int main(int argc, char *argv[])
                if (!allow_setgid(pw_entry, gr_entry))
                        errx(EXIT_FAILURE, _("permission denied"));
                if (setgid(gr_entry->gr_gid) < 0)
-                       err(EXIT_FAILURE, _("setgid failed"));
+                       err(EXIT_FAILURE, _("setgid() failed"));
        }
 
        if (setuid(getuid()) < 0)
-               err(EXIT_FAILURE, _("setuid failed"));
+               err(EXIT_FAILURE, _("setuid() failed"));
 
        fflush(NULL);
        shell = (pw_entry->pw_shell && *pw_entry->pw_shell ?
index 66ce4b3242955770e79d1868c8299760288b6353..214893d1a9424be1b7c6fc18cbe850c81c2e6699 100644 (file)
@@ -836,9 +836,9 @@ int main(int argc, char *argv[])
                if (force_gid && setgroups(0, NULL) != 0 && setgroups_nerrs)    /* drop supplementary groups */
                        err(EXIT_FAILURE, _("setgroups failed"));
                if (force_gid && setgid(gid) < 0)               /* change GID */
-                       err(EXIT_FAILURE, _("setgid failed"));
+                       err(EXIT_FAILURE, _("setgid() failed"));
                if (force_uid && setuid(uid) < 0)               /* change UID */
-                       err(EXIT_FAILURE, _("setuid failed"));
+                       err(EXIT_FAILURE, _("setuid() failed"));
        }
 
        if (keepcaps && (namespaces & CLONE_NEWUSER))
index 4d078e4d58589237c4169be21447683d8c261fd3..b6c2f8b4573495db9ce6bd0721a1aedb4b828d20 100644 (file)
@@ -1270,10 +1270,10 @@ int main(int argc, char *argv[])
                if (setgroups(0, NULL) != 0)    /* drop supplementary groups */
                        err(EXIT_FAILURE, _("setgroups failed"));
                if (setgid(gid) < 0)            /* change GID */
-                       err(EXIT_FAILURE, _("setgid failed"));
+                       err(EXIT_FAILURE, _("setgid() failed"));
        }
        if (force_uid && setuid(uid) < 0)       /* change UID */
-               err(EXIT_FAILURE, _("setuid failed"));
+               err(EXIT_FAILURE, _("setuid() failed"));
 
        if (keepcaps && (unshare_flags & CLONE_NEWUSER))
                cap_permitted_to_ambient();