Print this page
5218 posix definition of NULL
correct unistd.h and iso/stddef_iso.h
update gate source affected

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/cmd-crypto/tpmadm/admin_cmds.c
          +++ new/usr/src/cmd/cmd-crypto/tpmadm/admin_cmds.c
↓ open down ↓ 653 lines elided ↑ open up ↑
 654  654              TSS_KEY_TSP_SRK | TSS_KEY_AUTHORIZATION, &hKeySRK);
 655  655          if (ret) {
 656  656                  print_error(ret, gettext("Create storage root key"));
 657  657                  return (ERR_FAIL);
 658  658          }
 659  659  
 660  660          if (set_object_policy(hKeySRK, TSS_SECRET_MODE_SHA1, NULL,
 661  661              sizeof (well_known), well_known))
 662  662                  return (ERR_FAIL);
 663  663  
 664      -        ret = Tspi_TPM_TakeOwnership(hTPM, hKeySRK, NULL);
      664 +        ret = Tspi_TPM_TakeOwnership(hTPM, hKeySRK, (TSS_HKEY)NULL);
 665  665          if (ret == TPM_E_NO_ENDORSEMENT) {
 666  666                  if (createek(hContext, hTPM))
 667  667                          return (ERR_FAIL);
 668      -                ret = Tspi_TPM_TakeOwnership(hTPM, hKeySRK, NULL);
      668 +                ret = Tspi_TPM_TakeOwnership(hTPM, hKeySRK, (TSS_HKEY)NULL);
 669  669          }
 670  670          if (ret) {
 671  671                  print_error(ret, gettext("Take ownership"));
 672  672                  return (ERR_FAIL);
 673  673          }
 674  674  
 675  675          return (0);
 676  676  }
 677  677  
 678  678  /*
↓ open down ↓ 15 lines elided ↑ open up ↑
 694  694          ret = Tspi_Context_CreateObject(hContext, TSS_OBJECT_TYPE_POLICY,
 695  695              TSS_POLICY_USAGE, &hNewPolicy);
 696  696          if (ret) {
 697  697                  print_error(ret, gettext("Create policy object"));
 698  698                  return (ERR_FAIL);
 699  699          }
 700  700          if (set_policy_options(hNewPolicy, TSS_SECRET_MODE_POPUP,
 701  701              gettext("= New TPM owner passphrase ="), 0, NULL))
 702  702                  return (ERR_FAIL);
 703  703  
 704      -        ret = Tspi_ChangeAuth(hTPM, NULL, hNewPolicy);
      704 +        ret = Tspi_ChangeAuth(hTPM, (TSS_HOBJECT)NULL, hNewPolicy);
 705  705          if (ret && ret != TSP_ERROR(TSS_E_POLICY_NO_SECRET)) {
 706  706                  print_error(ret, gettext("Change authorization"));
 707  707                  return (ERR_FAIL);
 708  708          }
 709  709  
 710  710          return (0);
 711  711  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX