summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2009-12-19 22:41:39 +0000
committerschwarze <schwarze@openbsd.org>2009-12-19 22:41:39 +0000
commitdfecd56a097e9352a4ebdda1b42a097eeec123e5 (patch)
treed7745abb389bddc707021e5a995e6996811f9e9f /usr.bin/ssh/ssh.c
parenttry to clarify ChrootDirectory pathname argument a bit; resulting from (diff)
downloadwireguard-openbsd-dfecd56a097e9352a4ebdda1b42a097eeec123e5.tar.xz
wireguard-openbsd-dfecd56a097e9352a4ebdda1b42a097eeec123e5.zip
Implement proper error handling for getgrent(3), getgrnam(3) and getgrgid(3).
1) Distinguish normal end of data (like eof, YPERR_NOMORE, YPERR_KEY) from error conditions. 2) Save errno(2) and restore it in case of success, as suggested by deraadt@ and beck@. While this code is touched, * move the common code for the yp_first and yp_next calls after the respective if/else-block; note that free(data) is not needed in case of failure and that __ypcurrent = NULL does no harm after failing yp_first. * return 0, not NULL: the return value of grscan is int, not a pointer. This is the last part of the work done on getgrent.c during c2k9, heavily relying on the other improvements done at that time. This has been rotting in my tree far too long. "get it in" deraadt@; also lightly tested by simon@ some time ago
Diffstat (limited to 'usr.bin/ssh/ssh.c')
0 files changed, 0 insertions, 0 deletions