Date: Tue, 4 Jun 2002 08:48:00 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 12360 for review Message-ID: <200206041548.g54Fm0443612@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=12360 Change 12360 by rwatson@rwatson_curry on 2002/06/04 08:47:52 In mac_{biba,mls}_cred_check_rename_to_vnode(), don't dereference the target vnode label unless the vnode is non-NULL. This covers the "are you allowed to overwrite file (x) in a rename", which only applies if there is a target file to overwrite. Affected files ... ... //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#46 edit ... //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#33 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#46 (text+ko) ==== @@ -1406,10 +1406,12 @@ if (!mac_biba_dominate_single(subj, obj)) return (EACCES); - obj = SLOT(label); + if (vp != NULL) { + obj = SLOT(label); - if (!mac_biba_dominate_single(subj, obj)) - return (EACCES); + if (!mac_biba_dominate_single(subj, obj)) + return (EACCES); + } return (0); } ==== //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#33 (text+ko) ==== @@ -1399,10 +1399,12 @@ if (!mac_mls_dominate_single(obj, subj)) return (EACCES); - obj = SLOT(label); + if (vp != NULL) { + obj = SLOT(label); - if (!mac_mls_dominate_single(obj, subj)) - return (EACCES); + if (!mac_mls_dominate_single(obj, subj)) + return (EACCES); + } return (0); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206041548.g54Fm0443612>