xref: /titanic_44/usr/src/cmd/lp/include/secure.h (revision b7f45089ccbe01bab3d7c7377b49d80d2ae18a69)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28 /*	  All Rights Reserved  	*/
29 
30 
31 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.3	*/
32 
33 #if	!defined(_LP_SECURE_H)
34 #define _LP_SECURE_H
35 
36 #include "sys/types.h"
37 
38 /**
39  ** The disk copy of the secure request files:
40  **/
41 
42 /*
43  * There are 7 fields in the secure request file.
44  */
45 #define	SC_MAX  7
46 # define SC_REQID	0	/* Original request id */
47 # define SC_UID		1	/* Originator's user ID */
48 # define SC_USER	2	/* Originator's real login name */
49 # define SC_GID		3	/* Originator's group ID */
50 # define SC_SIZE	4	/* Total size of the request data */
51 # define SC_DATE	5	/* Date submitted (in seconds) */
52 # define SC_SYSTEM	6	/* Originating system */
53 
54 /**
55  ** The internal copy of a request as seen by the rest of the world:
56  **/
57 
58 typedef struct SECURE {
59     uid_t	uid;
60     gid_t	gid;
61     off_t	size;
62     time_t	date;
63     char	*system;
64     char	*user;
65     char	*req_id;
66 }			SECURE;
67 
68 /**
69  ** Various routines.
70  **/
71 
72 SECURE *	getsecure ( char * );
73 int		putsecure ( char *, SECURE * );
74 int		rmsecure (char *);
75 void		freesecure ( SECURE * );
76 
77 #endif
78