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

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 1491 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 1491.


Report 1491 Actions


    Problem Report Number 1491
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0773
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published 1995-10-30 08:00
    Product Standard Internationalised System Calls and Libraries Extended (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 4.0.2
    Test Identification Base/getutxent 1
    Problem Summary TSD4U.00040 This test may fail on implementations that define ut_line to be less than 24 characters in length.
    Problem Text
    This test may fail on implementations that define ut_line
    to be less than 24 characters in length.

    getutxent() Test 1 and several other utmpx tests fail because they copy a
    string into the "ut_line" member of struct utmpx that is longer than the
    space allocated for ut_line. This trashes other members of the utmpx
    structure, and then the test does not read back what it thinks it wrote
    out. The problem is even worse in CAPI/SRC/LIB/capi_utmpx/mk_utmpx.c in
    function write_several_entries(), where a malloc'ed area is also overrun.

    The solution is to first make sure the resulting string is not longer than
    sizeof(utmpx.ut_line).

    The following tests will also fail for this reason:

    getutxid() Test 2-8, 10-13
    getutxline() Test 1
    pututxline() Test 1, 2
    Test Output
    TEST CASE: getutxent

    TEST PURPOSE #1
    A successful call to struct utmpx
    *getutxent(void) shall read the next entry from the
    user accounting database and return a pointer to a utmpx
    structure containing a copy of the entry.
    PREP: Compute the number of entries in the user accounting database
    PREP: Update the user accounting database with entries for known values
    PREP: Seek to the location in the utmp database where
    the new entries should be
    TEST: getutxent() reads next entry from utmp database
    1 NORESULT

    TEST CASE: getutxid

    TEST PURPOSE #2
    A successful call to struct utmpx *getutxid(const
    struct utmpx *id) when the ut_type member of the utmpx
    structure pointed to by id is BOOT_TIME shall search
    forward from the current point in the user accounting
    database for an entry with a ut_type of BOOT_TIME and
    return a pointer to a utmpx structure containing a
    copy of the entry with meaningful data in the ut_tv
    member.
    PREP: Open the user accounting database by a call to getutxent()
    PREP: Update the user accounting database with entries of type BOOT_TIME
    TEST: getutxid() when ut_type is BOOT_TIME searches
    forward for the entry of type BOOT_TIME and
    returns a pointer to it
    ERROR: getutxid() failed to return the next entry.
    Expected an entry Received: NULL
    2 FAIL

    TEST PURPOSE #3
    A successful call to struct utmpx *getutxid(const
    struct utmpx *id) when the ut_type member of the utmpx
    structure pointed to by id is OLD_TIME shall search
    forward from the current point in the user accounting
    database for an entry with a ut_type of OLD_TIME and
    return a pointer to a utmpx structure containing a
    copy of the entry with meaningful data in the ut_tv
    member.
    PREP: Open the user accounting database by a call to getutxent()
    PREP: Update the user accounting database with entries of type OLD_TIME
    TEST: getutxid() when ut_type is OLD_TIME searches
    forward for the entry of type OLD_TIME and
    returns a pointer to it
    ERROR: getutxid() failed to return the next entry.
    Expected an entry Received: NULL
    3 FAIL

    TEST PURPOSE #4
    A successful call to struct utmpx *getutxid(const
    struct utmpx *id) when the ut_type member of the utmpx
    structure pointed to by id is NEW_TIME shall search
    forward from the current point in the user accounting
    database for an entry with a ut_type of NEW_TIME and
    return a pointer to a utmpx structure containing a
    copy of the entry with meaningful data in the ut_tv
    member.
    PREP: Open the user accounting database by a call to getutxent()
    PREP: Update the user accounting database with entries of type NEW_TIME
    TEST: getutxid() when ut_type is NEW_TIME searches
    forward for the entry of type NEW_TIME and
    returns a pointer to it
    ERROR: getutxid() failed to return the next entry.
    Expected an entry Received: NULL
    4 FAIL

    TEST PURPOSE #5
    A successful call to struct utmpx
    *getutxid(const struct utmpx *id) when the ut_type
    member of the utmpx structure pointed to by id is
    INIT_PROCESS shall find the next entry in the user accounting
    database with a ut_type of INIT_PROCESS,
    LOGIN_PROCESS, USER_PROCESS or DEAD_PROCESS whose
    ut_id matches the ut_id member of the structure and
    return a pointer to a utmpx structure containing a
    copy of the entry.
    PREP: Open the user accounting database by a call to getutxent()
    PREP: Update the user accounting database with entries of
    various types
    TEST: getutxid() when ut_type is INIT_PROCESS
    searches forward for the entry of type
    INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS or
    DEAD_PROCESS and returns a pointer to it
    ERROR: getutxid() failed to return the next entry.
    Expected an entry Received: NULL
    5 FAIL

    TEST PURPOSE #6
    A successful call to struct utmpx
    *getutxid(const struct utmpx *id) when the ut_type
    member of the utmpx structure pointed to by id is
    LOGIN_PROCESS shall find the next entry in the user accounting
    database with a ut_type of INIT_PROCESS,
    LOGIN_PROCESS, USER_PROCESS or DEAD_PROCESS whose
    ut_id matches the ut_id member of the structure and
    return a pointer to a utmpx structure containing a
    copy of the entry.
    PREP: Open the user accounting database by a call to getutxent()
    PREP: Update the user accounting database with entries of
    various types
    TEST: getutxid() when ut_type is LOGIN_PROCESS
    searches forward for the entry of type
    INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS or
    DEAD_PROCESS and returns a pointer to it
    ERROR: getutxid() failed to return the next entry.
    Expected an entry Received: NULL
    6 FAIL

    TEST PURPOSE #7
    A successful call to struct utmpx
    *getutxid(const struct utmpx *id) when the ut_type
    member of the utmpx structure pointed to by id is
    USER_PROCESS shall find the next entry in the user accounting
    database with a ut_type of INIT_PROCESS,
    LOGIN_PROCESS, USER_PROCESS or DEAD_PROCESS whose
    ut_id matches the ut_id member of the structure and
    return a pointer to a utmpx structure containing a
    copy of the entry.
    PREP: Open the user accounting database by a call to getutxent()
    PREP: Update the user accounting database with entries of
    various types
    TEST: getutxid() when ut_type is USER_PROCESS
    searches forward for the entry of type
    INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS or
    DEAD_PROCESS and returns a pointer to it
    ERROR: getutxid() failed to return the next entry.
    Expected an entry Received: NULL
    7 FAIL

    TEST PURPOSE #8
    A successful call to struct utmpx
    *getutxid(const struct utmpx *id) when the ut_type
    member of the utmpx structure pointed to by id is
    DEAD_PROCESS shall find the next entry in the user accounting
    database with a ut_type of INIT_PROCESS,
    LOGIN_PROCESS, USER_PROCESS or DEAD_PROCESS whose
    ut_id matches the ut_id member of the structure and
    return a pointer to a utmpx structure containing a
    copy of the entry.
    PREP: Open the user accounting database by a call to getutxent()
    PREP: Update the utmpx database with entries of
    various types
    TEST: getutxid() when ut_type is DEAD_PROCESS
    searches forward for the entry of type
    INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS or
    DEAD_PROCESS and returns a pointer to it
    ERROR: getutxid() failed to return the next entry.
    Expected an entry Received: NULL
    8 FAIL

    TEST PURPOSE #10
    On a successful call to struct utmpx *getutxid(const
    struct utmpx *id) which returns a pointer to an entry
    with ut_type of USER_PROCESS the members ut_id,
    ut_user, ut_line, ut_pid and ut_tv shall have
    meaningful data in them.
    PREP: Open the user accounting database by a call to getutxent()
    PREP: Update the user accounting database with entries
    TEST: Members have meaningful data
    10 UNRESOLVED

    TEST PURPOSE #11
    On a successful call to struct utmpx *getutxid(const
    struct utmpx *id) which returns a pointer to an entry
    with ut_type of INIT_PROCESS the members ut_id, ut_pid
    and ut_tv shall have meaningful data in them.
    PREP: Open the user accounting database by a call to getutxent()
    PREP: Update the user accounting database with entries
    TEST: Members have meaningful data
    11 UNRESOLVED

    TEST PURPOSE #12
    On a successful call to struct utmpx *getutxid(const
    struct utmpx *id) which returns a pointer to an entry
    with ut_type of LOGIN_PROCESS the members ut_id,
    ut_user, ut_pid and ut_tv shall have meaningful data
    in them.
    PREP: Open the user accounting database by a call to getutxent()
    PREP: Update the user accounting database with entries
    TEST: Members have meaningful data
    12 UNRESOLVED

    TEST PURPOSE #13
    On a successful call to struct utmpx *getutxid(const
    struct utmpx *id) which returns a pointer to an entry
    with ut_type of DEAD_PROCESS the members ut_id, ut_pid
    and ut_tv shall have meaningful data in them.
    PREP: Open the user accounting database by a call to getutxent()
    PREP: Update the user accounting database with entries
    TEST: Members have meaningful data
    13 UNRESOLVED

    TEST CASE: getutxline

    TEST PURPOSE #1
    A successful call to struct utmpx
    *getutxline(const struct utmpx *line) shall search
    forward from the current point in the user accounting database
    until it finds an entry of the type LOGIN_PROCESS or
    USER_PROCESS which has a ut_line value matching that
    in the utmpx structure pointed to by line and return a
    pointer to a utmpx structure containing a copy of the
    entry.
    PREP: Update the user accounting database with entries for known values
    PREP: Reset to the start of the database
    TEST: getutxline() returns the correct entry from the
    database
    ERROR: getutxline() could not retrieve the entry
    matching the input
    1 FAIL

    TEST CASE: pututxline

    TEST PURPOSE #1
    A successful call to struct utmpx
    *pututxline(const struct utmpx *utmpx) when the
    calling process has appropriate privileges shall write
    out the entry pointed to by utmpx into the user accounting
    database and return a pointer to a utmpx structure
    containing a copy of the entry added to the user accounting
    database.
    PREP: Initialize an entry with known values
    PREP: Write the entry in the database
    TEST: pututxline() returns the entry written to the database
    1 FAIL

    TEST PURPOSE #2
    A successful call to struct utmpx
    *pututxline(const struct utmpx *utmpx) shall search
    forward for the proper place in the user accounting database to
    write out the entry pointed to by utmpx when it finds
    that it is not already at the proper place.
    PREP: Initialize entries with known values
    PREP: Seek to the start of the database
    PREP: Overwrite one of the new entries created with a
    call to pututxlin()
    PREP: Seek to the start of the database
    TEST: pututxline() searches forward to the proper
    place to write an entry.
    2 FAIL

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    We agree this is a test suite deficiency in the test
    suite version(s) listed.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Test Suite Deficiency (TSD)
    Review Conclusion
    This is an agreed Test Suite Deficiency.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority