Anton Altaparmakov writes:
> At 03:55 21/08/2000, Albert D. Cahalan wrote:
> [snip - Talking about NTFS and Windows NT]
>
>> You have a drive f: with a file "bar" in the current directory.
>
> You mean that current directory is on drive f:, right? (You can't have a
> drive f: inside the current directory whatever the current directory is. -
> This is a contradiction in terms!)
I'm not sure what happens at the native API level, but at least some
of the other stuff has the notion of one current directory per drive.
>> You have a directory "f" in the current directory on the current drive.
>
> Just ZwOpenFile or ZwCreateFile it as "\??\f:\f" if in root directory
> or as "f" and then use RootDirectory handle which you need to obtain
> first (see above). [ No problems for NT so far. ]
>
>> Directory "f" has an EA called "bar".
>
> First open the directory as described above and then to query the
> EA "bar" use ZwQueryEaFile or to write to the EA use ZwSetEaFile. -
> "Bar" is provided in the optional EaList argument (embedded in a
> FILE_GET_EA_INFORMATION struct) when calling ZwQueryEaFile and in
> the Buffer (of type PFILE_FULL_EA_INFORMATION) when calling
> ZwSetEaFile. [ No problems for NT so far. ]
OK. So the EA is not in the general namespace.
All EAs are set at once? Does the kernel care if you pass
it a mess of broken EA data structures?
>> Directory "f" has a stream called "bar".
>
> AFAICS this would be done using ZwOpenFile setting the object
> name to "f:bar". [ Note, I am not 100% sure about this, never
> done this in kernel mode... Assuming I am right, again, no
> problems for NT so far. ]
I don't think this is right because...
>> In the same place as "f", you have a file named "f:bar".
>
> You can't have a file called f:bar! The colon is a reserved
> character and cannot be used in filenames.
NT supports a POSIX subsystem that is able to create this.
You can put everything but '/' and '\0' in filenames by using
the POSIX subsystem. At the native API level, I think even
those are legal filename characters.
The sysinternals people had fun putting '\0' in the registry.
NT's native API tends to use counted 16-bit strings instead
of the more typical nul-terminated 8-bit strings, so you can
make quite a bit of trouble for Win32-based admin tools.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:14 EST