diff options
author | sdussud <none@none> | 2007-02-07 12:22:46 -0800 |
---|---|---|
committer | sdussud <none@none> | 2007-02-07 12:22:46 -0800 |
commit | bf1f3d9222ae6fcadd490d70a03838f7a2d30bb0 (patch) | |
tree | bdde373715e9acb2994b922b662492b4226292d5 /usr/src | |
parent | 9ed7afb74239987a3a9fbe2d75a08904b1665a31 (diff) | |
download | illumos-joyent-bf1f3d9222ae6fcadd490d70a03838f7a2d30bb0.tar.gz |
6485580 "profiles -l" does not pick up exec_attr entries from nis maps
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/lib/nsswitch/nis/common/getexecattr.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/usr/src/lib/nsswitch/nis/common/getexecattr.c b/usr/src/lib/nsswitch/nis/common/getexecattr.c index 9a4ff82dda..4dc8255b7e 100644 --- a/usr/src/lib/nsswitch/nis/common/getexecattr.c +++ b/usr/src/lib/nsswitch/nis/common/getexecattr.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -202,7 +202,18 @@ _exec_nis_cb(int instatus, _priv_execattr *_priv_exec = (_priv_execattr *)(argp->key.attrp); if (instatus != YP_TRUE) { - *(eargp->yp_status) = YPERR_YPERR; + /* + * If we have no more data to look at, we want to + * keep yp_status from previous key/value pair + * that we processed. + * If this is the 1st time we enter this callback, + * yp_status is already set to YPERR_YPERR + * (see _exec_nis_lookup() for when this callback + * and arguments are set initially). + */ + if (instatus != YP_NOMORE) { + *(eargp->yp_status) = YPERR_YPERR; + } return (0); /* yp_all may decide otherwise... */ } @@ -325,6 +336,15 @@ _exec_nis_lookup(nis_backend_ptr_t be, nss_XbyY_args_t *argp, int getby_flag) case YPERR_BUSY: res = NSS_TRYAGAIN; break; + case YPERR_KEY: + /* + * If no such key, return NSS_NOTFOUND + * as this looks more relevant; it will + * also help libnsl to try with another + * policy (see _getexecprof()). + */ + res = NSS_NOTFOUND; + break; default: res = NSS_UNAVAIL; break; |