Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140052388
D50196.id155136.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
771 B
Referenced Files
None
Subscribers
None
D50196.id155136.diff
View Options
diff --git a/usr.sbin/makefs/ffs/mkfs.c b/usr.sbin/makefs/ffs/mkfs.c
--- a/usr.sbin/makefs/ffs/mkfs.c
+++ b/usr.sbin/makefs/ffs/mkfs.c
@@ -579,13 +579,21 @@
{
int size, blks, i, saveflag;
uint32_t cylno;
- void *space;
+ void *info, *space;
char *wrbuf;
saveflag = fs->fs_flags & FS_INTERNAL;
fs->fs_flags &= ~FS_INTERNAL;
- memcpy(writebuf, &sblock, sbsize);
+ /*
+ * Write out the superblock. Blank out the summary info field, as it's
+ * a random pointer that would make the resulting image unreproducible.
+ */
+ info = fs->fs_si;
+ fs->fs_si = NULL;
+ memcpy(writebuf, fs, sbsize);
+ fs->fs_si = info;
+
if (fsopts->needswap)
ffs_sb_swap(fs, (struct fs*)writebuf);
ffs_wtfs(fs->fs_sblockloc / sectorsize, sbsize, writebuf, fsopts);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 20, 2:20 PM (13 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27097810
Default Alt Text
D50196.id155136.diff (771 B)
Attached To
Mode
D50196: makefs: Ensure that FFS superblocks are reproducible
Attached
Detach File
Event Timeline
Log In to Comment