kconf.c revision c48f4690176e54195652a6ecbbe3014ee39e7341
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * CDDL HEADER START
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * The contents of this file are subject to the terms of the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Common Development and Distribution License (the "License").
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * You may not use this file except in compliance with the License.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * See the License for the specific language governing permissions
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * and limitations under the License.
724365f7556fc4201fdb11766ebc6bd918523130sethg * When distributing Covered Code, include this CDDL HEADER in each
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
724365f7556fc4201fdb11766ebc6bd918523130sethg * If applicable, add the following below this CDDL HEADER, with the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * fields enclosed by brackets "[]" replaced with your own identifying
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * information: Portions Copyright [yyyy] [name of copyright owner]
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * CDDL HEADER END
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * From prof_get.c as the following four functions are private in mech_krb5.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Initialize the string list abstraction.
724365f7556fc4201fdb11766ebc6bd918523130sethg return (0);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * If re_list is non-NULL then pass the list header to the caller else free
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * the previously allocated list.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiend_list(struct profile_string_list *list, char ***ret_list)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Add a string to the list.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiadd_to_list(struct profile_string_list *list, const char *str)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi newlist = realloc(list->list, newmax * sizeof (char *));
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi return (0);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi (void) fprintf(stderr, gettext("kconf -f <file> -r <realm> "
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi "-k <kdc[,kdc]> -m <master_kdc>\n -p <kpasswd_protocol> "
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi "-d <domain>\n"));
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi char c, *realm, *kdcs, *master, *domain, *token, *lasts;
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#if !defined(TEXT_DOMAIN)
724365f7556fc4201fdb11766ebc6bd918523130sethg#endif /* TEXT_DOMAIN */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * kconf -f <file> -r <realm> -k <kdc[,kdc]> -m <master_kdc>
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * -p <kpasswd_protocol> -d <domain>
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi while ((c = getopt(argc, argv, "f:r:k:a:s:p:d:m:")) != -1) {
724365f7556fc4201fdb11766ebc6bd918523130sethg switch (c) {
usage();
if (code != 0) {
goto error;
if (code != 0) {
goto error;
code);
goto error;
if (code != 0) {
goto error;
if (code != 0) {
goto error;
return (code);