setlogin.S revision 1849
1272343Sngie/*-
2272343Sngie * Copyright (c) 1991 The Regents of the University of California.
3272343Sngie * All rights reserved.
4272343Sngie *
5272343Sngie * This code is derived from software contributed to Berkeley by
6272343Sngie * William Jolitz.
7272343Sngie *
8272343Sngie * Redistribution and use in source and binary forms, with or without
9272343Sngie * modification, are permitted provided that the following conditions
10272343Sngie * are met:
11272343Sngie * 1. Redistributions of source code must retain the above copyright
12272343Sngie *    notice, this list of conditions and the following disclaimer.
13272343Sngie * 2. Redistributions in binary form must reproduce the above copyright
14272343Sngie *    notice, this list of conditions and the following disclaimer in the
15272343Sngie *    documentation and/or other materials provided with the distribution.
16272343Sngie * 3. All advertising materials mentioning features or use of this software
17272343Sngie *    must display the following acknowledgement:
18272343Sngie *	This product includes software developed by the University of
19272343Sngie *	California, Berkeley and its contributors.
20272343Sngie * 4. Neither the name of the University nor the names of its contributors
21272343Sngie *    may be used to endorse or promote products derived from this software
22272343Sngie *    without specific prior written permission.
23272343Sngie *
24272343Sngie * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25272343Sngie * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26272343Sngie * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27272343Sngie * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28272343Sngie * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29272343Sngie * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30272343Sngie * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31272343Sngie * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32272343Sngie * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33272343Sngie * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34272343Sngie * SUCH DAMAGE.
35272343Sngie *
36272343Sngie *	$Id: setlogin.S,v 1.2 1994/02/21 05:19:17 rgrimes Exp $
37272343Sngie */
38272343Sngie
39272343Sngie#if defined(LIBC_SCCS) && !defined(lint)
40272343Sngie	.asciz "@(#)setlogin.s	5.2 (Berkeley) 4/12/91"
41272343Sngie#endif /* LIBC_SCCS and not lint */
42272343Sngie
43272343Sngie#include "SYS.h"
44272343Sngie
45272343Sngie.globl	__logname_valid		/* in getlogin() */
46272343Sngie
47272343SngieSYSCALL(setlogin)
48272343Sngie#ifdef PIC
49272343Sngie	PIC_PROLOGUE
50272343Sngie	pushl	%eax
51272343Sngie	movl	PIC_GOT(__logname_valid),%eax
52272343Sngie	movl	$0,(%eax)
53272343Sngie	popl	%eax
54272343Sngie	PIC_EPILOGUE
55272343Sngie#else
56272343Sngie	movl	$0,__logname_valid
57272343Sngie#endif
58272343Sngie	ret				/* setlogin(name) */
59272343Sngie