diff options
| author | Joep Vesseur <Joep.Vesseur@Sun.COM> | 2009-07-02 15:13:49 +0200 |
|---|---|---|
| committer | Joep Vesseur <Joep.Vesseur@Sun.COM> | 2009-07-02 15:13:49 +0200 |
| commit | 01ef659d9b1ead333ef0adc346e7051f7eae7520 (patch) | |
| tree | d2c5afe78a61d1a009b9345db69f2f3873f1ac21 /usr/src/lib/nsswitch/files/common | |
| parent | a1ba878124e55e106e12f717d2b0aa3d6c531858 (diff) | |
| download | illumos-gate-01ef659d9b1ead333ef0adc346e7051f7eae7520.tar.gz | |
6848927 sulogin accepts empty username
6446994 'profiles -l' doesn't list all commands if profile has both solaris and suser policies
Diffstat (limited to 'usr/src/lib/nsswitch/files/common')
| -rw-r--r-- | usr/src/lib/nsswitch/files/common/getexecattr.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/usr/src/lib/nsswitch/files/common/getexecattr.c b/usr/src/lib/nsswitch/files/common/getexecattr.c index ac9e50ad3a..d4993a98e1 100644 --- a/usr/src/lib/nsswitch/files/common/getexecattr.c +++ b/usr/src/lib/nsswitch/files/common/getexecattr.c @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdlib.h> #include "files_common.h" #include <time.h> @@ -80,7 +78,7 @@ check_match(nss_XbyY_args_t *argp, const char *line, int linelen) if (keyp) { /* compare field */ while (*keyp && linep < limit && - *linep != ':' && *keyp == *linep) { + *linep != ':' && *keyp == *linep) { keyp++; linep++; } @@ -220,7 +218,8 @@ _exec_files_XY_all(files_backend_ptr_t be, default: break; } - if ((strstr(instr, _priv_exec->policy) == NULL) || + if (((_priv_exec->policy != NULL) && + (strstr(instr, _priv_exec->policy) == NULL)) || ((_priv_exec->type != NULL) && (strstr(instr, _priv_exec->type) == NULL))) continue; @@ -262,10 +261,10 @@ _exec_files_XY_all(files_backend_ptr_t be, argp->buf.buffer, argp->buf.buflen); if (parse_stat == NSS_STR_PARSE_SUCCESS) { argp->returnval = (argp->buf.result != NULL)? - argp->buf.result : argp->buf.buffer; + argp->buf.result : argp->buf.buffer; argp->returnlen = linelen; res = NSS_SUCCESS; - if (_priv_exec->search_flag == GET_ONE) { + if (IS_GET_ONE(_priv_exec->search_flag)) { break; } else if (_doexeclist(argp) == 0) { res = NSS_UNAVAIL; @@ -387,8 +386,6 @@ _nss_files_exec_attr_constr(const char *dummy1, const char *dummy7) { return (_nss_files_constr(execattr_ops, - sizeof (execattr_ops)/sizeof (execattr_ops[0]), - EXECATTR_FILENAME, - NSS_LINELEN_EXECATTR, - NULL)); + sizeof (execattr_ops)/sizeof (execattr_ops[0]), + EXECATTR_FILENAME, NSS_LINELEN_EXECATTR, NULL)); } |
