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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1143 Actions


    Problem Report Number 1143
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0345
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published null
    Product Standard Sockets (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 4.1.1
    Test Identification sockets/bind 9
    Problem Summary PG4U.00126 This IR claims that sock_len may be zero and return ENOENT.
    Problem Text
    On our implementation, for the following call:
    -----------------------------------------------------------------
    s2 = bind(su, (struct sockaddr *) &sin5, sizeof(sin5));
    -----------------------------------------------------------------

    First, the bindaddress length - the sizeof(sin5) is checked to see if
    it is too short to be a bind address. In this same test we also check
    to see if the sock_len field is too long. In either of these cases
    we return EINVAL.

    Second, if sock_len is negative or zero, we return ENOENT.

    Third, if the sock_family field does not contain AF_UNIX, we return
    EAFNOSUPPORT.

    So, since the bindaddress length is valid and the length (0) is not
    too long, we don't kick out on the first check. But, since it is
    zero we give the ENOENT. If a 10 (the AF_INET sock_len) had been in
    that field, then we would have returned the EAFNOSUPPORT.

    When a call is made to bind with at least 2 errors (the sock_len of 0
    and incompatible socket type and ip address field) we catch and check
    the parameters in a different order than was expected. We believe that
    our order should be acceptable.
    Test Output
    TEST CASE: bind

    TEST PURPOSE #9
    If the implementation supports a communications
    domain and a socket type:
    EAFNOSUPPORT in errno and return -1 on a call to int
    bind(int socket, const struct sockaddr *address,
    size_t address_len) when address is not valid for the
    address family of the socket.
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_un: path = ../tmp/unix.DFeaxQ
    PREP: Create test sockaddr_in: address = 129.40.217.7, port = 64585
    PREP: Create socket
    TEST: Bind socket with AF_UNIX address
    TEST: Return value
    TEST: errno value
    CLEANUP: Close socket
    TEST: AF_UNIX SOCK_STREAM
    PREP: Create test sockaddr_in: address = 129.40.217.7, port = 64586
    PREP: Create test sockaddr_un: path = ../tmp/unix.EBcFxQ
    PREP: Create socket
    TEST: Bind with AF_INET address
    TEST: Return value
    TEST: errno value
    ERROR: bind call failed incorrectly, errno was 129(ENOENT - No such file or directory) should have been EAFNOSUPPORT
    9 FAIL

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    We recommend this request be refused.

    It appears that a non-standard sockaddr structure member, sock_len, is
    being checked.

    The standard only defines sun_family and sun_path members of the
    structure for AF_UNIX (see sys/un.h), and sin_family, sin_port,
    sin_addr, and sin_zero for AF_INET (see netinet/inet.h). No sock_len
    member is specified by the standard.

    The length of the structure is sizeof(sin5), which is non-zero, and
    should not cause EINVAL. If indeed, sizeof(sin5) is zero, then there
    is a problem with the IUT, since the standard requires several
    structure members to be present.

    The address family of the specified bind address is AF_INET, so ENOENT
    does not apply.

    Since an invalid address family type is specified in the address argument,
    EAFNOSUPPORT should be returned.


    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Rejected (REJ)
    Review Conclusion
    This request is refused.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority