diff options
author | Brent Paulson <Brent.Paulson@Sun.COM> | 2009-07-23 18:29:20 +0100 |
---|---|---|
committer | Brent Paulson <Brent.Paulson@Sun.COM> | 2009-07-23 18:29:20 +0100 |
commit | fc960aa7d5b64fecfb1cd068106eb0dc81cf5bf0 (patch) | |
tree | 0177d5d3d7e04cab7218dc42bd434077e2ac8ff5 /usr/src/uts/common/c2 | |
parent | 5fbb41393be5d63f75952b1d72d4df2642d22557 (diff) | |
download | illumos-gate-fc960aa7d5b64fecfb1cd068106eb0dc81cf5bf0.tar.gz |
6795688 fsattr(5) auditing needs to be more careful with certain fad_aupaths
6816071 fsattr(5) auditing shouldn't attempt to record pathnames for invalid fds
Diffstat (limited to 'usr/src/uts/common/c2')
-rw-r--r-- | usr/src/uts/common/c2/audit.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr/src/uts/common/c2/audit.c b/usr/src/uts/common/c2/audit.c index 66b0e4a3ff..fa010e1d24 100644 --- a/usr/src/uts/common/c2/audit.c +++ b/usr/src/uts/common/c2/audit.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -1349,11 +1349,18 @@ audit_setfsat_path(int argnum) tad->tad_atpath = NULL; } if (fd != AT_FDCWD) { - if ((fp = getf(fd)) == NULL) + if ((fp = getf(fd)) == NULL) { + tad->tad_ctrl |= PAD_NOPATH; return; + } fad = F2A(fp); ASSERT(fad); + if (fad->fad_aupath == NULL) { + tad->tad_ctrl |= PAD_NOPATH; + releasef(fd); + return; + } au_pathhold(fad->fad_aupath); tad->tad_atpath = fad->fad_aupath; releasef(fd); |