]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
In ncp_conn_alloc(), a new credential pointer, 'owner', is set up to point
authorrwatson <rwatson@FreeBSD.org>
Sun, 27 May 2007 17:14:33 +0000 (17:14 +0000)
committerrwatson <rwatson@FreeBSD.org>
Sun, 27 May 2007 17:14:33 +0000 (17:14 +0000)
commita247f2cf6f0faeec72aae99fab929037aa5edaab
tree1db0e282619dc280241e8e1c13ffd7c1a5537f98
parent933cc5abb3fc5e0afc41fd1420765773cc08e548
In ncp_conn_alloc(), a new credential pointer, 'owner', is set up to point
at the credential to be used by the connection.  However, the pointer's
value was ignored when actually setting hcp->nc_owner.

(1) Do set nc_owner to the owner pointer value so that the credential is
    not discarded after being carefully configured.

(2) In the case where we create a new credential with modified uid, copy
    the existing credential to initialize non-uid fields to existing
    values, which will lead to a fully initialized MAC label, groups, etc.

Found with: Coverity Prevent(tm)
CID: 2226
sys/netncp/ncp_conn.c