Print this page
8485 Remove set but unused variables in usr/src/cmd


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*

  23  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*
  28  * Test client for gssd.  This program is not shipped on the binary
  29  * release.
  30  */
  31 
  32 #include <stdio.h>
  33 #include <strings.h>
  34 #include <ctype.h>
  35 #include <stdlib.h>
  36 #include <gssapi/gssapi.h>
  37 #include <gssapi/gssapi_ext.h>
  38 #include "gssd.h"
  39 #include <rpc/rpc.h>
  40 
  41 #define _KERNEL
  42 #include <gssapi/gssapi.h>


1277 
1278         if (status != GSS_S_COMPLETE) {
1279                 printf(gettext("server ret err (octal) %o (%s)\n"),
1280                         status, gettext("gss_process_context_token error"));
1281                 return;
1282 
1283         } else {
1284                 printf(gettext("\nprocess succeeded\n\n"));
1285                 return;
1286         }
1287 }
1288 
1289 static void
1290 _gss_delete_sec_context(argc, argv)
1291 int argc;
1292 char **argv;
1293 {
1294         OM_UINT32 status;
1295         gss_ctx_id_t *context_handle;
1296         OM_uint32 minor_status;
1297         uid_t uid;
1298 
1299         uid = (uid_t) getuid();
1300 
1301         /* parse the command line to determine the variable input argument */
1302 
1303         if (argc == 0) {
1304                 usage();
1305                 return;
1306         }
1307 
1308         if (strcmp(argv[0], "initiator") == 0) {
1309                 context_handle = &initiator_context_handle;
1310         } else if (strcmp(argv[0], "acceptor") == 0) {
1311                 context_handle = &acceptor_context_handle;
1312         } else {
1313                 printf(gettext(
1314                         "must specify either \"initiator\" or \"acceptor\"\n"));
1315                 return;
1316         }
1317 
1318         argc--;
1319         argv++;




   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright 2017 Gary Mills
  24  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
  25  * Use is subject to license terms.
  26  */
  27 
  28 /*
  29  * Test client for gssd.  This program is not shipped on the binary
  30  * release.
  31  */
  32 
  33 #include <stdio.h>
  34 #include <strings.h>
  35 #include <ctype.h>
  36 #include <stdlib.h>
  37 #include <gssapi/gssapi.h>
  38 #include <gssapi/gssapi_ext.h>
  39 #include "gssd.h"
  40 #include <rpc/rpc.h>
  41 
  42 #define _KERNEL
  43 #include <gssapi/gssapi.h>


1278 
1279         if (status != GSS_S_COMPLETE) {
1280                 printf(gettext("server ret err (octal) %o (%s)\n"),
1281                         status, gettext("gss_process_context_token error"));
1282                 return;
1283 
1284         } else {
1285                 printf(gettext("\nprocess succeeded\n\n"));
1286                 return;
1287         }
1288 }
1289 
1290 static void
1291 _gss_delete_sec_context(argc, argv)
1292 int argc;
1293 char **argv;
1294 {
1295         OM_UINT32 status;
1296         gss_ctx_id_t *context_handle;
1297         OM_uint32 minor_status;

1298 

1299 
1300         /* parse the command line to determine the variable input argument */
1301 
1302         if (argc == 0) {
1303                 usage();
1304                 return;
1305         }
1306 
1307         if (strcmp(argv[0], "initiator") == 0) {
1308                 context_handle = &initiator_context_handle;
1309         } else if (strcmp(argv[0], "acceptor") == 0) {
1310                 context_handle = &acceptor_context_handle;
1311         } else {
1312                 printf(gettext(
1313                         "must specify either \"initiator\" or \"acceptor\"\n"));
1314                 return;
1315         }
1316 
1317         argc--;
1318         argv++;