lkml.org 
[lkml]   [2011]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Possible coding issue in udf??
Date
Alex Davis <alex14641@yahoo.com> writes:

> In fs/udf/inode.c, line 1455, linux 2.6.35, there is the following code:
>
> udfperms = ((inode->i_mode & S_IRWXO)) |
> ((inode->i_mode & S_IRWXG) << 2) |
> ((inode->i_mode & S_IRWXU) << 4);
>
> Shouldn't we be shifting by 3 bits? i.e:
> udfperms = ((inode->i_mode & S_IRWXO)) |
> ((inode->i_mode & S_IRWXG) << 3) |
> ((inode->i_mode & S_IRWXU) << 6);
>
> The S_I.. constants are all defined in include/linux/stat.h as 3-bit values.
>
> I will send a patch if needed.

I would suggest you test it first. Put in a UDF disk that triggers
this case (verify with a printk). Check in ls -l if the
permissions are correct or wrong.

-Andi

--
ak@linux.intel.com -- Speaking for myself only


\
 
 \ /
  Last update: 2011-05-15 17:17    [W:0.175 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site