https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222632

Jan Kokemüller <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #13 from Jan Kokemüller <[email protected]> ---
I've noticed that connectat(AT_FDCWD, ...) will even work on AF_INET sockets
created in capabilities mode. Surely this is not intended to work? Am I missing
something? bindat(AT_FDCWD, ...) also works.


        if (cap_enter() < 0) {
                err(1, "cap_enter");
        }

        int sock = socket(AF_INET, SOCK_STREAM, 0);
        if (sock < 0) {
                err(1, "socket");
        }

        struct sockaddr_in sin;
        sin.sin_family = AF_INET;
        sin.sin_port = htons(22);
        sin.sin_addr.s_addr = htonl(0x7F000001);

        if (connectat(AT_FDCWD, sock, (struct sockaddr *)(&sin),
                sizeof(struct sockaddr_in)) < 0) {
                err(1, "connect");
        }

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to