sel_subs.h revision 1557
1168404Spjd/*-
2168404Spjd * Copyright (c) 1992 Keith Muller.
3168404Spjd * Copyright (c) 1992, 1993
4168404Spjd *	The Regents of the University of California.  All rights reserved.
5168404Spjd *
6168404Spjd * This code is derived from software contributed to Berkeley by
7168404Spjd * Keith Muller of the University of California, San Diego.
8168404Spjd *
9168404Spjd * Redistribution and use in source and binary forms, with or without
10168404Spjd * modification, are permitted provided that the following conditions
11168404Spjd * are met:
12168404Spjd * 1. Redistributions of source code must retain the above copyright
13168404Spjd *    notice, this list of conditions and the following disclaimer.
14168404Spjd * 2. Redistributions in binary form must reproduce the above copyright
15168404Spjd *    notice, this list of conditions and the following disclaimer in the
16168404Spjd *    documentation and/or other materials provided with the distribution.
17168404Spjd * 3. All advertising materials mentioning features or use of this software
18168404Spjd *    must display the following acknowledgement:
19168404Spjd *	This product includes software developed by the University of
20168404Spjd *	California, Berkeley and its contributors.
21168404Spjd * 4. Neither the name of the University nor the names of its contributors
22219089Spjd *    may be used to endorse or promote products derived from this software
23285001Savg *    without specific prior written permission.
24228103Smm *
25247265Smm * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26288549Smav * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27290757Smav * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28168404Spjd * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29168404Spjd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30168404Spjd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31168404Spjd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32247265Smm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33168404Spjd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34168404Spjd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35168404Spjd * SUCH DAMAGE.
36168404Spjd *
37168404Spjd *	@(#)sel_subs.h	8.1 (Berkeley) 5/31/93
38168404Spjd */
39168404Spjd
40168404Spjd/*
41168404Spjd * data structure for storing uid/grp selects (-U, -G non standard options)
42168404Spjd */
43168404Spjd
44168404Spjd#define USR_TB_SZ	317		/* user selection table size */
45168404Spjd#define GRP_TB_SZ	317		/* user selection table size */
46168404Spjd
47168404Spjdtypedef struct usrt {
48168404Spjd	uid_t uid;
49219089Spjd	struct usrt *fow;		/* next uid */
50168404Spjd} USRT;
51185029Spjd
52185029Spjdtypedef struct grpt {
53219089Spjd	gid_t gid;
54185029Spjd	struct grpt *fow;		/* next gid */
55290757Smav} GRPT;
56168404Spjd
57168404Spjd/*
58168404Spjd * data structure for storing user supplied time ranges (-T option)
59168404Spjd */
60168404Spjd
61168404Spjd#define ATOI2(s)	((((s)[0] - '0') * 10) + ((s)[1] - '0'))
62168404Spjd
63168404Spjdtypedef struct time_rng {
64168404Spjd	time_t		low_time;	/* lower inclusive time limit */
65168404Spjd	time_t		high_time;	/* higher inclusive time limit */
66168404Spjd	int		flgs;		/* option flags */
67168404Spjd#define	HASLOW		0x01		/* has lower time limit */
68168404Spjd#define HASHIGH		0x02		/* has higher time limit */
69168404Spjd#define CMPMTME		0x04		/* compare file modification time */
70168404Spjd#define CMPCTME		0x08		/* compare inode change time */
71168404Spjd#define CMPBOTH	(CMPMTME|CMPCTME)	/* compare inode and mod time */
72168404Spjd	struct time_rng	*fow;		/* next pattern */
73168404Spjd} TIME_RNG;
74168404Spjd