Mercurial > illumos > illumos-gate
changeset 3662:d7848fb68fba
6520921 problems with Java Audit
author | gww |
---|---|
date | Thu, 15 Feb 2007 13:46:37 -0800 |
parents | 42a018c1e567 |
children | 718327411bfa |
files | usr/src/lib/libbsm/common/adt.c |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/libbsm/common/adt.c Thu Feb 15 11:50:23 2007 -0800 +++ b/usr/src/lib/libbsm/common/adt.c Thu Feb 15 13:46:37 2007 -0800 @@ -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. */ @@ -1482,6 +1482,18 @@ if (adt_get_mask_from_user(ruid, &(state->as_info.ai_mask))) return (-1); + /* Assume intending to audit as this process */ + + if (state->as_pid == (pid_t)-1) + state->as_pid = getpid(); + + if (is_system_labeled() && state->as_label == NULL) { + ucred_t *ucred = ucred_get(P_MYID); + + state->as_label = adt_ucred_label(ucred); + ucred_free(ucred); + } + return (0); }