Hello!

When reading the ntfs-3g-1.2712SR.1 code, I noticed in ntfs_set_mode()
in security.c the following check:

                if (!processuid || (uid == processuid)) {
...
                } else {
                        errno = EPERM;
                        res = -1;       /* neither owner nor root */
                }

Does this mean that ntfs-3g does the rude check for processuid==0 and
ignores the actually applicable delicate capability, CAP_FOWNER? If
so, it's a pity, it would be nice if the general linux capabilities
system would work for NTFS as well.

And also this thing made me think of a more general issue. (I don't
know much about FUSE, so perhaps I'm misunderstanding something; and I
would like to know more.)

This code which checks whether the user has enough rights makes an
impression of re-implementing one more time the general linux logic
for permission checking, and it doesn't feel right. Isn't it possible
in FUSE to use the system procedure for permission checking as the
default? Why should at all this ntfs-3g code care about whether it
should check for CAP_FOWNER or for processuid==0 or for something else
(when a new version of linux with different logic is out) -- can't it
just tell the kernel all the owner and permission information and let
it decide whether the operation is allowed?

And also, I haven't yet understood how the POSIX ACLs implementation
work. Does ntfs-3g just map between NTFS and POSIX ACLs and relegate
permission checking to a general (system-wide?) POSIX ACL permission
checking procedure, or does it again re-implement the POSIX ACLs
checking logic (although it could be thought to be a
filesystem-independent system-wide common procedure)?


Many thanks for creating this very useful driver!

Best regards,

-- 
Ivan

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to