0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills/*
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * CDDL HEADER START
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills *
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * The contents of this file are subject to the terms of the
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * Common Development and Distribution License, Version 1.0 only
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * (the "License"). You may not use this file except in compliance
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * with the License.
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills *
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * or http://www.opensolaris.org/os/licensing.
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * See the License for the specific language governing permissions
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * and limitations under the License.
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills *
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * When distributing Covered Code, include this CDDL HEADER in each
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * If applicable, add the following below this CDDL HEADER, with the
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * fields enclosed by brackets "[]" replaced with your own identifying
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * information: Portions Copyright [yyyy] [name of copyright owner]
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills *
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * CDDL HEADER END
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills */
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills/*
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * Copyright (c) 2013 Gary Mills
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills *
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * For old programs that handle long names correctly,
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * getlogin() returns a long login name without change.
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills *
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * Use:
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills * LD_PRELOAD=getloginx.so.1 program args ...
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills *
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills */
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Millsextern char *getloginx(void);
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Millschar *
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Millsgetlogin(void)
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills{
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills return (getloginx());
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills}
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills
0a1278f26ea4b7c8c0285d4f2d6c5b680904aa01Gary Mills/* */