Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/libpwdgrp/pwd_grp_internal.c
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/libpwdgrp/pwd_grp_internal.c
r1765 r2725 1 1 /* vi: set sw=4 ts=4: */ 2 /* 2 /* Copyright (C) 2003 Manuel Novoa III 3 3 * 4 * Licensed under GPL v2, or later. See file LICENSE in this tarball.4 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 5 5 */ 6 6 7 /* 7 /* Nov 6, 2003 Initial version. 8 8 * 9 * 9 * NOTE: This implementation is quite strict about requiring all 10 10 * field seperators. It also does not allow leading whitespace 11 11 * except when processing the numeric fields. glibc is more 12 12 * lenient. See the various glibc difference comments below. 13 13 * 14 * 14 * TODO: 15 15 * Move to dynamic allocation of (currently statically allocated) 16 16 * buffers; especially for the group-related functions since 17 17 * large group member lists will cause error returns. 18 *19 18 */ 20 19 … … 33 32 *result = NULL; 34 33 35 stream = fopen (GETXXKEY_R_PATHNAME, "r");34 stream = fopen_for_read(GETXXKEY_R_PATHNAME); 36 35 if (!stream) 37 36 return errno; … … 39 38 rv = bb__pgsreader(GETXXKEY_R_PARSER, resultbuf, buffer, buflen, stream); 40 39 if (!rv) { 41 if (GETXXKEY_R_TEST(resultbuf)) { /* Found key? */40 if (GETXXKEY_R_TEST(resultbuf)) { /* found key? */ 42 41 *result = resultbuf; 43 42 break; 44 43 } 45 44 } else { 46 if (rv == ENOENT) { /* end-of-file encountered.*/45 if (rv == ENOENT) { /* EOF encountered */ 47 46 rv = 0; 48 47 }
Note:
See TracChangeset
for help on using the changeset viewer.