/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
/* EMACS_MODES: !fill, lnumb, !overwrite, !nodelete, !picture */
#include "string.h"
#include "stdlib.h"
#include "lp.h"
#include "secure.h"
/**
** getsecure() - EXTRACT SECURE REQUEST STRUCTURE FROM DISK FILE
**/
SECURE *
{
*path;
int fd;
int fld;
if (*file == '/')
else
if (!path)
return (0);
return (0);
}
errno = 0;
for (
fld = 0;
fld++
) {
switch (fld) {
case SC_REQID:
break;
case SC_UID:
break;
case SC_USER:
break;
case SC_GID:
break;
case SC_SIZE:
break;
case SC_DATE:
break;
case SC_SLABEL:
break;
}
}
freesecure (secp);
errno = save_errno;
return (0);
}
/*
* Now go through the structure and see if we have
* anything strange.
*/
if (
) {
freesecure (secp);
return (0);
}
return (secp);
}
/**
** putsecure() - WRITE SECURE REQUEST STRUCTURE TO DISK FILE
**/
int
{
char *path;
int fd;
int fld;
if (*file == '/')
else
if (!path)
return (-1);
return (-1);
}
if (
)
return (-1);
switch (fld) {
case SC_REQID:
break;
case SC_UID:
break;
case SC_USER:
break;
case SC_GID:
break;
case SC_SIZE:
break;
case SC_DATE:
break;
case SC_SLABEL:
if (is_system_labeled()) {
M_INTERNAL, DEF_NAMES) != 0) {
perror("label_to_str");
strdup("bad_label");
}
} else {
}
} else {
}
break;
}
return (0);
}
/*
** rmsecure ()
**
** o 'reqfilep' is of the form 'node-name/request-file'
** e.g. 'sfcalv/123-0'.
*/
int
{
int n;
char * pathp;
if (! pathp)
return -1;
return n;
}
/**
** freesecure() - FREE A SECURE STRUCTURE
**/
void
{
if (!secbufp)
return;
return;
}