Date: Mon, 21 Jan 2008 20:59:20 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 133813 for review Message-ID: <200801212059.m0LKxKS9002050@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133813 Change 133813 by rwatson@rwatson_freebsd_capabilities on 2008/01/21 20:58:39 Correct logic in getsock_cap() to check for a socket and return it and file flags rather than check for a vnode. Copy-and-paste-o. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/kern/uipc_syscalls.c#3 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/kern/uipc_syscalls.c#3 (text+ko) ==== @@ -184,12 +184,14 @@ } } #endif /* CAPABILITIES */ - if (fp->f_vnode == NULL) { - error = EINVAL; + if (fp->f_type != DTYPE_SOCKET) { + error = ENOTSOCK; fp = NULL; goto out; } else { fhold(fp); + if (fflagp != NULL) + *fflagp = fp->f_flag; error = 0; } out:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801212059.m0LKxKS9002050>