summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@nexenta.com>2010-11-19 14:02:57 -0800
committerGarrett D'Amore <garrett@nexenta.com>2010-11-19 14:02:57 -0800
commit382f00c9f2bd34208f10bb7d2be96bc6696eb8c4 (patch)
tree0b05c4d7f1bfe7833181dc0a0b81b6d274fc227b
parent6c1891ea28c10049521d8647a32ef85d9449a8cb (diff)
downloadillumos-gate-382f00c9f2bd34208f10bb7d2be96bc6696eb8c4.tar.gz
424 svr4pkg should remove ALLOW_EXCEPTION_LIST_PKG
Reviewed by: albert.lee@nexenta.com Approved by: gwr@nexenta.com
-rw-r--r--usr/src/cmd/svr4pkg/installf/main.c11
-rw-r--r--usr/src/cmd/svr4pkg/pkgchk/main.c12
-rw-r--r--usr/src/cmd/svr4pkg/pkginstall/main.c37
-rw-r--r--usr/src/cmd/svr4pkg/pkgmk/main.c13
-rw-r--r--usr/src/cmd/svr4pkg/pkgremove/main.c33
-rw-r--r--usr/src/cmd/svr4pkg/pkgtrans/main.c43
6 files changed, 15 insertions, 134 deletions
diff --git a/usr/src/cmd/svr4pkg/installf/main.c b/usr/src/cmd/svr4pkg/installf/main.c
index 2d3b889c15..9d6775620a 100644
--- a/usr/src/cmd/svr4pkg/installf/main.c
+++ b/usr/src/cmd/svr4pkg/installf/main.c
@@ -358,17 +358,6 @@ main(int argc, char **argv)
exit(1);
}
-#ifdef ALLOW_EXCEPTION_PKG_LIST
- /*
- * *********************************************************************
- * this feature is removed starting with Solaris 10 - there is no built
- * in list of packages that should be run "the old way"
- * *********************************************************************
- */
- /* Until 2.9, set it from the execption list */
- if (pkginst && exception_pkg(pkginst, LINK))
- set_nonABI_symlinks();
-#endif
/*
* This maps the client filesystems into the server's space.
*/
diff --git a/usr/src/cmd/svr4pkg/pkgchk/main.c b/usr/src/cmd/svr4pkg/pkgchk/main.c
index c8659d5731..23951c11c4 100644
--- a/usr/src/cmd/svr4pkg/pkgchk/main.c
+++ b/usr/src/cmd/svr4pkg/pkgchk/main.c
@@ -449,18 +449,6 @@ main(int argc, char *argv[])
for (n = 0; pkg[n]; n++) {
char locenv[PATH_MAX];
- /*
- * *********************************************************************
- * this feature is removed starting with Solaris 10 - there is no built
- * in list of packages that should be run "the old way"
- * *********************************************************************
- */
-#ifdef ALLOW_EXCEPTION_PKG_LIST
- /* Until 2.9, set it from the execption list */
- if (exception_pkg(pkg[n], LINK))
- set_nonABI_symlinks();
-#endif
-
if (pkgfmt)
(void) printf(
gettext(MSG_CHK_DIR), pkg[n], device);
diff --git a/usr/src/cmd/svr4pkg/pkginstall/main.c b/usr/src/cmd/svr4pkg/pkginstall/main.c
index 1e6c46cb56..5fc0a69fef 100644
--- a/usr/src/cmd/svr4pkg/pkginstall/main.c
+++ b/usr/src/cmd/svr4pkg/pkginstall/main.c
@@ -197,11 +197,6 @@ static char *parentZoneType = (char *)NULL;
#define MALSIZ 4 /* best guess at likely maximum value of MAXINST */
#define LSIZE 256 /* maximum line size supported in copyright file */
-#ifdef ALLOW_EXCEPTION_PKG_LIST
-#define SCRIPT 0 /* which exception_pkg() pkg list to use (SCRIPTS) */
-#define LINK 1 /* which exception_pkg() pkg list to use (SYMLINKS) */
-#endif
-
#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */
#define TEXT_DOMAIN "SYS_TEST"
#endif
@@ -1246,43 +1241,11 @@ main(int argc, char *argv[])
non_abi_scripts = 1;
}
-#ifdef ALLOW_EXCEPTION_PKG_LIST
- /*
- * *********************************************************************
- * this feature is removed starting with Solaris 10 - there is no built
- * in list of packages that should be run "the old way"
- * *********************************************************************
- */
-
- else if (exception_pkg(srcinst, SCRIPT)) {
- /*
- * Until on1095, set it from exception package names as
- * well.
- */
- putparam("NONABI_SCRIPTS", "TRUE");
- script_in = PROC_XSTDIN;
- non_abi_scripts = 1;
- }
-#endif
-
/* Set symlinks to be processed the old way */
if (abi_sym_ptr && strncasecmp(abi_sym_ptr, "TRUE", 4) == 0) {
set_nonABI_symlinks();
}
- /*
- * *********************************************************************
- * this feature is removed starting with Solaris 10 - there is no built
- * in list of packages that should be run "the old way"
- * *********************************************************************
- */
-#ifdef ALLOW_EXCEPTION_PKG_LIST
- else if (exception_pkg(srcinst, LINK)) {
- /* Until 2.9, set it from the execption list */
- putparam("PKG_NONABI_SYMLINKS", "TRUE");
- set_nonABI_symlinks();
- }
-#endif
/*
* At this point, script_in, non_abi_scripts & the environment are
* all set correctly for the ABI status of the package.
diff --git a/usr/src/cmd/svr4pkg/pkgmk/main.c b/usr/src/cmd/svr4pkg/pkgmk/main.c
index 49d2b50cb1..64fac814d5 100644
--- a/usr/src/cmd/svr4pkg/pkgmk/main.c
+++ b/usr/src/cmd/svr4pkg/pkgmk/main.c
@@ -454,19 +454,6 @@ main(int argc, char *argv[])
quit(1);
}
- /*
- * *********************************************************************
- * this feature is removed starting with Solaris 10 - there is no built
- * in list of packages that should be run "the old way"
- * *********************************************************************
- */
-
-#ifdef ALLOW_EXCEPTION_PKG_LIST
- /* Until 2.9, set it from the execption list */
- if (exception_pkg(pkginst, LINK))
- set_nonABI_symlinks();
-#endif
-
if ((pkgname = getenv("NAME")) == NULL) {
progerr(gettext(ERR_NOPARAM), "NAME", svept->path);
quit(1);
diff --git a/usr/src/cmd/svr4pkg/pkgremove/main.c b/usr/src/cmd/svr4pkg/pkgremove/main.c
index ead4cdbe69..03632902ac 100644
--- a/usr/src/cmd/svr4pkg/pkgremove/main.c
+++ b/usr/src/cmd/svr4pkg/pkgremove/main.c
@@ -76,11 +76,6 @@ extern int delmap(int flag, char *pkginst, PKGserver *server, VFP_T **tfp);
#define DEFPATH "/sbin:/usr/sbin:/usr/bin"
-#ifdef ALLOW_EXCEPTION_PKG_LIST
-#define SCRIPT 0 /* Tells exception_pkg() which pkg list to use */
-#define LINK 1
-#endif
-
#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */
#define TEXT_DOMAIN "SYS_TEST"
#endif
@@ -728,38 +723,10 @@ main(int argc, char *argv[])
/*
* If pkginfo says it's not compliant then set non_abi_scripts.
- * Oh, for two releases, set it from exception package names as
- * well.
*/
- /*
- * *********************************************************************
- * this feature is removed starting with Solaris 10 - there is no built
- * in list of packages that should be run "the old way"
- * *********************************************************************
- */
-
-#ifdef ALLOW_EXCEPTION_PKG_LIST
- if (exception_pkg(pkginst, SCRIPT) ||
- (abi_comp_ptr && strncmp(abi_comp_ptr, "TRUE", 4) == 0))
- script_in = PROC_XSTDIN;
-#else
if (abi_comp_ptr && strncmp(abi_comp_ptr, "TRUE", 4) == 0) {
script_in = PROC_XSTDIN;
}
-#endif
- /*
- * *********************************************************************
- * this feature is removed starting with Solaris 10 - there is no built
- * in list of packages that should be run "the old way"
- * *********************************************************************
- */
-
-#ifdef ALLOW_EXCEPTION_PKG_LIST
- /* Until 2.9, set it from the execption list */
- if (exception_pkg(pkginst, LINK)) {
- set_nonABI_symlinks();
- }
-#endif
/*
* Since this is a removal, we can tell whether it's absolute or
diff --git a/usr/src/cmd/svr4pkg/pkgtrans/main.c b/usr/src/cmd/svr4pkg/pkgtrans/main.c
index bf1373f07b..857301150c 100644
--- a/usr/src/cmd/svr4pkg/pkgtrans/main.c
+++ b/usr/src/cmd/svr4pkg/pkgtrans/main.c
@@ -27,6 +27,9 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
+/*
+ * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
+ */
#include <locale.h>
#include <libintl.h>
@@ -40,6 +43,7 @@
#include <pkglocs.h>
#include <libadm.h>
#include <libinst.h>
+#include <messages.h>
static int options;
static keystore_handle_t keystore = NULL;
@@ -47,13 +51,7 @@ static keystore_handle_t keystore = NULL;
static void usage(void);
static void trap(int signo);
-#define PASSWD_CMDLINE \
- "## WARNING: USING <%s> MAKES PASSWORD " \
- "VISIBLE TO ALL USERS."
-
-#define PASSPHRASE_PROMPT "Enter keystore password:"
#define KEYSTORE_OPEN "Retrieving signing certificates from keystore <%s>"
-#define PARAM_LEN "Parameter <%s> too long"
int
main(int argc, char *argv[])
@@ -67,7 +65,7 @@ main(int argc, char *argv[])
boolean_t create_sig = B_FALSE;
char *homedir = NULL;
PKG_ERR *err;
- int ret, len, homelen;
+ int ret, len;
(void) setlocale(LC_ALL, "");
@@ -116,7 +114,7 @@ main(int argc, char *argv[])
* passwords on the command line are highly
* insecure. complain.
*/
- logerr(gettext(PASSWD_CMDLINE), "pass:<pass>");
+ logerr(PASSWD_CMDLINE, "pass:<pass>");
}
break;
@@ -132,9 +130,7 @@ main(int argc, char *argv[])
(void) signal(SIGQUIT, trap);
(void) signal(SIGTERM, trap);
(void) signal(SIGPIPE, trap);
-#ifndef SUNOS41
(void) signal(SIGPWR, trap);
-#endif
if ((argc-optind) < 2) {
usage();
@@ -150,33 +146,24 @@ main(int argc, char *argv[])
if (geteuid() == 0) {
/* we are superuser, so use their keystore */
keystore_file = PKGSEC;
- } else {
- if ((homedir = getenv("HOME")) == NULL) {
+
+ } else if ((homedir = getenv("HOME")) == NULL) {
/*
* not superuser, but no home dir, so
* use superuser's keystore
*/
- keystore_file = PKGSEC;
- } else {
- /* $HOME/.pkg/security\0 */
- homelen = strlen(homedir) + 15;
- keystore_file =
- malloc(strlen(homedir) + 15);
- if (((len = snprintf(keystore_file,
- homelen, "%s/%s", homedir,
- ".pkg/security")) < 0) ||
- (len >= homelen)) {
- logerr(gettext(PARAM_LEN),
- "$HOME");
- quit(1);
- }
- }
+ keystore_file = PKGSEC;
+
+ } else if (asprintf(&keystore_file, "%s/.pkg/security",
+ homedir) < 0) {
+ logerr(ERR_MEM);
+ quit(1);
}
}
logerr(gettext(KEYSTORE_OPEN), keystore_file);
- set_passphrase_prompt(gettext(PASSPHRASE_PROMPT));
+ set_passphrase_prompt(MSG_PASSPROMPT);
/* open keystore for reading */
if (open_keystore(err, keystore_file, get_prog_name(),