setlogin.S revision 115279
1208599Srdivacky/*-
2208599Srdivacky * Copyright (c) 1991 The Regents of the University of California.
3208599Srdivacky * All rights reserved.
4208599Srdivacky *
5208599Srdivacky * This code is derived from software contributed to Berkeley by
6208599Srdivacky * William Jolitz.
7208599Srdivacky *
8208599Srdivacky * Redistribution and use in source and binary forms, with or without
9208599Srdivacky * modification, are permitted provided that the following conditions
10208599Srdivacky * are met:
11208599Srdivacky * 1. Redistributions of source code must retain the above copyright
12208599Srdivacky *    notice, this list of conditions and the following disclaimer.
13208599Srdivacky * 2. Redistributions in binary form must reproduce the above copyright
14208599Srdivacky *    notice, this list of conditions and the following disclaimer in the
15208599Srdivacky *    documentation and/or other materials provided with the distribution.
16208599Srdivacky * 3. All advertising materials mentioning features or use of this software
17249423Sdim *    must display the following acknowledgement:
18208599Srdivacky *	This product includes software developed by the University of
19210299Sed *	California, Berkeley and its contributors.
20210299Sed * 4. Neither the name of the University nor the names of its contributors
21208599Srdivacky *    may be used to endorse or promote products derived from this software
22218893Sdim *    without specific prior written permission.
23208599Srdivacky *
24208599Srdivacky * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25208599Srdivacky * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26208599Srdivacky * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27218893Sdim * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28208599Srdivacky * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29208599Srdivacky * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30208599Srdivacky * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31208599Srdivacky * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32208599Srdivacky * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33208599Srdivacky * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34208599Srdivacky * SUCH DAMAGE.
35208599Srdivacky */
36208599Srdivacky
37208599Srdivacky#if defined(LIBC_SCCS) && !defined(lint)
38208599Srdivacky	.asciz "@(#)setlogin.s	5.2 (Berkeley) 4/12/91"
39208599Srdivacky#endif /* LIBC_SCCS and not lint */
40208599Srdivacky#include <machine/asm.h>
41208599Srdivacky__FBSDID("$FreeBSD: head/lib/libc/amd64/sys/setlogin.S 115279 2003-05-24 17:35:23Z peter $");
42208599Srdivacky
43208599Srdivacky#include "SYS.h"
44208599Srdivacky
45208599Srdivacky.globl	CNAME(_logname_valid)		/* in _getlogin() */
46208599Srdivacky
47208599SrdivackySYSCALL(setlogin)
48208599Srdivacky#ifdef PIC
49208599Srdivacky	movq	PIC_GOT(CNAME(_logname_valid)),%rdx
50208599Srdivacky	movl	$0,(%rdx)
51208599Srdivacky#else
52208599Srdivacky	movl	$0,CNAME(_logname_valid)(%rip)
53249423Sdim#endif
54249423Sdim	ret				/* setlogin(name) */
55249423Sdim