setlogin.S revision 81586
1224133Sdim/*- 2224133Sdim * Copyright (c) 1991 The Regents of the University of California. 3224133Sdim * All rights reserved. 4224133Sdim * 5224133Sdim * This code is derived from software contributed to Berkeley by 6224133Sdim * William Jolitz. 7224133Sdim * 8224133Sdim * Redistribution and use in source and binary forms, with or without 9224133Sdim * modification, are permitted provided that the following conditions 10224133Sdim * are met: 11224133Sdim * 1. Redistributions of source code must retain the above copyright 12224133Sdim * notice, this list of conditions and the following disclaimer. 13224133Sdim * 2. Redistributions in binary form must reproduce the above copyright 14224133Sdim * notice, this list of conditions and the following disclaimer in the 15224133Sdim * documentation and/or other materials provided with the distribution. 16224133Sdim * 3. All advertising materials mentioning features or use of this software 17226633Sdim * must display the following acknowledgement: 18224133Sdim * This product includes software developed by the University of 19224133Sdim * California, Berkeley and its contributors. 20224133Sdim * 4. Neither the name of the University nor the names of its contributors 21226633Sdim * may be used to endorse or promote products derived from this software 22226633Sdim * without specific prior written permission. 23226633Sdim * 24226633Sdim * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25226633Sdim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26226633Sdim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27224133Sdim * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28224133Sdim * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29224133Sdim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30226633Sdim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31224133Sdim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32224133Sdim * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33224133Sdim * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34226633Sdim * SUCH DAMAGE. 35226633Sdim */ 36226633Sdim 37226633Sdim#if defined(LIBC_RCS) && !defined(lint) 38226633Sdim .text 39226633Sdim .asciz "$FreeBSD: head/lib/libc/i386/sys/setlogin.S 81586 2001-08-13 14:06:34Z ru $" 40226633Sdim#endif /* LIBC_RCS and not lint */ 41226633Sdim 42226633Sdim#include "SYS.h" 43226633Sdim 44226633Sdim.globl CNAME(_logname_valid) /* in _getlogin() */ 45226633Sdim 46226633SdimSYSCALL(setlogin) 47226633Sdim#ifdef PIC 48226633Sdim PIC_PROLOGUE 49226633Sdim pushl %eax 50224133Sdim movl PIC_GOT(CNAME(_logname_valid)),%eax 51224133Sdim movl $0,(%eax) 52224133Sdim popl %eax 53224133Sdim PIC_EPILOGUE 54224133Sdim#else 55224133Sdim movl $0,CNAME(_logname_valid) 56224133Sdim#endif 57234353Sdim ret /* setlogin(name) */ 58234353Sdim