1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

nss_wrapper: hopefully a better fix for the solaris get*ent_r functions

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25873 0c0555d6-39d7-0310-84fc-f1cc0bd64818
This commit is contained in:
metze 2007-11-06 12:34:50 +00:00 committed by Stefan Metzmacher
parent 350d6c19e3
commit e0c8c01650

View File

@ -906,7 +906,21 @@ _PUBLIC_ int nwrap_getpwent_r(struct passwd *pwdst, char *buf,
struct passwd *pw;
if (!nwrap_enabled()) {
#ifdef SOLARIS_GETPWENT_R
pw = real_getpwent_r(pwdst, buf, buflen);
if (!pw) {
if (errno == 0) {
return ENOENT;
}
return errno;
}
if (pwdstp) {
*pwdstp = pw;
}
return 0;
#else
return real_getpwent_r(pwdst, buf, buflen, pwdstp);
#endif
}
pw = nwrap_getpwent();
@ -1078,7 +1092,21 @@ _PUBLIC_ int nwrap_getgrent_r(struct group *grdst, char *buf,
struct group *gr;
if (!nwrap_enabled()) {
#ifdef SOLARIS_GETGRENT_R
gr = real_getgrent_r(grdst, buf, buflen);
if (!gr) {
if (errno == 0) {
return ENOENT;
}
return errno;
}
if (grdstp) {
*grdstp = gr;
}
return 0;
#else
return real_getgrent_r(grdst, buf, buflen, grdstp);
#endif
}
gr = nwrap_getgrent();