11.2Sagc/* $NetBSD: loginx.c,v 1.2 2003/08/07 16:44:59 agc 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.2Sagc * 3. Neither the name of the University nor the names of its contributors 161.1Sjdolecek * may be used to endorse or promote products derived from this software 171.1Sjdolecek * without specific prior written permission. 181.1Sjdolecek * 191.1Sjdolecek * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 201.1Sjdolecek * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 211.1Sjdolecek * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 221.1Sjdolecek * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 231.1Sjdolecek * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 241.1Sjdolecek * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 251.1Sjdolecek * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 261.1Sjdolecek * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 271.1Sjdolecek * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 281.1Sjdolecek * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 291.1Sjdolecek * SUCH DAMAGE. 301.1Sjdolecek */ 311.1Sjdolecek 321.1Sjdolecek#include <sys/cdefs.h> 331.1Sjdolecek#if defined(LIBC_SCCS) && !defined(lint) 341.2Sagc__RCSID("$NetBSD: loginx.c,v 1.2 2003/08/07 16:44:59 agc Exp $"); 351.1Sjdolecek#endif /* LIBC_SCCS and not lint */ 361.1Sjdolecek 371.1Sjdolecek#include <sys/types.h> 381.1Sjdolecek 391.1Sjdolecek#include <assert.h> 401.1Sjdolecek#include <errno.h> 411.1Sjdolecek#include <fcntl.h> 421.1Sjdolecek#include <stdio.h> 431.1Sjdolecek#include <stdlib.h> 441.1Sjdolecek#include <unistd.h> 451.1Sjdolecek#include <util.h> 461.1Sjdolecek#include <utmp.h> 471.1Sjdolecek#include <utmpx.h> 481.1Sjdolecek 491.1Sjdolecekvoid 501.1Sjdolecekloginx(const struct utmpx *ut) 511.1Sjdolecek{ 521.1Sjdolecek (void)pututxline(ut); 531.1Sjdolecek (void)updwtmpx(_PATH_WTMPX, ut); 541.1Sjdolecek} 55