setlogin.S revision 71579
1230557Sjimharris/*- 2230557Sjimharris * Copyright (c) 1991 The Regents of the University of California. 3230557Sjimharris * All rights reserved. 4230557Sjimharris * 5230557Sjimharris * This code is derived from software contributed to Berkeley by 6230557Sjimharris * William Jolitz. 7230557Sjimharris * 8230557Sjimharris * Redistribution and use in source and binary forms, with or without 9230557Sjimharris * modification, are permitted provided that the following conditions 10230557Sjimharris * are met: 11230557Sjimharris * 1. Redistributions of source code must retain the above copyright 12230557Sjimharris * notice, this list of conditions and the following disclaimer. 13230557Sjimharris * 2. Redistributions in binary form must reproduce the above copyright 14230557Sjimharris * notice, this list of conditions and the following disclaimer in the 15230557Sjimharris * documentation and/or other materials provided with the distribution. 16230557Sjimharris * 3. All advertising materials mentioning features or use of this software 17230557Sjimharris * must display the following acknowledgement: 18230557Sjimharris * This product includes software developed by the University of 19230557Sjimharris * California, Berkeley and its contributors. 20230557Sjimharris * 4. Neither the name of the University nor the names of its contributors 21230557Sjimharris * may be used to endorse or promote products derived from this software 22230557Sjimharris * without specific prior written permission. 23230557Sjimharris * 24230557Sjimharris * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25230557Sjimharris * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26230557Sjimharris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27230557Sjimharris * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28230557Sjimharris * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29230557Sjimharris * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30230557Sjimharris * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31230557Sjimharris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32230557Sjimharris * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33230557Sjimharris * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34230557Sjimharris * SUCH DAMAGE. 35230557Sjimharris * 36230557Sjimharris * $FreeBSD: head/lib/libc/amd64/sys/setlogin.S 71579 2001-01-24 13:01:12Z deischen $ 37230557Sjimharris */ 38230557Sjimharris 39230557Sjimharris#if defined(LIBC_RCS) && !defined(lint) 40230557Sjimharris .text 41230557Sjimharris .asciz "$FreeBSD: head/lib/libc/amd64/sys/setlogin.S 71579 2001-01-24 13:01:12Z deischen $" 42230557Sjimharris#endif /* LIBC_RCS and not lint */ 43230557Sjimharris 44230557Sjimharris#include "SYS.h" 45230557Sjimharris 46230557Sjimharris.globl CNAME(_logname_valid) /* in _getlogin() */ 47230557Sjimharris 48230557SjimharrisSYSCALL(setlogin) 49230557Sjimharris#ifdef PIC 50230557Sjimharris PIC_PROLOGUE 51230557Sjimharris pushl %eax 52230557Sjimharris movl PIC_GOT(CNAME(_logname_valid)),%eax 53230557Sjimharris movl $0,(%eax) 54230557Sjimharris popl %eax 55230557Sjimharris PIC_EPILOGUE 56230557Sjimharris#else 57230557Sjimharris movl $0,CNAME(_logname_valid) 58230557Sjimharris#endif 59230557Sjimharris ret /* setlogin(name) */ 60230557Sjimharris