xref: /titanic_41/usr/src/lib/getloginx/common/getloginx.c (revision 8a1259ef34833a7934b16172c15fc0aec436bb95)
1*c241e583SGary Mills /*
2*c241e583SGary Mills  * CDDL HEADER START
3*c241e583SGary Mills  *
4*c241e583SGary Mills  * The contents of this file are subject to the terms of the
5*c241e583SGary Mills  * Common Development and Distribution License, Version 1.0 only
6*c241e583SGary Mills  * (the "License").  You may not use this file except in compliance
7*c241e583SGary Mills  * with the License.
8*c241e583SGary Mills  *
9*c241e583SGary Mills  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*c241e583SGary Mills  * or http://www.opensolaris.org/os/licensing.
11*c241e583SGary Mills  * See the License for the specific language governing permissions
12*c241e583SGary Mills  * and limitations under the License.
13*c241e583SGary Mills  *
14*c241e583SGary Mills  * When distributing Covered Code, include this CDDL HEADER in each
15*c241e583SGary Mills  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*c241e583SGary Mills  * If applicable, add the following below this CDDL HEADER, with the
17*c241e583SGary Mills  * fields enclosed by brackets "[]" replaced with your own identifying
18*c241e583SGary Mills  * information: Portions Copyright [yyyy] [name of copyright owner]
19*c241e583SGary Mills  *
20*c241e583SGary Mills  * CDDL HEADER END
21*c241e583SGary Mills  */
22*c241e583SGary Mills /*
23*c241e583SGary Mills  *	Copyright (c) 2013 Gary Mills
24*c241e583SGary Mills  *
25*c241e583SGary Mills  * For old programs that handle long names correctly,
26*c241e583SGary Mills  * getlogin() returns a long login name without change.
27*c241e583SGary Mills  *
28*c241e583SGary Mills  * Use:
29*c241e583SGary Mills  *	LD_PRELOAD=getloginx.so.1 program args ...
30*c241e583SGary Mills  *
31*c241e583SGary Mills  */
32*c241e583SGary Mills 
33*c241e583SGary Mills extern char *getloginx(void);
34*c241e583SGary Mills 
35*c241e583SGary Mills char *
getlogin(void)36*c241e583SGary Mills getlogin(void)
37*c241e583SGary Mills {
38*c241e583SGary Mills 	return (getloginx());
39*c241e583SGary Mills }
40*c241e583SGary Mills 
41*c241e583SGary Mills /* */
42