Date: Mon, 25 Feb 2013 13:02:15 GMT From: Nicholas Wilson <nicholas@nicholaswilson.me.uk> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/176420: [patch] incorrect errno for LOCAL_PEERCRED Message-ID: <201302251302.r1PD2Fgv017011@red.freebsd.org> Resent-Message-ID: <201302251310.r1PDA031091693@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 176420 >Category: kern >Synopsis: [patch] incorrect errno for LOCAL_PEERCRED >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Feb 25 13:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Nicholas Wilson >Release: Release 7.4 to Release 9.1 >Organization: >Environment: FreeBSD EB5-FBSD-7-4-x64.realvnc.ltd 7.4-RELEASE-p9 FreeBSD 7.4-RELEASE-p9 #0: Mon Jun 11 19:47:58 UTC 2012 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: A tiny bug; error code is incorrect for the SEQPACKET retrieval of LOCAL_PEERCRED. * An unconnected SOCK_STREAM: get ENOTCONN * A SOCK_DGRAM: get EINVAL * An unconnected SOCK_SEQPACKET: get EINVAL, but should get ENOTCONN >How-To-Repeat: >Fix: Patch attached for RELEASE-9.1 Patch attached with submission follows: --- uipc_usrreq.c-9.1-release-r243808 2013-02-25 12:59:06.653391783 +0000 +++ uipc_usrreq.c 2013-02-25 13:00:43.196178074 +0000 @@ -1165,5 +1165,5 @@ xu = unp->unp_peercred; else { - if (so->so_type == SOCK_STREAM) + if (so->so_proto->pr_flags & PR_CONNREQUIRED) error = ENOTCONN; else >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302251302.r1PD2Fgv017011>