summaryrefslogtreecommitdiff
path: root/usr/src/lib/nsswitch/nis/common/getpwnam.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/nsswitch/nis/common/getpwnam.c')
-rw-r--r--usr/src/lib/nsswitch/nis/common/getpwnam.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/usr/src/lib/nsswitch/nis/common/getpwnam.c b/usr/src/lib/nsswitch/nis/common/getpwnam.c
index d623ebcbbd..a23ee8af5c 100644
--- a/usr/src/lib/nsswitch/nis/common/getpwnam.c
+++ b/usr/src/lib/nsswitch/nis/common/getpwnam.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * 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.
@@ -20,8 +19,8 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 1988-1992 Sun Microsystems Inc
- * All Rights Reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*
* nis/getpwnam.c -- "nis" backend for nsswitch "passwd" database
*/
@@ -36,7 +35,7 @@ getbyname(be, a)
nis_backend_ptr_t be;
void *a;
{
- nss_XbyY_args_t *argp = (nss_XbyY_args_t *) a;
+ nss_XbyY_args_t *argp = (nss_XbyY_args_t *)a;
return (_nss_nis_lookup(be, argp, 0,
"passwd.byname", argp->key.name, 0));
@@ -47,10 +46,10 @@ getbyuid(be, a)
nis_backend_ptr_t be;
void *a;
{
- nss_XbyY_args_t *argp = (nss_XbyY_args_t *) a;
+ nss_XbyY_args_t *argp = (nss_XbyY_args_t *)a;
char uidstr[12]; /* More than enough */
- sprintf(uidstr, "%d", argp->key.uid);
+ (void) snprintf(uidstr, 12, "%ld", argp->key.uid);
return (_nss_nis_lookup(be, argp, 0, "passwd.byuid", uidstr, 0));
}