loginx.c revision 1.1
11.1Sjdolecek/* $NetBSD: loginx.c,v 1.1 2002/09/27 20:42:48 jdolecek Exp $ */ 21.1Sjdolecek 31.1Sjdolecek/* 41.1Sjdolecek * Copyright (c) 1988, 1993 51.1Sjdolecek * The Regents of the University of California. All rights reserved. 61.1Sjdolecek * 71.1Sjdolecek * Redistribution and use in source and binary forms, with or without 81.1Sjdolecek * modification, are permitted provided that the following conditions 91.1Sjdolecek * are met: 101.1Sjdolecek * 1. Redistributions of source code must retain the above copyright 111.1Sjdolecek * notice, this list of conditions and the following disclaimer. 121.1Sjdolecek * 2. Redistributions in binary form must reproduce the above copyright 131.1Sjdolecek * notice, this list of conditions and the following disclaimer in the 141.1Sjdolecek * documentation and/or other materials provided with the distribution. 151.1Sjdolecek * 3. All advertising materials mentioning features or use of this software 161.1Sjdolecek * must display the following acknowledgement: 171.1Sjdolecek * This product includes software developed by the University of 181.1Sjdolecek * California, Berkeley and its contributors. 191.1Sjdolecek * 4. Neither the name of the University nor the names of its contributors 201.1Sjdolecek * may be used to endorse or promote products derived from this software 211.1Sjdolecek * without specific prior written permission. 221.1Sjdolecek * 231.1Sjdolecek * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 241.1Sjdolecek * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 251.1Sjdolecek * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 261.1Sjdolecek * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 271.1Sjdolecek * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 281.1Sjdolecek * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 291.1Sjdolecek * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 301.1Sjdolecek * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 311.1Sjdolecek * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 321.1Sjdolecek * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 331.1Sjdolecek * SUCH DAMAGE. 341.1Sjdolecek */ 351.1Sjdolecek 361.1Sjdolecek#include <sys/cdefs.h> 371.1Sjdolecek#if defined(LIBC_SCCS) && !defined(lint) 381.1Sjdolecek__RCSID("$NetBSD: loginx.c,v 1.1 2002/09/27 20:42:48 jdolecek Exp $"); 391.1Sjdolecek#endif /* LIBC_SCCS and not lint */ 401.1Sjdolecek 411.1Sjdolecek#include <sys/types.h> 421.1Sjdolecek 431.1Sjdolecek#include <assert.h> 441.1Sjdolecek#include <errno.h> 451.1Sjdolecek#include <fcntl.h> 461.1Sjdolecek#include <stdio.h> 471.1Sjdolecek#include <stdlib.h> 481.1Sjdolecek#include <unistd.h> 491.1Sjdolecek#include <util.h> 501.1Sjdolecek#include <utmp.h> 511.1Sjdolecek#include <utmpx.h> 521.1Sjdolecek 531.1Sjdolecekvoid 541.1Sjdolecekloginx(const struct utmpx *ut) 551.1Sjdolecek{ 561.1Sjdolecek (void)pututxline(ut); 571.1Sjdolecek (void)updwtmpx(_PATH_WTMPX, ut); 581.1Sjdolecek} 59