Bug 3533 - HFSPLUS does not take care of uid/gid options
Summary: HFSPLUS does not take care of uid/gid options
Status: REJECTED DOCUMENTED
Alias: None
Product: File System
Classification: Unclassified
Component: HFS/HFSPLUS (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Roman Zippel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-09 06:08 UTC by Carlos Perell
Modified: 2008-03-04 01:00 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.8.1
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
Patch to fix the bug (916 bytes, patch)
2004-10-09 06:10 UTC, Carlos Perell
Details | Diff
Second try, this time following Apple specification (3.72 KB, patch)
2004-10-10 10:40 UTC, Carlos Perell
Details | Diff
fix broken logic for mount uid=xxx,gid=xxx (1.47 KB, patch)
2007-06-22 08:45 UTC, Sean P. Kane
Details | Diff

Description Carlos Perell 2004-10-09 06:08:43 UTC
Distribution: Ubuntu
Hardware Environment: Powerbook G4 550Mhz
Software Environment: 
Problem Description: When you mount a hfsplus filesystems using the options
uid/gid, those options are ignored and the filesystem does not use them.

Steps to reproduce:
1.- plug a device with a hfsplus filesystem
2.- mount it using the options "uid=1000,gid=1000" (or any other number you want)
3.- execute a ls -l in the root directory where it's mounted and you will see
that it's not following those uid and gid numbers.


I did a patch and also tested it and works perfectly here with my iPod.
Comment 1 Carlos Perell 2004-10-09 06:10:58 UTC
Created attachment 3790 [details]
Patch to fix the bug
Comment 2 Carlos Perell 2004-10-09 08:58:01 UTC
I'm working on a new patch, this one is not correct.

The new one will follow the Apple specification at:

http://developer.apple.com/technotes/tn/tn1150.html#HFSPlusPermissions
Comment 3 Carlos Perell 2004-10-10 10:40:10 UTC
Created attachment 3798 [details]
Second try, this time following Apple specification

Here you have a proposal patch to fix it.

It does not have activated the dynamic owner change if you use uid=99 because I

don't know a way to invalidate the inode cache and thus, "ls" always shows the
uid of the files as the first user that accessed to it.
Comment 4 Adrian Bunk 2006-02-04 14:08:09 UTC
Roman, can you comment on this patch?
Comment 5 Sean P. Kane 2007-06-22 08:45:35 UTC
Created attachment 11849 [details]
fix broken logic for mount uid=xxx,gid=xxx

Patched by: Wyatt Banks <wyatt[at]banksresearch.com>

and originally posted here: http://lkml.org/lkml/2007/6/20/364
Comment 6 Roman Zippel 2007-06-24 09:44:50 UTC
This is not really a bug, this option is not intended to override the uid/gid, it's only used as default for uninitialized values.
The uid remapping for uid 99 should depend on a different kernel option and it only the uid should be remapped, there is no gid remapping.
Comment 7 Natalie Protasevich 2007-09-22 20:49:38 UTC
Any update on this problem please.
Thanks.
Comment 8 Natalie Protasevich 2008-03-04 00:57:45 UTC
I think the bug was sufficiently explained in #6, so I suppose we can close it as it "works as intended".

Note You need to log in before you can comment on or make changes to this bug.