| 1 |
# SOME DESCRIPTIVE TITLE |
| 2 |
# Copyright (C) YEAR Free Software Foundation, Inc. |
| 3 |
# This file is distributed under the same license as the PACKAGE package. |
| 4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 |
# |
| 6 |
#, fuzzy |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: PACKAGE VERSION\n" |
| 10 |
"POT-Creation-Date: 2026-06-05 06:25+0200\n" |
| 11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 13 |
"Language-Team: LANGUAGE <[email protected]>\n" |
| 14 |
"Language: \n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
|
| 19 |
#. type: TH |
| 20 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 21 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 22 |
#, no-wrap |
| 23 |
msgid "getpwent_r" |
| 24 |
msgstr "" |
| 25 |
|
| 26 |
#. type: TH |
| 27 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 28 |
#, no-wrap |
| 29 |
msgid "2026-02-14" |
| 30 |
msgstr "" |
| 31 |
|
| 32 |
#. type: TH |
| 33 |
#: archlinux debian-unstable |
| 34 |
#, no-wrap |
| 35 |
msgid "Linux man-pages 6.18" |
| 36 |
msgstr "" |
| 37 |
|
| 38 |
#. type: SH |
| 39 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 40 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 41 |
#, no-wrap |
| 42 |
msgid "NAME" |
| 43 |
msgstr "" |
| 44 |
|
| 45 |
#. type: Plain text |
| 46 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 47 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 48 |
msgid "getpwent_r, fgetpwent_r - get passwd file entry reentrantly" |
| 49 |
msgstr "" |
| 50 |
|
| 51 |
#. type: SH |
| 52 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 53 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 54 |
#, no-wrap |
| 55 |
msgid "LIBRARY" |
| 56 |
msgstr "" |
| 57 |
|
| 58 |
#. type: Plain text |
| 59 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 60 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 61 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 62 |
msgstr "" |
| 63 |
|
| 64 |
#. type: SH |
| 65 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 66 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 67 |
#, no-wrap |
| 68 |
msgid "SYNOPSIS" |
| 69 |
msgstr "" |
| 70 |
|
| 71 |
#. type: Plain text |
| 72 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 73 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 74 |
#, no-wrap |
| 75 |
msgid "B<#include E<lt>pwd.hE<gt>>\n" |
| 76 |
msgstr "" |
| 77 |
|
| 78 |
#. type: Plain text |
| 79 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 80 |
#: opensuse-tumbleweed |
| 81 |
#, no-wrap |
| 82 |
msgid "" |
| 83 |
"B<int getpwent_r(>size_t size;\n" |
| 84 |
"B< struct passwd *restrict >I<pwbuf>B<,>\n" |
| 85 |
"B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n" |
| 86 |
"B< struct passwd **restrict >I<pwbufp>B<);>\n" |
| 87 |
"B<int fgetpwent_r(>size_t size;\n" |
| 88 |
"B< FILE *restrict >I<stream>B<, struct passwd *restrict >I<pwbuf>B<,>\n" |
| 89 |
"B< char >I<buf>B<[restrict >I<size>B<], size_t >I<size>B<,>\n" |
| 90 |
"B< struct passwd **restrict >I<pwbufp>B<);>\n" |
| 91 |
msgstr "" |
| 92 |
|
| 93 |
#. type: Plain text |
| 94 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 95 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 96 |
msgid "" |
| 97 |
"Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):" |
| 98 |
msgstr "" |
| 99 |
|
| 100 |
#. type: Plain text |
| 101 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 102 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 103 |
msgid "B<getpwent_r>()," |
| 104 |
msgstr "" |
| 105 |
|
| 106 |
#. type: Plain text |
| 107 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 108 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 109 |
#, no-wrap |
| 110 |
msgid "" |
| 111 |
" Since glibc 2.19:\n" |
| 112 |
" _DEFAULT_SOURCE\n" |
| 113 |
" glibc 2.19 and earlier:\n" |
| 114 |
" _BSD_SOURCE || _SVID_SOURCE\n" |
| 115 |
msgstr "" |
| 116 |
|
| 117 |
#. type: Plain text |
| 118 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 119 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 120 |
msgid "B<fgetpwent_r>():" |
| 121 |
msgstr "" |
| 122 |
|
| 123 |
#. type: Plain text |
| 124 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 125 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 126 |
#, no-wrap |
| 127 |
msgid "" |
| 128 |
" Since glibc 2.19:\n" |
| 129 |
" _DEFAULT_SOURCE\n" |
| 130 |
" glibc 2.19 and earlier:\n" |
| 131 |
" _SVID_SOURCE\n" |
| 132 |
msgstr "" |
| 133 |
|
| 134 |
#. type: SH |
| 135 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 136 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 137 |
#, no-wrap |
| 138 |
msgid "DESCRIPTION" |
| 139 |
msgstr "" |
| 140 |
|
| 141 |
#. type: Plain text |
| 142 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 143 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 144 |
msgid "" |
| 145 |
"The functions B<getpwent_r>() and B<fgetpwent_r>() are the reentrant " |
| 146 |
"versions of B<getpwent>(3) and B<fgetpwent>(3). The former reads the next " |
| 147 |
"passwd entry from the stream initialized by B<setpwent>(3). The latter " |
| 148 |
"reads the next passwd entry from I<stream>." |
| 149 |
msgstr "" |
| 150 |
|
| 151 |
#. type: Plain text |
| 152 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 153 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 154 |
msgid "The I<passwd> structure is defined in I<E<lt>pwd.hE<gt>> as follows:" |
| 155 |
msgstr "" |
| 156 |
|
| 157 |
#. type: Plain text |
| 158 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 159 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 160 |
#, no-wrap |
| 161 |
msgid "" |
| 162 |
"struct passwd {\n" |
| 163 |
" char *pw_name; /* username */\n" |
| 164 |
" char *pw_passwd; /* user password */\n" |
| 165 |
" uid_t pw_uid; /* user ID */\n" |
| 166 |
" gid_t pw_gid; /* group ID */\n" |
| 167 |
" char *pw_gecos; /* user information */\n" |
| 168 |
" char *pw_dir; /* home directory */\n" |
| 169 |
" char *pw_shell; /* shell program */\n" |
| 170 |
"};\n" |
| 171 |
msgstr "" |
| 172 |
|
| 173 |
#. type: Plain text |
| 174 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 175 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 176 |
msgid "" |
| 177 |
"For more information about the fields of this structure, see B<passwd>(5)." |
| 178 |
msgstr "" |
| 179 |
|
| 180 |
#. type: Plain text |
| 181 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 182 |
#: opensuse-tumbleweed |
| 183 |
msgid "" |
| 184 |
"The nonreentrant functions return a pointer to static storage, where this " |
| 185 |
"static storage contains further pointers to user name, password, gecos " |
| 186 |
"field, home directory and shell. The reentrant functions described here " |
| 187 |
"return all of that in caller-provided buffers. First of all there is the " |
| 188 |
"buffer I<pwbuf> that can hold a I<struct\\ passwd>. And next the buffer " |
| 189 |
"I<buf> of size I<size> that can hold additional strings. The result of " |
| 190 |
"these functions, the I<struct\\ passwd> read from the stream, is stored in " |
| 191 |
"the provided buffer I<*pwbuf>, and a pointer to this I<struct\\ passwd> is " |
| 192 |
"returned in I<*pwbufp>." |
| 193 |
msgstr "" |
| 194 |
|
| 195 |
#. type: SH |
| 196 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 197 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 198 |
#, no-wrap |
| 199 |
msgid "RETURN VALUE" |
| 200 |
msgstr "" |
| 201 |
|
| 202 |
#. type: Plain text |
| 203 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 204 |
#: opensuse-tumbleweed |
| 205 |
msgid "" |
| 206 |
"On success, these functions return 0 and I<*pwbufp> is a pointer to the " |
| 207 |
"I<struct\\ passwd>. On error, these functions return an error value and " |
| 208 |
"I<*pwbufp> is NULL." |
| 209 |
msgstr "" |
| 210 |
|
| 211 |
#. type: SH |
| 212 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 213 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 214 |
#, no-wrap |
| 215 |
msgid "ERRORS" |
| 216 |
msgstr "" |
| 217 |
|
| 218 |
#. type: TP |
| 219 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 220 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 221 |
#, no-wrap |
| 222 |
msgid "B<ENOENT>" |
| 223 |
msgstr "" |
| 224 |
|
| 225 |
#. type: Plain text |
| 226 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 227 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 228 |
msgid "No more entries." |
| 229 |
msgstr "" |
| 230 |
|
| 231 |
#. type: TP |
| 232 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 233 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 234 |
#, no-wrap |
| 235 |
msgid "B<ERANGE>" |
| 236 |
msgstr "" |
| 237 |
|
| 238 |
#. type: Plain text |
| 239 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 240 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 241 |
msgid "Insufficient buffer space supplied. Try again with larger buffer." |
| 242 |
msgstr "" |
| 243 |
|
| 244 |
#. type: SH |
| 245 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 246 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 247 |
#, no-wrap |
| 248 |
msgid "ATTRIBUTES" |
| 249 |
msgstr "" |
| 250 |
|
| 251 |
#. type: Plain text |
| 252 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 253 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 254 |
msgid "" |
| 255 |
"For an explanation of the terms used in this section, see B<attributes>(7)." |
| 256 |
msgstr "" |
| 257 |
|
| 258 |
#. type: tbl table |
| 259 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 260 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 261 |
#, no-wrap |
| 262 |
msgid "Interface" |
| 263 |
msgstr "" |
| 264 |
|
| 265 |
#. type: tbl table |
| 266 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 267 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 268 |
#, no-wrap |
| 269 |
msgid "Attribute" |
| 270 |
msgstr "" |
| 271 |
|
| 272 |
#. type: tbl table |
| 273 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 274 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 275 |
#, no-wrap |
| 276 |
msgid "Value" |
| 277 |
msgstr "" |
| 278 |
|
| 279 |
#. type: tbl table |
| 280 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 281 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 282 |
#, no-wrap |
| 283 |
msgid ".na\n" |
| 284 |
msgstr "" |
| 285 |
|
| 286 |
#. type: tbl table |
| 287 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 288 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 289 |
#, no-wrap |
| 290 |
msgid ".nh\n" |
| 291 |
msgstr "" |
| 292 |
|
| 293 |
#. type: tbl table |
| 294 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 295 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 296 |
#, no-wrap |
| 297 |
msgid "B<getpwent_r>()" |
| 298 |
msgstr "" |
| 299 |
|
| 300 |
#. type: tbl table |
| 301 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 302 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 303 |
#, no-wrap |
| 304 |
msgid "Thread safety" |
| 305 |
msgstr "" |
| 306 |
|
| 307 |
#. type: tbl table |
| 308 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 309 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 310 |
#, no-wrap |
| 311 |
msgid "MT-Unsafe race:pwent locale" |
| 312 |
msgstr "" |
| 313 |
|
| 314 |
#. type: tbl table |
| 315 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 316 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 317 |
#, no-wrap |
| 318 |
msgid "B<fgetpwent_r>()" |
| 319 |
msgstr "" |
| 320 |
|
| 321 |
#. type: tbl table |
| 322 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 323 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 324 |
#, no-wrap |
| 325 |
msgid "MT-Safe" |
| 326 |
msgstr "" |
| 327 |
|
| 328 |
#. type: Plain text |
| 329 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 330 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 331 |
msgid "" |
| 332 |
"In the above table, I<pwent> in I<race:pwent> signifies that if any of the " |
| 333 |
"functions B<setpwent>(), B<getpwent>(), B<endpwent>(), or B<getpwent_r>() " |
| 334 |
"are used in parallel in different threads of a program, then data races " |
| 335 |
"could occur." |
| 336 |
msgstr "" |
| 337 |
|
| 338 |
#. type: SH |
| 339 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 340 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 341 |
#, no-wrap |
| 342 |
msgid "VERSIONS" |
| 343 |
msgstr "" |
| 344 |
|
| 345 |
#. type: Plain text |
| 346 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 347 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 348 |
msgid "Other systems use the prototype" |
| 349 |
msgstr "" |
| 350 |
|
| 351 |
#. type: Plain text |
| 352 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 353 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 354 |
#, no-wrap |
| 355 |
msgid "" |
| 356 |
"struct passwd *\n" |
| 357 |
"getpwent_r(struct passwd *pwd, char buf[.size], int size);\n" |
| 358 |
msgstr "" |
| 359 |
|
| 360 |
#. type: Plain text |
| 361 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 362 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 363 |
msgid "or, better," |
| 364 |
msgstr "" |
| 365 |
|
| 366 |
#. type: Plain text |
| 367 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 368 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 369 |
#, no-wrap |
| 370 |
msgid "" |
| 371 |
"int\n" |
| 372 |
"getpwent_r(struct passwd *pwd, char buf[.size], int size,\n" |
| 373 |
" FILE **pw_fp);\n" |
| 374 |
msgstr "" |
| 375 |
|
| 376 |
#. type: SH |
| 377 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 378 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 379 |
#, no-wrap |
| 380 |
msgid "STANDARDS" |
| 381 |
msgstr "" |
| 382 |
|
| 383 |
#. type: Plain text |
| 384 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 385 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 386 |
msgid "None." |
| 387 |
msgstr "" |
| 388 |
|
| 389 |
#. type: SH |
| 390 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 391 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 392 |
#, no-wrap |
| 393 |
msgid "HISTORY" |
| 394 |
msgstr "" |
| 395 |
|
| 396 |
#. type: Plain text |
| 397 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 398 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 399 |
msgid "" |
| 400 |
"These functions are done in a style resembling the POSIX version of " |
| 401 |
"functions like B<getpwnam_r>(3)." |
| 402 |
msgstr "" |
| 403 |
|
| 404 |
#. type: SH |
| 405 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 406 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 407 |
#, no-wrap |
| 408 |
msgid "NOTES" |
| 409 |
msgstr "" |
| 410 |
|
| 411 |
#. type: Plain text |
| 412 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 413 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 414 |
msgid "" |
| 415 |
"The function B<getpwent_r>() is not really reentrant since it shares the " |
| 416 |
"reading position in the stream with all other threads." |
| 417 |
msgstr "" |
| 418 |
|
| 419 |
#. type: SH |
| 420 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 421 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 422 |
#, no-wrap |
| 423 |
msgid "EXAMPLES" |
| 424 |
msgstr "" |
| 425 |
|
| 426 |
#. type: Plain text |
| 427 |
#: archlinux debian-unstable opensuse-leap-16-1 opensuse-tumbleweed |
| 428 |
#, no-wrap |
| 429 |
msgid "" |
| 430 |
"#define _GNU_SOURCE\n" |
| 431 |
"#include E<lt>pwd.hE<gt>\n" |
| 432 |
"#include E<lt>stdint.hE<gt>\n" |
| 433 |
"#include E<lt>stdio.hE<gt>\n" |
| 434 |
"#include E<lt>stdlib.hE<gt>\n" |
| 435 |
"\\&\n" |
| 436 |
"#define BUFLEN 4096\n" |
| 437 |
"\\&\n" |
| 438 |
"int\n" |
| 439 |
"main(void)\n" |
| 440 |
"{\n" |
| 441 |
" struct passwd pw;\n" |
| 442 |
" struct passwd *pwp;\n" |
| 443 |
" char buf[BUFLEN];\n" |
| 444 |
" int i;\n" |
| 445 |
"\\&\n" |
| 446 |
" setpwent();\n" |
| 447 |
" for (;;) {\n" |
| 448 |
" i = getpwent_r(&pw, buf, sizeof(buf), &pwp);\n" |
| 449 |
" if (i)\n" |
| 450 |
" break;\n" |
| 451 |
" printf(\"%s (%jd)\\[rs]tHOME %s\\[rs]tSHELL %s\\[rs]n\", pwp-E<gt>pw_name,\n" |
| 452 |
" (intmax_t) pwp-E<gt>pw_uid, pwp-E<gt>pw_dir, pwp-E<gt>pw_shell);\n" |
| 453 |
" }\n" |
| 454 |
" endpwent();\n" |
| 455 |
" exit(EXIT_SUCCESS);\n" |
| 456 |
"}\n" |
| 457 |
msgstr "" |
| 458 |
|
| 459 |
#. perhaps add error checking - should use strerror_r |
| 460 |
#. #include <errno.h> |
| 461 |
#. #include <stdlib.h> |
| 462 |
#. if (i) { |
| 463 |
#. if (i == ENOENT) |
| 464 |
#. break; |
| 465 |
#. printf("getpwent_r: %s", strerror(i)); |
| 466 |
#. exit(EXIT_SUCCESS); |
| 467 |
#. } |
| 468 |
#. SRC END |
| 469 |
#. type: SH |
| 470 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 471 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 472 |
#, no-wrap |
| 473 |
msgid "SEE ALSO" |
| 474 |
msgstr "" |
| 475 |
|
| 476 |
#. type: Plain text |
| 477 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 478 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 479 |
msgid "" |
| 480 |
"B<fgetpwent>(3), B<getpw>(3), B<getpwent>(3), B<getpwnam>(3), " |
| 481 |
"B<getpwuid>(3), B<putpwent>(3), B<passwd>(5)" |
| 482 |
msgstr "" |
| 483 |
|
| 484 |
#. type: TH |
| 485 |
#: debian-trixie |
| 486 |
#, no-wrap |
| 487 |
msgid "2024-06-15" |
| 488 |
msgstr "" |
| 489 |
|
| 490 |
#. type: TH |
| 491 |
#: debian-trixie |
| 492 |
#, no-wrap |
| 493 |
msgid "Linux man-pages 6.9.1" |
| 494 |
msgstr "" |
| 495 |
|
| 496 |
#. type: Plain text |
| 497 |
#: debian-trixie |
| 498 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 499 |
msgstr "" |
| 500 |
|
| 501 |
#. type: Plain text |
| 502 |
#: debian-trixie |
| 503 |
#, no-wrap |
| 504 |
msgid "" |
| 505 |
"B<int getpwent_r(struct passwd *restrict >I<pwbuf>B<,>\n" |
| 506 |
"B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n" |
| 507 |
"B< struct passwd **restrict >I<pwbufp>B<);>\n" |
| 508 |
"B<int fgetpwent_r(FILE *restrict >I<stream>B<, struct passwd *restrict >I<pwbuf>B<,>\n" |
| 509 |
"B< char >I<buf>B<[restrict .>I<buflen>B<], size_t >I<buflen>B<,>\n" |
| 510 |
"B< struct passwd **restrict >I<pwbufp>B<);>\n" |
| 511 |
msgstr "" |
| 512 |
|
| 513 |
#. type: Plain text |
| 514 |
#: debian-trixie |
| 515 |
msgid "" |
| 516 |
"The nonreentrant functions return a pointer to static storage, where this " |
| 517 |
"static storage contains further pointers to user name, password, gecos " |
| 518 |
"field, home directory and shell. The reentrant functions described here " |
| 519 |
"return all of that in caller-provided buffers. First of all there is the " |
| 520 |
"buffer I<pwbuf> that can hold a I<struct passwd>. And next the buffer " |
| 521 |
"I<buf> of size I<buflen> that can hold additional strings. The result of " |
| 522 |
"these functions, the I<struct passwd> read from the stream, is stored in the " |
| 523 |
"provided buffer I<*pwbuf>, and a pointer to this I<struct passwd> is " |
| 524 |
"returned in I<*pwbufp>." |
| 525 |
msgstr "" |
| 526 |
|
| 527 |
#. type: Plain text |
| 528 |
#: debian-trixie fedora-44 fedora-rawhide |
| 529 |
msgid "" |
| 530 |
"On success, these functions return 0 and I<*pwbufp> is a pointer to the " |
| 531 |
"I<struct passwd>. On error, these functions return an error value and " |
| 532 |
"I<*pwbufp> is NULL." |
| 533 |
msgstr "" |
| 534 |
|
| 535 |
#. type: Plain text |
| 536 |
#: debian-trixie |
| 537 |
#, no-wrap |
| 538 |
msgid "" |
| 539 |
"struct passwd *\n" |
| 540 |
"getpwent_r(struct passwd *pwd, char *buf, int buflen);\n" |
| 541 |
msgstr "" |
| 542 |
|
| 543 |
#. type: Plain text |
| 544 |
#: debian-trixie |
| 545 |
#, no-wrap |
| 546 |
msgid "" |
| 547 |
"int\n" |
| 548 |
"getpwent_r(struct passwd *pwd, char *buf, int buflen,\n" |
| 549 |
" FILE **pw_fp);\n" |
| 550 |
msgstr "" |
| 551 |
|
| 552 |
#. type: Plain text |
| 553 |
#: debian-trixie fedora-44 fedora-rawhide mageia-cauldron |
| 554 |
#, no-wrap |
| 555 |
msgid "" |
| 556 |
"#define _GNU_SOURCE\n" |
| 557 |
"#include E<lt>pwd.hE<gt>\n" |
| 558 |
"#include E<lt>stdint.hE<gt>\n" |
| 559 |
"#include E<lt>stdio.hE<gt>\n" |
| 560 |
"#include E<lt>stdlib.hE<gt>\n" |
| 561 |
"\\&\n" |
| 562 |
"#define BUFLEN 4096\n" |
| 563 |
"\\&\n" |
| 564 |
"int\n" |
| 565 |
"main(void)\n" |
| 566 |
"{\n" |
| 567 |
" struct passwd pw;\n" |
| 568 |
" struct passwd *pwp;\n" |
| 569 |
" char buf[BUFLEN];\n" |
| 570 |
" int i;\n" |
| 571 |
"\\&\n" |
| 572 |
" setpwent();\n" |
| 573 |
" while (1) {\n" |
| 574 |
" i = getpwent_r(&pw, buf, sizeof(buf), &pwp);\n" |
| 575 |
" if (i)\n" |
| 576 |
" break;\n" |
| 577 |
" printf(\"%s (%jd)\\[rs]tHOME %s\\[rs]tSHELL %s\\[rs]n\", pwp-E<gt>pw_name,\n" |
| 578 |
" (intmax_t) pwp-E<gt>pw_uid, pwp-E<gt>pw_dir, pwp-E<gt>pw_shell);\n" |
| 579 |
" }\n" |
| 580 |
" endpwent();\n" |
| 581 |
" exit(EXIT_SUCCESS);\n" |
| 582 |
"}\n" |
| 583 |
msgstr "" |
| 584 |
|
| 585 |
#. type: TH |
| 586 |
#: fedora-44 fedora-rawhide |
| 587 |
#, no-wrap |
| 588 |
msgid "2024-12-24" |
| 589 |
msgstr "" |
| 590 |
|
| 591 |
#. type: TH |
| 592 |
#: fedora-44 fedora-rawhide |
| 593 |
#, no-wrap |
| 594 |
msgid "Linux man-pages 6.13" |
| 595 |
msgstr "" |
| 596 |
|
| 597 |
#. type: Plain text |
| 598 |
#: fedora-44 fedora-rawhide |
| 599 |
#, no-wrap |
| 600 |
msgid "" |
| 601 |
"B<int getpwent_r(struct passwd *restrict >I<pwbuf>B<,>\n" |
| 602 |
"B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n" |
| 603 |
"B< struct passwd **restrict >I<pwbufp>B<);>\n" |
| 604 |
"B<int fgetpwent_r(FILE *restrict >I<stream>B<, struct passwd *restrict >I<pwbuf>B<,>\n" |
| 605 |
"B< char >I<buf>B<[restrict .>I<size>B<], size_t >I<size>B<,>\n" |
| 606 |
"B< struct passwd **restrict >I<pwbufp>B<);>\n" |
| 607 |
msgstr "" |
| 608 |
|
| 609 |
#. type: Plain text |
| 610 |
#: fedora-44 fedora-rawhide |
| 611 |
msgid "" |
| 612 |
"The nonreentrant functions return a pointer to static storage, where this " |
| 613 |
"static storage contains further pointers to user name, password, gecos " |
| 614 |
"field, home directory and shell. The reentrant functions described here " |
| 615 |
"return all of that in caller-provided buffers. First of all there is the " |
| 616 |
"buffer I<pwbuf> that can hold a I<struct passwd>. And next the buffer " |
| 617 |
"I<buf> of size I<size> that can hold additional strings. The result of " |
| 618 |
"these functions, the I<struct passwd> read from the stream, is stored in the " |
| 619 |
"provided buffer I<*pwbuf>, and a pointer to this I<struct passwd> is " |
| 620 |
"returned in I<*pwbufp>." |
| 621 |
msgstr "" |
| 622 |
|
| 623 |
#. type: TH |
| 624 |
#: mageia-cauldron |
| 625 |
#, no-wrap |
| 626 |
msgid "2026-02-08" |
| 627 |
msgstr "" |
| 628 |
|
| 629 |
#. type: TH |
| 630 |
#: mageia-cauldron |
| 631 |
#, no-wrap |
| 632 |
msgid "Linux man-pages 6.17" |
| 633 |
msgstr "" |
| 634 |
|
| 635 |
#. type: TH |
| 636 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 637 |
#, no-wrap |
| 638 |
msgid "Linux man-pages (unreleased)" |
| 639 |
msgstr "" |