Imported Upstream version 3.0.27 upstream/3.0.27
authorJinWang An <jinwang.an@samsung.com>
Mon, 26 Dec 2022 04:14:06 +0000 (13:14 +0900)
committerJinWang An <jinwang.an@samsung.com>
Mon, 26 Dec 2022 04:14:06 +0000 (13:14 +0900)
18 files changed:
ChangeLog
VERSION
manpages/de/fatlabel.de.8
manpages/de/fsck.fat.de.8
manpages/de/mkfs.fat.de.8
manpages/en/fatlabel.8
manpages/en/fsck.fat.8
manpages/en/mkfs.fat.8
manpages/po/de/fatlabel.8.po
manpages/po/de/fsck.fat.8.po
manpages/po/de/mkfs.fat.8.po
manpages/pot/fatlabel.8.pot
manpages/pot/fsck.fat.8.pot
manpages/pot/mkfs.fat.8.pot
src/boot.c
src/check.c
src/fsck.fat.c
src/version.h

index 6807d23..8616201 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,77 @@
-commit 6893c45 (HEAD, origin/master, origin/HEAD, master)
+commit e2c8f06 (HEAD, origin/master, master)
+Author: Andreas Bombe <aeb@debian.org>
+Date:   Wed Nov 12 00:22:17 2014 +0100
+
+    fsck.fat: Don't print version string every time -v is encountered
+    
+    Remove the printing of the version string every time -v is seen during
+    command line parsing in fsck.fat. The version string is printed anyway
+    before opening the filesystem device/image.
+    
+    Signed-off-by: Andreas Bombe <aeb@debian.org>
+
+commit 82076b6
+Author: Andreas Bombe <aeb@debian.org>
+Date:   Tue Nov 11 23:25:30 2014 +0100
+
+    Fix attempt to rename root dir in fsck due to uninitialized fields
+    
+    When add_file() is called with offset 0, it will construct a DIR_ENT for
+    the root directory instead of reading the contents from the filesystem.
+    It did not initialize the whole DIR_ENT on the stack, just select
+    values.
+    
+    In particular, the lcase field was left with an undefined value. If
+    that value happened to include the FAT_NO_83NAME bit, the "neither long
+    nor short file name" check in bad_name() added in 3.0.26 would trigger
+    and cause an attempt to rename the entry (which is not possible).
+    Example run:
+    
+        $ /sbin/fsck.fat -y bad.img
+        fsck.fat 3.0.26 (2014-03-07)
+        /
+          Bad short file name ().
+          Auto-renaming it.
+          Renamed to
+        bad.img: 14 files, 19388/403266 clusters
+    
+    This commit changes the initialization zeroize the whole struct before
+    setting individual fields. Thanks to AlexisM, who found the cause and
+    posted a patch on the Debian bug http://bugs.debian.org/764992 .
+    
+    Signed-off-by: Andreas Bombe <aeb@debian.org>
+
+commit c24ecb6
+Author: Andreas Bombe <aeb@debian.org>
+Date:   Tue Nov 11 22:49:50 2014 +0100
+
+    Support long file names in volume labeling code
+    
+    The code to find the volume label directory entry in find_volume_de()
+    did not consider long file names so far. Directory entries that make up
+    long file names have four attribute bits set, including the "volume"
+    bit.
+    
+    This caused the code to mistake a directory entry that is part of a
+    long file name as the volume name entry. If such an entry is found
+    first, fatlabel would print garbage when asked to display the label and
+    mangle the long file name when asked to set it. The latter would lead
+    to the loss of the long file name and require a fsck to clean up.
+    
+    Change so that the set of attributes equal that of LFN entries will no
+    langer match as a volume label.
+    
+    Signed-off-by: Andreas Bombe <aeb@debian.org>
+
+commit 1646f6e (tag: v3.0.26)
+Author: Daniel Baumann <mail@daniel-baumann.ch>
+Date:   Fri Mar 7 18:40:13 2014 +0100
+
+    Releasing version 3.0.26.
+    
+    Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
+
+commit 6893c45
 Author: Dir Lotter <dirk.lotter@siemens.com>
 Date:   Fri Mar 7 18:25:39 2014 +0100
 
diff --git a/VERSION b/VERSION
index 2551016..d0ecf17 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0.26
+3.0.27
index 8c9802b..d819a13 100644 (file)
@@ -24,7 +24,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH FATLABEL 8 2014\-03\-07 3.0.26 dosfstools
+.TH FATLABEL 8 2014\-11\-12 3.0.27 dosfstools
 
 .SH NAME
 \fBfatlabel\fP \- set or get MS\-DOS filesystem label
index 674a51f..1d96e23 100644 (file)
@@ -24,7 +24,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH FSCK.FAT 8 2014\-03\-07 3.0.26 dosfstools
+.TH FSCK.FAT 8 2014\-11\-12 3.0.27 dosfstools
 
 .SH NAME
 \fBfsck.fat\fP \- check and repair MS\-DOS filesystems
index 6d81c4f..5a6eb1a 100644 (file)
@@ -24,7 +24,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH MKFS.FAT 8 2014\-03\-07 3.0.26 dosfstools
+.TH MKFS.FAT 8 2014\-11\-12 3.0.27 dosfstools
 
 .SH NAME
 \fBmkfs.fat\fP \- create an MS\-DOS filesystem under Linux
index 341117b..6b50665 100644 (file)
@@ -19,7 +19,7 @@
 .\" can be found in /usr/share/common-licenses/GPL-3 file.
 .\"
 .\"
-.TH FATLABEL 8 2014\-03\-07 3.0.26 "dosfstools"
+.TH FATLABEL 8 2014\-11\-12 3.0.27 "dosfstools"
 
 .SH NAME
 \fBfatlabel\fR \- set or get MS\-DOS filesystem label
index af4b6ec..3d95dc8 100644 (file)
@@ -19,7 +19,7 @@
 .\" can be found in /usr/share/common-licenses/GPL-3 file.
 .\"
 .\"
-.TH FSCK.FAT 8 2014\-03\-07 3.0.26 "dosfstools"
+.TH FSCK.FAT 8 2014\-11\-12 3.0.27 "dosfstools"
 
 .SH NAME
 \fBfsck.fat\fR \- check and repair MS\-DOS filesystems
index d76d7a6..9dd8115 100644 (file)
@@ -19,7 +19,7 @@
 .\" can be found in /usr/share/common-licenses/GPL-3 file.
 .\"
 .\"
-.TH MKFS.FAT 8 2014\-03\-07 3.0.26 "dosfstools"
+.TH MKFS.FAT 8 2014\-11\-12 3.0.27 "dosfstools"
 
 .SH NAME
 \fBmkfs.fat\fR \- create an MS-DOS filesystem under Linux
index 256d5ed..27c69f5 100644 (file)
@@ -3,7 +3,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: dosfstools VERSION\n"
-"POT-Creation-Date: 2014-03-07 18:39+0100\n"
+"POT-Creation-Date: 2014-11-12 00:52+0100\n"
 "PO-Revision-Date: 2013-06-06 09:34+0300\n"
 "Last-Translator: Automatically generated\n"
 "Language-Team: none\n"
@@ -22,13 +22,13 @@ msgstr ""
 #. type: TH
 #: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
 #, no-wrap
-msgid "2014-03-07"
+msgid "2014-11-12"
 msgstr ""
 
 #. type: TH
 #: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
 #, no-wrap
-msgid "3.0.26"
+msgid "3.0.27"
 msgstr ""
 
 #. type: TH
index 70793da..3035906 100644 (file)
@@ -3,7 +3,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: dosfstools VERSION\n"
-"POT-Creation-Date: 2014-03-07 18:39+0100\n"
+"POT-Creation-Date: 2014-11-12 00:52+0100\n"
 "PO-Revision-Date: 2013-06-06 09:34+0300\n"
 "Last-Translator: Automatically generated\n"
 "Language-Team: none\n"
@@ -16,13 +16,13 @@ msgstr ""
 #. type: TH
 #: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
 #, no-wrap
-msgid "2014-03-07"
+msgid "2014-11-12"
 msgstr ""
 
 #. type: TH
 #: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
 #, no-wrap
-msgid "3.0.26"
+msgid "3.0.27"
 msgstr ""
 
 #. type: TH
index dffecd5..2531179 100644 (file)
@@ -3,7 +3,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: dosfstools VERSION\n"
-"POT-Creation-Date: 2014-03-07 18:39+0100\n"
+"POT-Creation-Date: 2014-11-12 00:52+0100\n"
 "PO-Revision-Date: 2013-06-06 09:34+0300\n"
 "Last-Translator: Automatically generated\n"
 "Language-Team: none\n"
@@ -16,13 +16,13 @@ msgstr ""
 #. type: TH
 #: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
 #, no-wrap
-msgid "2014-03-07"
+msgid "2014-11-12"
 msgstr ""
 
 #. type: TH
 #: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
 #, no-wrap
-msgid "3.0.26"
+msgid "3.0.27"
 msgstr ""
 
 #. type: TH
index 4b06bca..1d4af88 100644 (file)
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: dosfstools VERSION\n"
-"POT-Creation-Date: 2014-03-07 18:39+0100\n"
+"POT-Creation-Date: 2014-11-12 00:52+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -25,13 +25,13 @@ msgstr ""
 #. type: TH
 #: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
 #, no-wrap
-msgid "2014-03-07"
+msgid "2014-11-12"
 msgstr ""
 
 #. type: TH
 #: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
 #, no-wrap
-msgid "3.0.26"
+msgid "3.0.27"
 msgstr ""
 
 #. type: TH
index 22ff5fa..e411819 100644 (file)
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: dosfstools VERSION\n"
-"POT-Creation-Date: 2014-03-07 18:39+0100\n"
+"POT-Creation-Date: 2014-11-12 00:52+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -19,13 +19,13 @@ msgstr ""
 #. type: TH
 #: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
 #, no-wrap
-msgid "2014-03-07"
+msgid "2014-11-12"
 msgstr ""
 
 #. type: TH
 #: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
 #, no-wrap
-msgid "3.0.26"
+msgid "3.0.27"
 msgstr ""
 
 #. type: TH
index 98b36c0..a6106bc 100644 (file)
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: dosfstools VERSION\n"
-"POT-Creation-Date: 2014-03-07 18:39+0100\n"
+"POT-Creation-Date: 2014-11-12 00:52+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -19,13 +19,13 @@ msgstr ""
 #. type: TH
 #: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
 #, no-wrap
-msgid "2014-03-07"
+msgid "2014-11-12"
 msgstr ""
 
 #. type: TH
 #: en/fatlabel.8:22 en/fsck.fat.8:22 en/mkfs.fat.8:22
 #, no-wrap
-msgid "3.0.26"
+msgid "3.0.27"
 msgstr ""
 
 #. type: TH
index 45fb3c8..5b3825c 100644 (file)
@@ -504,7 +504,7 @@ loff_t find_volume_de(DOS_FS * fs, DIR_ENT * de)
            offset = cluster_start(fs, cluster);
            for (i = 0; i * sizeof(DIR_ENT) < fs->cluster_size; i++) {
                fs_read(offset, sizeof(DIR_ENT), de);
-               if (de->attr & ATTR_VOLUME)
+               if (de->attr != VFAT_LN_ATTR && de->attr & ATTR_VOLUME)
                    return offset;
                offset += sizeof(DIR_ENT);
            }
@@ -513,7 +513,7 @@ loff_t find_volume_de(DOS_FS * fs, DIR_ENT * de)
        for (i = 0; i < fs->root_entries; i++) {
            offset = fs->root_start + i * sizeof(DIR_ENT);
            fs_read(offset, sizeof(DIR_ENT), de);
-           if (de->attr & ATTR_VOLUME)
+           if (de->attr != VFAT_LN_ATTR && de->attr & ATTR_VOLUME)
                return offset;
        }
     }
index a330caf..e8aaf92 100644 (file)
@@ -959,9 +959,9 @@ static void add_file(DOS_FS * fs, DOS_FILE *** chain, DOS_FILE * parent,
        fs_read(offset, sizeof(DIR_ENT), &de);
     else {
        /* Construct a DIR_ENT for the root directory */
+       memset(&de, 0, sizeof de);
        memcpy(de.name, "           ", MSDOS_NAME);
        de.attr = ATTR_DIR;
-       de.size = de.time = de.date = 0;
        de.start = htole16(fs->root_cluster & 0xffff);
        de.starthi = htole16((fs->root_cluster >> 16) & 0xffff);
     }
index ce6cee6..c073d9a 100644 (file)
@@ -157,7 +157,6 @@ int main(int argc, char **argv)
            break;
        case 'v':
            verbose = 1;
-           printf("fsck.fat " VERSION " (" VERSION_DATE ")\n");
            break;
        case 'V':
            verify = 1;
index bf941bf..4ccc759 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef _version_h
 #define _version_h
 
-#define VERSION "3.0.26"
-#define VERSION_DATE "2014-03-07"
+#define VERSION "3.0.27"
+#define VERSION_DATE "2014-11-12"
 
 #endif