setlogin.S revision 15634
192108Sphk/*- 292108Sphk * Copyright (c) 1991 The Regents of the University of California. 392108Sphk * All rights reserved. 492108Sphk * 592108Sphk * This code is derived from software contributed to Berkeley by 692108Sphk * William Jolitz. 792108Sphk * 892108Sphk * Redistribution and use in source and binary forms, with or without 992108Sphk * modification, are permitted provided that the following conditions 1092108Sphk * are met: 1192108Sphk * 1. Redistributions of source code must retain the above copyright 1292108Sphk * notice, this list of conditions and the following disclaimer. 1392108Sphk * 2. Redistributions in binary form must reproduce the above copyright 1492108Sphk * notice, this list of conditions and the following disclaimer in the 1592108Sphk * documentation and/or other materials provided with the distribution. 1692108Sphk * 3. All advertising materials mentioning features or use of this software 1792108Sphk * must display the following acknowledgement: 1892108Sphk * This product includes software developed by the University of 1992108Sphk * California, Berkeley and its contributors. 2092108Sphk * 4. Neither the name of the University nor the names of its contributors 2192108Sphk * may be used to endorse or promote products derived from this software 2292108Sphk * without specific prior written permission. 2392108Sphk * 2492108Sphk * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2592108Sphk * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2692108Sphk * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2792108Sphk * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2892108Sphk * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2992108Sphk * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3092108Sphk * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3192108Sphk * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3292108Sphk * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3392108Sphk * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3492108Sphk * SUCH DAMAGE. 3592108Sphk * 3692108Sphk * $Id: setlogin.S,v 1.2 1995/01/23 01:30:06 davidg Exp $ 3792108Sphk */ 3892108Sphk 3992108Sphk#if defined(LIBC_RCS) && !defined(lint) 4092108Sphk .text 4192108Sphk .asciz "$Id: setlogin.S,v 1.2 1995/01/23 01:30:06 davidg Exp $" 4292108Sphk#endif /* LIBC_RCS and not lint */ 4392108Sphk 4492108Sphk#include "SYS.h" 4592108Sphk 4692108Sphk.globl CNAME(_logname_valid) /* in getlogin() */ 4792108Sphk 4892108SphkSYSCALL(setlogin) 4992108Sphk#ifdef PIC 5092108Sphk PIC_PROLOGUE 5192108Sphk pushl %eax 5292108Sphk movl PIC_GOT(CNAME(_logname_valid)),%eax 5392108Sphk movl $0,(%eax) 5492108Sphk popl %eax 5592108Sphk PIC_EPILOGUE 5692108Sphk#else 5792108Sphk movl $0,CNAME(_logname_valid) 5892108Sphk#endif 5992108Sphk ret /* setlogin(name) */ 6092108Sphk