summaryrefslogtreecommitdiffstats
path: root/templates/man3/getgrouplist.3.pot
diff options
context:
space:
mode:
Diffstat (limited to 'templates/man3/getgrouplist.3.pot')
-rw-r--r--templates/man3/getgrouplist.3.pot180
1 files changed, 162 insertions, 18 deletions
diff --git a/templates/man3/getgrouplist.3.pot b/templates/man3/getgrouplist.3.pot
index 720a1f66..03abf4b6 100644
--- a/templates/man3/getgrouplist.3.pot
+++ b/templates/man3/getgrouplist.3.pot
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2024-03-01 16:57+0100\n"
+"POT-Creation-Date: 2024-06-01 05:52+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -24,15 +24,15 @@ msgid "getgrouplist"
msgstr ""
#. type: TH
-#: archlinux fedora-40 fedora-rawhide mageia-cauldron
+#: archlinux debian-unstable opensuse-tumbleweed
#, no-wrap
-msgid "2023-10-31"
+msgid "2024-05-02"
msgstr ""
#. type: TH
-#: archlinux fedora-40 fedora-rawhide mageia-cauldron
+#: archlinux debian-unstable
#, no-wrap
-msgid "Linux man-pages 6.06"
+msgid "Linux man-pages 6.8"
msgstr ""
#. type: SH
@@ -319,10 +319,10 @@ msgid "Program source"
msgstr ""
#. type: Plain text
-#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
-#: opensuse-tumbleweed
+#: archlinux debian-unstable opensuse-tumbleweed
#, no-wrap
msgid ""
+"#include E<lt>errno.hE<gt>\n"
"#include E<lt>grp.hE<gt>\n"
"#include E<lt>pwd.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
@@ -331,10 +331,10 @@ msgid ""
"int\n"
"main(int argc, char *argv[])\n"
"{\n"
-" int ngroups;\n"
-" struct passwd *pw;\n"
-" struct group *gr;\n"
-" gid_t *groups;\n"
+" int ngroups;\n"
+" gid_t *groups;\n"
+" struct group *gr;\n"
+" struct passwd *pw;\n"
"\\&\n"
" if (argc != 3) {\n"
" fprintf(stderr, \"Usage: %s E<lt>userE<gt> E<lt>ngroupsE<gt>\\en\", argv[0]);\n"
@@ -351,10 +351,14 @@ msgid ""
"\\&\n"
" /* Fetch passwd structure (contains first group ID for user). */\n"
"\\&\n"
+" errno = 0;\n"
" pw = getpwnam(argv[1]);\n"
" if (pw == NULL) {\n"
-" perror(\"getpwnam\");\n"
-" exit(EXIT_SUCCESS);\n"
+" if (errno)\n"
+" perror(\"getpwnam\");\n"
+" else\n"
+" fprintf(stderr, \"no such user\\en\");\n"
+" exit(EXIT_FAILURE);\n"
" }\n"
"\\&\n"
" /* Retrieve group list. */\n"
@@ -368,7 +372,7 @@ msgid ""
" /* Display list of retrieved groups, along with group names. */\n"
"\\&\n"
" fprintf(stderr, \"ngroups = %d\\en\", ngroups);\n"
-" for (size_t j = 0; j E<lt> ngroups; j++) {\n"
+" for (int j = 0; j E<lt> ngroups; j++) {\n"
" printf(\"%d\", groups[j]);\n"
" gr = getgrgid(groups[j]);\n"
" if (gr != NULL)\n"
@@ -537,15 +541,149 @@ msgid ""
msgstr ""
#. type: TH
-#: debian-unstable opensuse-tumbleweed
+#: fedora-40 mageia-cauldron
+#, no-wrap
+msgid "2023-10-31"
+msgstr ""
+
+#. type: TH
+#: fedora-40 mageia-cauldron
+#, no-wrap
+msgid "Linux man-pages 6.06"
+msgstr ""
+
+#. type: Plain text
+#: fedora-40 mageia-cauldron
+#, no-wrap
+msgid ""
+"#include E<lt>grp.hE<gt>\n"
+"#include E<lt>pwd.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"\\&\n"
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" int ngroups;\n"
+" struct passwd *pw;\n"
+" struct group *gr;\n"
+" gid_t *groups;\n"
+"\\&\n"
+" if (argc != 3) {\n"
+" fprintf(stderr, \"Usage: %s E<lt>userE<gt> E<lt>ngroupsE<gt>\\en\", argv[0]);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" ngroups = atoi(argv[2]);\n"
+"\\&\n"
+" groups = malloc(sizeof(*groups) * ngroups);\n"
+" if (groups == NULL) {\n"
+" perror(\"malloc\");\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" /* Fetch passwd structure (contains first group ID for user). */\n"
+"\\&\n"
+" pw = getpwnam(argv[1]);\n"
+" if (pw == NULL) {\n"
+" perror(\"getpwnam\");\n"
+" exit(EXIT_SUCCESS);\n"
+" }\n"
+"\\&\n"
+" /* Retrieve group list. */\n"
+"\\&\n"
+" if (getgrouplist(argv[1], pw-E<gt>pw_gid, groups, &ngroups) == -1) {\n"
+" fprintf(stderr, \"getgrouplist() returned -1; ngroups = %d\\en\",\n"
+" ngroups);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" /* Display list of retrieved groups, along with group names. */\n"
+"\\&\n"
+" fprintf(stderr, \"ngroups = %d\\en\", ngroups);\n"
+" for (size_t j = 0; j E<lt> ngroups; j++) {\n"
+" printf(\"%d\", groups[j]);\n"
+" gr = getgrgid(groups[j]);\n"
+" if (gr != NULL)\n"
+" printf(\" (%s)\", gr-E<gt>gr_name);\n"
+" printf(\"\\en\");\n"
+" }\n"
+"\\&\n"
+" exit(EXIT_SUCCESS);\n"
+"}\n"
+msgstr ""
+
+#. type: TH
+#: fedora-rawhide
#, no-wrap
-msgid "2023-07-20"
+msgid "2024-03-16"
msgstr ""
#. type: TH
-#: debian-unstable opensuse-tumbleweed
+#: fedora-rawhide
#, no-wrap
-msgid "Linux man-pages 6.05.01"
+msgid "Linux man-pages 6.7"
+msgstr ""
+
+#. type: Plain text
+#: fedora-rawhide
+#, no-wrap
+msgid ""
+"#include E<lt>grp.hE<gt>\n"
+"#include E<lt>pwd.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"\\&\n"
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" int ngroups;\n"
+" gid_t *groups;\n"
+" struct group *gr;\n"
+" struct passwd *pw;\n"
+"\\&\n"
+" if (argc != 3) {\n"
+" fprintf(stderr, \"Usage: %s E<lt>userE<gt> E<lt>ngroupsE<gt>\\en\", argv[0]);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" ngroups = atoi(argv[2]);\n"
+"\\&\n"
+" groups = malloc(sizeof(*groups) * ngroups);\n"
+" if (groups == NULL) {\n"
+" perror(\"malloc\");\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" /* Fetch passwd structure (contains first group ID for user). */\n"
+"\\&\n"
+" pw = getpwnam(argv[1]);\n"
+" if (pw == NULL) {\n"
+" perror(\"getpwnam\");\n"
+" exit(EXIT_SUCCESS);\n"
+" }\n"
+"\\&\n"
+" /* Retrieve group list. */\n"
+"\\&\n"
+" if (getgrouplist(argv[1], pw-E<gt>pw_gid, groups, &ngroups) == -1) {\n"
+" fprintf(stderr, \"getgrouplist() returned -1; ngroups = %d\\en\",\n"
+" ngroups);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+"\\&\n"
+" /* Display list of retrieved groups, along with group names. */\n"
+"\\&\n"
+" fprintf(stderr, \"ngroups = %d\\en\", ngroups);\n"
+" for (int j = 0; j E<lt> ngroups; j++) {\n"
+" printf(\"%d\", groups[j]);\n"
+" gr = getgrgid(groups[j]);\n"
+" if (gr != NULL)\n"
+" printf(\" (%s)\", gr-E<gt>gr_name);\n"
+" printf(\"\\en\");\n"
+" }\n"
+"\\&\n"
+" exit(EXIT_SUCCESS);\n"
+"}\n"
msgstr ""
#. type: TH
@@ -559,3 +697,9 @@ msgstr ""
#, no-wrap
msgid "Linux man-pages 6.04"
msgstr ""
+
+#. type: TH
+#: opensuse-tumbleweed
+#, no-wrap
+msgid "Linux man-pages (unreleased)"
+msgstr ""