diff options
Diffstat (limited to 'usr/src/cmd/krb5/kwarn/kwarnd_clnt_stubs.c')
| -rw-r--r-- | usr/src/cmd/krb5/kwarn/kwarnd_clnt_stubs.c | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/usr/src/cmd/krb5/kwarn/kwarnd_clnt_stubs.c b/usr/src/cmd/krb5/kwarn/kwarnd_clnt_stubs.c index 207654b59e..434d1fe813 100644 --- a/usr/src/cmd/krb5/kwarn/kwarnd_clnt_stubs.c +++ b/usr/src/cmd/krb5/kwarn/kwarnd_clnt_stubs.c @@ -1,6 +1,27 @@ /* - * Copyright (c) 1998,1999, by Sun Microsystems, Inc. - * All rights reserved. + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -22,9 +43,9 @@ #include <sys/ddi.h> #include <sys/sunddi.h> #include <sys/uio.h> +#include <syslog.h> CLIENT *clnt, *getkwarnd_handle(void); -char *server = "localhost"; OM_UINT32 kwarn_add_warning(WARNING_NAME_T warning_name, int cred_exp_time) @@ -38,7 +59,12 @@ kwarn_add_warning(WARNING_NAME_T warning_name, int cred_exp_time) /* get the client handle to kwarnd */ if ((clnt = getkwarnd_handle()) == NULL) { - clnt_pcreateerror(server); + /* + * Let app output if an error occurs but we'll syslog to + * DEBUG to get error details if needed. + */ + syslog(LOG_DEBUG, "%s", + clnt_spcreateerror("getkwarnd_handle")); return (1); } @@ -70,7 +96,12 @@ kwarn_del_warning(WARNING_NAME_T warning_name) /* get the client GSSD handle */ if ((clnt = getkwarnd_handle()) == NULL) { - clnt_pcreateerror(server); + /* + * Let app output if an error occurs but we'll syslog to + * DEBUG to get error details if needed. + */ + syslog(LOG_DEBUG, "%s", + clnt_spcreateerror("getkwarnd_handle")); return (1); } |
