lkml.org 
[lkml]   [2015]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 9/9] sysfs: disallow world-writable files.
From
Hi Rusty,

I have a small doubt about the permission restriction (User perms >=
group perms >= other perms) in VERIFY_OCTAL_PERMISSIONS(). Please Note
that permission field of User, Group or Other consists of three bits.
LSB is EXECUTE permission, MSB is READ permission and the middle bit
is WRITE permission. Say for example, permission value is "0431". Here
User has only READ permission whereas Group has both WRITE and EXECUTE
permission and Other has EXECUTE permission. I guess, it is not good
to give Group the WRITE permission whereas User itself has no WRITE
permission.
May be, it's better to check those three permissions bit wise rather than
as a whole.
I already had posted my query at:

http://thread.gmane.org/gmane.linux.kernel/1667095/focus=1737833

But could get any reply.

Please rethink about my point and let me know your opinion.

Thanks,
Gobinda


\
 
 \ /
  Last update: 2015-04-29 14:41    [W:0.024 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site