Re: A PRIV_* flag for /dev/mem?

看板FB_current作者時間12年前 (2013/06/17 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串9/12 (看更多)
On 06/16/13 00:20, Konstantin Belousov wrote: > On Sat, Jun 15, 2013 at 05:23:50PM -0600, Jamie Gritton wrote: >> Index: sys/dev/mem/memdev.c >> =================================================================== >> --- sys/dev/mem/memdev.c (revision 251793) >> +++ sys/dev/mem/memdev.c (working copy) >> @@ -67,8 +67,14 @@ >> { >> int error = 0; >> >> - if (flags& FWRITE) >> - error = securelevel_gt(td->td_ucred, 0); >> + if (flags& FREAD) >> + error = priv_check(td, PRIV_KMEM_READ); >> + if (flags& FWRITE) { >> + if (error != 0) >> + error = priv_check(td, PRIV_KMEM_WRITE); >> + if (error != 0) > Shouldn't this be 'if (error == 0)' ? Indeed it should. None of this has even been compiled yet, let alone tested - still in the thought phase. - Jamie _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1HlVrXDT (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1HlVrXDT (FB_current)