10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 51676Sjpk * Common Development and Distribution License (the "License"). 61676Sjpk * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 221676Sjpk * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 270Sstevel@tonic-gate /* All Rights Reserved */ 280Sstevel@tonic-gate 290Sstevel@tonic-gate 30*3125Sjacobs #pragma ident "%Z%%M% %I% %E% SMI" 310Sstevel@tonic-gate 320Sstevel@tonic-gate #if !defined(_LP_SECURE_H) 330Sstevel@tonic-gate #define _LP_SECURE_H 340Sstevel@tonic-gate 350Sstevel@tonic-gate #include "sys/types.h" 360Sstevel@tonic-gate 370Sstevel@tonic-gate /** 380Sstevel@tonic-gate ** The disk copy of the secure request files: 390Sstevel@tonic-gate **/ 400Sstevel@tonic-gate 410Sstevel@tonic-gate /* 421676Sjpk * There are 8 fields in the secure request file. 430Sstevel@tonic-gate */ 44*3125Sjacobs #define SC_MAX 7 450Sstevel@tonic-gate # define SC_REQID 0 /* Original request id */ 460Sstevel@tonic-gate # define SC_UID 1 /* Originator's user ID */ 470Sstevel@tonic-gate # define SC_USER 2 /* Originator's real login name */ 480Sstevel@tonic-gate # define SC_GID 3 /* Originator's group ID */ 490Sstevel@tonic-gate # define SC_SIZE 4 /* Total size of the request data */ 500Sstevel@tonic-gate # define SC_DATE 5 /* Date submitted (in seconds) */ 51*3125Sjacobs # define SC_SLABEL 6 /* Sensitivity Label */ 520Sstevel@tonic-gate 530Sstevel@tonic-gate /** 540Sstevel@tonic-gate ** The internal copy of a request as seen by the rest of the world: 550Sstevel@tonic-gate **/ 560Sstevel@tonic-gate 570Sstevel@tonic-gate typedef struct SECURE { 580Sstevel@tonic-gate uid_t uid; 590Sstevel@tonic-gate gid_t gid; 600Sstevel@tonic-gate off_t size; 610Sstevel@tonic-gate time_t date; 620Sstevel@tonic-gate char *user; 630Sstevel@tonic-gate char *req_id; 641676Sjpk char *slabel; 650Sstevel@tonic-gate } SECURE; 660Sstevel@tonic-gate 670Sstevel@tonic-gate /** 680Sstevel@tonic-gate ** Various routines. 690Sstevel@tonic-gate **/ 700Sstevel@tonic-gate 710Sstevel@tonic-gate SECURE * getsecure ( char * ); 720Sstevel@tonic-gate int putsecure ( char *, SECURE * ); 730Sstevel@tonic-gate int rmsecure (char *); 740Sstevel@tonic-gate void freesecure ( SECURE * ); 750Sstevel@tonic-gate 760Sstevel@tonic-gate #endif 77