Hi Jean-Pierre,

On Mon, 17 Sep 2007, [ISO-8859-1] Jean-Pierre André wrote:
> Szabolcs Szakacsits wrote:
> > 
> > Fantastic! :-) Would it be posible to port the tool to Linux? It would 
> > be highly valuable because people often don't have or want to use 
> > Windows (portable external disks, disk images) but they would still 
> > like to have some sort of user mapping.
> >   
> The main problem for porting the mapping tool to Linux is to
> return the vol-id ("ctx->vol") to calling program, so that it
> could then call entries in ntfs.so similar to GetFileSecurity()
> and SetFileSecurity() from Win32, and bypassing fuse. I thought
> of returning the vol-id in parameter f_fsid of statfs(). There
> could be a second problem if vol-id points to data in an address
> space private to ntfs-3g process and not usable in other
> processes. If this should be confirmed, fuse cannot be bypassed.

You could make a separate utility using libntfs-3g. The ntfs-3g driver 
is also a utility using libntfs-3g.

> Getting Windows names is easy if system partition is mounted by
> ntfs-3g : just read entries in "Documents and Settings". This is
> basically what the tool I have developed does.

I suspect it should be stored somewhere else too (e.g. gids, 
non-interactive users, etc). But I also guess it's on the system 
partition somewhere (registry?).
 
> Supplying Linux names instead of uid and gid only implies
> reading /etc/passwd and /etc/groups at mount time, with one
> implementation if these files are over ntfs-3g, and a second
> implementation if they are not (expecting them to have been
> mounted).

getpwuid(uid) and getgrgid(gid) can help here. The former is used in 
set_user_mount_option() in ntfs-3g.c

Please also leave the $UserMapping file in the root directory and drop the 
$ because it typically causes problems for users, scripts, etc. The name 
'UserMapping' still seems a bit too general and candinate for collision 
with something else in the future. Maybe UserMapping.NTFS-3G? Or 
NTFS-3G.UserMapping? Or NTFS-3G/UserMapping and the NTFS-3G directory being 
hidden, still read and writeable by backup tools? Probably the last one is 
the best for the long term. What do you think?

Thanks,
            Szaka

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to