Deleted Added
sdiff udiff text old ( 129677 ) new ( 149423 )
full compact
1/*
2 * Copyright (c) 1996 Peter Wemm <peter@FreeBSD.org>.
3 * All rights reserved.
4 * Copyright (c) 2002 Networks Associates Technology, Inc.
5 * All rights reserved.
6 *
7 * Portions of this software were developed for the FreeBSD Project by
8 * ThinkSec AS and NAI Labs, the Security Research Division of Network

--- 19 unchanged lines hidden (view full) ---

28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * $FreeBSD: head/lib/libutil/libutil.h 149423 2005-08-24 17:21:38Z pjd $
37 */
38
39#ifndef _LIBUTIL_H_
40#define _LIBUTIL_H_
41
42#define PROPERTY_MAX_NAME 64
43#define PROPERTY_MAX_VALUE 512
44
45/* for properties.c */
46typedef struct _property {
47 struct _property *next;
48 char *name;
49 char *value;
50} *properties;
51
52#ifdef _SYS_PARAM_H_
53/* for pidfile.c */
54struct pidfh {
55 int pf_fd;
56 char pf_path[MAXPATHLEN + 1];
57 __dev_t pf_dev;
58 ino_t pf_ino;
59};
60#endif
61
62/* Avoid pulling in all the include files for no need */
63struct termios;
64struct winsize;
65struct utmp;
66struct in_addr;
67
68__BEGIN_DECLS
69void clean_environment(const char * const *_white,

--- 37 unchanged lines hidden (view full) ---

107int pw_init(const char *_dir, const char *_master);
108char *pw_make(const struct passwd *_pw);
109int pw_mkdb(const char *_user);
110int pw_lock(void);
111struct passwd *pw_scan(const char *_line, int _flags);
112const char *pw_tempname(void);
113int pw_tmp(int _mfd);
114#endif
115
116#ifdef _SYS_PARAM_H_
117struct pidfh *pidfile_open(const char *path, mode_t mode, pid_t *pidptr);
118int pidfile_write(struct pidfh *pfh);
119int pidfile_close(struct pidfh *pfh);
120int pidfile_remove(struct pidfh *pfh);
121#endif
122__END_DECLS
123
124#define UU_LOCK_INUSE (1)
125#define UU_LOCK_OK (0)
126#define UU_LOCK_OPEN_ERR (-1)
127#define UU_LOCK_READ_ERR (-2)
128#define UU_LOCK_CREAT_ERR (-3)
129#define UU_LOCK_WRITE_ERR (-4)

--- 31 unchanged lines hidden ---