431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * CDDL HEADER START
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * The contents of this file are subject to the terms of the
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * Common Development and Distribution License (the "License").
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * You may not use this file except in compliance with the License.
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * See the License for the specific language governing permissions
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * and limitations under the License.
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * When distributing Covered Code, include this CDDL HEADER in each
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * If applicable, add the following below this CDDL HEADER, with the
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * fields enclosed by brackets "[]" replaced with your own identifying
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * information: Portions Copyright [yyyy] [name of copyright owner]
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * CDDL HEADER END
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * Use is subject to license terms.
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee#pragma ident "%Z%%M% %I% %E% SMI"
431deaa01ac039d796fdfaf86b909a75e7d9ac48hyleestatic int err; /* To store errno which may be overwritten by gettext() */
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee extern char *optarg_av;
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee while ((opt = getopt_av(argc, argv, "k:(keystore)")) != EOF) {
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee switch (opt) {
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee "Error keystore input.\n"));
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee /* No additional args allowed. */
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee gettext("Can not uninstall the built-in keystore %s\n"),
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee (void) fprintf(stderr, gettext("%s does not exist.\n"),
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * Create a temporary file in the /etc/crypto directory.
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee (void) strlcpy(tmpfile_name, CONF_TEMPFILE, sizeof (tmpfile_name));
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * Loop thru the config file. If the plugin to be uninstalled is in
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * a package, then just comment it off.
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * make a copy of the original buffer to
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * buffer2. Also get rid of the trailing
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * '\n' from buffer2.
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee /* get rid of trailing '\n' */
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * If found and not in_package, then don't write
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee * this line to the result file.
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee "failed to update the configuration - %s"),
431deaa01ac039d796fdfaf86b909a75e7d9ac48hylee "failed to update the configuration - %s\n"),