setlogin.S revision 22993
13056Sdg/*- 23056Sdg * Copyright (c) 1991 The Regents of the University of California. 33056Sdg * All rights reserved. 43056Sdg * 53056Sdg * This code is derived from software contributed to Berkeley by 63056Sdg * William Jolitz. 73056Sdg * 83056Sdg * Redistribution and use in source and binary forms, with or without 93056Sdg * modification, are permitted provided that the following conditions 103056Sdg * are met: 113056Sdg * 1. Redistributions of source code must retain the above copyright 123056Sdg * notice, this list of conditions and the following disclaimer. 133056Sdg * 2. Redistributions in binary form must reproduce the above copyright 143056Sdg * notice, this list of conditions and the following disclaimer in the 153056Sdg * documentation and/or other materials provided with the distribution. 163056Sdg * 3. All advertising materials mentioning features or use of this software 173056Sdg * must display the following acknowledgement: 183056Sdg * This product includes software developed by the University of 193056Sdg * California, Berkeley and its contributors. 203056Sdg * 4. Neither the name of the University nor the names of its contributors 213056Sdg * may be used to endorse or promote products derived from this software 223056Sdg * without specific prior written permission. 233056Sdg * 243056Sdg * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 253056Sdg * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 263056Sdg * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 273056Sdg * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 283056Sdg * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 293056Sdg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3050477Speter * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 313056Sdg * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 323056Sdg * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 333056Sdg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 343056Sdg * SUCH DAMAGE. 353056Sdg * 363056Sdg * $Id$ 37130927Sobrien */ 383056Sdg 393056Sdg#if defined(LIBC_RCS) && !defined(lint) 403056Sdg .text 413056Sdg .asciz "$Id$" 423056Sdg#endif /* LIBC_RCS and not lint */ 433056Sdg 443056Sdg#include "SYS.h" 45130927Sobrien 46130927Sobrien.globl CNAME(_logname_valid) /* in getlogin() */ 47130927Sobrien 483056SdgSYSCALL(setlogin) 493056Sdg#ifdef PIC 5091394Stmm PIC_PROLOGUE 513056Sdg pushl %eax 5291394Stmm movl PIC_GOT(CNAME(_logname_valid)),%eax 533056Sdg movl $0,(%eax) 5491394Stmm popl %eax 553056Sdg PIC_EPILOGUE 5691394Stmm#else 5790868Smike movl $0,CNAME(_logname_valid) 583056Sdg#endif 593056Sdg ret /* setlogin(name) */ 603056Sdg