]> granicus.if.org Git - musl/commit
set errno when getpw*_r, getgr*_r, and getspnam_r fail
authorRich Felker <dalias@aerifal.cx>
Thu, 15 Jun 2017 17:01:34 +0000 (13:01 -0400)
committerRich Felker <dalias@aerifal.cx>
Thu, 15 Jun 2017 17:01:34 +0000 (13:01 -0400)
commit2d7d05f031e014068a61d3076c6178513395d2ae
tree533f4bd2fedea2ff59d998ebc1f6c73aabc1ac44
parent5c10c33d2a35204ee76931625a007fcc8cca3228
set errno when getpw*_r, getgr*_r, and getspnam_r fail

these functions return an error code, and are not explicitly
documented to set errno, but they are nonstandard and the historical
implementations do set errno as well, and some applications expect
this behavior. do likewise for compatibility.

patch by Rudolph Pereira.
src/passwd/getgr_r.c
src/passwd/getpw_r.c
src/passwd/getspnam_r.c