• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: Commit

2.4.36-stable kernel tree


Commit MetaInfo

Revisiona84feb810884e9d67c041821b31b9e71ac2b032c (tree)
Zeit2008-09-06 20:35:25
AutorGilbert Ashley Gilbert <amigo@ibib...>
CommiterWilly Tarreau

Log Message

udf: fix uid/gid permissions

This change made it into the 2.6 branch since 2.6.15 and fixes a problem
where the UDF code would change the ownership of files in a UDF filesystem
when they were different thatn the current user, when possible. Example: after
creating a CD using udf as a regular user, if you mounted the CD as root, the
udf code would reset the ownership of all the files on the cd, causing
unecessary write operations. I found this fix while working with an old patch
which adds packet-writing to the 2.4 kernel. This fix is from the original
author (or maintainer) of the udf code.

Note: this was fixed upstream in 4d6660eb3665f22d16aff466eb9d45df6102b254.

Ändern Zusammenfassung

Diff

--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -1363,9 +1363,13 @@ udf_update_inode(struct inode *inode, int do_sync)
13631363
13641364 if (inode->i_uid != UDF_SB(inode->i_sb)->s_uid)
13651365 fe->uid = cpu_to_le32(inode->i_uid);
1366+ else
1367+ fe->uid = cpu_to_le32(-1);
13661368
13671369 if (inode->i_gid != UDF_SB(inode->i_sb)->s_gid)
13681370 fe->gid = cpu_to_le32(inode->i_gid);
1371+ else
1372+ fe->uid = cpu_to_le32(-1);
13691373
13701374 udfperms = ((inode->i_mode & S_IRWXO) ) |
13711375 ((inode->i_mode & S_IRWXG) << 2) |
Show on old repository browser