xref: /freebsd/lib/libulog/utempter.h (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
104b0c5bbSEd Schouten /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
35e53a4f9SPedro F. Giffuni  *
404b0c5bbSEd Schouten  * Copyright (c) 2009 Ed Schouten <ed@FreeBSD.org>
504b0c5bbSEd Schouten  * All rights reserved.
604b0c5bbSEd Schouten  *
704b0c5bbSEd Schouten  * Redistribution and use in source and binary forms, with or without
804b0c5bbSEd Schouten  * modification, are permitted provided that the following conditions
904b0c5bbSEd Schouten  * are met:
1004b0c5bbSEd Schouten  * 1. Redistributions of source code must retain the above copyright
1104b0c5bbSEd Schouten  *    notice, this list of conditions and the following disclaimer.
1204b0c5bbSEd Schouten  * 2. Redistributions in binary form must reproduce the above copyright
1304b0c5bbSEd Schouten  *    notice, this list of conditions and the following disclaimer in the
1404b0c5bbSEd Schouten  *    documentation and/or other materials provided with the distribution.
1504b0c5bbSEd Schouten  *
1604b0c5bbSEd Schouten  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1704b0c5bbSEd Schouten  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1804b0c5bbSEd Schouten  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1904b0c5bbSEd Schouten  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2004b0c5bbSEd Schouten  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2104b0c5bbSEd Schouten  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2204b0c5bbSEd Schouten  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2304b0c5bbSEd Schouten  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2404b0c5bbSEd Schouten  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2504b0c5bbSEd Schouten  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2604b0c5bbSEd Schouten  * SUCH DAMAGE.
2704b0c5bbSEd Schouten  */
2804b0c5bbSEd Schouten 
2904b0c5bbSEd Schouten #ifndef _UTEMPTER_H_
3004b0c5bbSEd Schouten #define	_UTEMPTER_H_
3104b0c5bbSEd Schouten 
3204b0c5bbSEd Schouten #include <sys/cdefs.h>
3304b0c5bbSEd Schouten 
3404b0c5bbSEd Schouten __BEGIN_DECLS
3504b0c5bbSEd Schouten int	utempter_add_record(int, const char *);
3604b0c5bbSEd Schouten int	utempter_remove_added_record(void);
3704b0c5bbSEd Schouten int	utempter_remove_record(int);
3804b0c5bbSEd Schouten 
3904b0c5bbSEd Schouten void	addToUtmp(const char *, const char *, int);
4004b0c5bbSEd Schouten void	removeFromUtmp(void);
4104b0c5bbSEd Schouten void	removeLineFromUtmp(const char *, int);
4204b0c5bbSEd Schouten __END_DECLS
4304b0c5bbSEd Schouten 
4404b0c5bbSEd Schouten #endif /* !_UTEMPTER_H_ */
45