sponsored links

Collapse

Announcement

Collapse
No announcement yet.

db2_connect oddity ...

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • db2_connect oddity ...

    We have a couple of LPARS on the same tin, and hosting zend etc on one of them allows us to connect to other LPARS with bogus credentials. I can assure you that the password is not goat, and yet this returns a valid connection handle. Is there a setting that allows this to happen?

    this is hosted on lparone and it is trying to open a connection to lpartwo, my expectation would be a connection failure as the password is incorrect.

    PHP Code:
    try {
        
    $bad_conn db2_connect($this_lpar$usrPrf'goat'$options); 
    }
    catch (
    Exception $e) {              
        echo  
    $e->getMessage(), "\n";
        
    $this_bad_msg1 "TRY {} statement failed with [".db2_conn_errormsg()."]";
        exit();
    }
    if(
    $bad_conn) { $bad_conn_state 'OK'$rc db2_close($bad_conn); } else { $bad_conn_state 'ERROR'; }
    $this_bad_msg1 "db2_conn_error =  [".db2_conn_error()."]";
    $this_bad_msg2 "db2_conn_errormsg =  [".db2_conn_errormsg()."]";
    // Now punch the results into an array so we can report on it by dumping it out
    $results_array[] = array(
        
    'lpar' => $this_lpar,
        
    'resource' => $bad_conn,
        
    'mode' => 'Bogus password',
        
    'state' => $bad_conn_state,
        
    'msg1' => $this_bad_msg1,
        
    'msg2' => $this_bad_msg2
    ); 
    Greg Craill: "Life's hard - Get a helmet !!"

  • #2
    Is $usrPrf is an empty string? Is the current user profile of the connection job QSQSRVR = QTMHHTTP?

    > When the second parameter of db2_connect is an empty string, the connection user profile
    > is QTMHHTTP and the third parameter, the password, is ignored.

    Ringer
    Suppose your boss tasks you with grabbing and processing some XML from an HTTP request to create a new customer order. If you have a “deer in the headlights” expression on your face, don’t fear, you don’t have to punt this request over the cubicle wall to the web developers. Without weeks or months of

    Comment


    • #3
      Heya Ringer,

      When I echo them to the screen the values in $UsrPrf is what I expect, and in fact if I disable it on the target lpar then it reports a afailure logging in so I am fairly certain it is not falling over and using QTMHHTTP to try and connect.

      Cheers
      GC
      Greg Craill: "Life's hard - Get a helmet !!"

      Comment


      • #4
        You might look in the ibm_db2.ini file for clues, specifically the ibm_db2.i5_ignore_userid setting.
        ;ibm_db2.i5_ignore_userid=[0,1] ;0 - normal user/pwd using QSQSRVR job (default) ;1 - force ignore user/pwd, when possible, no QSQSRVR job https://www.zend.com/topics/DB2-and-...s-on-IBM-i.pdf

        Ringer

        Comment


        • #5
          Yeah checked that ... will keep digging or at least try another approach.
          Greg Craill: "Life's hard - Get a helmet !!"

          Comment

          sponsored links

          Collapse

          Working...
          X