You can subscribe to this list here.
2001 |
Jan
(38) |
Feb
(25) |
Mar
(37) |
Apr
(50) |
May
|
Jun
(156) |
Jul
(174) |
Aug
(94) |
Sep
(107) |
Oct
(18) |
Nov
(153) |
Dec
(91) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(79) |
Feb
(117) |
Mar
(39) |
Apr
(164) |
May
(12) |
Jun
(64) |
Jul
(138) |
Aug
(43) |
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(17) |
Jun
(100) |
Jul
(210) |
Aug
(127) |
Sep
(89) |
Oct
(214) |
Nov
(176) |
Dec
(20) |
2006 |
Jan
(29) |
Feb
(85) |
Mar
(45) |
Apr
(54) |
May
(9) |
Jun
(7) |
Jul
(28) |
Aug
(65) |
Sep
(3) |
Oct
(62) |
Nov
(68) |
Dec
(52) |
2007 |
Jan
(6) |
Feb
|
Mar
(8) |
Apr
|
May
|
Jun
(2) |
Jul
(4) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
From: Yura P. <yu...@de...> - 2007-10-02 12:40:31
|
Changes by: yura Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs In directory delta357:/tmp/cvs-serv23529/ntfsprogs Modified Files: ntfscat.8.in ntfscp.8.in ntfsmount.8.in ntfsprogs.8.in Log Message: update man pages Index: ntfscat.8.in =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfscat.8.in,v retrieving revision 1.14 retrieving revision 1.15 diff -u -p -r1.14 -r1.15 --- ntfscat.8.in 6 Feb 2006 01:05:01 -0000 1.14 +++ ntfscat.8.in 2 Oct 2007 12:40:17 -0000 1.15 @@ -1,7 +1,8 @@ .\" Copyright (c) 2003\-2005 Richard Russon. +.\" Copyright (c) 2007 Yura Pakhuchiy. .\" This file may be copied under the terms of the GNU Public License. .\" -.TH NTFSCAT 8 "November 2005" "ntfsprogs @VERSION@" +.TH NTFSCAT 8 "September 2007" "ntfsprogs @VERSION@" .SH NAME ntfscat \- print NTFS files and streams on the standard output .SH SYNOPSIS @@ -133,5 +134,8 @@ The manual pages are available online at http://man.linux-ntfs.org/ .hy .SH SEE ALSO +Read \fBlibntfs\fR(8) for details how to access encrypted files. +.sp +.BR libntfs (8), .BR ntfsls (8), .BR ntfsprogs (8) Index: ntfscp.8.in =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfscp.8.in,v retrieving revision 1.13 retrieving revision 1.14 diff -u -p -r1.13 -r1.14 --- ntfscp.8.in 6 Feb 2006 01:05:01 -0000 1.13 +++ ntfscp.8.in 2 Oct 2007 12:40:17 -0000 1.14 @@ -1,30 +1,20 @@ -.\" Copyright (c) 2004\-2005 Yura Pakhuchiy. +.\" Copyright (c) 2004\-2007 Yura Pakhuchiy. .\" Copyright (c) 2005 Richard Russon. .\" This file may be copied under the terms of the GNU Public License. .\" -.TH NTFSCP 8 "November 2005" "ntfsprogs @VERSION@" +.TH NTFSCP 8 "September 2007" "ntfsprogs @VERSION@" .SH NAME -ntfscp \- overwrite file on an NTFS volume. +ntfscp \- copy file to an NTFS volume. .SH SYNOPSIS -.B ntfscp -[\fIoptions\fR] \fIdevice source_file destination\fR +\fBntfscp\fR [\fIoptions\fR] \fIdevice source_file destination\fR .SH DESCRIPTION -.B ntfscp -will overwrite file on an NTFS volume. At present -.B ntfscp -can't create new files. -.B destination -can be either file or directory. In case if -.B destination -is directory specified by name then -.B source_file -is copied into this directory, in case if -.B destination -is directory and specified by inode number then unnamed data attribute is -created for this inode and -.B source_file -is copied into it (WARNING: it's unusual to have unnamed data streams in the -directories, think twice before specifying directory by inode number). +\fBntfscp\fR will copy file to an NTFS volume. \fIdestination\fR can be either +file or directory. In case if \fIdestination\fR is directory specified by name +then \fIsource_file\fR is copied into this directory, in case if +\fIdestination\fR is directory and specified by inode number then unnamed data +attribute is created for this inode and \fIsource_file\fR is copied into it +(WARNING: it's unusual to have unnamed data streams in the directories, think +twice before specifying directory by inode number). .SH OPTIONS Below is a summary of all the options that .B ntfscp @@ -96,24 +86,19 @@ windows is C): .sp .RE .SH BUGS -There are no known problems with -.BR ntfscp . -If you find a bug please send an email describing the problem to the -development team: +There are no known problems with \fBntfscp\fR. If you find a bug please send an +email describing the problem to the development team: .br .nh linux\-ntfs\-d...@li... .hy .SH AUTHORS -.B ntfscp -was written by Yura Pakhuchiy, with contributions from Anton Altaparmakov. +\fBntfscp\fR was written by Yura Pakhuchiy, with contributions from Anton +Altaparmakov and Hil Liao. .SH DEDICATION With love to Marina Sapego. .SH AVAILABILITY -.B ntfscp -is part of the -.B ntfsprogs -package and is available from: +\fBntfscp\fR is part of the \fBntfsprogs\fR package and is available from: .br .nh http://www.linux\-ntfs.org/content/view/19/37 Index: ntfsmount.8.in =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsmount.8.in,v retrieving revision 1.25 retrieving revision 1.26 diff -u -p -r1.25 -r1.26 --- ntfsmount.8.in 20 Feb 2006 17:11:24 -0000 1.25 +++ ntfsmount.8.in 2 Oct 2007 12:40:17 -0000 1.26 @@ -1,139 +1,89 @@ -.\" Copyright (c) 2005-2006 Yura Pakhuchiy. +.\" Copyright (c) 2005-2007 Yura Pakhuchiy. .\" Copyright (c) 2005 Richard Russon. +.\" Copyright (c) 2006-2007 Szabolcs Szakacsits. .\" This file may be copied under the terms of the GNU Public License. .\" -.TH NTFSMOUNT 8 "February 2006" "ntfsprogs @VERSION@" +.TH NTFSMOUNT 8 "September 2007" "ntfsprogs @VERSION@" .SH NAME -ntfsmount \- NTFS module for FUSE. +ntfsmount \- Read/Write userspace NTFS driver. .SH SYNOPSIS -.B ntfsmount -.I device mount_point -[\fB\-o options\fR] +\fBntfsmount\fR \fIdevice mount_point\fR [\fB\-o\fR \fIoptions\fR] +.br +\fBmount \-t fuse.ntfs\fR \fIdevice mount_point\fR [\fB\-o\fR \fIoptions\fR] +.sp +/etc/ftsab entry: +.br +\fIdevice mount_point\fR \fBfuse.ntfs\fR \fIoptions\fR \fB0 0\fR .SH DESCRIPTION -\fBntfsmount\fR is a \fBFUSE\fR module that rely on \fBlibntfs\fR. You need -\fBFUSE\fR to compile it, \fBxattr\fR is recommended, but not mandatory. +\fBntfsmount\fR is a read/write userspace NTFS filesystem driver. Technically +it connects \fBFUSE\fR with \fBlibntfs\fR. .TP -.B Fully implemented ntfsmount features: -\(bu Read\-write access to normal and sparse files. +\fBntfsmount\fR features: +\(bu Create/Delete/Move files and directories. +.br +\(bu Hard link files. +.br +\(bu Read and write to normal and sparse files. .br -\(bu Read\-only access to compressed files. +\(bu Read compressed and encrypted files. .br \(bu Access to special Interix files (symlinks, devices, FIFOs). .br \(bu List/Read/Write/Add/Remove named data streams. .br -\(bu Supports Linux and FreeBSD. -.TP -.B Partly implemented features: -\(bu Create/Delete/Move files and directories. -.br -\(bu Hard link files. +\(bu Supports Linux, FreeBSD, NetBSD and Mac OS X. .SH OPTIONS -Below is a summary of all the options that \fBntfsmount\fR accepts. +\fBntfsmount\fR supports most of options that \fBmount\fR and \fBFUSE\fR +accepts (see "man 8 mount" and FUSE documentation for them). Additionally +\fBntfsmount\fR have some unique to it options, below is a summary of them. +.TP +.B silent, nosilent +\fBsilent\fR option makes ntfsmount to do not return "Operation is not +supported" error on chmod and chown operations (this option is on by default). +\fBnosilent\fR cancels this. +.TP +.BI locale= value +You can set locale with this option. It's useful if locale environment variables +are not set before partitions from /etc/fstab had been mounted. Try submitting this option if you are experience problems with displaying national characters in filenames. +.TP +\fBuid=\fIvalue\fR, \fBgid=\fIvalue\fR +Set the owner and the group of files and directories. The values are numerical. +The defaults are the uid and gid of the current process. +.TP +\fBumask=\fIvalue\fR, \fBdmask=\fIvalue\fR, \fBfmask=\fIvalue\fR +Set the bitmask of the file and directory permissions that are not present. +The value is given in octal. Instead of specifying umask which applies both to +files and directories, fmask applies only to files and dmask only to +directories. +.TP +.B case_insensitive +Make \fBntfsmount\fR treat filenames in POSIX names as case insensitive. +See \fBFILENAME NAMESPACES\fR section for details. .TP -.B uid=, gid=, umask= -Provide default owner, group, and access mode mask. -These options work as documented in mount(8). By -default, the files/directories are owned by user that mounted volume and -he/she has read and write permissions, as well as -browse permission for directories. No one else has any -access permissions. I.e. the mode on all files is by -default rw\-\-\-\-\-\-\- and for directories rwx\-\-\-\-\-\-, a -consequence of the default fmask=0177 and dmask=0077. -Using a umask of zero will grant all permissions to -everyone, i.e. all files and directories will have mode -rwxrwxrwx. -.TP -.B fmask=, dmask= -Instead of specifying umask which applies both to -files and directories, fmask applies only to files and -mask only to directories. -.TP -.B show_sys_files -If show_sys_files is specified, show the system files -in directory listings. Otherwise the default behaviour -is to hide the system files. -Note that even when show_sys_files is specified, "$MFT" -may will not be visible due to bugs/mis\-features in glibc. -Further, note that irrespective of show_sys_files, all -files are accessible by name, i.e. you can always do -"ls \-l '$UpCase'" for example to specifically show the -system file containing the Unicode upcase table. -.TP -.B default_permissions -By default FUSE doesn't check file access permissions, the -filesystem is free to implement it's access policy or leave it to -the underlying file access mechanism (e.g. in case of network -filesystems). This option enables permission checking, restricting -access based on file mode. This is option is usually useful -together with the 'allow_other' mount option. -.TP -.B allow_other -This option overrides the security measure restricting file access -to the user mounting the filesystem. This option is by default only -allowed to root, but this restriction can be removed with a -configuration option described in the previous section. -.TP -.B kernel_cache -(NOTE: Only for FUSE 2.3.0, with FUSE >= 2.4.0 on by default) -This option disables flushing the cache of the file contents on -every open(). This should only be enabled on filesystems, where the -file data is never changed externally (not through the mounted FUSE -filesystem). Thus it is not suitable for network filesystems and -other "intermediate" filesystems. -NOTE: if this option is not specified (and neither 'direct_io') data -is still cached after the open(), so a read() system call will not -always initiate a read operation. -.TP -.B large_read -Issue large read requests. This can improve performance for some -filesystems, but can also degrade performance. This option is only -useful on 2.4.X kernels, as on 2.6 kernels requests size is -automatically determined for optimum performance. -.TP -.B direct_io -(NOTE: Only for FUSE 2.3.0) -This option disables the use of page cache (file content cache) in -the kernel for this filesystem. This has several affects: -- Each read() or write() system call will initiate one or more -read or write operations, data will not be cached in the -kernel. -- The return value of the read() and write() system calls will -correspond to the return values of the read and write -operations. This is useful for example if the file size is not -known in advance (before reading it). -.TP -.B max_read= -With this option the maximum size of read operations can be set. -The default is infinite. Note that the size of read requests is -limited anyway to 32 pages (which is 128kbyte on i386). +.B no_def_opts +By default ntfsmount acts as some useful options were passed to it (you can get +list of this options by running ntfsmount without any arguments). Submitting +this option will cancel such behaviour. +.TP +.B noblkdev +By default ntfsmount tries to mount block devices with blkdev FUSE option if it +have enough privileges. Submit this option if blkdev mount does not work for +you for some reasons. .TP .B force Force mount even if errors occurred. Use this option only if you know what are you doing and don't cry about data loss. .TP -.B ro -Mount filesystem read\-only. -.TP -.B no_def_opts -By default ntfsmount acts as "default_permissions,allow_other" was passed to it, -this option cancel this behaviour. -.TP -.B silent -Do nothing on chmod and chown operations, but do not return error. +.B relatime, norelatime +Update inode access times relative to modify or change time. Access +time is only updated if the previous access time was earlier than the +current modify or change time. (Similar to noatime, but doesn't break +mutt or other applications that need to know if a file has been read +since the last time it was modified.) .TP -.B locale= -You can set locale with this option. It's useful if locale enviroment variables -are not set before partitions from /etc/fstab had been mounted. -.TP -.B streams_interface= +.BI streams_interface= value This option controls how the user can access named data streams. It can be set -to, one of \fBnone\fR, \fBwindows\fR or \fBxattr\fR. If the option is set to -\fBnone\fR, the user will have no access to the named data streams. If it's set -to \fBwindows\fR, then the user can access them just like in Windows (eg. cat -file:stream). If it's set to \fBxattr\fR, then the named data streams are -mapped to xattrs and user can manipulate them using \fB{get,set}fattr\fR -utilities. +to, one of \fBnone\fR, \fBwindows\fR or \fBxattr\fR. See \fBDATA STREAMS\fR section for details. .TP .B debug Makes ntfsmount to not detach from terminal and print a lot of debug output from @@ -141,81 +91,79 @@ libntfs and FUSE. .TP .B no_detach Same as above but with less debug output. +.SH FILENAME NAMESPACES +There are exist several namespaces for filenames in NTFS: DOS, Win32 and POSIX. +Names in DOS and Win32 namespaces are case insensitive, but names in POSIX +namespace are case sensitive. By default windows creates filenames in DOS and +Win32 namespaces (with exception for hard links), but ntfsmount always creates +files in POSIX namespace. Note: you can create several files that differs only +in case in one directory with ntfsmount, but windows applications may be +confused by this. .SH DATA STREAMS -All data on NTFS is stored in streams. Every file has exactly one unnamed -data stream and can have many named data streams. The size of a file is the -size of its unnamed data stream. By default, \fBntfsmount\fR will only read -the unnamed data stream. +All data on NTFS is stored in streams. Every file has exactly one unnamed data +stream and can have many named data streams. The size of a file is the size of +its unnamed data stream. Windows applications don't, consistently, allow you +to read named data streams, so you are recommended to use tools like FAR, or +utilities from Cygwin. +.PP +By default or if "streams_interface=none" option was passed, \fBntfsmount\fR will only read the unnamed data stream. .PP -By using the options "streams_interface=windows", you will be able to read +By using the option "streams_interface=windows", you will be able to read any named data streams, simply by specifying the stream's name after a colon. -For example: +Named data streams act like normals files, so you can read from them, write to +them and even delete them (using rm). You can list all the named data streams +a file has by getting the "ntfs.streams.list" extended attribute. Some examples: .RS .sp cat some.mp3:artist +.br +rm some.mp3:album +.br +echo Sympho Black Metal > some.mp3:genre +.br +getfattr \-n ntfs.streams.list some.mp3 .sp .RE -Windows applications don't, consistently, allow you to read named data -streams, so you are recommended to use tools like FAR, or utils from Cygwin. -.PP -Named data streams act like normals files, so you can read from them, write to -them and even delete them (using rm). You can list all the named data streams -a file has by getting the "ntfs.streams.list" extended attribute. NOTE: This -list feature is unique to the \fBntfsmount\fR and may never be supported by the -\fBkernel driver\fR. -.SH EXAMPLES -Mount /dev/hda1 to /mnt/ntfs\-fuse using ntfsmount: +If \fBstreams_interface\fR option is set to \fBxattr\fR, then the named data streams are mapped to xattrs and user can manipulate them using \fBgetfattr\fR and +\fBsetfattr\fR utilities. Eg.: .RS .sp -.B ntfsmount /dev/hda1 /mnt/ntfs\-fuse -.sp +setfattr -n user.artist -v "Some Artist" some.mp3 +.br +getfattr -d some.mp3 .RE -Read\-only mount /dev/hda5 to /home/user/mnt and make user with uid 1000 to be -owner of all files: +.SH ALLOWED CHARACTERS +Win32 does not allow characters like '<', '>', '*', '?' and so on in the +filenames, but NTFS supports any characters except '\\0' (NULL) and '/'. You +can create filenames with any allowed by NTFS characters using ntfsmount, but +aware, you will not be able to access files with denied by Win32 characters from +windows. +.SH ACCESS HANDLING AND SECURITY +By default, files and directories are owned by the user and group of the +mounting process and everybody has full read, write, execution and directory +browsing permissions. If you want to use permissions handling then use the +\fBuid\fR and/or the \fBgid\fR options together with the \fBumask\fR or +\fBfmask\fR and \fBdmask\fR options. +.PP +Windows users have full access to the files created by \fBntfsmount\fR. +.SH EXAMPLES +Mount /dev/hda1 to /mnt/ntfs using ntfsmount submiting locale option: .RS .sp -.B ntfsmount /dev/hda5 /home/user/mnt \-o ro,uid=1000 +.B ntfsmount /dev/hda1 /mnt/ntfs -o locale=be_BY.UTF-8 .sp .RE /etc/fstab entry for above: .RS .sp -.B /dev/hda5 /home/user/mnt ntfs\-fuse ro,uid=1000 0 0 +.B /dev/hda1 /mnt/ntfs fuse.ntfs locale=be_BY.UTF-8 0 0 .sp .RE -Umount /mnt/ntfs\-fuse: +Umount /mnt/ntfs: .RS .sp -.B fusermount \-u /mnt/ntfs\-fuse -.sp -.RE -Cat "artist" named data stream of "some.mp3": -.RS -.sp -.B cat some.mp3:artist -.sp -.RE -Write "Sympho Black Metal" to "genre" named data stream of "some.mp3": -.RS -.sp -.B echo Sympho Black Metal > some.mp3:genre -.sp -.RE -Remove "album" named data stream from "some.mp3": -.RS -.sp -.B rm some.mp3:album -.sp -.RE -List all named data streams for "some.mp3": -.RS -.sp -.B getfattr \-n ntfs.streams.list some.mp3 -.sp -.RE +.B fusermount \-u /mnt/ntfs .SH BUGS -There are no known problems with -.BR ntfsmount . If you find a bug please send an email describing the problem to the development team: .br @@ -223,17 +171,13 @@ development team: linux\-ntfs\-d...@li... .hy .SH AUTHORS -.B ntfsmount -was written by Yura Pakhuchiy, with contributions from Yuval Fledel. +\fBntfsmount\fR was written by Yura Pakhuchiy, with contributions from Yuval Fledel and Szabolcs Szakacsits. .SH DEDICATION With love to Marina Sapego. .SH THANKS Many thanks to Miklos Szeredi for advice and answers about FUSE. .SH AVAILABILITY -.B ntfsmount -is part of the -.B ntfsprogs -package and is available from: +\fBntfsmount\fR is part of the \fBntfsprogs\fR package and is available from: .br .nh http://www.linux\-ntfs.org/content/view/19/37 @@ -244,7 +188,16 @@ The manual pages are available online at .nh http://man.linux-ntfs.org/ .hy +.sp +Additional up-to-date information can be found furthermore at: +.br +.nh +http://wiki.linux-ntfs.org/doku.php?id=ntfsmount +.hy .SH SEE ALSO +Read \fBlibntfs\fR(8) for details how to access encrypted files. +.sp +.BR libntfs (8), .BR ntfsprogs (8), .BR attr (5), .BR getfattr (1) Index: ntfsprogs.8.in =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsprogs.8.in,v retrieving revision 1.20 retrieving revision 1.21 diff -u -p -r1.20 -r1.21 --- ntfsprogs.8.in 11 Apr 2006 22:14:38 -0000 1.20 +++ ntfsprogs.8.in 2 Oct 2007 12:40:18 -0000 1.21 @@ -1,9 +1,10 @@ .\" Copyright (c) 2002\-2005 Richard Russon. .\" Copyright (c) 2002\-2003 Anton Altaparmakov. .\" Copyright (c) 2005\-2006 Szabolcs Szakacsits. +.\" Copyright (c) 2005\-2007 Yura Pakhuchiy. .\" This file may be copied under the terms of the GNU Public License. .\" -.TH NTFSPROGS 8 "April 2006" "ntfsprogs @VERSION@" +.TH NTFSPROGS 8 "September 2007" "ntfsprogs @VERSION@" .SH NAME ntfsprogs \- tools for doing neat things with NTFS .SH OVERVIEW @@ -28,7 +29,7 @@ available for free and come with full so \- Compare two NTFS filesystems and tell the differences. .PP .BR ntfscp (8) -\- Overwrite a file on an NTFS. +\- Copy a file to an NTFS volume. .PP .BR ntfsfix (8) \- Check and fix some common errors, clear the LogFile and make Windows @@ -71,5 +72,6 @@ These manual pages can be viewed online http://man.linux-ntfs.org/ .hy .SH SEE ALSO +.BR libntfs (8), .BR libntfs\-gnomevfs (8) |
From: Yura P. <yu...@de...> - 2007-10-02 12:40:30
|
Changes by: yura Update of /cvs/linux-ntfs/ntfsprogs/libntfs In directory delta357:/tmp/cvs-serv23529/libntfs Modified Files: Makefile.am Added Files: libntfs.8.in Log Message: update man pages Index: Makefile.am =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/libntfs/Makefile.am,v retrieving revision 1.37 retrieving revision 1.38 diff -u -p -r1.37 -r1.38 --- Makefile.am 1 Nov 2006 12:31:11 -0000 1.37 +++ Makefile.am 2 Oct 2007 12:40:17 -0000 1.38 @@ -79,7 +79,7 @@ libntfs_gnomevfs_la_SOURCES = \ gnome-vfs-method.c \ gnome-vfs-module.c -man_MANS = libntfs-gnomevfs.8 +man_MANS = libntfs.8 libntfs-gnomevfs.8 AM_CPPFLAGS = $(linux_ntfsincludedir) $(all_includes) --- NEW FILE --- .\" Copyright (c) 2007 Yura Pakhuchiy .\" This file may be copied under the terms of the GNU Public License. .TH LIBNTFS 8 "September 2007" "ntfsprogs @VERSION@" .SH NAME libntfs \- library for accessing and managing NTFS volumes .SH OVERVIEW \fBlibntfs\fR is GPL licensed library for accessing and managing NTFS volumes. It is used by\fB ntfsprogs\fR and some other projects. .SH ACCESSING ENCRYPTED FILES Programs that uses\fB libntfs\fR can transparently access encrypted files on NTFS volumes if\fB libntfs\fR was compiled with \fB--enable-crypto\fR option (it depends on\fB libgcrypt\fR,\fB GNU TLS\fR and \fBlibconfig\fR) and user wrote configuration file. Configuration file should be placed in \fB/etc/libntfs/config\fR or \fB$(HOME)/.libntfs/config\fR and contain list of .PFX key files (see ntfsprogs-<version>/libntfs/config in ntfsprogs source tarball for sample configuration file). Key files can be created/exported using\fB cipher\fR tool under windows. .SH AUTHORS \fBlibntfs\fR was written by Anton Altaparmakov, Richard Russon, Szabolcs Szakacsits, Yuval Fledel and Yura Pakhuchiy. .SH AVAILABILITY The \fBntfsprogs\fR can be downloaded from: .br .nh http://www.linux\-ntfs.org/content/view/19/37 .hy .sp These manual pages can be viewed online at: .br .nh http://man.linux-ntfs.org/ .hy .SH SEE ALSO .BR ntfsprogs (8), .BR libntfs\-gnomevfs (8) |
From: Anton A. <ai...@de...> - 2007-07-05 20:57:38
|
Changes by: aia21 Update of /cvs/linux-ntfs/ntfsprogs In directory delta357:/tmp/cvs-serv31813 Modified Files: configure.ac Log Message: Ooops. Forgot a tidy up last time. Index: configure.ac =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/configure.ac,v retrieving revision 1.119 retrieving revision 1.120 diff -u -p -r1.119 -r1.120 --- configure.ac 5 Jul 2007 20:50:18 -0000 1.119 +++ configure.ac 5 Jul 2007 20:57:19 -0000 1.120 @@ -344,7 +344,8 @@ AC_CHECK_HEADERS([ctype.h fcntl.h libgen endian.h byteswap.h sys/byteorder.h sys/endian.h sys/param.h \ sys/ioctl.h sys/mount.h sys/stat.h sys/types.h sys/vfs.h \ sys/statvfs.h sys/sysmacros.h linux/major.h linux/fd.h linux/hdreg.h \ - machine/endian.h gcrypt.h windows.h gnutls/pkcs12.h syslog.h]) + machine/endian.h gcrypt.h windows.h gnutls/pkcs12.h gnutls/x509.h \ + syslog.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL |
From: Anton A. <ai...@de...> - 2007-07-05 20:57:37
|
Changes by: aia21 Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs In directory delta357:/tmp/cvs-serv31813/ntfsprogs Modified Files: ntfsdecrypt.c Log Message: Ooops. Forgot a tidy up last time. Index: ntfsdecrypt.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsdecrypt.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -p -r1.33 -r1.34 --- ntfsdecrypt.c 5 Jul 2007 20:50:19 -0000 1.33 +++ ntfsdecrypt.c 5 Jul 2007 20:57:19 -0000 1.34 @@ -62,7 +62,9 @@ #ifdef HAVE_GNUTLS_PKCS12_H #include <gnutls/pkcs12.h> #endif +#ifdef HAVE_GNUTLS_X509_H #include <gnutls/x509.h> +#endif #include "types.h" #include "attrib.h" |
From: Anton A. <ai...@de...> - 2007-07-05 20:50:28
|
Changes by: aia21 Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs In directory delta357:/tmp/cvs-serv31212/ntfsprogs Modified Files: Makefile.am ntfsdecrypt.c Log Message: ntfsdecrypt: Major improvement! We now validate the .pfx file to be the right type of RSA key and we also determine the thumbprint and compare the one in the keys to the one in the .pfx file thus we only try to decrypt the FEK once we have the correct key. Several other bug fixes leading to crashes. Also make compilation work on OS X when gnutls is otherwise not found. (Anton, Yura) Index: Makefile.am =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/Makefile.am,v retrieving revision 1.64 retrieving revision 1.65 diff -u -p -r1.64 -r1.65 --- Makefile.am 19 Dec 2006 16:31:52 -0000 1.64 +++ Makefile.am 5 Jul 2007 20:50:19 -0000 1.65 @@ -125,7 +125,7 @@ ntfsdump_logfile_LDFLAGS= $(AM_LFLAGS) if ENABLE_CRYPTO ntfsdecrypt_SOURCES = ntfsdecrypt.c utils.c utils.h ntfsdecrypt_LDADD = $(AM_LIBS) -ntfsdecrypt_LDFLAGS = $(AM_LFLAGS) -lgcrypt -lgnutls +ntfsdecrypt_LDFLAGS = $(AM_LFLAGS) -lgcrypt ${GNUTLS_LIBS} endif # Extra targets Index: ntfsdecrypt.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsdecrypt.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -p -r1.32 -r1.33 --- ntfsdecrypt.c 12 Nov 2006 22:46:50 -0000 1.32 +++ ntfsdecrypt.c 5 Jul 2007 20:50:19 -0000 1.33 @@ -2,7 +2,7 @@ * ntfsdecrypt - Decrypt ntfs encrypted files. Part of the Linux-NTFS project. * * Copyright (c) 2005 Yuval Fledel - * Copyright (c) 2005 Anton Altaparmakov + * Copyright (c) 2005-2007 Anton Altaparmakov * * This utility will decrypt files and print the decrypted data on the standard * output. @@ -62,6 +62,7 @@ #ifdef HAVE_GNUTLS_PKCS12_H #include <gnutls/pkcs12.h> #endif +#include <gnutls/x509.h> #include "types.h" #include "attrib.h" @@ -74,6 +75,19 @@ typedef gcry_sexp_t ntfs_rsa_private_key; +#define NTFS_SHA1_THUMBPRINT_SIZE 0x14 + +#define NTFS_CRED_TYPE_CERT_THUMBPRINT const_cpu_to_le32(3) + +#define NTFS_EFS_CERT_PURPOSE_OID_DDF "1.3.6.1.4.1.311.10.3.4" +#define NTFS_EFS_CERT_PURPOSE_OID_DRF "1.3.6.1.4.1.311.10.3.4.1" + +typedef enum { + DF_TYPE_UNKNOWN, + DF_TYPE_DDF, + DF_TYPE_DRF, +} NTFS_DF_TYPES; + /** * enum NTFS_CRYPTO_ALGORITHMS - List of crypto algorithms used by EFS (32 bit) * @@ -108,7 +122,7 @@ typedef struct { /* DESX-MS128 implementation for libgcrypt. */ static gcry_module_t ntfs_desx_module; -static unsigned ntfs_desx_algorithm_id = -1; +static int ntfs_desx_algorithm_id = -1; typedef struct { u64 in_whitening, out_whitening; @@ -448,18 +462,33 @@ static ntfs_rsa_private_key ntfs_rsa_pri } /** + * ntfs_rsa_private_key_release + */ +static void ntfs_rsa_private_key_release(ntfs_rsa_private_key rsa_key) +{ + gcry_sexp_release((gcry_sexp_t)rsa_key); +} + +/** * ntfs_pkcs12_extract_rsa_key */ static ntfs_rsa_private_key ntfs_pkcs12_extract_rsa_key(u8 *pfx, int pfx_size, - char *password) + char *password, char *thumbprint, int thumbprint_size, + NTFS_DF_TYPES *df_type) { int err, bag_index, flags; gnutls_datum_t dpfx, dkey; - gnutls_pkcs12_t pkcs12; - gnutls_pkcs12_bag_t bag; - gnutls_x509_privkey_t pkey; + gnutls_pkcs12_t pkcs12 = NULL; + gnutls_pkcs12_bag_t bag = NULL; + gnutls_x509_privkey_t pkey = NULL; + gnutls_x509_crt_t crt = NULL; ntfs_rsa_private_key rsa_key = NULL; + char purpose_oid[100]; + size_t purpose_oid_size = sizeof(purpose_oid); + size_t tp_size = thumbprint_size; + BOOL have_thumbprint = FALSE; + *df_type = DF_TYPE_UNKNOWN; /* Create a pkcs12 structure. */ err = gnutls_pkcs12_init(&pkcs12); if (err) { @@ -475,7 +504,7 @@ static ntfs_rsa_private_key ntfs_pkcs12_ ntfs_log_error("Failed to convert the PFX file from DER to " "native PKCS#12 format: %s\n", gnutls_strerror(err)); - goto out; + goto err; } /* * Verify that the password is correct and that the key file has not @@ -492,9 +521,9 @@ retry_verify: password = NULL; goto retry_verify; } - ntfs_log_error("Failed to verify the MAC (%s). Is the " + ntfs_log_error("Failed to verify the MAC: %s Is the " "password correct?\n", gnutls_strerror(err)); - goto out; + goto err; } for (bag_index = 0; ; bag_index++) { err = gnutls_pkcs12_bag_init(&bag); @@ -502,29 +531,31 @@ retry_verify: ntfs_log_error("Failed to initialize PKCS#12 Bag " "structure: %s\n", gnutls_strerror(err)); - goto out; + goto err; } err = gnutls_pkcs12_get_bag(pkcs12, bag_index, bag); if (err) { - if (err == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) + if (err == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) { + err = 0; break; + } ntfs_log_error("Failed to obtain Bag from PKCS#12 " "structure: %s\n", gnutls_strerror(err)); - goto bag_out; + goto err; } check_again: err = gnutls_pkcs12_bag_get_count(bag); if (err < 0) { ntfs_log_error("Failed to obtain Bag count: %s\n", gnutls_strerror(err)); - goto bag_out; + goto err; } err = gnutls_pkcs12_bag_get_type(bag, 0); if (err < 0) { ntfs_log_error("Failed to determine Bag type: %s\n", gnutls_strerror(err)); - goto bag_out; + goto err; } flags = 0; switch (err) { @@ -535,14 +566,14 @@ check_again: if (err < 0) { ntfs_log_error("Failed to obtain Bag data: " "%s\n", gnutls_strerror(err)); - goto bag_out; + goto err; } err = gnutls_x509_privkey_init(&pkey); if (err) { ntfs_log_error("Failed to initialized " "private key structure: %s\n", gnutls_strerror(err)); - goto bag_out; + goto err; } /* Decrypt the private key into GNU TLS format. */ err = gnutls_x509_privkey_import_pkcs8(pkey, &dkey, @@ -552,7 +583,7 @@ check_again: "key from DER to GNU TLS " "format: %s\n", gnutls_strerror(err)); - goto key_out; + goto err; } #if 0 /* @@ -580,39 +611,111 @@ check_again: #endif /* Convert the private key to our internal format. */ rsa_key = ntfs_rsa_private_key_import_from_gnutls(pkey); - goto key_out; + if (!rsa_key) + goto err; + break; case GNUTLS_BAG_ENCRYPTED: err = gnutls_pkcs12_bag_decrypt(bag, password); if (err) { ntfs_log_error("Failed to decrypt Bag: %s\n", gnutls_strerror(err)); - goto bag_out; + goto err; } goto check_again; + case GNUTLS_BAG_CERTIFICATE: + err = gnutls_pkcs12_bag_get_data(bag, 0, &dkey); + if (err < 0) { + ntfs_log_error("Failed to obtain Bag data: " + "%s\n", gnutls_strerror(err)); + goto err; + } + err = gnutls_x509_crt_init(&crt); + if (err) { + ntfs_log_error("Failed to initialize " + "certificate structure: %s\n", + gnutls_strerror(err)); + goto err; + } + err = gnutls_x509_crt_import(crt, &dkey, + GNUTLS_X509_FMT_DER); + if (err) { + ntfs_log_error("Failed to convert certificate " + "from DER to GNU TLS format: " + "%s\n", gnutls_strerror(err)); + goto err; + } + err = gnutls_x509_crt_get_key_purpose_oid(crt, 0, + purpose_oid, &purpose_oid_size, NULL); + if (err) { + ntfs_log_error("Failed to get key purpose " + "OID: %s\n", + gnutls_strerror(err)); + goto err; + } + purpose_oid[purpose_oid_size - 1] = '\0'; + if (!strncmp(purpose_oid, + NTFS_EFS_CERT_PURPOSE_OID_DRF, + strlen( + NTFS_EFS_CERT_PURPOSE_OID_DRF))) + *df_type = DF_TYPE_DRF; + else if (!strncmp(purpose_oid, + NTFS_EFS_CERT_PURPOSE_OID_DDF, + strlen( + NTFS_EFS_CERT_PURPOSE_OID_DDF))) + *df_type = DF_TYPE_DDF; + else { + ntfs_log_error("Certificate has unknown " + "purpose OID %s.\n", + purpose_oid); + err = EINVAL; + goto err; + } + /* Return the thumbprint to the caller. */ + err = gnutls_x509_crt_get_fingerprint(crt, + GNUTLS_DIG_SHA1, thumbprint, &tp_size); + if (err) { + ntfs_log_error("Failed to get thumbprint: " + "%s\n", gnutls_strerror(err)); + goto err; + } + if (tp_size != NTFS_SHA1_THUMBPRINT_SIZE) { + ntfs_log_error("Invalid thumbprint size %zd. " + "Should be %d.\n", tp_size, + thumbprint_size); + err = EINVAL; + goto err; + } + have_thumbprint = TRUE; + gnutls_x509_crt_deinit(crt); + crt = NULL; + break; default: /* We do not care about other types. */ break; } gnutls_pkcs12_bag_deinit(bag); } -key_out: - gnutls_x509_privkey_deinit(pkey); -bag_out: - gnutls_pkcs12_bag_deinit(bag); -out: - gnutls_pkcs12_deinit(pkcs12); +err: + if (rsa_key && (err || *df_type == DF_TYPE_UNKNOWN || + !have_thumbprint)) { + if (!err) + ntfs_log_error("Key type or thumbprint not found, " + "aborting.\n"); + ntfs_rsa_private_key_release(rsa_key); + rsa_key = NULL; + } + if (crt) + gnutls_x509_crt_deinit(crt); + if (pkey) + gnutls_x509_privkey_deinit(pkey); + if (bag) + gnutls_pkcs12_bag_deinit(bag); + if (pkcs12) + gnutls_pkcs12_deinit(pkcs12); return rsa_key; } /** - * ntfs_rsa_private_key_release - */ -static void ntfs_rsa_private_key_release(ntfs_rsa_private_key rsa_key) -{ - gcry_sexp_release((gcry_sexp_t)rsa_key); -} - -/** * ntfs_buffer_reverse - * * This is a utility function for reversing the order of a buffer in place. @@ -972,16 +1075,20 @@ static inline BOOL ntfs_des_test(void) /** * ntfs_fek_import_from_raw */ -static ntfs_fek *ntfs_fek_import_from_raw(u8 *fek_buf, - unsigned fek_size __attribute__((unused))) +static ntfs_fek *ntfs_fek_import_from_raw(u8 *fek_buf, unsigned fek_size) { ntfs_fek *fek; u32 key_size, wanted_key_size, gcry_algo; gcry_error_t err; - // TODO: Sanity checking of sizes and offsets. key_size = le32_to_cpup(fek_buf); - //ntfs_log_debug("key_size 0x%x\n", key_size); + ntfs_log_debug("key_size 0x%x\n", key_size); + if (key_size + 16 > fek_size) { + ntfs_log_debug("Invalid FEK. It was probably decrypted with " + "the incorrect RSA key."); + errno = EINVAL; + return NULL; + } fek = malloc(((((sizeof(*fek) + 7) & ~7) + key_size + 7) & ~7) + sizeof(gcry_cipher_hd_t)); if (!fek) { @@ -989,7 +1096,7 @@ static ntfs_fek *ntfs_fek_import_from_ra return NULL; } fek->alg_id = *(u32*)(fek_buf + 8); - //ntfs_log_debug("alg_id 0x%x\n", le32_to_cpu(fek->alg_id)); + ntfs_log_debug("alg_id 0x%x\n", le32_to_cpu(fek->alg_id)); fek->key_data = (u8*)fek + ((sizeof(*fek) + 7) & ~7); memcpy(fek->key_data, fek_buf + 16, key_size); fek->des_gcry_cipher_hd_ptr = NULL; @@ -1040,7 +1147,8 @@ static ntfs_fek *ntfs_fek_import_from_ra } if (key_size != wanted_key_size) { ntfs_log_error("%s key of %u bytes but needed size is %u " - "bytes, assuming corrupt key. Aborting.\n", + "bytes, assuming corrupt or incorrect key. " + "Aborting.\n", gcry_cipher_algo_name(gcry_algo), (unsigned)key_size, (unsigned)wanted_key_size); err = EIO; @@ -1084,7 +1192,8 @@ static void ntfs_fek_release(ntfs_fek *f * ntfs_df_array_fek_get */ static ntfs_fek *ntfs_df_array_fek_get(EFS_DF_ARRAY_HEADER *df_array, - ntfs_rsa_private_key rsa_key) + ntfs_rsa_private_key rsa_key, char *thumbprint, + int thumbprint_size) { EFS_DF_HEADER *df_header; EFS_DF_CREDENTIAL_HEADER *df_cred; @@ -1094,14 +1203,41 @@ static ntfs_fek *ntfs_df_array_fek_get(E u32 df_count, fek_size; unsigned i; - df_header = (EFS_DF_HEADER*)(df_array + 1); df_count = le32_to_cpu(df_array->df_count); - for (i = 0; i < df_count; i++) { + if (!df_count) + ntfs_log_error("There are no elements in the DF array.\n"); + df_header = (EFS_DF_HEADER*)(df_array + 1); + for (i = 0; i < df_count; i++, df_header = (EFS_DF_HEADER*)( + (u8*)df_header + le32_to_cpu(df_header->df_length))) { df_cred = (EFS_DF_CREDENTIAL_HEADER*)((u8*)df_header + le32_to_cpu(df_header->cred_header_offset)); + if (df_cred->type != NTFS_CRED_TYPE_CERT_THUMBPRINT) { + ntfs_log_debug("Credential type is not certificate " + "thumbprint, skipping DF entry.\n"); + continue; + } df_cert = (EFS_DF_CERT_THUMBPRINT_HEADER*)((u8*)df_cred + le32_to_cpu( df_cred->cert_thumbprint_header_offset)); + if (le32_to_cpu(df_cert->thumbprint_size) != thumbprint_size) { + ntfs_log_error("Thumbprint size %d is not valid " + "(should be %d), skipping this DF " + "entry.\n", + le32_to_cpu(df_cert->thumbprint_size), + thumbprint_size); + continue; + } + if (memcmp((u8*)df_cert + + le32_to_cpu(df_cert->thumbprint_offset), + thumbprint, thumbprint_size)) { + ntfs_log_debug("Thumbprints do not match, skipping " + "this DF entry.\n"); + continue; + } + /* + * The thumbprints match so this is probably the DF entry + * matching the RSA key. Try to decrypt the FEK with it. + */ fek_size = le32_to_cpu(df_header->fek_size); fek_buf = (u8*)df_header + le32_to_cpu(df_header->fek_offset); /* Decrypt the FEK. Note: This is done in place. */ @@ -1116,8 +1252,6 @@ static ntfs_fek *ntfs_df_array_fek_get(E } else ntfs_log_error("Failed to decrypt the file " "encryption key.\n"); - df_header = (EFS_DF_HEADER*)((u8*)df_header + - le32_to_cpu(df_header->df_length)); } return NULL; } @@ -1126,10 +1260,11 @@ static ntfs_fek *ntfs_df_array_fek_get(E * ntfs_inode_fek_get - */ static ntfs_fek *ntfs_inode_fek_get(ntfs_inode *inode, - ntfs_rsa_private_key rsa_key) + ntfs_rsa_private_key rsa_key, char *thumbprint, + int thumbprint_size, NTFS_DF_TYPES df_type) { EFS_ATTR_HEADER *efs; - EFS_DF_ARRAY_HEADER *df_array; + EFS_DF_ARRAY_HEADER *df_array = NULL; ntfs_fek *fek = NULL; /* Obtain the $EFS contents. */ @@ -1138,17 +1273,29 @@ static ntfs_fek *ntfs_inode_fek_get(ntfs ntfs_log_perror("Failed to read $EFS attribute"); return NULL; } - /* Iterate through the DDFs & DRFs until we obtain a key. */ - if (efs->offset_to_ddf_array) { - df_array = (EFS_DF_ARRAY_HEADER*)((u8*)efs + - le32_to_cpu(efs->offset_to_ddf_array)); - fek = ntfs_df_array_fek_get(df_array, rsa_key); - } - if (!fek && efs->offset_to_drf_array) { - df_array = (EFS_DF_ARRAY_HEADER*)((u8*)efs + - le32_to_cpu(efs->offset_to_drf_array)); - fek = ntfs_df_array_fek_get(df_array, rsa_key); - } + /* + * Depending on whether the key is a normal key or a data recovery key, + * iterate through the DDF or DRF array, respectively. + */ + if (df_type == DF_TYPE_DDF) { + if (efs->offset_to_ddf_array) + df_array = (EFS_DF_ARRAY_HEADER*)((u8*)efs + + le32_to_cpu(efs->offset_to_ddf_array)); + else + ntfs_log_error("There are no entries in the DDF " + "array.\n"); + } else if (df_type == DF_TYPE_DRF) { + if (efs->offset_to_drf_array) + df_array = (EFS_DF_ARRAY_HEADER*)((u8*)efs + + le32_to_cpu(efs->offset_to_drf_array)); + else + ntfs_log_error("There are no entries in the DRF " + "array.\n"); + } else + ntfs_log_error("Invalid DF type.\n"); + if (df_array) + fek = ntfs_df_array_fek_get(df_array, rsa_key, thumbprint, + thumbprint_size); free(efs); return fek; } @@ -1275,6 +1422,8 @@ int main(int argc, char *argv[]) ntfs_fek *fek; unsigned pfx_size; int res; + NTFS_DF_TYPES df_type; + char thumbprint[NTFS_SHA1_THUMBPRINT_SIZE]; ntfs_log_set_handler(ntfs_log_handler_stderr); @@ -1303,14 +1452,14 @@ int main(int argc, char *argv[]) return 1; } /* Obtain the user's private RSA key from the key file. */ - rsa_key = ntfs_pkcs12_extract_rsa_key(pfx_buf, pfx_size, password); + rsa_key = ntfs_pkcs12_extract_rsa_key(pfx_buf, pfx_size, password, + thumbprint, sizeof(thumbprint), &df_type); /* Destroy the password. */ memset(password, 0, strlen(password)); /* No longer need the pfx file contents. */ free(pfx_buf); if (!rsa_key) { - ntfs_log_error("Failed to extract the private RSA key. Did " - "you perhaps mistype the password?\n"); + ntfs_log_error("Failed to extract the private RSA key.\n"); ntfs_crypto_deinit(); return 1; } @@ -1335,7 +1484,8 @@ int main(int argc, char *argv[]) return 1; } /* Obtain the file encryption key of the encrypted file. */ - fek = ntfs_inode_fek_get(inode, rsa_key); + fek = ntfs_inode_fek_get(inode, rsa_key, thumbprint, + sizeof(thumbprint), df_type); ntfs_rsa_private_key_release(rsa_key); if (fek) { res = ntfs_cat_decrypt(inode, fek); |
From: Anton A. <ai...@de...> - 2007-07-05 20:50:27
|
Changes by: aia21 Update of /cvs/linux-ntfs/ntfsprogs In directory delta357:/tmp/cvs-serv31212 Modified Files: ChangeLog configure.ac Log Message: ntfsdecrypt: Major improvement! We now validate the .pfx file to be the right type of RSA key and we also determine the thumbprint and compare the one in the keys to the one in the .pfx file thus we only try to decrypt the FEK once we have the correct key. Several other bug fixes leading to crashes. Also make compilation work on OS X when gnutls is otherwise not found. (Anton, Yura) Index: ChangeLog =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ChangeLog,v retrieving revision 1.441 retrieving revision 1.442 diff -u -p -r1.441 -r1.442 --- ChangeLog 27 Jun 2007 15:31:37 -0000 1.441 +++ ChangeLog 5 Jul 2007 20:50:18 -0000 1.442 @@ -135,6 +135,12 @@ xx/07/2007 - 2.0.0 - ntfsmount sports fu - libntfs: Ignore bootsector checksum inconsistencies as too many 3rd party utilities update the boot sector without correcting the checksum. Ported change from kernel driver. (Anton) + - ntfsdecrypt: Major improvement! We now validate the .pfx file to be + the right type of RSA key and we also determine the thumbprint and + compare the one in the keys to the one in the .pfx file thus we only + try to decrypt the FEK once we have the correct key. Several other + bug fixes leading to crashes. Also make compilation work on OS X + when gnutls is otherwise not found. (Anton, Yura) 21/06/2006 - 1.13.1 - Various fixes. Index: configure.ac =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/configure.ac,v retrieving revision 1.118 retrieving revision 1.119 diff -u -p -r1.118 -r1.119 --- configure.ac 19 Mar 2007 14:39:44 -0000 1.118 +++ configure.ac 5 Jul 2007 20:50:18 -0000 1.119 @@ -137,7 +137,7 @@ AC_ARG_ENABLE(test, ) AM_CONDITIONAL(ENABLE_TEST, test "$enable_test" = yes) if test "$enable_test" = "yes"; then - CFLAGS="$CFLAGS -DNTFS_TEST" + CFLAGS="${CFLAGS} -DNTFS_TEST" fi AH_TEMPLATE([NTFS_DISABLE_DEBUG_LOGGING], @@ -212,7 +212,7 @@ AM_CONDITIONAL(ENABLE_FUSE, $compile_ntf compile_crypto=false if test "$enable_crypto" != "no"; then have_libgcrypt=false - AM_PATH_LIBGCRYPT(1.2.0, [ have_libgcrypt=true ], + AM_PATH_LIBGCRYPT(1.2.2, [ have_libgcrypt=true ], [ if test "$enable_crypto" = "yes"; then AC_MSG_ERROR([Linux-NTFS crypto code requires the gcrypt library.]) @@ -220,15 +220,13 @@ if test "$enable_crypto" != "no"; then AC_MSG_WARN([Linux-NTFS crypto code requires the gcrypt library.]) fi ]) - have_libgnutls=false - AM_PATH_LIBGNUTLS(1.2.8, [ have_libgnutls=true ], - [ + PKG_CHECK_MODULES(GNUTLS, gnutls >= 1.4.4, [ have_libgnutls=true ], if test "$enable_crypto" = "yes"; then AC_MSG_ERROR([Linux-NTFS crypto code requires the gnutls library.]) else AC_MSG_WARN([Linux-NTFS crypto code requires the gnutls library.]) fi - ]) + ) if test "$have_libgcrypt" = "true"; then if test "$have_libgnutls" = "true"; then compile_crypto=true @@ -236,6 +234,7 @@ if test "$enable_crypto" != "no"; then fi fi AM_CONDITIONAL(ENABLE_CRYPTO, $compile_crypto) +CFLAGS="${CFLAGS} ${GNUTLS_CFLAGS}" # add --with-extra-includes and --with-extra-libs switch to ./configure all_libraries="$all_libraries $USER_LDFLAGS" |
From: Anton A. <ai...@de...> - 2007-06-27 15:49:05
|
Changes by: aia21 Update of /cvs/linux-ntfs/ntfsprogs In directory delta357:/tmp/cvs-serv18049 Modified Files: ChangeLog Log Message: Update the change log. Index: ChangeLog =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ChangeLog,v retrieving revision 1.440 retrieving revision 1.441 diff -u -p -r1.440 -r1.441 --- ChangeLog 19 Mar 2007 14:39:44 -0000 1.440 +++ ChangeLog 27 Jun 2007 15:31:37 -0000 1.441 @@ -1,4 +1,4 @@ -xx/03/2007 - 2.0.0 - ntfsmount sports full r/w and ntfsresize supports Vista. +xx/07/2007 - 2.0.0 - ntfsmount sports full r/w and ntfsresize supports Vista. - ntfsmount now creates files and directories with security descriptor that grant full access to everyone. (Yura) @@ -132,6 +132,9 @@ xx/03/2007 - 2.0.0 - ntfsmount sports fu - ntfsmount: st_block calculation was wrong. (Yuval) - mkntfs: Use Vista $Boot rather than XP one. (Anton) - ntfsmount: use utimens() instead of deprecated utime(). (Yura) + - libntfs: Ignore bootsector checksum inconsistencies as too many 3rd + party utilities update the boot sector without correcting the + checksum. Ported change from kernel driver. (Anton) 21/06/2006 - 1.13.1 - Various fixes. |
From: Anton A. <ai...@de...> - 2007-06-27 15:47:01
|
Changes by: aia21 Update of /cvs/linux-ntfs/ntfsprogs/libntfs In directory delta357:/tmp/cvs-serv17714/libntfs Modified Files: bootsect.c Log Message: When the bootsector contains an incorrect checksum, ignore this just printing a warning. Some utilities update the bootsector ignoring the checksum which leaves the checksum out-of-date so we don't want to abort when it is wrong. This change is taken from the NTFS kernel driver where it has been for ages... I must have forgotten to apply it to libntfs when I fixed the kernel... Index: bootsect.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/libntfs/bootsect.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -p -r1.23 -r1.24 --- bootsect.c 11 Dec 2006 03:02:23 -0000 1.23 +++ bootsect.c 27 Jun 2007 15:29:10 -0000 1.24 @@ -63,22 +63,26 @@ BOOL ntfs_boot_sector_is_ntfs(NTFS_BOOT_ ntfs_log_debug("\nBeginning bootsector check...\n"); - /* Calculate the checksum. Note, this is just a simple addition of - all u32 values in the bootsector starting at the beginning and - finishing at the offset of the checksum itself (i.e. not including - the checksum...). */ - if ((void*)b < (void*)&b->checksum) { + /* + * Check that checksum == sum of u32 values from b to the checksum + * field. If checksum is zero, no checking is done. We will work when + * the checksum test fails, since some utilities update the boot sector + * ignoring the checksum which leaves the checksum out-of-date. We + * report a warning if this is the case. + */ + if ((void*)b < (void*)&b->checksum && b->checksum) { u32 *u = (u32 *)b; u32 *bi = (u32 *)(&b->checksum); ntfs_log_debug("Calculating bootsector checksum... "); - for (i = 0; u < bi; ++u) i += le32_to_cpup(u); - - if (le32_to_cpu(b->checksum) && le32_to_cpu(b->checksum) != i) - goto not_ntfs; - ntfs_log_debug("OK\n"); + if (le32_to_cpu(b->checksum) && le32_to_cpu(b->checksum) != i) { + ntfs_log_debug("FAILED\n"); + ntfs_log_debug("The NTFS bootsector contains an " + "incorrect checksum."); + } else + ntfs_log_debug("OK\n"); } /* Check OEMidentifier is "NTFS " */ |
From: Anton A. <ai...@de...> - 2007-03-19 14:39:58
|
Changes by: aia21 Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs In directory delta357:/tmp/cvs-serv11385/ntfsprogs Modified Files: mkntfs.c Log Message: Minor updates for OSX compatibility, i.e. glibtoolize not libtoolize, and automake 1.10 fix, etc. Index: mkntfs.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/mkntfs.c,v retrieving revision 1.156 retrieving revision 1.157 diff -u -p -r1.156 -r1.157 --- mkntfs.c 19 Dec 2006 16:31:52 -0000 1.156 +++ mkntfs.c 19 Mar 2007 14:39:44 -0000 1.157 @@ -1,7 +1,7 @@ /** * mkntfs - Part of the Linux-NTFS project. * - * Copyright (c) 2000-2006 Anton Altaparmakov + * Copyright (c) 2000-2007 Anton Altaparmakov * Copyright (c) 2001-2005 Richard Russon * Copyright (c) 2002-2006 Szabolcs Szakacsits * Copyright (c) 2005 Erik Sornes @@ -29,21 +29,6 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* - * WARNING: This program might not work on architectures which do not allow - * unaligned access. For those, the program would need to start using - * get/put_unaligned macros (#include <asm/unaligned.h>), but not doing it yet, - * since NTFS really mostly applies to ia32 only, which does allow unaligned - * accesses. We might not actually have a problem though, since the structs are - * defined as being packed so that might be enough for gcc to insert the - * correct code. - * - * If anyone using a non-little endian and/or an aligned access only CPU tries - * this program please let me know whether it works or not! - * - * Anton Altaparmakov <ai...@ca...> - */ - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -263,7 +248,7 @@ static void mkntfs_version(void) { ntfs_log_info("\n%s v%s (libntfs %s)\n\n", EXEC_NAME, VERSION, ntfs_libntfs_version()); ntfs_log_info("Create an NTFS volume on a user specified (block) device.\n\n"); - ntfs_log_info("Copyright (c) 2000-2006 Anton Altaparmakov\n"); + ntfs_log_info("Copyright (c) 2000-2007 Anton Altaparmakov\n"); ntfs_log_info("Copyright (c) 2001-2005 Richard Russon\n"); ntfs_log_info("Copyright (c) 2002-2006 Szabolcs Szakacsits\n"); ntfs_log_info("Copyright (c) 2005 Erik Sornes\n"); |
From: Anton A. <ai...@de...> - 2007-03-19 14:39:57
|
Changes by: aia21 Update of /cvs/linux-ntfs/ntfsprogs In directory delta357:/tmp/cvs-serv11385 Modified Files: ChangeLog README autogen.sh configure.ac ntfsprogs.spec.in Log Message: Minor updates for OSX compatibility, i.e. glibtoolize not libtoolize, and automake 1.10 fix, etc. Index: ChangeLog =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ChangeLog,v retrieving revision 1.439 retrieving revision 1.440 diff -u -p -r1.439 -r1.440 --- ChangeLog 13 Mar 2007 18:52:02 -0000 1.439 +++ ChangeLog 19 Mar 2007 14:39:44 -0000 1.440 @@ -1,4 +1,4 @@ -xx/01/2007 - 2.0.0 - ntfsmount sports full r/w and ntfsresize supports Vista. +xx/03/2007 - 2.0.0 - ntfsmount sports full r/w and ntfsresize supports Vista. - ntfsmount now creates files and directories with security descriptor that grant full access to everyone. (Yura) Index: README =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/README,v retrieving revision 1.21 retrieving revision 1.22 diff -u -p -r1.21 -r1.22 --- README 2 Feb 2006 14:40:53 -0000 1.21 +++ README 19 Mar 2007 14:39:44 -0000 1.22 @@ -5,7 +5,7 @@ Linux-NTFS The Linux-NTFS project aims to bring full support for the NTFS filesystem to the Linux operating system. -Linux-NTFS is copyright (c) 2000-2006 Anton Altaparmakov. +Linux-NTFS is copyright (c) 2000-2007 Anton Altaparmakov. All of the contents of the Linux-NTFS project are free software, released under the GNU General Public License and you are welcome to redistribute them under Index: autogen.sh =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/autogen.sh,v retrieving revision 1.12 retrieving revision 1.13 diff -u -p -r1.12 -r1.13 --- autogen.sh 18 Dec 2006 13:39:23 -0000 1.12 +++ autogen.sh 19 Mar 2007 14:39:44 -0000 1.13 @@ -24,6 +24,17 @@ fi exit 1 } +UNAME=`which uname` +if [ $? -eq 0 -a -n ${UNAME} -a -x ${UNAME} ]; then + OS=`${UNAME} -s` + if [ $? -eq 0 -a -n ${OS} -a "${OS}" == "Darwin" ]; then + echo "" + echo "Running on Mac OS X / Darwin. Setting LIBTOOLIZE=glibtoolize..." + echo "" + export LIBTOOLIZE="glibtoolize" + fi +fi + echo Running autoreconf --verbose --install autoreconf --force --verbose --install Index: configure.ac =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/configure.ac,v retrieving revision 1.117 retrieving revision 1.118 diff -u -p -r1.117 -r1.118 --- configure.ac 13 Dec 2006 10:46:49 -0000 1.117 +++ configure.ac 19 Mar 2007 14:39:44 -0000 1.118 @@ -166,6 +166,7 @@ esac # Checks for programs. AC_PROG_CC AC_PROG_GCC_TRADITIONAL +AM_PROG_CC_C_O AC_PROG_INSTALL AC_PATH_PROG(RM, rm, rm) AC_PROG_LN_S Index: ntfsprogs.spec.in =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs.spec.in,v retrieving revision 1.19 retrieving revision 1.20 diff -u -p -r1.19 -r1.20 --- ntfsprogs.spec.in 1 Dec 2005 20:44:18 -0000 1.19 +++ ntfsprogs.spec.in 19 Mar 2007 14:39:44 -0000 1.20 @@ -41,7 +41,7 @@ allows GNOME VFS clients to seamlessly u Summary : NTFS FUSE module (ntfsmount) Group : System Environment/Base Requires : ntfsprogs = %{ver}-%{rel} -Requires : fuse >= 2.3.0 +Requires : fuse >= 2.6.1 %description fuse This package contains the ntfsmount utility which is an NTFS filesystem in userspace (FUSE) module allowing users to mount an ntfs filesystem from |
From: Yura P. <yu...@de...> - 2007-03-13 18:52:12
|
Changes by: yura Update of /cvs/linux-ntfs/ntfsprogs In directory delta357:/tmp/cvs-serv15353 Modified Files: ChangeLog Log Message: ntfsmount: use utimens() instead of deprecated utime(). Index: ChangeLog =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ChangeLog,v retrieving revision 1.438 retrieving revision 1.439 diff -u -p -r1.438 -r1.439 --- ChangeLog 6 Mar 2007 15:44:30 -0000 1.438 +++ ChangeLog 13 Mar 2007 18:52:02 -0000 1.439 @@ -131,6 +131,7 @@ xx/01/2007 - 2.0.0 - ntfsmount sports fu sensitive and insensitive mounts. (Yura) - ntfsmount: st_block calculation was wrong. (Yuval) - mkntfs: Use Vista $Boot rather than XP one. (Anton) + - ntfsmount: use utimens() instead of deprecated utime(). (Yura) 21/06/2006 - 1.13.1 - Various fixes. |
From: Yura P. <yu...@de...> - 2007-03-13 18:52:09
|
Changes by: yura Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs In directory delta357:/tmp/cvs-serv15353/ntfsprogs Modified Files: ntfsmount.c Log Message: ntfsmount: use utimens() instead of deprecated utime(). Index: ntfsmount.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsmount.c,v retrieving revision 1.110 retrieving revision 1.111 diff -u -p -r1.110 -r1.111 --- ntfsmount.c 7 Jan 2007 19:19:53 -0000 1.110 +++ ntfsmount.c 13 Mar 2007 18:52:02 -0000 1.111 @@ -1120,7 +1120,7 @@ static int ntfs_fuse_rmdir(const char *p return ntfs_fuse_rm(path); } -static int ntfs_fuse_utime(const char *path, struct utimbuf *buf) +static int ntfs_fuse_utimens(const char *path, const struct timespec ts[2]) { ntfs_inode *ni; @@ -1129,10 +1129,10 @@ static int ntfs_fuse_utime(const char *p ni = ntfs_pathname_to_inode(ctx->vol, NULL, path); if (!ni) return -errno; - if (buf) { - ni->last_access_time = buf->actime; - ni->last_data_change_time = buf->modtime; - ni->last_mft_change_time = buf->modtime; + if (ts) { + ni->last_access_time = ts[0].tv_sec; + ni->last_data_change_time = ts[1].tv_sec; + ni->last_mft_change_time = ts[1].tv_sec; } else { time_t now; @@ -1468,7 +1468,7 @@ static struct fuse_operations ntfs_fuse_ .rename = ntfs_fuse_rename, .mkdir = ntfs_fuse_mkdir, .rmdir = ntfs_fuse_rmdir, - .utime = ntfs_fuse_utime, + .utimens = ntfs_fuse_utimens, .destroy = ntfs_fuse_destroy, #ifdef HAVE_SETXATTR .getxattr = ntfs_fuse_getxattr, |
From: Yura P. <yu...@de...> - 2007-03-13 18:46:03
|
Changes by: yura Update of /cvs/linux-ntfs/ntfsprogs/libntfs In directory delta357:/tmp/cvs-serv14868/libntfs Modified Files: attrib.c Log Message: cleanup Index: attrib.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/libntfs/attrib.c,v retrieving revision 1.236 retrieving revision 1.237 diff -u -p -r1.236 -r1.237 --- attrib.c 22 Nov 2006 18:28:13 -0000 1.236 +++ attrib.c 13 Mar 2007 18:45:51 -0000 1.237 @@ -953,9 +953,9 @@ s64 ntfs_attr_pwrite(ntfs_attr *na, cons unsigned int update_mapping_pairs : 1; } need_to = { 0, 0, 0 }; - ntfs_log_trace("Entering for inode 0x%llx, attr 0x%x, pos 0x%llx, count " - "0x%llx.\n", na->ni->mft_no, na->type, (long long)pos, - (long long)count); + ntfs_log_trace("Entering for inode 0x%llx, attr 0x%x, pos 0x%llx, " + "count 0x%llx.\n", na->ni->mft_no, na->type, + (long long)pos, (long long)count); if (!na || !na->ni || !na->ni->vol || !b || pos < 0 || count < 0) { errno = EINVAL; return -1; |
From: Yura P. <yu...@de...> - 2007-03-13 18:40:00
|
Changes by: yura Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs In directory delta357:/tmp/cvs-serv14358/ntfsprogs Modified Files: ntfscp.c Log Message: minor cleanups Index: ntfscp.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfscp.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -p -r1.41 -r1.42 --- ntfscp.c 12 Dec 2006 15:44:52 -0000 1.41 +++ ntfscp.c 13 Mar 2007 18:39:47 -0000 1.42 @@ -384,7 +384,7 @@ int main(int argc, char *argv[]) } else out = ntfs_pathname_to_inode(vol, NULL, opts.dest_file); if (!out) { - /* copy the file if the dest_file's parent dir can be opened */ + /* Copy the file if the dest_file's parent dir can be opened. */ char *parent_dirname; char *filename; ntfs_inode *dir_ni; @@ -401,7 +401,7 @@ int main(int argc, char *argv[]) } dirname_last_whack = strrchr(parent_dirname, '/'); if (dirname_last_whack) { - dirname_last_whack[1] = '\0'; + dirname_last_whack[1] = 0; dir_ni = ntfs_pathname_to_inode(vol, NULL, parent_dirname); } else { @@ -412,7 +412,7 @@ int main(int argc, char *argv[]) if (dir_ni) { if (!(dir_ni->mrec->flags & MFT_RECORD_IS_DIRECTORY)) { /* Remove the last '/' for estetic reasons. */ - dirname_last_whack[0] = '\0'; + dirname_last_whack[0] = 0; ntfs_log_error("The file '%s' already exists " "and is not a directory. " "Aborting.\n", parent_dirname); @@ -440,14 +440,12 @@ int main(int argc, char *argv[]) } free(parent_dirname); } - /* the destination file is a path */ + /* The destination is a directory. */ if ((out->mrec->flags & MFT_RECORD_IS_DIRECTORY) && !opts.inode) { char *filename; char *overwrite_filename; int overwrite_filename_len; - /* inode to the file that is being created */ ntfs_inode *ni; - /* inode to the directory to create the file */ ntfs_inode *dir_ni; int filename_len; int dest_dirname_len; @@ -456,7 +454,7 @@ int main(int argc, char *argv[]) dir_ni = out; filename_len = strlen(filename); dest_dirname_len = strlen(opts.dest_file); - overwrite_filename_len = filename_len+dest_dirname_len+2; + overwrite_filename_len = filename_len+dest_dirname_len + 2; overwrite_filename = malloc(overwrite_filename_len); if (!overwrite_filename) { ntfs_log_perror("ERROR: Failed to allocate %i bytes " @@ -466,8 +464,7 @@ int main(int argc, char *argv[]) goto close_src; } strcpy(overwrite_filename, opts.dest_file); - /* add '/' in the end of dest_dirname if there is not one there */ - if (opts.dest_file[dest_dirname_len-1] != '/') { + if (opts.dest_file[dest_dirname_len - 1] != '/') { strcat(overwrite_filename, "/"); } strcat(overwrite_filename, filename); @@ -480,8 +477,8 @@ int main(int argc, char *argv[]) ntfs_inode_close(out); out = ni; } else { - ntfs_log_verbose("Creating a new file '%s' under '%s'\n", - filename, opts.dest_file); + ntfs_log_verbose("Creating a new file '%s' under " + "'%s'\n", filename, opts.dest_file); ni = ntfs_new_file(dir_ni, filename); ntfs_inode_close(dir_ni); if (!ni) { |
From: Anton A. <ai...@de...> - 2007-03-06 15:45:05
|
Changes by: aia21 Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs In directory delta357:/tmp/cvs-serv18577/ntfsprogs Modified Files: boot.c boot.h Log Message: - mkntfs: Use Vista $Boot rather than XP one. (Anton) Index: boot.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/boot.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -p -r1.4 -r1.5 --- boot.c 12 Dec 2006 19:00:01 -0000 1.4 +++ boot.c 6 Mar 2007 15:44:31 -0000 1.5 @@ -1,224 +1,268 @@ #include "boot.h" /** - * boot_array - the first 3429 bytes of $Boot - * The first 3429 bytes of $Boot. The rest is just zero. Total 8192 bytes. + * boot_array - the first 4136 bytes of $Boot + * + * The first 4136 bytes of $Boot. The rest is just zero. Total 8192 bytes. */ -const unsigned char boot_array[3429] = { -235, 91, 144, 78, 84, 70, 83, 32, 32, 32, 32, 0, 0, 0, 0, 0, +const unsigned char boot_array[4136] = { +235, 82, 144, 78, 84, 70, 83, 32, 32, 32, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 250, 51, 192, -142, 208, 188, 0, 124, 251, 184, 192, 7, 142, 216, 199, 6, 84, 0, 0, - 0, 199, 6, 86, 0, 0, 0, 199, 6, 91, 0, 16, 0, 184, 0, 13, -142, 192, 43, 219, 232, 7, 0, 104, 0, 13, 104, 102, 2, 203, 80, 83, - 81, 82, 6, 102, 161, 84, 0, 102, 3, 6, 28, 0, 102, 51, 210, 102, - 15, 183, 14, 24, 0, 102, 247, 241, 254, 194, 136, 22, 90, 0, 102, 139, -208, 102, 193, 234, 16, 247, 54, 26, 0, 136, 22, 37, 0, 163, 88, 0, -161, 24, 0, 42, 6, 90, 0, 64, 59, 6, 91, 0, 118, 3, 161, 91, - 0, 80, 180, 2, 139, 22, 88, 0, 177, 6, 210, 230, 10, 54, 90, 0, -139, 202, 134, 233, 138, 54, 37, 0, 178, 128, 205, 19, 88, 114, 42, 1, - 6, 84, 0, 131, 22, 86, 0, 0, 41, 6, 91, 0, 118, 11, 193, 224, - 5, 140, 194, 3, 208, 142, 194, 235, 138, 7, 90, 89, 91, 88, 195, 190, - 89, 1, 235, 8, 190, 227, 1, 235, 3, 190, 57, 1, 232, 9, 0, 190, -173, 1, 232, 3, 0, 251, 235, 254, 172, 60, 0, 116, 9, 180, 14, 187, - 7, 0, 205, 16, 235, 242, 195, 29, 0, 65, 32, 100, 105, 115, 107, 32, -114, 101, 97, 100, 32, 101, 114, 114, 111, 114, 32, 111, 99, 99, 117, 114, -114, 101, 100, 46, 13, 10, 0, 41, 0, 65, 32, 107, 101, 114, 110, 101, -108, 32, 102, 105, 108, 101, 32, 105, 115, 32, 109, 105, 115, 115, 105, 110, -103, 32, 102, 114, 111, 109, 32, 116, 104, 101, 32, 100, 105, 115, 107, 46, - 13, 10, 0, 37, 0, 65, 32, 107, 101, 114, 110, 101, 108, 32, 102, 105, -108, 101, 32, 105, 115, 32, 116, 111, 111, 32, 100, 105, 115, 99, 111, 110, -116, 105, 103, 117, 111, 117, 115, 46, 13, 10, 0, 51, 0, 73, 110, 115, -101, 114, 116, 32, 97, 32, 115, 121, 115, 116, 101, 109, 32, 100, 105, 115, -107, 101, 116, 116, 101, 32, 97, 110, 100, 32, 114, 101, 115, 116, 97, 114, -116, 13, 10, 116, 104, 101, 32, 115, 121, 115, 116, 101, 109, 46, 13, 10, - 0, 23, 0, 92, 78, 84, 76, 68, 82, 32, 105, 115, 32, 99, 111, 109, -112, 114, 101, 115, 115, 101, 100, 46, 13, 10, 0, 0, 0, 0, 85, 170, - 5, 0, 78, 0, 84, 0, 76, 0, 68, 0, 82, 0, 4, 0, 36, 0, - 73, 0, 51, 0, 48, 0, 0, 224, 0, 0, 0, 48, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 140, 200, 142, 216, 193, 224, 4, 250, 139, 224, -251, 102, 15, 183, 6, 11, 0, 102, 15, 182, 30, 13, 0, 102, 247, 227, -102, 163, 78, 2, 102, 139, 14, 64, 0, 128, 249, 0, 15, 143, 14, 0, -246, 217, 102, 184, 1, 0, 0, 0, 102, 211, 224, 235, 8, 144, 102, 161, - 78, 2, 102, 247, 225, 102, 163, 82, 2, 102, 15, 183, 30, 11, 0, 102, - 51, 210, 102, 247, 243, 102, 163, 86, 2, 232, 44, 4, 102, 139, 14, 74, - 2, 102, 137, 14, 34, 2, 102, 3, 14, 82, 2, 102, 137, 14, 38, 2, -102, 3, 14, 82, 2, 102, 137, 14, 42, 2, 102, 3, 14, 82, 2, 102, -137, 14, 58, 2, 102, 3, 14, 82, 2, 102, 137, 14, 66, 2, 102, 184, -144, 0, 0, 0, 102, 139, 14, 34, 2, 232, 65, 9, 102, 11, 192, 15, -132, 22, 254, 102, 163, 46, 2, 102, 184, 160, 0, 0, 0, 102, 139, 14, - 38, 2, 232, 40, 9, 102, 163, 50, 2, 102, 184, 176, 0, 0, 0, 102, -139, 14, 42, 2, 232, 22, 9, 102, 163, 54, 2, 102, 161, 46, 2, 102, - 11, 192, 15, 132, 227, 253, 103, 128, 120, 8, 0, 15, 133, 218, 253, 103, -102, 141, 80, 16, 103, 3, 66, 4, 103, 102, 15, 182, 72, 12, 102, 137, - 14, 94, 2, 103, 102, 139, 72, 8, 102, 137, 14, 90, 2, 102, 161, 90, - 2, 102, 15, 183, 14, 11, 0, 102, 51, 210, 102, 247, 241, 102, 163, 98, - 2, 102, 161, 66, 2, 102, 3, 6, 90, 2, 102, 163, 70, 2, 102, 131, - 62, 50, 2, 0, 15, 132, 25, 0, 102, 131, 62, 54, 2, 0, 15, 132, -135, 253, 102, 139, 30, 54, 2, 30, 7, 102, 139, 62, 70, 2, 232, 177, - 1, 102, 15, 183, 14, 0, 2, 102, 184, 2, 2, 0, 0, 232, 153, 6, -102, 11, 192, 15, 132, 88, 253, 103, 102, 139, 0, 30, 7, 102, 139, 62, - 58, 2, 232, 209, 4, 102, 161, 58, 2, 102, 187, 128, 0, 0, 0, 102, -185, 0, 0, 0, 0, 102, 186, 0, 0, 0, 0, 232, 203, 0, 102, 11, -192, 15, 132, 42, 253, 103, 102, 15, 183, 88, 12, 102, 129, 227, 255, 0, - 0, 0, 15, 133, 30, 253, 102, 139, 216, 104, 0, 32, 7, 102, 43, 255, -232, 79, 1, 138, 22, 36, 0, 184, 232, 3, 142, 192, 141, 54, 11, 0, - 43, 192, 104, 0, 32, 80, 203, 80, 83, 81, 82, 6, 255, 54, 91, 0, -255, 54, 84, 0, 255, 54, 86, 0, 139, 195, 193, 232, 4, 140, 193, 3, -193, 37, 255, 15, 45, 0, 16, 247, 216, 139, 14, 91, 0, 193, 225, 5, - 81, 59, 193, 118, 2, 139, 193, 80, 193, 232, 5, 163, 91, 0, 232, 61, -252, 88, 89, 43, 200, 118, 11, 140, 194, 3, 208, 142, 194, 184, 0, 16, -235, 222, 143, 6, 86, 0, 143, 6, 84, 0, 143, 6, 91, 0, 7, 90, - 89, 91, 88, 195, 6, 30, 102, 96, 102, 139, 218, 102, 15, 182, 14, 13, - 0, 102, 247, 225, 102, 163, 84, 0, 102, 139, 195, 102, 247, 225, 163, 91, - 0, 139, 223, 131, 227, 15, 140, 192, 102, 193, 239, 4, 3, 199, 80, 7, -232, 116, 255, 102, 97, 144, 31, 7, 195, 103, 3, 64, 20, 103, 102, 131, - 56, 255, 15, 132, 76, 0, 103, 102, 57, 24, 15, 133, 51, 0, 102, 11, -201, 15, 133, 10, 0, 103, 128, 120, 9, 0, 15, 133, 35, 0, 195, 103, - 58, 72, 9, 15, 133, 26, 0, 102, 139, 240, 103, 3, 112, 10, 232, 61, - 5, 102, 81, 30, 7, 102, 139, 250, 243, 167, 102, 89, 15, 133, 1, 0, -195, 103, 102, 131, 120, 4, 0, 15, 132, 7, 0, 103, 102, 3, 64, 4, -235, 171, 102, 43, 192, 195, 102, 139, 243, 232, 18, 5, 103, 102, 3, 0, -103, 247, 64, 12, 2, 0, 15, 133, 52, 0, 103, 102, 141, 80, 16, 103, - 58, 74, 64, 15, 133, 24, 0, 103, 102, 141, 114, 66, 232, 239, 4, 102, - 81, 30, 7, 102, 139, 251, 243, 167, 102, 89, 15, 133, 1, 0, 195, 103, -131, 120, 8, 0, 15, 132, 6, 0, 103, 3, 64, 8, 235, 194, 102, 51, -192, 195, 103, 128, 123, 8, 0, 15, 133, 28, 0, 6, 30, 102, 96, 103, -102, 141, 83, 16, 103, 102, 139, 10, 102, 139, 243, 103, 3, 114, 4, 243, -164, 102, 97, 144, 31, 7, 195, 103, 102, 141, 83, 16, 103, 102, 139, 74, - 8, 102, 65, 102, 43, 192, 232, 1, 0, 195, 6, 30, 102, 96, 103, 128, -123, 8, 1, 15, 132, 3, 0, 233, 127, 251, 102, 131, 249, 0, 15, 133, - 6, 0, 102, 97, 144, 31, 7, 195, 102, 83, 102, 80, 102, 81, 102, 87, - 6, 232, 87, 3, 102, 139, 209, 7, 102, 95, 102, 89, 102, 59, 202, 15, -141, 3, 0, 102, 139, 209, 232, 171, 254, 102, 43, 202, 102, 139, 218, 102, -139, 194, 102, 15, 182, 22, 13, 0, 102, 247, 226, 102, 15, 183, 22, 11, - 0, 102, 247, 226, 102, 3, 248, 102, 88, 102, 3, 195, 102, 91, 235, 170, - 6, 30, 102, 96, 103, 128, 123, 8, 1, 15, 132, 3, 0, 233, 25, 251, -102, 131, 249, 0, 15, 133, 6, 0, 102, 97, 144, 31, 7, 195, 102, 83, -102, 80, 102, 81, 102, 87, 6, 102, 81, 102, 51, 210, 102, 15, 182, 14, - 13, 0, 102, 247, 241, 102, 82, 232, 225, 2, 102, 15, 182, 30, 13, 0, -102, 247, 227, 102, 90, 102, 3, 194, 102, 80, 102, 15, 182, 6, 13, 0, -102, 247, 225, 102, 139, 208, 102, 88, 102, 89, 7, 102, 95, 102, 89, 102, - 59, 202, 15, 141, 3, 0, 102, 139, 209, 102, 163, 84, 0, 137, 22, 91, - 0, 6, 30, 102, 96, 139, 223, 131, 227, 15, 140, 192, 102, 193, 239, 4, - 3, 199, 80, 7, 232, 160, 253, 102, 97, 144, 31, 7, 102, 43, 202, 102, -139, 218, 102, 139, 194, 102, 15, 183, 22, 11, 0, 102, 247, 226, 102, 3, -248, 102, 88, 102, 3, 195, 102, 91, 233, 101, 255, 6, 30, 102, 96, 38, -103, 102, 15, 183, 95, 4, 38, 103, 102, 15, 183, 79, 6, 102, 11, 201, - 15, 132, 101, 250, 102, 3, 223, 102, 131, 195, 2, 102, 129, 199, 254, 1, - 0, 0, 102, 73, 102, 11, 201, 15, 132, 23, 0, 38, 103, 139, 3, 38, -103, 137, 7, 102, 131, 195, 2, 102, 129, 199, 0, 2, 0, 0, 102, 73, -235, 226, 102, 97, 144, 31, 7, 195, 6, 30, 102, 96, 102, 184, 1, 0, - 0, 0, 102, 163, 30, 2, 102, 161, 26, 2, 102, 3, 6, 82, 2, 102, -163, 74, 2, 102, 161, 48, 0, 102, 15, 182, 30, 13, 0, 102, 247, 227, -102, 163, 84, 0, 102, 161, 86, 2, 163, 91, 0, 102, 139, 30, 26, 2, - 30, 7, 232, 242, 252, 102, 15, 183, 251, 232, 111, 255, 102, 161, 26, 2, + 0, 0, 0, 0, 250, 51, 192, 142, 208, 188, 0, 124, 251, 104, 192, 7, + 31, 30, 104, 102, 0, 203, 136, 22, 14, 0, 102, 129, 62, 3, 0, 78, + 84, 70, 83, 117, 21, 180, 65, 187, 170, 85, 205, 19, 114, 12, 129, 251, + 85, 170, 117, 6, 247, 193, 1, 0, 117, 3, 233, 210, 0, 30, 131, 236, + 24, 104, 26, 0, 180, 72, 138, 22, 14, 0, 139, 244, 22, 31, 205, 19, +159, 131, 196, 24, 158, 88, 31, 114, 225, 59, 6, 11, 0, 117, 219, 163, + 15, 0, 193, 46, 15, 0, 4, 30, 90, 51, 219, 185, 0, 32, 43, 200, +102, 255, 6, 17, 0, 3, 22, 15, 0, 142, 194, 255, 6, 22, 0, 232, + 64, 0, 43, 200, 119, 239, 184, 0, 187, 205, 26, 102, 35, 192, 117, 45, +102, 129, 251, 84, 67, 80, 65, 117, 36, 129, 249, 2, 1, 114, 30, 22, +104, 7, 187, 22, 104, 112, 14, 22, 104, 9, 0, 102, 83, 102, 83, 102, + 85, 22, 22, 22, 104, 184, 1, 102, 97, 14, 7, 205, 26, 233, 106, 1, +144, 144, 102, 96, 30, 6, 102, 161, 17, 0, 102, 3, 6, 28, 0, 30, +102, 104, 0, 0, 0, 0, 102, 80, 6, 83, 104, 1, 0, 104, 16, 0, +180, 66, 138, 22, 14, 0, 22, 31, 139, 244, 205, 19, 102, 89, 91, 90, +102, 89, 102, 89, 31, 15, 130, 22, 0, 102, 255, 6, 17, 0, 3, 22, + 15, 0, 142, 194, 255, 14, 22, 0, 117, 188, 7, 31, 102, 97, 195, 160, +248, 1, 232, 8, 0, 160, 251, 1, 232, 2, 0, 235, 254, 180, 1, 139, +240, 172, 60, 0, 116, 9, 180, 14, 187, 7, 0, 205, 16, 235, 242, 195, + 13, 10, 65, 32, 100, 105, 115, 107, 32, 114, 101, 97, 100, 32, 101, 114, +114, 111, 114, 32, 111, 99, 99, 117, 114, 114, 101, 100, 0, 13, 10, 66, + 79, 79, 84, 77, 71, 82, 32, 105, 115, 32, 109, 105, 115, 115, 105, 110, +103, 0, 13, 10, 66, 79, 79, 84, 77, 71, 82, 32, 105, 115, 32, 99, +111, 109, 112, 114, 101, 115, 115, 101, 100, 0, 13, 10, 80, 114, 101, 115, +115, 32, 67, 116, 114, 108, 43, 65, 108, 116, 43, 68, 101, 108, 32, 116, +111, 32, 114, 101, 115, 116, 97, 114, 116, 13, 10, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 128, 157, 178, 202, 0, 0, 85, 170, + 7, 0, 66, 0, 79, 0, 79, 0, 84, 0, 77, 0, 71, 0, 82, 0, + 4, 0, 36, 0, 73, 0, 51, 0, 48, 0, 0, 224, 0, 0, 0, 48, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 235, 34, 144, 144, 5, 0, 78, 0, 84, 0, + 76, 0, 68, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 15, 183, 6, 11, 0, +102, 15, 182, 30, 13, 0, 102, 247, 227, 102, 163, 82, 2, 102, 139, 14, + 64, 0, 128, 249, 0, 15, 143, 14, 0, 246, 217, 102, 184, 1, 0, 0, + 0, 102, 211, 224, 235, 8, 144, 102, 161, 82, 2, 102, 247, 225, 102, 163, +102, 2, 102, 15, 183, 30, 11, 0, 102, 51, 210, 102, 247, 243, 102, 163, + 86, 2, 232, 149, 4, 102, 139, 14, 78, 2, 102, 137, 14, 38, 2, 102, + 3, 14, 102, 2, 102, 137, 14, 42, 2, 102, 3, 14, 102, 2, 102, 137, + 14, 46, 2, 102, 3, 14, 102, 2, 102, 137, 14, 62, 2, 102, 3, 14, +102, 2, 102, 137, 14, 70, 2, 102, 184, 144, 0, 0, 0, 102, 139, 14, + 38, 2, 232, 131, 9, 102, 11, 192, 15, 132, 83, 254, 102, 163, 50, 2, +102, 184, 160, 0, 0, 0, 102, 139, 14, 42, 2, 232, 106, 9, 102, 163, + 54, 2, 102, 184, 176, 0, 0, 0, 102, 139, 14, 46, 2, 232, 88, 9, +102, 163, 58, 2, 102, 161, 50, 2, 102, 11, 192, 15, 132, 32, 254, 103, +128, 120, 8, 0, 15, 133, 23, 254, 103, 102, 141, 80, 16, 103, 3, 66, + 4, 103, 102, 15, 182, 72, 12, 102, 137, 14, 114, 2, 103, 102, 139, 72, + 8, 102, 137, 14, 110, 2, 102, 161, 110, 2, 102, 15, 183, 14, 11, 0, +102, 51, 210, 102, 247, 241, 102, 163, 118, 2, 102, 161, 70, 2, 102, 3, + 6, 110, 2, 102, 163, 74, 2, 102, 131, 62, 54, 2, 0, 15, 132, 29, + 0, 102, 131, 62, 58, 2, 0, 15, 132, 196, 253, 102, 139, 30, 58, 2, + 30, 7, 102, 139, 62, 74, 2, 102, 161, 46, 2, 232, 224, 1, 102, 15, +183, 14, 0, 2, 102, 184, 2, 2, 0, 0, 232, 34, 8, 102, 11, 192, + 15, 133, 22, 0, 102, 15, 183, 14, 90, 2, 102, 184, 92, 2, 0, 0, +232, 12, 8, 102, 11, 192, 15, 132, 66, 12, 103, 102, 139, 0, 30, 7, +102, 139, 62, 62, 2, 232, 63, 6, 102, 161, 62, 2, 102, 187, 32, 0, + 0, 0, 102, 185, 0, 0, 0, 0, 102, 186, 0, 0, 0, 0, 232, 228, + 0, 102, 133, 192, 15, 133, 35, 0, 102, 161, 62, 2, 102, 187, 128, 0, + 0, 0, 102, 185, 0, 0, 0, 0, 102, 186, 0, 0, 0, 0, 232, 196, + 0, 102, 11, 192, 15, 133, 68, 0, 233, 241, 11, 102, 51, 210, 102, 185, +128, 0, 0, 0, 102, 161, 62, 2, 232, 202, 8, 102, 11, 192, 15, 132, +218, 11, 30, 7, 102, 139, 62, 62, 2, 232, 219, 5, 102, 161, 62, 2, +102, 187, 128, 0, 0, 0, 102, 185, 0, 0, 0, 0, 102, 186, 0, 0, + 0, 0, 232, 128, 0, 102, 11, 192, 15, 132, 176, 11, 103, 102, 15, 183, + 88, 12, 102, 129, 227, 255, 0, 0, 0, 15, 133, 165, 11, 102, 139, 216, +104, 0, 32, 7, 102, 43, 255, 102, 161, 62, 2, 232, 0, 1, 104, 0, + 32, 7, 102, 43, 255, 102, 161, 62, 2, 232, 172, 10, 138, 22, 14, 0, +184, 232, 3, 142, 192, 141, 54, 11, 0, 43, 192, 104, 0, 32, 80, 203, + 6, 30, 102, 96, 102, 139, 218, 102, 15, 182, 14, 13, 0, 102, 247, 225, +102, 163, 17, 0, 102, 139, 195, 102, 247, 225, 163, 22, 0, 139, 223, 131, +227, 15, 140, 192, 102, 193, 239, 4, 3, 199, 80, 7, 232, 51, 252, 102, + 97, 144, 31, 7, 195, 103, 3, 64, 20, 103, 102, 131, 56, 255, 15, 132, + 76, 0, 103, 102, 57, 24, 15, 133, 51, 0, 102, 11, 201, 15, 133, 10, + 0, 103, 128, 120, 9, 0, 15, 133, 35, 0, 195, 103, 58, 72, 9, 15, +133, 26, 0, 102, 139, 240, 103, 3, 112, 10, 232, 151, 6, 102, 81, 30, + 7, 102, 139, 250, 243, 167, 102, 89, 15, 133, 1, 0, 195, 103, 102, 131, +120, 4, 0, 15, 132, 7, 0, 103, 102, 3, 64, 4, 235, 171, 102, 43, +192, 195, 102, 139, 243, 232, 108, 6, 103, 102, 3, 0, 103, 247, 64, 12, + 2, 0, 15, 133, 52, 0, 103, 102, 141, 80, 16, 103, 58, 74, 64, 15, +133, 24, 0, 103, 102, 141, 114, 66, 232, 73, 6, 102, 81, 30, 7, 102, +139, 251, 243, 167, 102, 89, 15, 133, 1, 0, 195, 103, 131, 120, 8, 0, + 15, 132, 6, 0, 103, 3, 64, 8, 235, 194, 102, 51, 192, 195, 103, 128, +123, 8, 0, 15, 133, 28, 0, 6, 30, 102, 96, 103, 102, 141, 83, 16, +103, 102, 139, 10, 102, 139, 243, 103, 3, 114, 4, 243, 164, 102, 97, 144, + 31, 7, 195, 102, 80, 103, 102, 141, 83, 16, 102, 133, 192, 15, 133, 10, + 0, 103, 102, 139, 74, 8, 102, 65, 235, 17, 144, 103, 102, 139, 66, 24, +102, 51, 210, 102, 247, 54, 82, 2, 102, 139, 200, 102, 43, 192, 102, 94, +232, 1, 0, 195, 6, 30, 102, 96, 103, 128, 123, 8, 1, 15, 132, 3, + 0, 233, 107, 251, 102, 131, 249, 0, 15, 133, 6, 0, 102, 97, 144, 31, + 7, 195, 102, 83, 102, 80, 102, 81, 102, 86, 102, 87, 6, 232, 145, 4, +102, 139, 209, 7, 102, 95, 102, 94, 102, 89, 102, 133, 192, 15, 132, 52, + 0, 102, 59, 202, 15, 141, 3, 0, 102, 139, 209, 232, 130, 254, 102, 43, +202, 102, 139, 218, 102, 139, 194, 102, 15, 182, 22, 13, 0, 102, 247, 226, +102, 15, 183, 22, 11, 0, 102, 247, 226, 102, 3, 248, 102, 88, 102, 3, +195, 102, 91, 235, 159, 102, 133, 246, 15, 132, 3, 251, 102, 81, 102, 87, + 6, 103, 102, 15, 182, 67, 9, 102, 133, 192, 15, 132, 32, 0, 102, 209, +224, 102, 43, 224, 102, 139, 252, 102, 84, 102, 86, 103, 102, 15, 183, 115, + 10, 102, 3, 243, 102, 139, 200, 243, 164, 102, 94, 235, 3, 144, 102, 80, +102, 80, 103, 102, 139, 3, 102, 80, 103, 102, 139, 67, 24, 102, 80, 103, +102, 139, 86, 32, 102, 133, 210, 15, 132, 11, 0, 102, 139, 254, 30, 7, +102, 139, 194, 232, 113, 3, 102, 139, 198, 102, 90, 102, 89, 102, 66, 102, + 81, 102, 86, 232, 63, 6, 102, 133, 192, 15, 132, 146, 250, 102, 94, 102, + 89, 102, 139, 254, 30, 7, 232, 78, 3, 102, 139, 198, 102, 139, 217, 102, + 89, 102, 90, 102, 81, 102, 86, 102, 209, 233, 232, 248, 253, 102, 133, 192, + 15, 132, 107, 250, 102, 94, 102, 89, 102, 3, 225, 7, 102, 95, 102, 89, +102, 139, 208, 102, 88, 102, 91, 102, 139, 218, 233, 245, 254, 6, 30, 102, + 96, 38, 103, 102, 15, 183, 95, 4, 38, 103, 102, 15, 183, 79, 6, 102, + 11, 201, 15, 132, 57, 250, 102, 3, 223, 102, 131, 195, 2, 102, 129, 199, +254, 1, 0, 0, 102, 73, 102, 11, 201, 15, 132, 23, 0, 38, 103, 139, + 3, 38, 103, 137, 7, 102, 131, 195, 2, 102, 129, 199, 0, 2, 0, 0, +102, 73, 235, 226, 102, 97, 144, 31, 7, 195, 6, 30, 102, 96, 102, 184, + 1, 0, 0, 0, 102, 163, 34, 2, 102, 161, 30, 2, 102, 3, 6, 102, + 2, 102, 163, 106, 2, 102, 3, 6, 102, 2, 102, 163, 78, 2, 102, 161, + 48, 0, 102, 15, 182, 30, 13, 0, 102, 247, 227, 102, 139, 30, 78, 2, +102, 137, 7, 102, 163, 17, 0, 131, 195, 4, 102, 161, 86, 2, 102, 137, + 7, 163, 22, 0, 131, 195, 4, 102, 137, 30, 78, 2, 102, 139, 30, 30, + 2, 30, 7, 232, 92, 249, 102, 139, 251, 232, 81, 255, 102, 161, 30, 2, 102, 187, 32, 0, 0, 0, 102, 185, 0, 0, 0, 0, 102, 186, 0, 0, - 0, 0, 232, 100, 253, 102, 11, 192, 15, 132, 87, 0, 102, 139, 216, 30, - 7, 102, 139, 62, 22, 2, 232, 249, 253, 102, 139, 30, 22, 2, 103, 102, -129, 59, 128, 0, 0, 0, 15, 132, 6, 0, 103, 3, 91, 4, 235, 238, -103, 102, 129, 59, 128, 0, 0, 0, 15, 133, 39, 0, 102, 83, 103, 102, -139, 67, 16, 102, 139, 62, 74, 2, 30, 7, 232, 9, 1, 102, 91, 102, -161, 82, 2, 102, 1, 6, 74, 2, 102, 255, 6, 30, 2, 103, 3, 91, - 4, 235, 205, 102, 97, 144, 31, 7, 195, 102, 139, 208, 102, 139, 14, 30, - 2, 102, 161, 26, 2, 102, 82, 102, 80, 102, 81, 102, 82, 102, 187, 128, + 0, 0, 232, 16, 253, 102, 11, 192, 15, 132, 25, 1, 102, 139, 216, 30, + 7, 102, 139, 62, 26, 2, 102, 51, 192, 232, 162, 253, 102, 139, 30, 26, + 2, 102, 129, 63, 128, 0, 0, 0, 15, 132, 235, 0, 3, 95, 4, 235, +240, 102, 83, 102, 139, 71, 16, 102, 247, 38, 86, 2, 102, 80, 102, 51, +210, 102, 15, 182, 30, 13, 0, 102, 247, 243, 102, 82, 232, 220, 0, 102, + 11, 192, 15, 132, 57, 249, 102, 139, 14, 86, 2, 102, 15, 182, 30, 13, + 0, 102, 247, 227, 102, 90, 102, 3, 194, 102, 139, 30, 78, 2, 102, 137, + 7, 131, 195, 4, 102, 15, 182, 6, 13, 0, 102, 43, 194, 102, 59, 193, + 15, 134, 3, 0, 102, 139, 193, 102, 137, 7, 102, 43, 200, 102, 90, 15, +132, 117, 0, 102, 3, 194, 102, 80, 102, 51, 210, 102, 15, 182, 30, 13, + 0, 102, 247, 243, 102, 81, 232, 130, 0, 102, 89, 102, 11, 192, 15, 132, +221, 248, 102, 15, 182, 30, 13, 0, 102, 247, 227, 102, 139, 30, 78, 2, +102, 139, 23, 131, 195, 4, 102, 3, 23, 102, 59, 208, 15, 133, 21, 0, +102, 15, 182, 6, 13, 0, 102, 59, 193, 15, 134, 3, 0, 102, 139, 193, +102, 1, 7, 235, 165, 131, 195, 4, 102, 137, 30, 78, 2, 102, 137, 7, +131, 195, 4, 102, 15, 182, 6, 13, 0, 102, 59, 193, 15, 134, 3, 0, +102, 139, 193, 102, 137, 7, 235, 130, 131, 195, 4, 102, 255, 6, 34, 2, +102, 137, 30, 78, 2, 102, 91, 3, 95, 4, 102, 129, 63, 128, 0, 0, + 0, 15, 132, 12, 255, 102, 97, 144, 31, 7, 195, 102, 139, 208, 102, 139, + 14, 34, 2, 102, 139, 54, 106, 2, 102, 3, 54, 102, 2, 102, 82, 102, + 81, 102, 82, 102, 139, 30, 106, 2, 102, 139, 62, 86, 2, 102, 139, 4, +102, 163, 17, 0, 131, 198, 4, 102, 139, 4, 163, 22, 0, 131, 198, 4, + 30, 7, 232, 221, 247, 102, 43, 248, 15, 132, 8, 0, 247, 38, 11, 0, + 3, 216, 235, 217, 102, 139, 62, 106, 2, 30, 7, 232, 191, 253, 102, 161, +106, 2, 102, 187, 128, 0, 0, 0, 102, 185, 0, 0, 0, 0, 102, 139, +209, 232, 129, 251, 102, 11, 192, 15, 132, 244, 247, 102, 139, 216, 102, 88, +102, 86, 232, 44, 1, 102, 94, 102, 11, 192, 15, 132, 5, 0, 102, 91, +102, 91, 195, 102, 89, 102, 90, 226, 132, 102, 51, 192, 195, 6, 30, 102, + 96, 102, 80, 102, 81, 102, 51, 210, 102, 15, 182, 30, 13, 0, 102, 247, +243, 102, 82, 102, 87, 232, 83, 255, 102, 95, 102, 11, 192, 15, 132, 174, +247, 102, 15, 182, 30, 13, 0, 102, 247, 227, 102, 90, 102, 3, 194, 102, +163, 17, 0, 102, 89, 102, 15, 182, 30, 13, 0, 102, 59, 203, 15, 142, + 19, 0, 137, 30, 22, 0, 102, 43, 203, 102, 88, 102, 3, 195, 102, 80, +102, 81, 235, 20, 144, 102, 88, 102, 3, 193, 102, 80, 137, 14, 22, 0, +102, 185, 0, 0, 0, 0, 102, 81, 6, 102, 87, 139, 223, 131, 227, 15, +140, 192, 102, 193, 239, 4, 3, 199, 80, 7, 232, 5, 247, 102, 95, 7, +102, 3, 62, 82, 2, 102, 89, 102, 88, 102, 131, 249, 0, 15, 143, 112, +255, 102, 97, 144, 31, 7, 195, 6, 30, 102, 96, 102, 247, 38, 86, 2, +102, 139, 14, 86, 2, 232, 85, 255, 232, 210, 252, 102, 97, 144, 31, 7, +195, 6, 30, 102, 96, 102, 247, 38, 114, 2, 102, 139, 30, 54, 2, 102, +139, 14, 114, 2, 102, 139, 54, 42, 2, 30, 7, 102, 139, 62, 70, 2, +232, 129, 251, 232, 167, 252, 102, 97, 144, 31, 7, 195, 102, 80, 102, 83, +102, 81, 102, 139, 30, 74, 2, 102, 139, 200, 102, 193, 232, 3, 102, 131, +225, 7, 102, 3, 216, 102, 184, 1, 0, 0, 0, 102, 211, 224, 103, 132, + 3, 15, 132, 4, 0, 248, 235, 2, 144, 249, 102, 89, 102, 91, 102, 88, +195, 103, 128, 123, 8, 1, 15, 132, 4, 0, 102, 43, 192, 195, 103, 102, +141, 115, 16, 103, 102, 139, 86, 8, 102, 59, 194, 15, 135, 11, 0, 103, +102, 139, 22, 102, 59, 194, 15, 131, 4, 0, 102, 43, 192, 195, 103, 3, + 94, 16, 102, 43, 246, 103, 128, 59, 0, 15, 132, 62, 0, 232, 129, 0, +102, 3, 241, 232, 57, 0, 102, 3, 202, 102, 59, 193, 15, 140, 33, 0, +102, 139, 209, 102, 80, 103, 102, 15, 182, 11, 102, 139, 193, 102, 131, 224, + 15, 102, 193, 233, 4, 102, 3, 217, 102, 3, 216, 102, 67, 102, 88, 235, +196, 102, 43, 200, 102, 43, 194, 102, 3, 198, 195, 102, 43, 192, 195, 102, + 43, 201, 103, 138, 11, 128, 225, 15, 102, 131, 249, 0, 15, 133, 4, 0, +102, 43, 201, 195, 102, 83, 102, 82, 102, 3, 217, 103, 102, 15, 190, 19, +102, 73, 102, 75, 102, 131, 249, 0, 15, 132, 13, 0, 102, 193, 226, 8, +103, 138, 19, 102, 75, 102, 73, 235, 235, 102, 139, 202, 102, 90, 102, 91, +195, 102, 83, 102, 82, 102, 43, 210, 103, 138, 19, 102, 131, 226, 15, 102, + 43, 201, 103, 138, 11, 192, 233, 4, 102, 131, 249, 0, 15, 133, 8, 0, +102, 43, 201, 102, 90, 102, 91, 195, 102, 3, 218, 102, 3, 217, 103, 102, + 15, 190, 19, 102, 73, 102, 75, 102, 131, 249, 0, 15, 132, 13, 0, 102, +193, 226, 8, 103, 138, 19, 102, 75, 102, 73, 235, 235, 102, 139, 202, 102, + 90, 102, 91, 195, 102, 11, 201, 15, 133, 1, 0, 195, 102, 81, 102, 86, +103, 131, 62, 97, 15, 140, 12, 0, 103, 131, 62, 122, 15, 143, 4, 0, +103, 131, 46, 32, 102, 131, 198, 2, 226, 230, 102, 94, 102, 89, 195, 102, + 80, 102, 81, 102, 139, 208, 102, 161, 50, 2, 103, 102, 141, 88, 16, 103, + 3, 67, 4, 103, 102, 141, 64, 16, 102, 139, 218, 232, 68, 249, 102, 11, +192, 15, 132, 5, 0, 102, 89, 102, 89, 195, 102, 161, 54, 2, 102, 11, +192, 15, 133, 8, 0, 102, 89, 102, 89, 102, 51, 192, 195, 102, 139, 22, + 54, 2, 103, 102, 141, 82, 16, 103, 102, 139, 66, 24, 102, 51, 210, 102, +247, 54, 110, 2, 102, 51, 246, 102, 80, 102, 86, 102, 88, 102, 94, 102, + 59, 198, 15, 132, 58, 0, 102, 86, 102, 64, 102, 80, 102, 72, 232, 27, +254, 114, 232, 232, 235, 253, 102, 90, 102, 94, 102, 89, 102, 91, 102, 83, +102, 81, 102, 86, 102, 82, 102, 161, 70, 2, 103, 102, 141, 64, 24, 232, +208, 248, 102, 11, 192, 116, 196, 102, 89, 102, 89, 102, 89, 102, 89, 195, +102, 89, 102, 89, 102, 51, 192, 195, 102, 81, 102, 80, 102, 184, 5, 0, + 0, 0, 30, 7, 102, 139, 249, 232, 141, 253, 102, 139, 193, 102, 187, 32, 0, 0, 0, 102, 185, 0, 0, 0, 0, 102, 186, 0, 0, 0, 0, 232, -215, 252, 102, 11, 192, 15, 132, 64, 249, 102, 139, 216, 102, 88, 232, 42, - 1, 102, 11, 192, 15, 132, 7, 0, 102, 91, 102, 91, 102, 91, 195, 102, - 89, 102, 88, 102, 90, 102, 3, 6, 82, 2, 226, 185, 102, 51, 192, 195, - 6, 30, 102, 96, 102, 80, 102, 81, 102, 51, 210, 102, 15, 182, 30, 13, - 0, 102, 247, 243, 102, 82, 232, 144, 255, 102, 11, 192, 15, 132, 249, 248, -102, 15, 182, 30, 13, 0, 102, 247, 227, 102, 90, 102, 3, 194, 102, 163, - 84, 0, 102, 89, 102, 15, 182, 30, 13, 0, 102, 59, 203, 15, 142, 19, - 0, 137, 30, 91, 0, 102, 43, 203, 102, 88, 102, 3, 195, 102, 80, 102, - 81, 235, 20, 144, 102, 88, 102, 3, 193, 102, 80, 137, 14, 91, 0, 102, -185, 0, 0, 0, 0, 102, 81, 6, 102, 87, 139, 223, 131, 227, 15, 140, -192, 102, 193, 239, 4, 3, 199, 80, 7, 232, 155, 251, 102, 95, 7, 102, - 3, 62, 78, 2, 102, 89, 102, 88, 102, 131, 249, 0, 15, 143, 116, 255, -102, 97, 144, 31, 7, 195, 6, 30, 102, 96, 102, 247, 38, 86, 2, 102, -139, 14, 86, 2, 232, 89, 255, 232, 241, 253, 102, 97, 144, 31, 7, 195, - 6, 30, 102, 96, 102, 247, 38, 98, 2, 102, 139, 30, 50, 2, 102, 139, - 14, 98, 2, 30, 7, 102, 139, 62, 66, 2, 232, 35, 253, 232, 203, 253, -102, 97, 144, 31, 7, 195, 102, 80, 102, 83, 102, 81, 102, 139, 30, 70, - 2, 102, 139, 200, 102, 193, 232, 3, 102, 131, 225, 7, 102, 3, 216, 102, -184, 1, 0, 0, 0, 102, 211, 224, 103, 132, 3, 15, 132, 4, 0, 248, -235, 2, 144, 249, 102, 89, 102, 91, 102, 88, 195, 103, 128, 123, 8, 1, - 15, 132, 4, 0, 102, 43, 192, 195, 103, 102, 141, 115, 16, 103, 102, 139, - 86, 8, 102, 59, 194, 15, 135, 11, 0, 103, 102, 139, 22, 102, 59, 194, - 15, 131, 4, 0, 102, 43, 192, 195, 103, 3, 94, 16, 102, 43, 246, 103, -128, 59, 0, 15, 132, 62, 0, 232, 129, 0, 102, 3, 241, 232, 57, 0, -102, 3, 202, 102, 59, 193, 15, 140, 33, 0, 102, 139, 209, 102, 80, 103, -102, 15, 182, 11, 102, 139, 193, 102, 131, 224, 15, 102, 193, 233, 4, 102, - 3, 217, 102, 3, 216, 102, 67, 102, 88, 235, 196, 102, 43, 200, 102, 43, -194, 102, 3, 198, 195, 102, 43, 192, 195, 102, 43, 201, 103, 138, 11, 128, -225, 15, 102, 131, 249, 0, 15, 133, 4, 0, 102, 43, 201, 195, 102, 83, -102, 82, 102, 3, 217, 103, 102, 15, 190, 19, 102, 73, 102, 75, 102, 131, -249, 0, 15, 132, 13, 0, 102, 193, 226, 8, 103, 138, 19, 102, 75, 102, - 73, 235, 235, 102, 139, 202, 102, 90, 102, 91, 195, 102, 83, 102, 82, 102, - 43, 210, 103, 138, 19, 102, 131, 226, 15, 102, 43, 201, 103, 138, 11, 192, -233, 4, 102, 131, 249, 0, 15, 133, 8, 0, 102, 43, 201, 102, 90, 102, - 91, 195, 102, 3, 218, 102, 3, 217, 103, 102, 15, 190, 19, 102, 73, 102, - 75, 102, 131, 249, 0, 15, 132, 13, 0, 102, 193, 226, 8, 103, 138, 19, -102, 75, 102, 73, 235, 235, 102, 139, 202, 102, 90, 102, 91, 195, 102, 11, -201, 15, 133, 1, 0, 195, 102, 81, 102, 86, 103, 131, 62, 97, 15, 140, - 12, 0, 103, 131, 62, 122, 15, 143, 4, 0, 103, 131, 46, 32, 102, 131, -198, 2, 226, 230, 102, 94, 102, 89, 195, 102, 80, 102, 81, 102, 139, 208, -102, 161, 46, 2, 103, 102, 141, 88, 16, 103, 3, 67, 4, 103, 102, 141, - 64, 16, 102, 139, 218, 232, 158, 250, 102, 11, 192, 15, 132, 5, 0, 102, - 89, 102, 89, 195, 102, 161, 50, 2, 102, 11, 192, 15, 133, 8, 0, 102, - 89, 102, 89, 102, 51, 192, 195, 102, 139, 22, 50, 2, 103, 102, 141, 82, - 16, 103, 102, 139, 66, 8, 102, 64, 102, 139, 30, 78, 2, 102, 247, 227, -102, 51, 210, 102, 247, 54, 90, 2, 102, 80, 102, 88, 102, 11, 192, 15, -132, 48, 0, 102, 72, 102, 80, 232, 28, 254, 114, 238, 232, 241, 253, 102, - 90, 102, 89, 102, 91, 102, 83, 102, 81, 102, 82, 102, 161, 66, 2, 103, -102, 141, 64, 24, 232, 47, 250, 102, 11, 192, 116, 206, 102, 89, 102, 89, -102, 89, 195, 102, 89, 102, 89, 102, 51, 192, 195, 6, 30, 102, 96, 102, -139, 54, 66, 2, 102, 185, 32, 0, 0, 0, 102, 247, 193, 3, 0, 0, - 0, 15, 133, 3, 0, 232, 13, 0, 102, 173, 232, 105, 0, 226, 235, 102, - 97, 144, 31, 7, 195, 6, 30, 102, 96, 102, 51, 192, 102, 51, 219, 176, - 13, 180, 14, 187, 7, 0, 205, 16, 176, 10, 180, 14, 187, 7, 0, 205, - 16, 102, 97, 144, 31, 7, 195, 6, 30, 102, 96, 102, 11, 201, 15, 133, - 9, 0, 232, 208, 255, 102, 97, 144, 31, 7, 195, 102, 51, 192, 102, 51, -219, 173, 180, 14, 187, 7, 0, 205, 16, 226, 240, 232, 183, 255, 102, 97, -144, 31, 7, 195, 96, 172, 60, 0, 116, 9, 180, 14, 187, 7, 0, 205, - 16, 235, 242, 97, 144, 195, 6, 30, 102, 96, 102, 185, 8, 0, 0, 0, -102, 139, 208, 102, 131, 226, 15, 102, 82, 102, 193, 232, 4, 226, 241, 102, -185, 8, 0, 0, 0, 102, 88, 102, 131, 248, 9, 15, 143, 7, 0, 102, -131, 192, 48, 235, 9, 144, 102, 131, 232, 10, 102, 131, 192, 65, 102, 51, -219, 180, 14, 187, 7, 0, 205, 16, 226, 219, 176, 32, 180, 14, 187, 7, - 0, 205, 16, 102, 97, 144, 31, 7, 232, 96, 0, 195, 6, 30, 102, 96, -102, 190, 22, 13, 0, 0, 232, 79, 245, 102, 97, 144, 31, 7, 195, 6, - 30, 102, 96, 102, 190, 38, 13, 0, 0, 232, 60, 245, 102, 97, 144, 31, - 7, 195, 6, 30, 102, 96, 102, 190, 54, 13, 0, 0, 232, 41, 245, 102, - 97, 144, 31, 7, 195, 6, 30, 102, 96, 102, 190, 70, 13, 0, 0, 232, - 22, 245, 102, 97, 144, 31, 7, 195, 6, 30, 102, 96, 102, 190, 86, 13, - 0, 0, 232, 3, 245, 102, 97, 144, 31, 7, 195, 102, 80, 102, 184, 0, - 0, 245, 255, 102, 64, 102, 11, 192, 117, 249, 102, 88, 195, 102, 81, 102, - 80, 102, 184, 5, 0, 0, 0, 30, 7, 102, 139, 249, 232, 71, 252, 102, -139, 193, 102, 91, 102, 83, 102, 15, 183, 14, 12, 2, 102, 186, 14, 2, - 0, 0, 232, 68, 248, 102, 91, 102, 89, 102, 11, 192, 15, 133, 47, 0, -102, 139, 193, 102, 139, 203, 102, 80, 102, 83, 232, 35, 0, 102, 91, 102, - 95, 102, 11, 192, 15, 132, 23, 0, 30, 7, 232, 9, 252, 102, 139, 199, -102, 15, 183, 14, 12, 2, 102, 186, 14, 2, 0, 0, 232, 10, 248, 195, -102, 81, 102, 187, 32, 0, 0, 0, 102, 185, 0, 0, 0, 0, 102, 186, - 0, 0, 0, 0, 232, 242, 247, 102, 11, 192, 15, 132, 82, 0, 102, 139, -216, 30, 7, 102, 139, 62, 22, 2, 232, 135, 248, 30, 7, 102, 139, 30, - 22, 2, 102, 89, 38, 102, 57, 15, 15, 132, 46, 0, 38, 102, 131, 63, -255, 15, 132, 45, 0, 38, 131, 127, 4, 0, 15, 132, 36, 0, 38, 102, - 15, 183, 71, 4, 3, 216, 139, 195, 37, 0, 128, 116, 215, 140, 192, 5, - 0, 8, 142, 192, 129, 227, 255, 127, 235, 202, 38, 102, 139, 71, 16, 195, -102, 89, 102, 51, 192, 195, 68, 101, 98, 117, 103, 32, 80, 111, 105, 110, -116, 32, 48, 13, 10, 0, 68, 101, 98, 117, 103, 32, 80, 111, 105, 110, -116, 32, 49, 13, 10, 0, 68, 101, 98, 117, 103, 32, 80, 111, 105, 110, -116, 32, 50, 13, 10, 0, 68, 101, 98, 117, 103, 32, 80, 111, 105, 110, -116, 32, 51, 13, 10, 0, 68, 101, 98, 117, 103, 32, 80, 111, 105, 110, -116, 32, 52, 13, 10 + 51, 248, 102, 91, 102, 89, 102, 133, 192, 15, 133, 21, 0, 102, 139, 193, +102, 15, 183, 14, 16, 2, 102, 186, 18, 2, 0, 0, 232, 22, 248, 235, + 51, 144, 102, 51, 210, 102, 139, 193, 102, 139, 203, 102, 80, 102, 83, 232, + 35, 0, 102, 91, 102, 95, 102, 11, 192, 15, 132, 23, 0, 30, 7, 232, + 53, 253, 102, 139, 199, 102, 15, 183, 14, 16, 2, 102, 186, 18, 2, 0, + 0, 232, 225, 247, 195, 102, 82, 102, 81, 102, 187, 32, 0, 0, 0, 102, +185, 0, 0, 0, 0, 102, 186, 0, 0, 0, 0, 232, 199, 247, 102, 11, +192, 15, 132, 99, 0, 102, 139, 216, 30, 7, 102, 139, 62, 26, 2, 102, + 51, 192, 232, 89, 248, 30, 7, 102, 139, 30, 26, 2, 102, 89, 102, 90, + 38, 102, 57, 15, 15, 133, 12, 0, 38, 102, 57, 87, 8, 15, 132, 49, + 0, 235, 19, 144, 38, 102, 131, 63, 255, 15, 132, 47, 0, 38, 131, 127, + 4, 0, 15, 132, 38, 0, 38, 102, 15, 183, 71, 4, 3, 216, 139, 195, + 37, 0, 128, 116, 203, 140, 192, 5, 0, 8, 142, 192, 129, 227, 255, 127, +235, 190, 38, 102, 139, 71, 16, 195, 102, 89, 102, 90, 102, 51, 192, 195, +102, 80, 102, 81, 102, 139, 199, 102, 193, 232, 4, 6, 89, 3, 200, 81, + 7, 102, 131, 231, 15, 102, 89, 102, 88, 195, 96, 6, 190, 189, 13, 191, + 0, 32, 30, 7, 185, 13, 0, 144, 243, 165, 7, 97, 195, 1, 35, 69, +103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16, 240, 225, 210, +195, 0, 0, 0, 0, 32, 32, 96, 139, 54, 24, 32, 38, 138, 5, 136, + 4, 71, 70, 102, 255, 6, 20, 32, 129, 254, 96, 32, 117, 6, 232, 91, + 0, 190, 32, 32, 226, 230, 137, 54, 24, 32, 97, 195, 102, 96, 139, 54, + 24, 32, 176, 128, 136, 4, 70, 50, 192, 129, 254, 96, 32, 117, 6, 232, + 58, 0, 190, 32, 32, 129, 254, 88, 32, 117, 233, 102, 51, 192, 102, 163, + 88, 32, 102, 161, 20, 32, 102, 193, 224, 3, 102, 15, 200, 102, 163, 92, + 32, 232, 24, 0, 187, 0, 32, 102, 139, 7, 102, 15, 200, 102, 137, 7, +131, 195, 4, 129, 251, 52, 32, 117, 238, 102, 97, 195, 102, 96, 187, 32, + 32, 102, 139, 7, 102, 15, 200, 102, 137, 7, 131, 195, 4, 129, 251, 96, + 32, 117, 238, 187, 0, 32, 102, 139, 15, 102, 139, 87, 4, 102, 139, 119, + 8, 102, 139, 127, 12, 102, 139, 111, 16, 187, 32, 32, 199, 6, 26, 32, + 48, 15, 198, 6, 28, 32, 20, 144, 83, 139, 30, 26, 32, 255, 23, 102, + 3, 71, 2, 91, 102, 3, 232, 102, 3, 47, 102, 139, 193, 102, 193, 192, + 5, 102, 3, 197, 102, 139, 239, 102, 139, 254, 102, 139, 242, 102, 193, 198, + 30, 102, 139, 209, 102, 139, 200, 102, 139, 7, 102, 51, 71, 8, 102, 51, + 71, 32, 102, 51, 71, 52, 102, 209, 192, 102, 137, 71, 64, 131, 195, 4, +254, 14, 28, 32, 117, 178, 131, 6, 26, 32, 6, 129, 62, 26, 32, 72, + 15, 117, 159, 187, 0, 32, 102, 1, 15, 102, 1, 87, 4, 102, 1, 119, + 8, 102, 1, 127, 12, 102, 1, 111, 16, 102, 97, 195, 102, 139, 198, 102, + 51, 199, 102, 35, 194, 102, 51, 199, 195, 102, 139, 194, 102, 51, 198, 102, + 51, 199, 195, 102, 83, 102, 139, 194, 102, 35, 198, 102, 139, 218, 102, 35, +223, 102, 11, 195, 102, 139, 222, 102, 35, 223, 102, 11, 195, 102, 91, 195, +252, 14, 153, 121, 130, 90, 9, 15, 161, 235, 217, 110, 19, 15, 220, 188, + 27, 143, 9, 15, 214, 193, 98, 202, 6, 30, 102, 96, 102, 51, 219, 184, + 0, 187, 205, 26, 102, 35, 192, 15, 133, 187, 0, 102, 129, 251, 84, 67, + 80, 65, 15, 133, 176, 0, 129, 249, 2, 1, 15, 130, 168, 0, 102, 97, +144, 31, 7, 6, 30, 102, 96, 103, 128, 123, 8, 0, 15, 133, 12, 0, +103, 102, 141, 83, 16, 103, 102, 139, 10, 235, 37, 144, 103, 102, 141, 83, + 16, 103, 102, 139, 74, 40, 102, 129, 249, 0, 0, 8, 0, 15, 131, 12, + 0, 103, 102, 139, 66, 44, 102, 35, 192, 15, 132, 3, 0, 102, 51, 201, + 14, 31, 232, 245, 253, 102, 35, 201, 15, 132, 50, 0, 102, 186, 0, 128, + 0, 0, 102, 59, 202, 15, 134, 31, 0, 102, 43, 202, 6, 102, 81, 102, + 87, 102, 82, 102, 139, 202, 232, 183, 253, 232, 251, 253, 102, 90, 102, 95, +102, 89, 7, 102, 3, 250, 235, 218, 232, 165, 253, 232, 233, 253, 232, 11, +254, 14, 7, 102, 187, 84, 67, 80, 65, 102, 191, 0, 32, 0, 0, 102, +185, 20, 0, 0, 0, 102, 184, 7, 187, 0, 0, 102, 186, 10, 0, 0, + 0, 102, 51, 246, 205, 26, 102, 97, 144, 31, 7, 195, 160, 249, 1, 233, + 64, 241, 160, 250, 1, 233, 58, 241 }; - Index: boot.h =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/boot.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -r1.1 -r1.2 --- boot.h 21 Oct 2005 18:08:28 -0000 1.1 +++ boot.h 6 Mar 2007 15:44:31 -0000 1.2 @@ -1,7 +1,7 @@ #ifndef _NTFS_BOOT_H_ #define _NTFS_BOOT_H_ -extern const unsigned char boot_array[3429]; +extern const unsigned char boot_array[4136]; #endif /* _NTFS_BOOT_H_ */ |
From: Anton A. <ai...@de...> - 2007-03-06 15:45:03
|
Changes by: aia21 Update of /cvs/linux-ntfs/ntfsprogs In directory delta357:/tmp/cvs-serv18577 Modified Files: ChangeLog Log Message: - mkntfs: Use Vista $Boot rather than XP one. (Anton) Index: ChangeLog =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ChangeLog,v retrieving revision 1.437 retrieving revision 1.438 diff -u -p -r1.437 -r1.438 --- ChangeLog 7 Jan 2007 19:19:53 -0000 1.437 +++ ChangeLog 6 Mar 2007 15:44:30 -0000 1.438 @@ -130,6 +130,7 @@ xx/01/2007 - 2.0.0 - ntfsmount sports fu introduce new "case_insensitive" option to support both case sensitive and insensitive mounts. (Yura) - ntfsmount: st_block calculation was wrong. (Yuval) + - mkntfs: Use Vista $Boot rather than XP one. (Anton) 21/06/2006 - 1.13.1 - Various fixes. |
From: Yura P. <yu...@de...> - 2007-01-07 19:21:42
|
Changes by: yura Update of /cvs/linux-ntfs/ntfsprogs In directory delta357:/tmp/cvs-serv11844 Modified Files: ChangeLog Log Message: minor style fix and changelog description Index: ChangeLog =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ChangeLog,v retrieving revision 1.436 retrieving revision 1.437 diff -u -p -r1.436 -r1.437 --- ChangeLog 7 Jan 2007 19:08:22 -0000 1.436 +++ ChangeLog 7 Jan 2007 19:19:53 -0000 1.437 @@ -129,7 +129,7 @@ xx/01/2007 - 2.0.0 - ntfsmount sports fu - ntfsmount: Remove "show_sys_files" as potential harmful and introduce new "case_insensitive" option to support both case sensitive and insensitive mounts. (Yura) - - ntfsmount: st_block calculation was wrong for resident files. (Yuval) + - ntfsmount: st_block calculation was wrong. (Yuval) 21/06/2006 - 1.13.1 - Various fixes. |
From: Yura P. <yu...@de...> - 2007-01-07 19:20:06
|
Changes by: yura Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs In directory delta357:/tmp/cvs-serv11844/ntfsprogs Modified Files: ntfsmount.c Log Message: minor style fix and changelog description Index: ntfsmount.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsmount.c,v retrieving revision 1.109 retrieving revision 1.110 diff -u -p -r1.109 -r1.110 --- ntfsmount.c 7 Jan 2007 19:08:22 -0000 1.109 +++ ntfsmount.c 7 Jan 2007 19:19:53 -0000 1.110 @@ -375,7 +375,7 @@ static int ntfs_fuse_getattr(const char na = ntfs_attr_open(ni, AT_INDEX_ALLOCATION, NTFS_INDEX_I30, 4); if (na) { stbuf->st_size = na->data_size; - stbuf->st_blocks = (na->allocated_size+511) >> 9; + stbuf->st_blocks = (na->allocated_size + 511) >> 9; ntfs_attr_close(na); } else { stbuf->st_size = 0; @@ -386,7 +386,7 @@ static int ntfs_fuse_getattr(const char /* Regular or Interix (INTX) file. */ stbuf->st_mode = S_IFREG; stbuf->st_size = ni->data_size; - stbuf->st_blocks = (ni->allocated_size+511) >> 9; + stbuf->st_blocks = (ni->allocated_size + 511) >> 9; stbuf->st_nlink = le16_to_cpu(ni->mrec->link_count); if (ni->flags & FILE_ATTR_SYSTEM || stream_name_len) { na = ntfs_attr_open(ni, AT_DATA, stream_name, @@ -398,8 +398,8 @@ static int ntfs_fuse_getattr(const char } if (stream_name_len) { stbuf->st_size = na->data_size; - stbuf->st_blocks = (ni->allocated_size+511) >> - 9; + stbuf->st_blocks = + (ni->allocated_size + 511) >> 9; } /* Check whether it's Interix FIFO or socket. */ if (!(ni->flags & FILE_ATTR_HIDDEN) && |
From: Yuval <uv...@de...> - 2007-01-07 19:08:35
|
Changes by: uvman Update of /cvs/linux-ntfs/ntfsprogs In directory delta357:/tmp/cvs-serv10012 Modified Files: ChangeLog Log Message: ni->allocated_size for resident files is rounded up to multiples of 8. A '>> 9' on such value may round up or down. Fix it to always round up. Samba 3 use st_blocks to detect if a file is sparse. ActiveSync 4 fails on sparse files. Index: ChangeLog =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ChangeLog,v retrieving revision 1.435 retrieving revision 1.436 diff -u -p -r1.435 -r1.436 --- ChangeLog 3 Jan 2007 18:27:10 -0000 1.435 +++ ChangeLog 7 Jan 2007 19:08:22 -0000 1.436 @@ -129,6 +129,7 @@ xx/01/2007 - 2.0.0 - ntfsmount sports fu - ntfsmount: Remove "show_sys_files" as potential harmful and introduce new "case_insensitive" option to support both case sensitive and insensitive mounts. (Yura) + - ntfsmount: st_block calculation was wrong for resident files. (Yuval) 21/06/2006 - 1.13.1 - Various fixes. |
From: Yuval <uv...@de...> - 2007-01-07 19:08:34
|
Changes by: uvman Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs In directory delta357:/tmp/cvs-serv10012/ntfsprogs Modified Files: ntfsmount.c Log Message: ni->allocated_size for resident files is rounded up to multiples of 8. A '>> 9' on such value may round up or down. Fix it to always round up. Samba 3 use st_blocks to detect if a file is sparse. ActiveSync 4 fails on sparse files. Index: ntfsmount.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsmount.c,v retrieving revision 1.108 retrieving revision 1.109 diff -u -p -r1.108 -r1.109 --- ntfsmount.c 3 Jan 2007 18:27:11 -0000 1.108 +++ ntfsmount.c 7 Jan 2007 19:08:22 -0000 1.109 @@ -375,7 +375,7 @@ static int ntfs_fuse_getattr(const char na = ntfs_attr_open(ni, AT_INDEX_ALLOCATION, NTFS_INDEX_I30, 4); if (na) { stbuf->st_size = na->data_size; - stbuf->st_blocks = na->allocated_size >> 9; + stbuf->st_blocks = (na->allocated_size+511) >> 9; ntfs_attr_close(na); } else { stbuf->st_size = 0; @@ -386,7 +386,7 @@ static int ntfs_fuse_getattr(const char /* Regular or Interix (INTX) file. */ stbuf->st_mode = S_IFREG; stbuf->st_size = ni->data_size; - stbuf->st_blocks = ni->allocated_size >> 9; + stbuf->st_blocks = (ni->allocated_size+511) >> 9; stbuf->st_nlink = le16_to_cpu(ni->mrec->link_count); if (ni->flags & FILE_ATTR_SYSTEM || stream_name_len) { na = ntfs_attr_open(ni, AT_DATA, stream_name, @@ -398,7 +398,8 @@ static int ntfs_fuse_getattr(const char } if (stream_name_len) { stbuf->st_size = na->data_size; - stbuf->st_blocks = ni->allocated_size >> 9; + stbuf->st_blocks = (ni->allocated_size+511) >> + 9; } /* Check whether it's Interix FIFO or socket. */ if (!(ni->flags & FILE_ATTR_HIDDEN) && |
From: Yura P. <yu...@de...> - 2007-01-03 18:27:23
|
Changes by: yura Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs In directory delta357:/tmp/cvs-serv29988/ntfsprogs Modified Files: ntfsmount.c Log Message: - upgrade to new shiny fuse option parsing API instead of my old hackish one (more readable and -4kb code) - remove show_sys_files and add case_insensitive options Index: ntfsmount.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsmount.c,v retrieving revision 1.107 retrieving revision 1.108 diff -u -p -r1.107 -r1.108 --- ntfsmount.c 18 Dec 2006 13:32:58 -0000 1.107 +++ ntfsmount.c 3 Jan 2007 18:27:11 -0000 1.108 @@ -1,10 +1,11 @@ /** * ntfsmount - Part of the Linux-NTFS project. * - * Copyright (c) 2005-2006 Yura Pakhuchiy - * Copyright (c) 2005 Yuval Fledel + * Copyright (c) 2005-2007 Yura Pakhuchiy + * Copyright (c) 2005 Yuval Fledel + * Copyright (c) 2006 Szabolcs Szakacsits * - * Userspace NTFS driver. + * Userspace read/write NTFS driver. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -86,6 +87,9 @@ typedef enum { typedef struct { ntfs_volume *vol; + char *mnt_point; + char *device; + char *locale; int state; long free_clusters; long free_mft; @@ -95,12 +99,14 @@ typedef struct { unsigned int dmask; ntfs_fuse_streams_interface streams; BOOL ro; - BOOL show_sys_files; BOOL silent; BOOL force; BOOL debug; - BOOL noatime; BOOL no_detach; + BOOL quiet; + BOOL verbose; + BOOL no_def_opts; + BOOL case_insensitive; } ntfs_fuse_context_t; typedef enum { @@ -110,18 +116,61 @@ typedef enum { free MFT records is outdated. */ } ntfs_fuse_state_bits; -static struct options { - char *mnt_point; /* Mount point */ - char *options; /* Mount options */ - char *device; /* Device to mount */ - int quiet; /* Less output */ - int verbose; /* Extra output */ -} opts; +#define NTFS_FUSE_OPT(t, p) { t, offsetof(ntfs_fuse_context_t, p), TRUE } +#define NTFS_FUSE_OPT_NEG(t, p) { t, offsetof(ntfs_fuse_context_t, p), FALSE } +#define NTFS_FUSE_OPT_VAL(t, p, v) { t, offsetof(ntfs_fuse_context_t, p), v } + +enum { + NF_KEY_HELP, + NF_KEY_UMASK, +}; + +static const struct fuse_opt ntfs_fuse_opts[] = { + NTFS_FUSE_OPT("-v", verbose), + NTFS_FUSE_OPT("--verbose", verbose), + NTFS_FUSE_OPT("-q", quiet), + NTFS_FUSE_OPT("--quiet", quiet), + NTFS_FUSE_OPT("force", force), + NTFS_FUSE_OPT("silent", silent), + NTFS_FUSE_OPT("ro", ro), + NTFS_FUSE_OPT("fake_rw", ro), + NTFS_FUSE_OPT("debug", debug), + NTFS_FUSE_OPT("no_detach", no_detach), + NTFS_FUSE_OPT("no_def_opts", no_def_opts), + NTFS_FUSE_OPT("case_insensitive", case_insensitive), + NTFS_FUSE_OPT("fmask=%o", fmask), + NTFS_FUSE_OPT("dmask=%o", dmask), + NTFS_FUSE_OPT("umask=%o", fmask), + NTFS_FUSE_OPT("uid=%d", uid), + NTFS_FUSE_OPT("gid=%d", gid), + NTFS_FUSE_OPT("locale=%s", locale), + NTFS_FUSE_OPT_NEG("nosilent", silent), + NTFS_FUSE_OPT_NEG("rw", ro), + NTFS_FUSE_OPT_VAL("streams_interface=none", streams, + NF_STREAMS_INTERFACE_NONE), + NTFS_FUSE_OPT_VAL("streams_interface=windows", streams, + NF_STREAMS_INTERFACE_WINDOWS), + NTFS_FUSE_OPT_VAL("streams_interface=xattr", streams, + NF_STREAMS_INTERFACE_XATTR), + FUSE_OPT_KEY("-h", NF_KEY_HELP), + FUSE_OPT_KEY("-?", NF_KEY_HELP), + FUSE_OPT_KEY("--help", NF_KEY_HELP), + FUSE_OPT_KEY("umask=", NF_KEY_UMASK), + FUSE_OPT_KEY("noauto", FUSE_OPT_KEY_DISCARD), + FUSE_OPT_KEY("fsname=", FUSE_OPT_KEY_DISCARD), + FUSE_OPT_KEY("ro", FUSE_OPT_KEY_KEEP), + FUSE_OPT_KEY("rw", FUSE_OPT_KEY_KEEP), + FUSE_OPT_END +}; static const char *EXEC_NAME = "ntfsmount"; -static char def_opts[] = "default_permissions,allow_other,"; +static char ntfs_fuse_default_options[] = + "default_permissions,allow_other,use_ino,kernel_cache"; static ntfs_fuse_context_t *ctx; +/** + * ntfs_fuse_mark_free_space_outdated - forces free space recalculation + */ static __inline__ void ntfs_fuse_mark_free_space_outdated(void) { /* Mark information about free MFT record and clusters outdated. */ @@ -522,8 +571,7 @@ static int ntfs_fuse_filler(ntfs_fuse_fi free(filename); return 0; } - if (MREF(mref) == FILE_root || MREF(mref) >= FILE_first_user || - ctx->show_sys_files) + if (MREF(mref) == FILE_root || MREF(mref) >= FILE_first_user) fill_ctx->filler(fill_ctx->buf, filename, NULL, 0); free(filename); return 0; @@ -1390,13 +1438,15 @@ exit: static void ntfs_fuse_destroy(void *priv __attribute__((unused))) { if (ctx->vol) { - ntfs_log_info("Unmounting %s (%s)\n", opts.device, + ntfs_log_info("Unmounting %s (%s)\n", ctx->device, ctx->vol->vol_name); if (ntfs_umount(ctx->vol, FALSE)) ntfs_log_perror("Failed to unmount volume"); } + free(ctx->device); + free(ctx->mnt_point); + free(ctx->locale); free(ctx); - free(opts.device); } static struct fuse_operations ntfs_fuse_oper = { @@ -1427,247 +1477,23 @@ static struct fuse_operations ntfs_fuse_ #endif /* HAVE_SETXATTR */ }; -static int ntfs_fuse_init(void) -{ - ctx = ntfs_malloc(sizeof(ntfs_fuse_context_t)); - if (!ctx) - return -1; - - *ctx = (ntfs_fuse_context_t) { - .state = NF_FreeClustersOutdate | NF_FreeMFTOutdate, - .uid = geteuid(), - .gid = getegid(), - .fmask = 0111, - .dmask = 0, - .streams = NF_STREAMS_INTERFACE_NONE, - }; - return 0; -} - -static int ntfs_fuse_mount(const char *device) -{ - ntfs_volume *vol; - - vol = utils_mount_volume(device, ((ctx->ro) ? NTFS_MNT_RDONLY : 0) | - ((ctx->noatime) ? NTFS_MNT_NOATIME : 0) | - NTFS_MNT_NOT_EXCLUSIVE /*| NTFS_MNT_CASE_SENSITIVE*/, - ctx->force); - if (!vol) { - ntfs_log_error("Mount failed.\n"); - return -1; - } - ctx->vol = vol; - return 0; -} - static void signal_handler(int arg __attribute__((unused))) { fuse_exit((fuse_get_context())->fuse); } -static char *parse_mount_options(const char *org_options) -{ - char *options, *s, *opt, *val, *ret; - BOOL no_def_opts = FALSE; - - /* - * +7 for "fsname=". - * +1 for comma. - * +1 for null-terminator. - * +PATH_MAX for resolved by realpath() device name. - */ - ret = ntfs_malloc(strlen(def_opts) + strlen(org_options) + PATH_MAX + - 9); - if (!ret) - return NULL; - - *ret = 0; - options = strdup(org_options); - if (!options) { - ntfs_log_perror("strdup failed"); - return NULL; - } - s = options; - while ((val = strsep(&s, ","))) { - opt = strsep(&val, "="); - if (!strcmp(opt, "ro")) { /* Read-only mount. */ - if (val) { - ntfs_log_error("'ro' option should not have " - "value.\n"); - goto err_exit; - } - ctx->ro = TRUE; - strcat(ret, "ro,"); - } else if (!strcmp(opt, "noatime")) { - if (val) { - ntfs_log_error("'noatime' option should not " - "have value.\n"); - goto err_exit; - } - ctx->noatime = TRUE; - strcat(ret, "noatime,"); /* Duplicate it for FUSE. */ - } else if (!strcmp(opt, "fake_rw")) { - if (val) { - ntfs_log_error("'fake_rw' option should not " - "have value.\n"); - goto err_exit; - } - ctx->ro = TRUE; - } else if (!strcmp(opt, "fsname")) { /* Filesystem name. */ - /* - * We need this to be able to check whether filesystem - * mounted or not. - */ - ntfs_log_error("'fsname' is unsupported option.\n"); - goto err_exit; - } else if (!strcmp(opt, "no_def_opts")) { - if (val) { - ntfs_log_error("'no_def_opts' option should " - "not have value.\n"); - goto err_exit; - } - no_def_opts = TRUE; /* Don't add default options. */ - } else if (!strcmp(opt, "umask")) { - if (!val) { - ntfs_log_error("'umask' option should have " - "value.\n"); - goto err_exit; - } - sscanf(val, "%o", &ctx->fmask); - ctx->dmask = ctx->fmask; - } else if (!strcmp(opt, "fmask")) { - if (!val) { - ntfs_log_error("'fmask' option should have " - "value.\n"); - goto err_exit; - } - sscanf(val, "%o", &ctx->fmask); - } else if (!strcmp(opt, "dmask")) { - if (!val) { - ntfs_log_error("'dmask' option should have " - "value.\n"); - goto err_exit; - } - sscanf(val, "%o", &ctx->dmask); - } else if (!strcmp(opt, "uid")) { - if (!val) { - ntfs_log_error("'uid' option should have " - "value.\n"); - goto err_exit; - } - sscanf(val, "%i", &ctx->uid); - } else if (!strcmp(opt, "gid")) { - if (!val) { - ntfs_log_error("'gid' option should have " - "value.\n"); - goto err_exit; - } - sscanf(val, "%i", &ctx->gid); - } else if (!strcmp(opt, "show_sys_files")) { - if (val) { - ntfs_log_error("'show_sys_files' option should " - "not have value.\n"); - goto err_exit; - } - ctx->show_sys_files = TRUE; - } else if (!strcmp(opt, "silent")) { - if (val) { - ntfs_log_error("'silent' option should " - "not have value.\n"); - goto err_exit; - } - ctx->silent = TRUE; - } else if (!strcmp(opt, "force")) { - if (val) { - ntfs_log_error("'force' option should not " - "have value.\n"); - goto err_exit; - } - ctx->force = TRUE; - } else if (!strcmp(opt, "locale")) { - if (!val) { - ntfs_log_error("'locale' option should have " - "value.\n"); - goto err_exit; - } - if (!setlocale(LC_ALL, val)) - ntfs_log_error("Failed to set locale to %s. " - "Continue anyway.\n", val); - } else if (!strcmp(opt, "streams_interface")) { - if (!val) { - ntfs_log_error("'streams_interface' option " - "should have value.\n"); - goto err_exit; - } - if (!strcmp(val, "none")) - ctx->streams = NF_STREAMS_INTERFACE_NONE; - else if (!strcmp(val, "xattr")) - ctx->streams = NF_STREAMS_INTERFACE_XATTR; - else if (!strcmp(val, "windows")) - ctx->streams = NF_STREAMS_INTERFACE_WINDOWS; - else { - ntfs_log_error("Invalid named data streams " - "access interface.\n"); - goto err_exit; - } - } else if (!strcmp(opt, "noauto")) { - /* Don't pass noauto option to fuse. */ - } else if (!strcmp(opt, "debug")) { - if (val) { - ntfs_log_error("'debug' option should not have " - "value.\n"); - goto err_exit; - } - ctx->debug = TRUE; - ntfs_log_set_levels(NTFS_LOG_LEVEL_DEBUG); - ntfs_log_set_levels(NTFS_LOG_LEVEL_TRACE); - } else if (!strcmp(opt, "no_detach")) { - if (val) { - ntfs_log_error("'no_detach' option should not " - "have value.\n"); - goto err_exit; - } - ctx->no_detach = TRUE; - } else if (!strcmp(opt, "remount")) { - ntfs_log_error("Remounting is not supported at present." - " You have to umount volume and then " - "mount it once again.\n"); - goto err_exit; - } else { /* Probably FUSE option. */ - strcat(ret, opt); - if (val) { - strcat(ret, "="); - strcat(ret, val); - } - strcat(ret, ","); - } - } - if (!no_def_opts) - strcat(ret, def_opts); - strcat(ret, "fsname="); - strcat(ret, opts.device); -exit: - free(options); - return ret; -err_exit: - free(ret); - ret = NULL; - goto exit; -} - static void usage(void) { - ntfs_log_info("\n%s v%s (libntfs %s) - NTFS module for FUSE.\n\n", - EXEC_NAME, VERSION, ntfs_libntfs_version()); - ntfs_log_info("Copyright (C) 2005-2006 Yura Pakhuchiy\n\n"); + ntfs_log_info("\n%s v%s (libntfs %s) - Userspace read/write NTFS " + "driver.\n\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); + ntfs_log_info("Copyright (c) 2005-2007 Yura Pakhuchiy\n"); + ntfs_log_info("Copyright (c) 2005 Yuval Fledel\n"); + ntfs_log_info("Copyright (c) 2006 Szabolcs Szakacsits\n\n"); ntfs_log_info("usage: %s device mount_point [-o options]\n\n", EXEC_NAME); - ntfs_log_info("ntfsmount options are:\n\tforce\n\tno_def_opts\n\tumask" - "\n\tfmask\n\tdmask\n\tuid\n\tgid\n\tshow_sys_files\n\t" - "silent\n\tlocale\n\tstreams_interface\n" - "Also look into FUSE documentation about it options " - "(NOTE: not all FUSE options are supported by ntfsmount).\n"); - ntfs_log_info("Default options are: \"%s\".\n\n", def_opts); + ntfs_log_info("Default options:\n\t%s\n\n", + ntfs_fuse_default_options); ntfs_log_info("%s%s\n", ntfs_bugs, ntfs_home); } @@ -1681,178 +1507,178 @@ static char *realpath(const char *path, } #endif -/** - * parse_options - Read and validate the programs command line - * - * Read the command line, verify the syntax and parse the options. - * This function is very long, but quite simple. - * - * Return: 1 Success - * 0 Error, one or more problems - */ -static int parse_options(int argc, char *argv[]) +static int ntfs_fuse_init(void) { - int err = 0, help = 0; - int c = -1; + utils_set_locale(); + ntfs_log_set_handler(ntfs_log_handler_stderr); + signal(SIGINT, signal_handler); + signal(SIGTERM, signal_handler); - static const char *sopt = "-o:h?qv"; - static const struct option lopt[] = { - { "options", required_argument, NULL, 'o' }, - { "help", no_argument, NULL, 'h' }, - { "quiet", no_argument, NULL, 'q' }, - { "verbose", no_argument, NULL, 'v' }, - { NULL, 0, NULL, 0 } - }; + ctx = ntfs_malloc(sizeof(ntfs_fuse_context_t)); + if (!ctx) + return -1; - opterr = 0; /* We'll handle the errors, thank you. */ + *ctx = (ntfs_fuse_context_t) { + .state = NF_FreeClustersOutdate | NF_FreeMFTOutdate, + .uid = geteuid(), + .gid = getegid(), + .fmask = 0111, + .dmask = 0, + .streams = NF_STREAMS_INTERFACE_NONE, + .silent = TRUE, + }; + return 0; +} - opts.mnt_point = NULL; - opts.options = NULL; - opts.device = NULL; - - while ((c = getopt_long(argc, argv, sopt, lopt, NULL)) != -1) { - switch (c) { - case 1: /* A non-option argument */ - if (!opts.device) { - opts.device = malloc(PATH_MAX + 1); - if (!opts.device) { - ntfs_log_perror("malloc"); - err++; - break; +static int ntfs_fuse_opt_proc(void *data __attribute__((unused)), + const char *arg, int key, struct fuse_args *outargs) +{ + switch (key) { + case NF_KEY_HELP: + return -1; /* Force usage show. */ + case NF_KEY_UMASK: + ctx->dmask = ctx->fmask; + return 0; + case FUSE_OPT_KEY_NONOPT: /* All non-option arguments go here. */ + if (!ctx->device) { + /* We don't want relative path in /etc/mtab. */ + if (arg[0] != '/') { + ctx->device = ntfs_malloc(PATH_MAX + 1); + if (!ctx->device) + return -1; + if (!realpath(arg, ctx->device)) { + ntfs_log_perror("realpath(): %s", arg); + free(ctx->device); + ctx->device = NULL; + return -1; + } + } else { + ctx->device = strdup(arg); + if (!ctx->device) { + ntfs_log_perror("strdup()"); + return -1; } - /* We don't want relative path in /etc/mtab. */ - if (optarg[0] != '/') { - if (!realpath(optarg, opts.device)) { - ntfs_log_perror("Failed to " - "access %s", - optarg); - free(opts.device); - opts.device = NULL; - err++; - break; - } - } else - strcpy(opts.device, optarg); - } else if (!opts.mnt_point) - opts.mnt_point = optarg; - else { - ntfs_log_error("You must specify exactly one " - "device and exactly one mount " - "point.\n"); - err++; } - break; - case 'o': - if (!opts.options) - opts.options = optarg; - else { - ntfs_log_error("You must specify exactly one " - "set of options.\n"); - err++; + return 0; + } + if (!ctx->mnt_point) { + ctx->mnt_point = strdup(arg); + if (!ctx->mnt_point) { + ntfs_log_perror("strdup()"); + return -1; } - break; - case 'h': - case '?': - help++; - break; - case 'q': - opts.quiet++; - break; - case 'v': - opts.verbose++; - break; - default: - ntfs_log_error("Unknown option '%s'.\n", optarg); - err++; - break; + return 0; } + ntfs_log_error("You must specify exactly one device and " + "exactly one mount point.\n"); + return -1; + default: + if (!strcmp(arg, "remount")) { + ntfs_log_error("Remounting is not supported yet. " + "You have to umount volume and then " + "mount it once again.\n"); + return -1; + } + return 1; /* Just pass all unknown to us options to FUSE. */ } +} - if (help) { - opts.quiet = 0; - } else { - if (!opts.device) { - ntfs_log_error("No device specified.\n"); - err++; - } +static int parse_options(struct fuse_args *args) +{ + int ret; + char *fsname; - if (opts.quiet && opts.verbose) { - ntfs_log_error("You may not use --quiet and --verbose " - "at the same time.\n"); - err++; - } + ret = fuse_opt_parse(args, ctx, ntfs_fuse_opts, ntfs_fuse_opt_proc); + if (!ctx->device) { + ntfs_log_error("No device specified.\n"); + return -1; } + if (ctx->quiet && ctx->verbose) { + ntfs_log_error("You may not use --quiet and --verbose at the " + "same time.\n"); + return -1; + } + if (ctx->debug) { + ntfs_log_set_levels(NTFS_LOG_LEVEL_DEBUG); + ntfs_log_set_levels(NTFS_LOG_LEVEL_TRACE); + } + if (ctx->locale && !setlocale(LC_ALL, ctx->locale)) + ntfs_log_error("Failed to set locale to %s " + "(continue anyway).\n", ctx->locale); + fsname = ntfs_malloc(strlen(ctx->device) + 64); + if (!fsname) + return -1; + sprintf(fsname, "-ofsname=%s", ctx->device); + if (fuse_opt_add_arg(args, fsname) == -1) { + free(fsname); + return -1; + } + free(fsname); + if (!ctx->no_def_opts) { + if (fuse_opt_add_arg(args, "-o") == -1) + return -1; + if (fuse_opt_add_arg(args, ntfs_fuse_default_options) == -1) + return -1; + } + if (ctx->debug || ctx->no_detach) { + if (fuse_opt_add_arg(args, "-odebug") == -1) + return -1; + } + return ret; +} - if (help || err) - usage(); +static int ntfs_fuse_mount(void) +{ + ntfs_volume *vol; - return (!help && !err); + vol = utils_mount_volume(ctx->device, NTFS_MNT_NOATIME | + ((ctx->ro) ? NTFS_MNT_RDONLY : 0) | + ((ctx->case_insensitive) ? 0 : + NTFS_MNT_CASE_SENSITIVE) | + NTFS_MNT_NOT_EXCLUSIVE /* FIXME */, ctx->force); + if (!vol) { + ntfs_log_error("Mount failed.\n"); + return -1; + } + ctx->vol = vol; + return 0; } int main(int argc, char *argv[]) { - char *parsed_options; - struct fuse_args margs = FUSE_ARGS_INIT(0, NULL); + struct fuse_args args = FUSE_ARGS_INIT(argc, argv); struct fuse *fh; struct fuse_chan *fch; - utils_set_locale(); - ntfs_log_set_handler(ntfs_log_handler_stderr); - signal(SIGINT, signal_handler); - signal(SIGTERM, signal_handler); - - if (!parse_options(argc, argv)) - return 1; - ntfs_fuse_init(); - /* Parse options. */ - parsed_options = parse_mount_options((opts.options) ? - opts.options : ""); - if (!parsed_options) { + if (parse_options(&args) == -1) { + usage(); + fuse_opt_free_args(&args); ntfs_fuse_destroy(NULL); - return 3; + return 1; } - - /* Mount volume. */ - if (ntfs_fuse_mount(opts.device)) { + /* Mount volume (libntfs part). */ + if (ntfs_fuse_mount()) { + fuse_opt_free_args(&args); ntfs_fuse_destroy(NULL); - free(parsed_options); - return 4; + return 1; } - /* Create filesystem. */ - fch = NULL; - if (!(fuse_opt_add_arg(&margs, "") == -1 || - fuse_opt_add_arg(&margs, "-o") == -1 || - fuse_opt_add_arg(&margs, parsed_options))) - fch = fuse_mount(opts.mnt_point, &margs); - fuse_opt_free_args(&margs); - free(parsed_options); + /* Create filesystem (FUSE part). */ + fch = fuse_mount(ctx->mnt_point, &args); if (!fch) { ntfs_log_error("fuse_mount failed.\n"); + fuse_opt_free_args(&args); ntfs_fuse_destroy(NULL); - return 5; - } - fh = (struct fuse *)1; /* Cast anything except NULL to handle errors. */ - margs = (struct fuse_args)FUSE_ARGS_INIT(0, NULL); - if (fuse_opt_add_arg(&margs, "") == -1 || - fuse_opt_add_arg(&margs, "-o") == -1) - fh = NULL; - if (!ctx->debug && !ctx->no_detach) { - if (fuse_opt_add_arg(&margs, "use_ino,kernel_cache") == -1) - fh = NULL; - } else { - if (fuse_opt_add_arg(&margs, "use_ino,debug") == -1) - fh = NULL; + return 1; } - if (fh) - fh = fuse_new(fch, &margs , &ntfs_fuse_oper, - sizeof(ntfs_fuse_oper), NULL); - fuse_opt_free_args(&margs); + fh = fuse_new(fch, &args , &ntfs_fuse_oper, sizeof(ntfs_fuse_oper), + NULL); + fuse_opt_free_args(&args); if (!fh) { ntfs_log_error("fuse_new failed.\n"); - fuse_unmount(opts.mnt_point, fch); + fuse_unmount(ctx->mnt_point, fch); ntfs_fuse_destroy(NULL); - return 6; + return 1; } if (!ctx->debug && !ctx->no_detach) { if (daemon(0, 0)) @@ -1866,13 +1692,13 @@ int main(int argc, char *argv[]) ntfs_log_info("Version %s (libntfs %s)\n", VERSION, ntfs_libntfs_version()); ntfs_log_info("Mounted %s (%s, label \"%s\", NTFS version %d.%d)\n", - opts.device, (ctx->ro) ? "Read-Only" : "Read-Write", + ctx->device, (ctx->ro) ? "Read-Only" : "Read-Write", ctx->vol->vol_name, ctx->vol->major_ver, ctx->vol->minor_ver); /* Main loop. */ fuse_loop(fh); /* Destroy. */ - fuse_unmount(opts.mnt_point, fch); + fuse_unmount(ctx->mnt_point, fch); fuse_destroy(fh); return 0; } |
From: Yura P. <yu...@de...> - 2007-01-03 18:27:23
|
Changes by: yura Update of /cvs/linux-ntfs/ntfsprogs In directory delta357:/tmp/cvs-serv29988 Modified Files: ChangeLog Log Message: - upgrade to new shiny fuse option parsing API instead of my old hackish one (more readable and -4kb code) - remove show_sys_files and add case_insensitive options Index: ChangeLog =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ChangeLog,v retrieving revision 1.434 retrieving revision 1.435 diff -u -p -r1.434 -r1.435 --- ChangeLog 19 Dec 2006 16:31:52 -0000 1.434 +++ ChangeLog 3 Jan 2007 18:27:10 -0000 1.435 @@ -1,4 +1,4 @@ -xx/12/2006 - 2.0.0 - ntfsmount sports full r/w and ntfsresize supports Vista. +xx/01/2007 - 2.0.0 - ntfsmount sports full r/w and ntfsresize supports Vista. - ntfsmount now creates files and directories with security descriptor that grant full access to everyone. (Yura) @@ -125,6 +125,10 @@ xx/12/2006 - 2.0.0 - ntfsmount sports fu - mkntfs: Remove own generation of upcase table, i.e. delete ntfsprogs/upcase.[ch] and use ntfs_upcase_table_build() supplied by libntfs. (Anton) + - Upgrade ntfsmount to new FUSE option parsing API. (Yura) + - ntfsmount: Remove "show_sys_files" as potential harmful and + introduce new "case_insensitive" option to support both case + sensitive and insensitive mounts. (Yura) 21/06/2006 - 1.13.1 - Various fixes. |
From: Anton A. <ai...@de...> - 2006-12-19 16:32:06
|
Changes by: aia21 Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs In directory delta357:/tmp/cvs-serv10137/ntfsprogs Modified Files: Makefile.am mkntfs.c sd.c sd.h Removed Files: upcase.c upcase.h Log Message: - mkntfs: Create more Vista like volumes. We now match the security descriptor attributes (but not yet the security descriptors stored in $Secure). (Anton) - libntfs: Rewrite ntfs_upcase_table_build() to generate a Vista compatible upcase table ($UpCase). (Anton) - mkntfs: Remove own generation of upcase table, i.e. delete ntfsprogs/upcase.[ch] and use ntfs_upcase_table_build() supplied by libntfs. (Anton) Index: Makefile.am =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/Makefile.am,v retrieving revision 1.63 retrieving revision 1.64 diff -u -p -r1.63 -r1.64 --- Makefile.am 13 Dec 2006 00:11:50 -0000 1.63 +++ Makefile.am 19 Dec 2006 16:31:52 -0000 1.64 @@ -45,7 +45,7 @@ ntfsfix_LDADD = $(AM_LIBS) ntfsfix_LDFLAGS = $(AM_LFLAGS) mkntfs_CPPFLAGS = $(AM_CPPFLAGS) $(MKNTFS_CPPFLAGS) -mkntfs_SOURCES = attrdef.c attrdef.h upcase.c upcase.h boot.c boot.h sd.c sd.h mkntfs.c utils.c utils.h +mkntfs_SOURCES = attrdef.c attrdef.h boot.c boot.h sd.c sd.h mkntfs.c utils.c utils.h mkntfs_LDADD = $(AM_LIBS) $(MKNTFS_LIBS) mkntfs_LDFLAGS = $(AM_LFLAGS) Index: mkntfs.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/mkntfs.c,v retrieving revision 1.155 retrieving revision 1.156 diff -u -p -r1.155 -r1.156 --- mkntfs.c 15 Dec 2006 14:52:43 -0000 1.155 +++ mkntfs.c 19 Dec 2006 16:31:52 -0000 1.156 @@ -145,12 +145,12 @@ #include "utils.h" #include "ntfstime.h" #include "sd.h" -#include "upcase.h" #include "boot.h" #include "attrdef.h" #include "version.h" #include "logging.h" #include "support.h" +#include "unistr.h" #ifdef NO_NTFS_DEVICE_DEFAULT_IO_OPS #error "No default device io operations! Cannot build mkntfs. \ @@ -4065,7 +4065,7 @@ static BOOL mkntfs_create_root_structure FILE_ATTR_I30_INDEX_PRESENT, 0, 0, ".", FILE_NAME_WIN32_AND_DOS); if (!err) { - init_root_sd_31(&sd, &i); + init_root_sd(&sd, &i); err = add_attr_sd(m, sd, i); } /* FIXME: This should be IGNORE_CASE */ @@ -4349,7 +4349,7 @@ static BOOL mkntfs_create_root_structure buf_sds = ntfs_calloc(buf_sds_size); if (!buf_sds) return FALSE; - init_secure_31(buf_sds); + init_secure_sds(buf_sds); memcpy(buf_sds + 0x40000, buf_sds, buf_sds_first_size); err = add_attr_data(m, "$SDS", 4, 0, 0, (u8*)buf_sds, buf_sds_size); @@ -4541,8 +4541,8 @@ static int mkntfs_redirect(struct mkntfs g_vol->upcase = ntfs_malloc(g_vol->upcase_len * sizeof(ntfschar)); if (!g_vol->upcase) goto done; - - init_upcase_table(g_vol->upcase, g_vol->upcase_len * sizeof(ntfschar)); + ntfs_upcase_table_build(g_vol->upcase, + g_vol->upcase_len * sizeof(ntfschar)); g_vol->attrdef = ntfs_malloc(sizeof(attrdef_ntfs3x_array)); if (!g_vol->attrdef) { ntfs_log_perror("Could not create attrdef structure"); Index: sd.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/sd.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -p -r1.16 -r1.17 --- sd.c 15 Dec 2006 14:52:43 -0000 1.16 +++ sd.c 19 Dec 2006 16:31:52 -0000 1.17 @@ -3,7 +3,7 @@ #include "sd.h" /** - * init_system_file_sd + * init_system_file_sd - * * NTFS 3.1 - System files security decriptors * ===================================================== @@ -11,15 +11,8 @@ * Create the security descriptor for system file number @sys_file_no and * return a pointer to the descriptor. * - * $MFT, $MFTMirr, $LogFile, $AttrDef, $Bitmap, $Boot, $BadClus, and $UpCase - * are the same. - * - * $Volume, $Quota, and system files 0xb-0xf are the same. They are almost the - * same as the above, the only difference being that the two SIDs present in - * the DACL grant GENERIC_WRITE and GENERIC_READ equivalent privileges while - * the above only grant GENERIC_READ equivalent privileges. - * - * Root directory system file (".") is different altogether. + * Note the root directory system file (".") is very different and handled by a + * different function. * * The sd is returned in *@sd_val and has length *@sd_val_len. * @@ -165,17 +158,14 @@ void init_system_file_sd(int sys_file_no } /** - * init_root_sd_31 + * init_root_sd - * - * creates the security_descriptor for the root folder on ntfs 3.1. - * It is very long; lots of ACE's at first, then large pieces of zeroes; - * the owner user/group is near the end. On a partition created with - * w2k3 the owner user/group at the end is surrounded by 'garbage', which I - * yet do not understand. Here I have replaced the 'garbage' with - * zeros, which seems to work. Chkdsk does not add the 'garbage', nor alter - * this security descriptor in any way. + * Creates the security_descriptor for the root folder on ntfs 3.1 as created + * by Windows Vista (when the format is done from the disk management MMC + * snap-in, note this is different from the format done from the disk + * properties in Windows Explorer). */ -void init_root_sd_31(u8 **sd_val, int *sd_val_len) +void init_root_sd(u8 **sd_val, int *sd_val_len) { SECURITY_DESCRIPTOR_RELATIVE *sd; ACL *acl; @@ -188,34 +178,33 @@ void init_root_sd_31(u8 **sd_val, int *s //security descriptor relative sd = (SECURITY_DESCRIPTOR_RELATIVE*)sd_array; - sd->revision = 0x01; - sd->alignment = 0x00; + sd->revision = SECURITY_DESCRIPTOR_REVISION; + sd->alignment = 0; sd->control = SE_SELF_RELATIVE | SE_DACL_PRESENT; sd->owner = const_cpu_to_le32(0x1014); sd->group = const_cpu_to_le32(0x1020); - sd->sacl = const_cpu_to_le32(0x00); - sd->dacl = const_cpu_to_le32(0x14); + sd->sacl = 0; + sd->dacl = const_cpu_to_le32(sizeof(SECURITY_DESCRIPTOR_RELATIVE)); //acl acl = (ACL*)((u8*)sd + sizeof(SECURITY_DESCRIPTOR_RELATIVE)); - acl->revision = 0x02; - acl->alignment1 = 0x00; + acl->revision = ACL_REVISION; + acl->alignment1 = 0; acl->size = const_cpu_to_le16(0x1000); - acl->ace_count = const_cpu_to_le16(0x07); - acl->alignment2 = const_cpu_to_le16(0x00); + acl->ace_count = const_cpu_to_le16(0x08); + acl->alignment2 = 0; //ace1 ace = (ACCESS_ALLOWED_ACE*)((u8*)acl + sizeof(ACL)); - ace->type = 0x00; - ace->flags = OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE; + ace->type = ACCESS_ALLOWED_ACE_TYPE; + ace->flags = 0; ace->size = const_cpu_to_le16(0x18); ace->mask = STANDARD_RIGHTS_ALL | FILE_WRITE_ATTRIBUTES | FILE_LIST_DIRECTORY | FILE_WRITE_DATA | FILE_ADD_SUBDIRECTORY | FILE_READ_EA | FILE_WRITE_EA | FILE_TRAVERSE | FILE_DELETE_CHILD | FILE_READ_ATTRIBUTES; - - ace->sid.revision = 0x01; + ace->sid.revision = SID_REVISION; ace->sid.sub_authority_count = 0x02; /* SECURITY_NT_SID_AUTHORITY (S-1-5) */ ace->sid.identifier_authority.value[0] = 0; @@ -230,15 +219,35 @@ void init_root_sd_31(u8 **sd_val, int *s //ace2 ace = (ACCESS_ALLOWED_ACE*)((u8*)ace + le16_to_cpu(ace->size)); - ace->type = 0x00; - ace->flags = OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE; + ace->type = ACCESS_ALLOWED_ACE_TYPE; + ace->flags = OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE | + INHERIT_ONLY_ACE; + ace->size = const_cpu_to_le16(0x18); + ace->mask = GENERIC_ALL; + ace->sid.revision = SID_REVISION; + ace->sid.sub_authority_count = 0x02; + /* SECURITY_NT_SID_AUTHORITY (S-1-5) */ + ace->sid.identifier_authority.value[0] = 0; + ace->sid.identifier_authority.value[1] = 0; + ace->sid.identifier_authority.value[2] = 0; + ace->sid.identifier_authority.value[3] = 0; + ace->sid.identifier_authority.value[4] = 0; + ace->sid.identifier_authority.value[5] = 5; + ace->sid.sub_authority[0] = + const_cpu_to_le32(SECURITY_BUILTIN_DOMAIN_RID); + ace->sid.sub_authority[1] = const_cpu_to_le32(DOMAIN_ALIAS_RID_ADMINS); + + //ace3 + ace = (ACCESS_ALLOWED_ACE*)((u8*)ace + le16_to_cpu(ace->size)); + ace->type = ACCESS_ALLOWED_ACE_TYPE; + ace->flags = 0; ace->size = const_cpu_to_le16(0x14); ace->mask = STANDARD_RIGHTS_ALL | FILE_WRITE_ATTRIBUTES | FILE_LIST_DIRECTORY | FILE_WRITE_DATA | FILE_ADD_SUBDIRECTORY | FILE_READ_EA | FILE_WRITE_EA | FILE_TRAVERSE | FILE_DELETE_CHILD | FILE_READ_ATTRIBUTES; - ace->sid.revision = 0x01; + ace->sid.revision = SID_REVISION; ace->sid.sub_authority_count = 0x01; /* SECURITY_NT_SID_AUTHORITY (S-1-5) */ ace->sid.identifier_authority.value[0] = 0; @@ -250,33 +259,37 @@ void init_root_sd_31(u8 **sd_val, int *s ace->sid.sub_authority[0] = const_cpu_to_le32(SECURITY_LOCAL_SYSTEM_RID); - //ace3 + //ace4 ace = (ACCESS_ALLOWED_ACE*)((u8*)ace + le16_to_cpu(ace->size)); - ace->type = 0x00; + ace->type = ACCESS_ALLOWED_ACE_TYPE; ace->flags = OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE | INHERIT_ONLY_ACE; ace->size = const_cpu_to_le16(0x14); - ace->mask = const_cpu_to_le32(0x10000000); - ace->sid.revision = 0x01; + ace->mask = GENERIC_ALL; + ace->sid.revision = SID_REVISION; ace->sid.sub_authority_count = 0x01; - /* SECURITY_CREATOR_SID_AUTHORITY (S-1-3) */ + /* SECURITY_NT_SID_AUTHORITY (S-1-5) */ ace->sid.identifier_authority.value[0] = 0; ace->sid.identifier_authority.value[1] = 0; ace->sid.identifier_authority.value[2] = 0; ace->sid.identifier_authority.value[3] = 0; ace->sid.identifier_authority.value[4] = 0; - ace->sid.identifier_authority.value[5] = 3; + ace->sid.identifier_authority.value[5] = 5; ace->sid.sub_authority[0] = - const_cpu_to_le32(SECURITY_CREATOR_OWNER_RID); + const_cpu_to_le32(SECURITY_LOCAL_SYSTEM_RID); - //ace4 - ace = (ACCESS_ALLOWED_ACE*)((u8*)ace + le16_to_cpu(ace->size)); - ace->type = 0x00; - ace->flags = OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE; - ace->size = const_cpu_to_le16(0x18); - ace->mask = const_cpu_to_le32(0x1200A9); - ace->sid.revision = 0x01; - ace->sid.sub_authority_count = 0x02; + //ace5 + ace = (ACCESS_ALLOWED_ACE*)((char*)ace + le16_to_cpu(ace->size)); + ace->type = ACCESS_ALLOWED_ACE_TYPE; + ace->flags = 0; + ace->size = const_cpu_to_le16(0x14); + ace->mask = SYNCHRONIZE | READ_CONTROL | DELETE | + FILE_WRITE_ATTRIBUTES | FILE_READ_ATTRIBUTES | + FILE_TRAVERSE | FILE_WRITE_EA | FILE_READ_EA | + FILE_ADD_SUBDIRECTORY | FILE_ADD_FILE | + FILE_LIST_DIRECTORY; + ace->sid.revision = SID_REVISION; + ace->sid.sub_authority_count = 0x01; /* SECURITY_NT_SID_AUTHORITY (S-1-5) */ ace->sid.identifier_authority.value[0] = 0; ace->sid.identifier_authority.value[1] = 0; @@ -285,17 +298,17 @@ void init_root_sd_31(u8 **sd_val, int *s ace->sid.identifier_authority.value[4] = 0; ace->sid.identifier_authority.value[5] = 5; ace->sid.sub_authority[0] = - const_cpu_to_le32(SECURITY_BUILTIN_DOMAIN_RID); - ace->sid.sub_authority[1] = const_cpu_to_le32(DOMAIN_ALIAS_RID_USERS); + const_cpu_to_le32(SECURITY_AUTHENTICATED_USER_RID); - //ace5 - ace = (ACCESS_ALLOWED_ACE*)((char*)ace + le16_to_cpu(ace->size)); - ace->type = 0x00; - ace->flags = CONTAINER_INHERIT_ACE; - ace->size = const_cpu_to_le16(0x18); - ace->mask = const_cpu_to_le32(0x04); - ace->sid.revision = 0x01; - ace->sid.sub_authority_count = 0x02; + //ace6 + ace = (ACCESS_ALLOWED_ACE*)((u8*)ace + le16_to_cpu(ace->size)); + ace->type = ACCESS_ALLOWED_ACE_TYPE; + ace->flags = OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE | + INHERIT_ONLY_ACE; + ace->size = const_cpu_to_le16(0x14); + ace->mask = GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | DELETE; + ace->sid.revision = SID_REVISION; + ace->sid.sub_authority_count = 0x01; /* SECURITY_NT_SID_AUTHORITY (S-1-5) */ ace->sid.identifier_authority.value[0] = 0; ace->sid.identifier_authority.value[1] = 0; @@ -304,16 +317,17 @@ void init_root_sd_31(u8 **sd_val, int *s ace->sid.identifier_authority.value[4] = 0; ace->sid.identifier_authority.value[5] = 5; ace->sid.sub_authority[0] = - const_cpu_to_le32(SECURITY_BUILTIN_DOMAIN_RID); - ace->sid.sub_authority[1] = const_cpu_to_le32(DOMAIN_ALIAS_RID_USERS); + const_cpu_to_le32(SECURITY_AUTHENTICATED_USER_RID); - //ace6 + //ace7 ace = (ACCESS_ALLOWED_ACE*)((u8*)ace + le16_to_cpu(ace->size)); - ace->type = 0x00; - ace->flags = CONTAINER_INHERIT_ACE | INHERIT_ONLY_ACE; + ace->type = ACCESS_ALLOWED_ACE_TYPE; + ace->flags = 0; ace->size = const_cpu_to_le16(0x18); - ace->mask = const_cpu_to_le32(0x02); - ace->sid.revision = 0x01; + ace->mask = 9; + ace->mask = SYNCHRONIZE | READ_CONTROL | FILE_READ_ATTRIBUTES | + FILE_TRAVERSE | FILE_READ_EA | FILE_LIST_DIRECTORY; + ace->sid.revision = SID_REVISION; ace->sid.sub_authority_count = 0x02; /* SECURITY_NT_SID_AUTHORITY (S-1-5) */ ace->sid.identifier_authority.value[0] = 0; @@ -326,22 +340,25 @@ void init_root_sd_31(u8 **sd_val, int *s const_cpu_to_le32(SECURITY_BUILTIN_DOMAIN_RID); ace->sid.sub_authority[1] = const_cpu_to_le32(DOMAIN_ALIAS_RID_USERS); - //ace7 + //ace8 ace = (ACCESS_ALLOWED_ACE*)((u8*)ace + le16_to_cpu(ace->size)); - ace->type = 0x00; - ace->flags = 0x00; - ace->size = const_cpu_to_le16(0x14); - ace->mask = const_cpu_to_le32(0x1200A9); - ace->sid.revision = 0x01; - ace->sid.sub_authority_count = 0x01; - /* SECURITY_WORLD_SID_AUTHORITY (S-1-1) */ + ace->type = ACCESS_ALLOWED_ACE_TYPE; + ace->flags = OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE | + INHERIT_ONLY_ACE; + ace->size = const_cpu_to_le16(0x18); + ace->mask = GENERIC_READ | GENERIC_EXECUTE; + ace->sid.revision = SID_REVISION; + ace->sid.sub_authority_count = 0x02; + /* SECURITY_NT_SID_AUTHORITY (S-1-5) */ ace->sid.identifier_authority.value[0] = 0; ace->sid.identifier_authority.value[1] = 0; ace->sid.identifier_authority.value[2] = 0; ace->sid.identifier_authority.value[3] = 0; ace->sid.identifier_authority.value[4] = 0; - ace->sid.identifier_authority.value[5] = 1; - ace->sid.sub_authority[0] = const_cpu_to_le32(SECURITY_WORLD_RID); + ace->sid.identifier_authority.value[5] = 5; + ace->sid.sub_authority[0] = + const_cpu_to_le32(SECURITY_BUILTIN_DOMAIN_RID); + ace->sid.sub_authority[1] = const_cpu_to_le32(DOMAIN_ALIAS_RID_USERS); //owner sid sid = (SID*)((char*)sd + le32_to_cpu(sd->owner)); @@ -371,14 +388,14 @@ void init_root_sd_31(u8 **sd_val, int *s } /** - * init_secure_31(char **r, int size); + * init_secure_sds - * * NTFS 3.1 - System files security decriptors * =========================================== * Create the security descriptor entries in $SDS data stream like they * are in a partition, newly formatted with windows 2003 */ -void init_secure_31(char *sd_val) +void init_secure_sds(char *sd_val) { SECURITY_DESCRIPTOR_HEADER *sds; SECURITY_DESCRIPTOR_RELATIVE *sd; Index: sd.h =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/sd.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -r1.2 -r1.3 --- sd.h 13 Dec 2006 10:46:50 -0000 1.2 +++ sd.h 19 Dec 2006 16:31:52 -0000 1.3 @@ -4,8 +4,8 @@ #include "types.h" void init_system_file_sd(int sys_file_no, u8 **sd_val, int *sd_val_len); -void init_root_sd_31(u8 **sd_val, int *sd_val_len); -void init_secure_31(char *sd_val); +void init_root_sd(u8 **sd_val, int *sd_val_len); +void init_secure_sds(char *sd_val); #endif /* _NTFS_SD_H_ */ --- upcase.c DELETED --- --- upcase.h DELETED --- |
From: Anton A. <ai...@de...> - 2006-12-19 16:32:05
|
Changes by: aia21 Update of /cvs/linux-ntfs/ntfsprogs In directory delta357:/tmp/cvs-serv10137 Modified Files: ChangeLog Log Message: - mkntfs: Create more Vista like volumes. We now match the security descriptor attributes (but not yet the security descriptors stored in $Secure). (Anton) - libntfs: Rewrite ntfs_upcase_table_build() to generate a Vista compatible upcase table ($UpCase). (Anton) - mkntfs: Remove own generation of upcase table, i.e. delete ntfsprogs/upcase.[ch] and use ntfs_upcase_table_build() supplied by libntfs. (Anton) Index: ChangeLog =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/ChangeLog,v retrieving revision 1.433 retrieving revision 1.434 diff -u -p -r1.433 -r1.434 --- ChangeLog 15 Dec 2006 15:21:27 -0000 1.433 +++ ChangeLog 19 Dec 2006 16:31:52 -0000 1.434 @@ -117,6 +117,14 @@ xx/12/2006 - 2.0.0 - ntfsmount sports fu - mkntfs: Remove lots of unused/unneeded debugging code. (Anton) - libntfs: Add support for FreeBSD 5.0+ sector aligned access requirements. (Max Khon) + - mkntfs: Create more Vista like volumes. We now match the security + descriptor attributes (but not yet the security descriptors stored in + $Secure). (Anton) + - libntfs: Rewrite ntfs_upcase_table_build() to generate a Vista + compatible upcase table ($UpCase). (Anton) + - mkntfs: Remove own generation of upcase table, i.e. delete + ntfsprogs/upcase.[ch] and use ntfs_upcase_table_build() supplied by + libntfs. (Anton) 21/06/2006 - 1.13.1 - Various fixes. |
From: Anton A. <ai...@de...> - 2006-12-19 16:32:05
|
Changes by: aia21 Update of /cvs/linux-ntfs/ntfsprogs/libntfs In directory delta357:/tmp/cvs-serv10137/libntfs Modified Files: unistr.c volume.c Log Message: - mkntfs: Create more Vista like volumes. We now match the security descriptor attributes (but not yet the security descriptors stored in $Secure). (Anton) - libntfs: Rewrite ntfs_upcase_table_build() to generate a Vista compatible upcase table ($UpCase). (Anton) - mkntfs: Remove own generation of upcase table, i.e. delete ntfsprogs/upcase.[ch] and use ntfs_upcase_table_build() supplied by libntfs. (Anton) Index: unistr.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/libntfs/unistr.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -p -r1.39 -r1.40 --- unistr.c 12 Dec 2006 15:02:25 -0000 1.39 +++ unistr.c 19 Dec 2006 16:31:52 -0000 1.40 @@ -1,7 +1,7 @@ /** * unistr.c - Unicode string handling. Part of the Linux-NTFS project. * - * Copyright (c) 2000-2004 Anton Altaparmakov + * Copyright (c) 2000-2006 Anton Altaparmakov * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -40,6 +40,7 @@ #endif #include "attrib.h" +#include "endians.h" #include "types.h" #include "unistr.h" #include "debug.h" @@ -644,62 +645,86 @@ err_out: * ntfs_upcase_table_build() builds the default upcase table for NTFS and * stores it in the caller supplied buffer @uc of size @uc_len. * + * The generated $UpCase table is the one used by Windows Vista. + * * Note, @uc_len must be at least 128kiB in size or bad things will happen! */ void ntfs_upcase_table_build(ntfschar *uc, u32 uc_len) { - static int uc_run_table[][3] = { /* Start, End, Add */ - {0x0061, 0x007B, -32}, {0x0451, 0x045D, -80}, {0x1F70, 0x1F72, 74}, - {0x00E0, 0x00F7, -32}, {0x045E, 0x0460, -80}, {0x1F72, 0x1F76, 86}, - {0x00F8, 0x00FF, -32}, {0x0561, 0x0587, -48}, {0x1F76, 0x1F78, 100}, - {0x0256, 0x0258, -205}, {0x1F00, 0x1F08, 8}, {0x1F78, 0x1F7A, 128}, - {0x028A, 0x028C, -217}, {0x1F10, 0x1F16, 8}, {0x1F7A, 0x1F7C, 112}, - {0x03AC, 0x03AD, -38}, {0x1F20, 0x1F28, 8}, {0x1F7C, 0x1F7E, 126}, - {0x03AD, 0x03B0, -37}, {0x1F30, 0x1F38, 8}, {0x1FB0, 0x1FB2, 8}, - {0x03B1, 0x03C2, -32}, {0x1F40, 0x1F46, 8}, {0x1FD0, 0x1FD2, 8}, - {0x03C2, 0x03C3, -31}, {0x1F51, 0x1F52, 8}, {0x1FE0, 0x1FE2, 8}, - {0x03C3, 0x03CC, -32}, {0x1F53, 0x1F54, 8}, {0x1FE5, 0x1FE6, 7}, - {0x03CC, 0x03CD, -64}, {0x1F55, 0x1F56, 8}, {0x2170, 0x2180, -16}, - {0x03CD, 0x03CF, -63}, {0x1F57, 0x1F58, 8}, {0x24D0, 0x24EA, -26}, - {0x0430, 0x0450, -32}, {0x1F60, 0x1F68, 8}, {0xFF41, 0xFF5B, -32}, - {0} + /* + * "Start" is inclusive and "End" is exclusive, every value has the + * value of "Add" added to it. + */ + static int add[][3] = { /* Start, End, Add */ + {0x0061, 0x007b, -32}, {0x00e0, 0x00f7, -32}, {0x00f8, 0x00ff, -32}, + {0x0256, 0x0258, -205}, {0x028a, 0x028c, -217}, {0x037b, 0x037e, 130}, + {0x03ac, 0x03ad, -38}, {0x03ad, 0x03b0, -37}, {0x03b1, 0x03c2, -32}, + {0x03c2, 0x03c3, -31}, {0x03c3, 0x03cc, -32}, {0x03cc, 0x03cd, -64}, + {0x03cd, 0x03cf, -63}, {0x0430, 0x0450, -32}, {0x0450, 0x0460, -80}, + {0x0561, 0x0587, -48}, {0x1f00, 0x1f08, 8}, {0x1f10, 0x1f16, 8}, + {0x1f20, 0x1f28, 8}, {0x1f30, 0x1f38, 8}, {0x1f40, 0x1f46, 8}, + {0x1f51, 0x1f52, 8}, {0x1f53, 0x1f54, 8}, {0x1f55, 0x1f56, 8}, + {0x1f57, 0x1f58, 8}, {0x1f60, 0x1f68, 8}, {0x1f70, 0x1f72, 74}, + {0x1f72, 0x1f76, 86}, {0x1f76, 0x1f78, 100}, {0x1f78, 0x1f7a, 128}, + {0x1f7a, 0x1f7c, 112}, {0x1f7c, 0x1f7e, 126}, {0x1f80, 0x1f88, 8}, + {0x1f90, 0x1f98, 8}, {0x1fa0, 0x1fa8, 8}, {0x1fb0, 0x1fb2, 8}, + {0x1fb3, 0x1fb4, 9}, {0x1fcc, 0x1fcd, -9}, {0x1fd0, 0x1fd2, 8}, + {0x1fe0, 0x1fe2, 8}, {0x1fe5, 0x1fe6, 7}, {0x1ffc, 0x1ffd, -9}, + {0x2170, 0x2180, -16}, {0x24d0, 0x24ea, -26}, {0x2c30, 0x2c5f, -48}, + {0x2d00, 0x2d26, -7264}, {0xff41, 0xff5b, -32}, {0} }; - static int uc_dup_table[][2] = { /* Start, End */ - {0x0100, 0x012F}, {0x01A0, 0x01A6}, {0x03E2, 0x03EF}, {0x04CB, 0x04CC}, - {0x0132, 0x0137}, {0x01B3, 0x01B7}, {0x0460, 0x0481}, {0x04D0, 0x04EB}, - {0x0139, 0x0149}, {0x01CD, 0x01DD}, {0x0490, 0x04BF}, {0x04EE, 0x04F5}, - {0x014A, 0x0178}, {0x01DE, 0x01EF}, {0x04BF, 0x04BF}, {0x04F8, 0x04F9}, - {0x0179, 0x017E}, {0x01F4, 0x01F5}, {0x04C1, 0x04C4}, {0x1E00, 0x1E95}, - {0x018B, 0x018B}, {0x01FA, 0x0218}, {0x04C7, 0x04C8}, {0x1EA0, 0x1EF9}, - {0} + /* + * "Start" is exclusive and "End" is inclusive, every second value is + * decremented by one. + */ + static int skip_dec[][2] = { /* Start, End */ + {0x0100, 0x012f}, {0x0132, 0x0137}, {0x0139, 0x0149}, {0x014a, 0x0178}, + {0x0179, 0x017e}, {0x01a0, 0x01a6}, {0x01b3, 0x01b7}, {0x01cd, 0x01dd}, + {0x01de, 0x01ef}, {0x01f4, 0x01f5}, {0x01f8, 0x01f9}, {0x01fa, 0x0220}, + {0x0222, 0x0234}, {0x023b, 0x023c}, {0x0241, 0x0242}, {0x0246, 0x024f}, + {0x03d8, 0x03ef}, {0x03f7, 0x03f8}, {0x03fa, 0x03fb}, {0x0460, 0x0481}, + {0x048a, 0x04bf}, {0x04c1, 0x04c4}, {0x04c5, 0x04c8}, {0x04c9, 0x04ce}, + {0x04ec, 0x04ed}, {0x04d0, 0x04eb}, {0x04ee, 0x04f5}, {0x04f6, 0x0513}, + {0x1e00, 0x1e95}, {0x1ea0, 0x1ef9}, {0x2183, 0x2184}, {0x2c60, 0x2c61}, + {0x2c67, 0x2c6c}, {0x2c75, 0x2c76}, {0x2c80, 0x2ce3}, {0} }; - static int uc_byte_table[][2] = { /* Offset, Value */ - {0x00FF, 0x0178}, {0x01AD, 0x01AC}, {0x01F3, 0x01F1}, {0x0269, 0x0196}, - {0x0183, 0x0182}, {0x01B0, 0x01AF}, {0x0253, 0x0181}, {0x026F, 0x019C}, - {0x0185, 0x0184}, {0x01B9, 0x01B8}, {0x0254, 0x0186}, {0x0272, 0x019D}, - {0x0188, 0x0187}, {0x01BD, 0x01BC}, {0x0259, 0x018F}, {0x0275, 0x019F}, - {0x018C, 0x018B}, {0x01C6, 0x01C4}, {0x025B, 0x0190}, {0x0283, 0x01A9}, - {0x0192, 0x0191}, {0x01C9, 0x01C7}, {0x0260, 0x0193}, {0x0288, 0x01AE}, - {0x0199, 0x0198}, {0x01CC, 0x01CA}, {0x0263, 0x0194}, {0x0292, 0x01B7}, - {0x01A8, 0x01A7}, {0x01DD, 0x018E}, {0x0268, 0x0197}, - {0} + /* + * Set the Unicode character at offset "Offset" to "Value". Note, + * "Value" is host endian. + */ + static int set[][2] = { /* Offset, Value */ + {0x00ff, 0x0178}, {0x0180, 0x0243}, {0x0183, 0x0182}, {0x0185, 0x0184}, + {0x0188, 0x0187}, {0x018c, 0x018b}, {0x0192, 0x0191}, {0x0195, 0x01f6}, + {0x0199, 0x0198}, {0x019a, 0x023d}, {0x019e, 0x0220}, {0x01a8, 0x01a7}, + {0x01ad, 0x01ac}, {0x01b0, 0x01af}, {0x01b9, 0x01b8}, {0x01bd, 0x01bc}, + {0x01bf, 0x01f7}, {0x01c6, 0x01c4}, {0x01c9, 0x01c7}, {0x01cc, 0x01ca}, + {0x01dd, 0x018e}, {0x01f3, 0x01f1}, {0x023a, 0x2c65}, {0x023e, 0x2c66}, + {0x0253, 0x0181}, {0x0254, 0x0186}, {0x0259, 0x018f}, {0x025b, 0x0190}, + {0x0260, 0x0193}, {0x0263, 0x0194}, {0x0268, 0x0197}, {0x0269, 0x0196}, + {0x026b, 0x2c62}, {0x026f, 0x019c}, {0x0272, 0x019d}, {0x0275, 0x019f}, + {0x027d, 0x2c64}, {0x0280, 0x01a6}, {0x0283, 0x01a9}, {0x0288, 0x01ae}, + {0x0289, 0x0244}, {0x028c, 0x0245}, {0x0292, 0x01b7}, {0x03f2, 0x03f9}, + {0x04cf, 0x04c0}, {0x1d7d, 0x2c63}, {0x214e, 0x2132}, {0} }; - int i, r; + unsigned i, r; - memset((char*)uc, 0, uc_len); - uc_len >>= 1; - if (uc_len > 65536) - uc_len = 65536; - for (i = 0; (u32)i < uc_len; i++) - uc[i] = i; - for (r = 0; uc_run_table[r][0]; r++) - for (i = uc_run_table[r][0]; i < uc_run_table[r][1]; i++) - uc[i] += uc_run_table[r][2]; - for (r = 0; uc_dup_table[r][0]; r++) - for (i = uc_dup_table[r][0]; i < uc_dup_table[r][1]; i += 2) - uc[i + 1]--; - for (r = 0; uc_byte_table[r][0]; r++) - uc[uc_byte_table[r][0]] = uc_byte_table[r][1]; + memset(uc, 0, uc_len); + uc_len /= 2; + /* Start with a one-to-one mapping, i.e. no upcasing happens at all. */ + for (i = 0; i < uc_len; i++) + uc[i] = cpu_to_le16(i); + /* Adjust specified runs by the specified amount. */ + for (r = 0; add[r][0]; r++) + for (i = add[r][0]; i < add[r][1]; i++) + uc[i] = cpu_to_le16(le16_to_cpu(uc[i]) + add[r][2]); + /* Decrement every second value in specified runs. */ + for (r = 0; skip_dec[r][0]; r++) + for (i = skip_dec[r][0]; i < skip_dec[r][1]; + i += 2) + uc[i + 1] = cpu_to_le16(le16_to_cpu(uc[i + 1]) - 1); + /* Set specified characters to specified values. */ + for (r = 0; set[r][0]; r++) + uc[set[r][0]] = cpu_to_le16(set[r][1]); } /** Index: volume.c =================================================================== RCS file: /cvs/linux-ntfs/ntfsprogs/libntfs/volume.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -p -r1.83 -r1.84 --- volume.c 11 Dec 2006 03:03:30 -0000 1.83 +++ volume.c 19 Dec 2006 16:31:52 -0000 1.84 @@ -436,7 +436,6 @@ ntfs_volume *ntfs_volume_startup(struct sizeof(ntfschar)); if (!vol->upcase) goto error_exit; - ntfs_upcase_table_build(vol->upcase, vol->upcase_len * sizeof(ntfschar)); if (flags & NTFS_MNT_RDONLY) |