doc update
[www.jankratochvil.net.git] / project / captive / Index.html.pl
1 #! /usr/bin/perl
2
3 # $Id$
4 # Main page of 'My::Project::captive'
5 # Copyright (C) 2003 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
6
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; exactly version 2 of June 1991 is required
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
20
21 package project::captive::Index;
22 require 5.6.0;  # at least 'use warnings;' but we need some 5.6.0+ modules anyway
23 our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
24 our $CVS_ID=q$Id$;
25 use strict;
26 use warnings;
27
28 BEGIN{ open F,"Makefile"; our $top_dir=pop @{[split /\s/,(grep /^top_srcdir/,<F>)[0]]}; eval "use lib '$top_dir'"; close F; }
29 use My::Web;
30 use My::Project;
31 use project::captive::ListItem;
32
33
34 my $W=My::Project->init_project(
35                 "__PACKAGE__"=>__PACKAGE__,
36                 "ListItem"=>\@project::captive::ListItem::ListItem,
37                 "head_css"=>"
38 .reqpkg { font-style: italic; }
39 .stuff  { font-style: italic; font-size: larger; margin-left: 20%; margin-right: 10%; }
40 .re     { font-style: italic; }
41 ",
42                 );
43
44
45 print vskip("10ex")."<h1 align=\"center\">!!! DO NOT DISCLOSE - **************** !!!</h1>\n".vskip("10ex");
46
47 print <<"HERE";
48 <h1>The First Read/Write NTFS for Free Operating Systems</h1>
49 <h1>The First Free Microsoft Windows Kernel API Emulation</h1>
50 HERE
51
52 my @stuff=(
53                 "A lot of people claim themselves as Windows Programmers.\n"
54                                 ." Now I can finally join them - I also wrote my own Microsoft Windows.",
55                 "Why do they need ".a_href('http://www.winsupersite.com/reviews/winserver2k3_gold2.asp','5000 developers')
56                                 ." to write Microsoft Windows when it is just One Man Show task?",
57
58
59
60                 "My first Microsoft Windows program ever written? Some 'helloworld'?"
61                                 ." <span class=\"quote\">hal.dll</span>.",
62                 );
63
64 print "<p class=\"stuff\">$_</p>\n" for ($stuff[int rand @stuff]);
65 print vskip "3ex";
66
67
68 print <<'HERE';
69 <table border="1" align="center" style="text-align: center;"><tr><th>Distribution</th>
70                 <th>Installation Case #1<br />Filesystem and installer<br />(recommended)</th>
71                 <th>Installation Case #2<br />Manual installation<br />(filesystem, expert user)</th>
72                 <th>Installation Case #3<br />Command-line client<br />(no filesystem access)</th></tr>
73 HERE
74 my %pkg=(
75                 1=>[qw(captive captive-lufs captive-install lufs gnome-vfs-httpcaptive ntfsprogs ntfsprogs-gnomevfs)],
76                 2=>[qw(captive captive-lufs                 lufs)],
77                 3=>[qw(captive)],
78                 );
79 my %reqpkg=(
80                 1=>[qw(glib2 gnome-vfs2 ORBit2 libxml2 openssl popt          libgnomeui)],
81                 2=>[qw(glib2 gnome-vfs2 ORBit2 libxml2 openssl popt)],
82                 3=>[qw(glib2 gnome-vfs2 ORBit2 libxml2 openssl popt readline)],
83                 );
84 my %version=(
85                 map(($_=>["0.9.1","0"]),qw(captive captive-lufs captive-install)),
86                 "lufs"=>["0.9.6","1captive2"],
87                 "gnome-vfs-httpcaptive"=>["2.3.8captive2","0"],
88                 "ntfsprogs"=>["200309071734","1captive1"],
89                 "ntfsprogs-gnomevfs"=>["1.0.1","0"],
90                 );
91 my %has_rh8=(map(($_=>1),qw(
92                 gnome-vfs-httpcaptive
93                 captive
94                 captive-lufs
95                 captive-install
96                 )));
97 my %has_mdk91=(map(($_=>1),qw(
98                 gnome-vfs-httpcaptive
99                 lufs
100                 captive
101                 captive-lufs
102                 captive-install
103                 )));
104 my %has_devel=(map(($_=>1),qw(
105                 ntfsprogs
106                 )));
107 my %pkg_nosrc=(map(($_=>1),qw(
108                 captive-lufs
109                 captive-install
110                 )));
111 my @dist=(
112                 {
113                         "name"=>"Red Hat 9<br />Shrike i386",
114                         "out"=>sub {
115                                 my($pkg,$version_base,$version_ext)=@_;
116                                         my $file="$pkg-$version_base-$version_ext.i386.rpm";
117                                         my $r=a_href "dist/$file",$file;
118                                         (my $filedev=$file)=~s/^\Q$pkg\E-/${pkg}-devel-/;
119                                         $r.="<br />".a_href("dist/$filedev",$filedev) if $has_devel{$pkg};
120                                         return $r;
121                                 },
122                         },
123                 {
124                         "name"=>"Red Hat 8<br />Psyche i386",
125                         "out"=>sub {
126                                 my($pkg,$version_base,$version_ext)=@_;
127                                         my $file="$pkg-$version_base-$version_ext".(!$has_rh8{$pkg} ? "" : "rh8").".i386.rpm";
128                                         my $r=a_href "dist/$file",$file;
129                                         (my $filedev=$file)=~s/^\Q$pkg\E-/${pkg}-devel-/;
130                                         $r.="<br />".a_href("dist/$filedev",$filedev) if $has_devel{$pkg};
131                                         if ($pkg eq "captive-install") {
132                                                 for (qw(libxml2-2.5.4-1.i386.rpm libxml2-python-2.5.4-1.i386.rpm)) {
133                                                         $r.="<br />".a_href('ftp://ftp.redhat.com/pub/redhat/linux/9/en/os/i386/RedHat/RPMS/'.$_,$_)." of Red Hat 9";
134                                                         }
135                                                 }
136                                         return $r;
137                                 },
138                         },
139                 {
140                         "name"=>"Mandrake 9.1<br />Bamboo i586",
141                         "out"=>sub {
142                                 my($pkg,$version_base,$version_ext)=@_;
143                                         my $file="$pkg-$version_base-$version_ext".(!$has_mdk91{$pkg} ? ".i386.rpm" : "mdk91.i586.rpm");
144                                         my $r=a_href "dist/$file",$file;
145                                         (my $filedev=$file)=~s/^\Q$pkg\E-/${pkg}-devel-/;
146                                         $r.="<br />".a_href("dist/$filedev",$filedev) if $has_devel{$pkg};
147                                         return $r;
148                                 },
149                         },
150                 {
151                         "name"=>"Red Hat .src.rpm<br />(of 9 - Shrike)",
152                         "out"=>sub {
153                                 my($pkg,$version_base,$version_ext)=@_;
154                                         return () if $pkg_nosrc{$pkg};
155                                         my $file="$pkg-$version_base-$version_ext.src.rpm";
156                                         return $file,$file;
157                                 },
158                         },
159                 {
160                         "name"=>"Debian GNU/Linux<br />'unstable' i386",
161                         "out"=>sub {
162                                 my($pkg,$version_base,$version_ext)=@_;
163                                         $version_ext=~s/^\d+//;
164                                         my $file="${pkg}_$version_base".($version_ext=~/^\d+$/ ? "" : $version_ext)."_i386.deb";
165                                         my $r=a_href "dist/$file",$file;
166                                         (my $filedev=$file)=~s/^\Q$pkg\E_/${pkg}-dev_/;
167                                         $r.="<br />".a_href("dist/$filedev",$filedev) if $has_devel{$pkg};
168                                         return $r;
169                                 },
170                         },
171                 {
172                         "name"=>"Debian GNU/Linux<br />sources",
173                         "out"=>sub {
174                                 my($pkg,$version_base,$version_ext)=@_;
175                                         return () if $pkg_nosrc{$pkg};
176                                         $version_ext=~s/^\d+//;
177                                         my $file="${pkg}_$version_base".($version_ext=~/^\d+$/ ? "" : $version_ext);
178                                         return CGI::escapeHTML($file).":"
179                                                         .' '     .a_href("dist/$file.dsc",".dsc","size"=>0)
180                                                         .'&nbsp;'.a_href("dist/$file.tar.gz",".tar.gz");
181                                 },
182                         },
183                 {
184                         "name"=>"Sources (.tar.gz)",
185                         "out"=>sub {
186                                 my($pkg,$version_base,$version_ext)=@_;
187                                         return () if $pkg_nosrc{$pkg};
188                                         $version_ext=~s/^\d+//;
189                                         my $file="$pkg-$version_base".($version_ext=~/^\d+$/ ? "" : $version_ext).".tar.gz";
190                                         return $file,$file;
191                                 },
192                         },
193                 );
194
195 for my $dist (@dist) {
196         print "<tr>";
197                 print "<td>".$dist->{"name"}."</td>";
198                 for my $case (1,2,3) {
199                         print "<td>";
200                         print join("<br />",map({ my $pkg=$_;
201                                 my($file,$text)=&{$dist->{"out"}}($pkg,@{$version{$pkg}});
202                                 (!defined $text ? ($file) || () : (a_href("dist/$file",$text)));
203                                 } @{$pkg{$case}}));
204                         print "</td>";
205                         }
206         print "</tr>\n";
207         }
208 print <<'HERE';
209 </table>
210 HERE
211
212 print vskip "3ex";
213
214 print <<"HERE";
215 <h1>Installation notes</h1>
216
217 <p>You should first run <b>captive-install-acquire</b> command to check your
218 available Microsoft Windows drivers versions. Now you can execute:</p>
219
220 <blockquote>
221 <p class="quote"># mount -t captive-ntfs /dev/hda1 /mnt/dosc</p>
222 </blockquote>
223
224 <h2>Package version conflicts</h2>
225
226 <dl>
227
228 <dt>@{[ a_href 'http://lufs.sourceforge.net/lufs/','lufs' ]}</dt>
229 <dd><p><b>'captive' version required</b>: Although you may already have the
230 original package installed you must replace it by the local 'captive'-marked
231 version containing some 'captive'-essential fixes and extensions.</p></dd>
232
233 <dt>@{[ a_href 'http://linux-ntfs.sourceforge.net/','ntfsprogs' ]}</dt>
234 <dd><p><b>Original version >=200309071734 sufficient</b>:
235 The package downloadable here has no code patches - you can freely use the
236 original version instead.  Unfortunately the last public release is
237 <b>1.7.1</b> while this project requires at least
238 @{[ a_href 'http://linux-ntfs.sourceforge.net/snapshots/','snapshot' ]} version
239 <b>@{[ a_href 'http://linux-ntfs.sourceforge.net/snapshots/ntfsprogs-200309071734.tar.bz2','200309071734' ]}</b>
240 which is not packaged (.rpm/.deb) yet. Packaged versions are provided here for
241 your convenience.</p></dd>
242
243 </dl>
244
245
246 <h2>LUFS kernel driver module</h2>
247
248 <p>@{[ a_href 'http://lufs.sourceforge.net/lufs/','LUFS' ]} (Linux Userland File
249 System) needs Linux kernel module driver (<i>lufs.o</i>) compatible with your
250 running Linux kernel. Binary driver is supplied already precompiled for many
251 Linux kernel versions in the binary packages above (<b>.i386.rpm</b> and
252 <b>_i386.deb</b> archives).</p>
253
254 <p>If you cannot <b>mount</b>(8) your NTFS filesystem you should run <span
255 class="quote">/usr/share/lufs/prepmod</span> to see the reasons. It is always
256 recommended to upgrade to the latest stable kernel supplied by your GNU/Linux
257 distribution vendor. You may need to install package
258 <b>kernel-source</b> (Red Hat) or <b>kernel-headers</b> (Debian) matching your
259 Linux kernel version (<b>rpm&nbsp;-q&nbsp;kernel</b>) and re-run <span
260 class="quote">/usr/share/lufs/prepmod</span>.</p>
261
262
263 <h2>The First Free Microsoft Windows Kernel API Emulation</h2>
264
265 <p>Compatibility with existing binary Microsoft Windows file system drivers was
266 reached. Microsoft Windows kernel system components required by these drivers
267 were analyzed and successfuly emulated in the GNU/Linux operating system.
268 Project brings Microsoft Windows kernel emulation framework to support even
269 other types Microsoft Windows drivers in the future.</p>
270
271 <dl>
272         <dt>Emulation principle equivalent</dt>
273         <dd>
274                 <p>@{[ a_href 'http://www.winehq.com/','Wine Project' ]}</p>
275                 <p>No code could be shared - Wine emulates only Microsoft Windows userland.
276                 Filesystem drivers completely belong to Microsoft Windows kernelland.</p>
277         </dd>
278
279         <dt>Closed-source read-only-crippled @{[ '$0' ]} equivalent for Microsoft Windows</dt>
280         <dd>
281                 <p>@{[ a_href 'http://www.sysinternals.com/ntw2k/freeware/ntfswin98.shtml',
282                                 'NTFS for Windows 98' ]}</p>
283                 <p>There is a @{[ a_href 'http://www.sysinternals.com/images/screenshots/ntfs98ap.gif',
284                                 'diagram' ]} showing exactly the principle of Captive NTFS project.
285                 There is apparently disabled read/write functionality in <i>NTFS for
286                 Windows 98</i> as the same company also sells the following product sharing
287                 the same codebase:</p>
288         </dd>
289
290         <dt>Closed-source read/write @{[ '$299' ]} equivalent for MS-DOS</dt>
291         <dd>
292                 <p>@{[ a_href 'http://www.winternals.com/products/repairandrecovery/ntfsdospro.asp',
293                                 'NTFSDOS Professional' ]}</p>
294                 <p>This product is the most close equivalent to Captive NTFS but it is
295                 a commercial product, closed-source and it has filesystem interface only
296                 for MS-DOS.</p>
297         </dd>
298
299         <dt>The only real competition: Closed-source read/write @{[ '$299' ]} equivalent</dt>
300         <dd>
301                 <p>@{[ a_href 'http://www.vmware.com/download/workstation.html',
302                                 'VMware Workstation' ]}</p>
303                 <p>Original Microsoft Windows operating system can be run inside a virtual
304                 machine running under GNU/Linux and share the read-write NTFS disk by using
305                 a network file sharing through a&nbsp;VMware virtual network card.</p>
306                 <p>You need @{[ '$299' ]} for this product and you need to
307                 give up your system security by running un@{[ a_href '#sandbox','sandbox' ]}ed
308                 closed-source program in your GNU/Linux.</p>
309         </dd>
310 </dl>
311
312
313 <h2>Security</h2>
314
315 <p><b>Re: @{[ a_href 'http://linux-ntfs.sourceforge.net/info/ntfs.html#7.7',
316                 "7.7 Can't we write a wrapper for Windows' driver?" ]}</<b></p>
317
318 <p class="re">&gt; It sounds like a great idea, to start with, but there are numerous
319 problems.</p>
320
321 <p><span class="re">&gt; The largest technical problem is joining the Windows
322 system DLL to the Linux VFS. It could be done, but it wouldn't be pretty.</span><br />
323 Yep. :-)</p>
324
325 <p><span class="re">&gt; It would have to run as part of the kernel which would mean
326 that if it went wrong it could crash the machine. With no source, we might not
327 be able to work around the problem.</span><br />
328 <a name="sandbox">Nope</a>,
329 @{[ a_href 'http://lufs.sourceforge.net/lufs/','Linux Userland File System (LUFS)' ]}
330 moves the filesystem implementation to UNIX userland where the Microsoft
331 Windows filesystem is completely unarmed by Captive jail of chroot(2),
332 setuid(2) and setrlimit(2). There only remains one narrow connection to the rest of
333 system (by CORBA/ORBit). The filesystem's life environment gets kill(2)ed when
334 UNIX is no longer satisfied with it. Safety similiar to
335 @{[ a_href 'http://www.vmware.com/solutions/security.html','VMware sandbox' ]}.</p>
336
337 <p><span class="re">&gt; The next major problem is compati<!--orig. text typo-->bility.
338 Which version of the Windows system file would we use? Picking one would limit
339 its use, making the wrapper versatile for all of them would be a programming
340 nightmare.</span><br />
341 Microsoft Windows NTFS filesystem driver is capable of accessing older formats
342 of the filesystem. This project currently runs Microsoft Windows XP version,
343 porting to Microsoft Windows 2003 Server expected. (Microsoft Windows upgrades
344 NTFS disk filesystem to its own version during complete CD-ROM Microsoft
345 Windows system installation - such operation is not threat this project use.)</p>
346
347 <p><span class="re">&gt; And it gets worse. The legal implications of
348 distributing Windows systems files would cause problems.</span><br />
349 User must be careful to obey all licensing restrictions according to his
350 local country laws.<br />
351 <span class="re">&gt; Also the proprietary nature of the driver would mean that
352 the other kernel coders would not investigate any problems if someone had used
353 the NTFS wrapper.</span><br />
354 It does not apply to this project due to the implemented
355 @{[ a_href '#sandbox','filesystem separation' ]}.</p>
356
357 @{[ vskip "3ex" ]}
358
359 <h1>See also</h1>
360 <ul>
361         <li>@{[ a_href 'Preview.html.pl','Technology Preview' ]}</li>
362         <li>@{[ a_href 'doc/','Developer Documentation' ]}</li>
363         <li>@{[ a_href 'apiref/','API Reference Manual' ]} (fragment)</li>
364         <li>
365                 @{[ a_href 'http://cvs.jankratochvil.net/viewcvs/priv/captive/','CVS repository ViewCVS' ]}
366                 (@{[ a_href 'http://cvs.jankratochvil.net/viewcvs/priv/reactos/?only_with_tag=captive','ReactOS branch part' ]})
367                 </li>
368         <li>@{[ a_href 'http://cvs.jankratochvil.net/viewcvs/*checkout*/priv/captive/src/libcaptive/ke/exports.captivesym?rev=HEAD',
369                         'List of implemented W32 kernel functions' ]}</li>
370         <li>@{[ a_href 'Thanks.html.pl','Thanks' ]}</li>
371         <li>@{[ a_href 'Resources.html.pl','Related Pages' ]}</li>
372 </ul>
373
374 @{[ vskip "3ex" ]}
375
376 <p class="stuff">
377         Why did I install Microsoft Windows and wrote such disgusting piece of code?<br />
378         I expect @{[ a_href $W->{"top_dir"}."/CV.html.pl","yet another challenging task" ]}, !
379 </p>
380 HERE
381
382
383 My::Web->footer();