HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 2283 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 2283.


Report 2283 Actions


    Problem Report Number 2283
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0643
    Raised 2003-09-24 04:44
    Updated 2003-09-30 02:40
    Published 2003-09-30 02:40
    Product Standard Internationalised System Calls and Libraries Extended V2 (UNIX 98)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.5.4
    Test Identification XOPEN.os/genuts/getpass
    Specification System Interfaces and Headers Issue 5
    Location in Spec Volume 1, page 353
    Problem Summary XOPEN.os/genuts/getpass expects exactly {PASS_MAX} bytes returned, not
    "at most {PASS_MAX} bytes" returned.
    Problem Text The problem with these tests is they expect getpass to return exactly
    {PASS_MAX} bytes.

    According to the standard:

    Upon successful completion, getpass() returns a pointer to a
    null-terminated string of at most {PASS_MAX} bytes that were
    read from the terminal device.

    The phrase "at most {PASS_MAX} bytes" allows for any number of bytes not
    exceeding PASS_MAX bytes to be returned, therefore when getpass returns
    8, it is within the requirements of the spec.
    Test Output ************************************************************************
    ****************************************
    /tset/XOPEN.os/genuts/getpass/T.getpass 1 Failed

    Test Description:
    If a string of not more than PASS_MAX characters is typed into
    /dev/tty before a newline or EOF character is entered, it will
    be
    returned, NULL terminated, by getpass().

    Test Strategy:
    OPEN and initialise terminal file (/dev/tty) and loop back file
    FOR terminating characters NL and EOF:
    CREATE process pair
    CHILD process will
    SLEEP for 2 seconds
    SET timeout for WAITTIME/2
    WRITE PASS_MAX characters to loop back file using write()
    WRITE terminating character to loop back file using
    write()
    PARENT process will
    SET timeout for WAITTIME/2
    CALL getpass("")
    VERIFY that getpass() returns pointer to data written,
    NULL
    terminated

    Test Information:
    getpass("") did not return PASS_MAX chars of password entered
    before new
    line
    Expected string:
    "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZAB
    CDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP

    QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZAB
    CDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP

    QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUV"
    Observed string: "ABCDEFGH"
    getpass("") did not return PASS_MAX chars of password entered
    before EOF
    Expected string:
    "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZAB
    CDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP

    QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZAB
    CDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP

    QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUV"
    Observed string: "ABCDEFGH"


    ************************************************************************
    ****************************************


    ************************************************************************
    ****************************************
    /tset/XOPEN.os/genuts/getpass/T.getpass 2 Failed

    Test Description:
    If a string of more than PASS_MAX characters is typed into
    /dev/tty
    before a newline or EOF character is entered, the first PASS_MAX
    characters, NULL terminated, will be returned by getpass().

    Test Strategy:
    OPEN and initialise terminal file (/dev/tty) and loop back file
    FOR terminating characters NL and EOF:
    CREATE process pair
    CHILD process will
    SLEEP for 2 seconds
    SET timeout for WAITTIME/2
    WRITE (PASS_MAX+1) characters to loop back file using
    write()
    WRITE terminating character to loop back file using
    write()
    PARENT process will
    SET timeout for WAITTIME/2
    CALL getpass("")
    VERIFY that getpass() returns pointer to first PASS_MAX
    characters written, NULL terminated

    Test Information:
    getpass("") did not return PASS_MAX chars of password entered
    before new
    line
    Expected string:
    "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZAB
    CDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP

    QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZAB
    CDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP

    QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUV"
    Observed string: ""
    getpass("") did not return PASS_MAX chars of password entered
    before EOF
    Expected string:
    "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZAB
    CDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP

    QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZAB
    CDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP

    QRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUV"
    Observed string: "ABCDEFGH"


    ************************************************************************
    ****************************************

    Review Information

    Review Type TSMA Review
    Start Date 2003-09-24 04:44
    Last Updated 2003-09-24 22:23
    Completed 2003-09-24 22:23
    Status Complete
    Review Recommendation Rejected (REJ)
    Review Response I disagree with the submitter's interpretation of the specification.

    The use of "at most" here is a requirement that getpass() must never
    return more than PASS_MAX bytes, even if more than that were read from
    the terminal. Clearly if PASS_MAX or more bytes are read from the
    terminal then getpass() must return the first PASS_MAX bytes and discard
    the rest, as expected by the tests.

    It appears that the value of PASS_MAX has been incorrectly configured on
    this system - since getpass() returns at most 8 bytes, the value of
    PASS_MAX should be 8.

    Review Type SA Review
    Start Date 2003-09-24 21:23
    Last Updated 2003-09-25 01:54
    Completed 2003-09-25 01:54
    Status Complete
    Review Resolution Rejected (REJ)
    Review Conclusion The SA interpretation is that the use of "at most" in the specification
    is a requirement that getpass() must never return more than PASS_MAX
    bytes, even if more than that were read from the terminal. Clearly if
    PASS_MAX or more bytes are read from the terminal then getpass() must
    return the first PASS_MAX bytes and discard the rest, as expected by
    the tests.

    It appears that the value of PASS_MAX may have been incorrectly
    configured on this system - since getpass() returns at most 8 bytes,
    the value of PASS_MAX should be 8.


    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority