Revision 38106da7
src/node.cc | ||
---|---|---|
1513 | 1513 |
struct passwd pwd; |
1514 | 1514 |
struct passwd* pp; |
1515 | 1515 |
char buf[8192]; |
1516 |
int rc; |
|
1517 | 1516 |
|
1518 | 1517 |
errno = 0; |
1519 | 1518 |
pp = NULL; |
1520 | 1519 |
|
1521 |
if ((rc = getpwnam_r(name, &pwd, buf, sizeof(buf), &pp)) == 0 && pp != NULL) {
|
|
1520 |
if (getpwnam_r(name, &pwd, buf, sizeof(buf), &pp) == 0 && pp != NULL) {
|
|
1522 | 1521 |
return pp->pw_uid; |
1523 | 1522 |
} |
1524 | 1523 |
|
... | ... | |
1551 | 1550 |
struct group pwd; |
1552 | 1551 |
struct group* pp; |
1553 | 1552 |
char buf[8192]; |
1554 |
int rc; |
|
1555 | 1553 |
|
1556 | 1554 |
errno = 0; |
1557 | 1555 |
pp = NULL; |
1558 | 1556 |
|
1559 |
if ((rc = getgrnam_r(name, &pwd, buf, sizeof(buf), &pp)) == 0 && pp != NULL) {
|
|
1557 |
if (getgrnam_r(name, &pwd, buf, sizeof(buf), &pp) == 0 && pp != NULL) {
|
|
1560 | 1558 |
return pp->gr_gid; |
1561 | 1559 |
} |
1562 | 1560 |
|
Also available in: Unified diff