allow no-param input when get smapi level

Bug #1769794 reported by jichenjc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zVM Cloud Connector
Fix Committed
Low
Chuck Brazie

Bug Description

testlx:~/zthin-build/RPMS/s390x # smcli
Failed
  Return Code: 100
  Reason Code: 8
  Description: ULGSMC5100E Request not authorized by external security manager
  API issued : Query_API_Functional_Level

ERROR: Unable to determine SMAPI level.

Calls to SMAPI with ESM will require a targetId.

smapiUtilities.c has a function called
getSmapiLevel

There are 6 places in the code that call this routine and they all pass in a null target id.
ex:
rc = getSmapiLevel(vmapiContextP, " ", &smapiLevel);

we can do following as suggested

    fp = popen("sudo /sbin/vmcp q userid", "r");
    if (fp == NULL) {
        printAndLogProcessingErrors(MY_API_NAME, PROCESSING_ERROR, vmapiContextP, "", 0);
        printf("ERROR: Failed to identify the user");
        return 1;
    }
    fgets(queryData, sizeof(queryData)-1, fp);
    pclose(fp);

    myUserid = strtok_r(queryData, " ", &saveptr);

jichenjc (jichenjc)
Changed in python-zvm-sdk:
status: New → Confirmed
importance: Undecided → Low
Huang Rui (bjhuangr)
Changed in python-zvm-sdk:
assignee: nobody → Huang Rui (bjhuangr)
Revision history for this message
Huang Rui (bjhuangr) wrote :
Changed in python-zvm-sdk:
status: Confirmed → Fix Committed
milestone: none → future
assignee: Huang Rui (bjhuangr) → nobody
assignee: nobody → Chuck Brazie (brazie)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.