/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
#include <pkgstrct.h>
#include <locale.h>
#include <libintl.h>
#include <pkglib.h>
#include <install.h>
#include <libinst.h>
#include <libadm.h>
#include "installf.h"
static void checkPaths(char *argv[]);
int
{
int myerror;
if (argc < 1)
usage(); /* at least pathname is required */
eptnum = 1;
/* There is only one filename on the command line. */
quit(1);
return (0);
}
/* Read stdin to obtain entries, which need to be sorted. */
eptnum = 0;
myerror = 0;
argc = 0;
argc++;
if (argc < 1)
usage(); /* at least pathname is required */
quit(99);
}
myerror++;
if (!extlist) {
quit(99);
}
}
}
cfentcmp);
return (myerror);
}
static int
{
/* initialize cfent structure */
n = allspec = 0;
if (classname)
return (1);
}
/*
* It would be a good idea to figure out how to get much of
* this done using facilities in procmap.c - JST
*/
is_a_link = 1;
} else
is_a_link = 0;
return (1);
}
/* get the pathnames */
return (1);
/* This isn't likely to happen; but, better safe than sorry. */
return (1);
}
if (is_a_link) {
/* links specifications should be handled right here */
/* If nothing follows the '=', it's invalid */
if (!pt[1]) {
return (1);
}
/* Test for an argument after the link. */
if (argc != n) {
return (1);
}
/*
* If it's a link but it's neither hard nor symbolic then
* it's bad.
*/
return (1);
}
return (0);
} else if (n >= argc) {
/* we are expecting to change object's contents */
return (0);
}
return (1);
return (1);
}
if (n < argc) {
return (1);
}
}
if (n < argc) {
return (1);
}
allspec++;
}
}
allspec = 0;
if (n < argc) {
return (1);
}
}
if (n < argc)
if (n < argc) {
allspec++;
}
return (1);
}
if (n < argc) {
return (1);
}
return (0);
}
int
{
}
/*
* If the path at argv[0] has the value of
* PKG_INSTALL_ROOT prepended, remove it
*/
static void
{
char *root;
int rootLen;
/*
* Note- No local copy of argv is needed since this
* function is guaranteed to replace argv with a subset of
* the original argv.
*/
/* We only want to canonize the path if it contains multiple '/'s */
canonize_slashes(argv[0]);
return;
}
}
}