Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/gic_pwd.c
          +++ new/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/gic_pwd.c
   1    1  /*
   2    2   * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. */
   3    3  
        4 +/*
        5 + * Copyright 2019 Joyent, Inc.
        6 + */
        7 +
   4    8  #include "k5-int.h"
   5    9  #include "com_err.h"
   6   10  #include <admin.h>
   7   11  #include <locale.h>
   8   12  #include <syslog.h>
   9   13  
  10   14  /* Solaris Kerberos:
  11   15   *
  12   16   * Change Password functionality is handled by the libkadm5clnt.so.1 library in
  13   17   * Solaris Kerberos. In order to avoid a circular dependency between that lib
↓ open down ↓ 498 lines elided ↑ open up ↑
 512  516  
 513  517     return(ret);
 514  518  }
 515  519  krb5_error_code krb5int_populate_gic_opt (
 516  520      krb5_context context, krb5_gic_opt_ext **opte,
 517  521      krb5_flags options, krb5_address * const *addrs, krb5_enctype *ktypes,
 518  522      krb5_preauthtype *pre_auth_types, krb5_creds *creds)
 519  523  {
 520  524    int i;
 521  525    krb5_int32 starttime;
 522      -  krb5_get_init_creds_opt *opt;
      526 +  krb5_get_init_creds_opt opt;
 523  527  
 524  528  
 525      -    krb5_get_init_creds_opt_init(opt);
      529 +    krb5_get_init_creds_opt_init(&opt);
 526  530      if (addrs)
 527      -      krb5_get_init_creds_opt_set_address_list(opt, (krb5_address **) addrs);
      531 +      krb5_get_init_creds_opt_set_address_list(&opt, (krb5_address **) addrs);
 528  532      if (ktypes) {
 529  533          for (i=0; ktypes[i]; i++);
 530  534          if (i)
 531      -            krb5_get_init_creds_opt_set_etype_list(opt, ktypes, i);
      535 +            krb5_get_init_creds_opt_set_etype_list(&opt, ktypes, i);
 532  536      }
 533  537      if (pre_auth_types) {
 534  538          for (i=0; pre_auth_types[i]; i++);
 535  539          if (i)
 536      -            krb5_get_init_creds_opt_set_preauth_list(opt, pre_auth_types, i);
      540 +            krb5_get_init_creds_opt_set_preauth_list(&opt, pre_auth_types, i);
 537  541      }
 538  542      if (options&KDC_OPT_FORWARDABLE)
 539      -        krb5_get_init_creds_opt_set_forwardable(opt, 1);
 540      -    else krb5_get_init_creds_opt_set_forwardable(opt, 0);
      543 +        krb5_get_init_creds_opt_set_forwardable(&opt, 1);
      544 +    else krb5_get_init_creds_opt_set_forwardable(&opt, 0);
 541  545      if (options&KDC_OPT_PROXIABLE)
 542      -        krb5_get_init_creds_opt_set_proxiable(opt, 1);
 543      -    else krb5_get_init_creds_opt_set_proxiable(opt, 0);
      546 +        krb5_get_init_creds_opt_set_proxiable(&opt, 1);
      547 +    else krb5_get_init_creds_opt_set_proxiable(&opt, 0);
 544  548      if (creds && creds->times.endtime) {
 545  549          krb5_timeofday(context, &starttime);
 546  550          if (creds->times.starttime) starttime = creds->times.starttime;
 547      -        krb5_get_init_creds_opt_set_tkt_life(opt, creds->times.endtime - starttime);
      551 +        krb5_get_init_creds_opt_set_tkt_life(&opt, creds->times.endtime - starttime);
 548  552      }
 549      -    return krb5int_gic_opt_to_opte(context, opt, opte, 0,
      553 +    return krb5int_gic_opt_to_opte(context, &opt, opte, 0,
 550  554                                     "krb5int_populate_gic_opt");
 551  555  }
 552  556  
 553  557  /*
 554  558    Rewrites get_in_tkt in terms of newer get_init_creds API.
 555  559   Attempts to get an initial ticket for creds->client to use server
 556  560   creds->server, (realm is taken from creds->client), with options
 557  561   options, and using creds->times.starttime, creds->times.endtime,
 558  562   creds->times.renew_till as from, till, and rtime.  
 559  563   creds->times.renew_till is ignored unless the RENEWABLE option is requested.
↓ open down ↓ 76 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX