Print this page
4786 emlxs shouldn't abuse ddi_get_time(9f)

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/fibre-channel/fca/emlxs/emlxs_dhchap.c
          +++ new/usr/src/uts/common/io/fibre-channel/fca/emlxs/emlxs_dhchap.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2010 Emulex.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
       26 +/*
       27 + * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
       28 + */
  26   29  
  27   30  
  28   31  #include <emlxs.h>
  29   32  
  30   33  #ifdef DHCHAP_SUPPORT
  31   34  
  32   35  #include <md5.h>
  33   36  #include <sha1.h>
  34   37  #ifdef S10
  35   38  #include <sha1_consts.h>
↓ open down ↓ 7558 lines elided ↑ open up ↑
7594 7597  emlxs_dhc_set_reauth_time(
7595 7598          emlxs_port_t *port,
7596 7599          emlxs_node_t *ndlp,
7597 7600          uint32_t status)
7598 7601  {
7599 7602          emlxs_port_dhc_t *port_dhc = &port->port_dhc;
7600 7603          emlxs_node_dhc_t *node_dhc = &ndlp->node_dhc;
7601 7604          uint32_t drv_time;
7602 7605          uint32_t timeout;
7603 7606          uint32_t reauth_tmo;
7604      -        time_t last_auth_time;
     7607 +        uint32_t last_auth_time;
7605 7608  
7606 7609          node_dhc->flag &= ~NLP_SET_REAUTH_TIME;
7607 7610  
7608 7611          if ((status == ENABLE) &&
7609 7612              node_dhc->auth_cfg.reauthenticate_time_interval) {
7610 7613  
7611 7614                  timeout =
7612 7615                      (60 * node_dhc->auth_cfg.reauthenticate_time_interval);
7613 7616                  drv_time = DRV_TIME;
7614 7617  
↓ open down ↓ 2034 lines elided ↑ open up ↑
9649 9652  emlxs_dhc_get_auth_status(emlxs_hba_t *hba, dfc_auth_status_t *fcsp_status)
9650 9653  {
9651 9654          emlxs_port_t *port = &PPORT;
9652 9655          emlxs_config_t *cfg = &CFG;
9653 9656          char s_lwwpn[64];
9654 9657          char s_rwwpn[64];
9655 9658          emlxs_auth_cfg_t *auth_cfg;
9656 9659          dfc_auth_status_t *auth_status;
9657 9660          NODELIST *ndlp;
9658 9661          uint32_t rc;
9659      -        time_t auth_time;
     9662 +        uint32_t auth_time;
9660 9663          uint32_t update;
9661 9664  
9662 9665          /* Return is authentication is not enabled */
9663 9666          if (cfg[CFG_AUTH_ENABLE].current == 0) {
9664 9667                  EMLXS_MSGF(EMLXS_CONTEXT, &emlxs_fcsp_debug_msg,
9665 9668                      "emlxs_dhc_get_auth_status. Auth disabled.");
9666 9669  
9667 9670                  return (DFC_AUTH_AUTHENTICATION_DISABLED);
9668 9671          }
9669 9672          mutex_enter(&hba->auth_lock);
↓ open down ↓ 176 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX