Commit Graph

209 Commits

Author SHA1 Message Date
christos
f1cc09510d Patch from Jung-uk Kim (jkim at FreeBSD dot org) to allow contents of multiple
directories to be merged to the current image.
2012-01-28 02:35:46 +00:00
christos
4a5d314575 add support for setting the ufs label. (Nathan Whitehorn) 2011-10-09 21:33:43 +00:00
christos
91cc0e5629 more fixes from martin 2011-08-23 19:57:24 +00:00
christos
3e74546ba5 remove stray brace, minor knf 2011-08-23 19:17:07 +00:00
christos
1beaa2ceec PR/45285: Martin Matuska: makefs does not properly convert ISO level 1 and 2
filenames (buffer overflow)

makefs does not properly verify the maximum filename length in the
special "." case for both ISO level 1 and ISO level 2 filename
conversion.  This creates broken images or causes a buffer overflow
(ISO level 2).

ISO level 1:
If a filename contains only dots or up to 8 characters followed by
dots the 8+3 limit check doesn't work.

ISO level 2:
If a filename contains a dot in the first 30 characters and a dot
on the 30th character, the length limit check doesn't work and the
buffer is overflowed.

$ mkdir level1
$ touch level1/12345............
$ makefs -t cd9660 -o isolevel=1 test.iso level1

$ mkdir level2
$ touch level2/1234567890.2345678901234567.....34567890123456789012345
$ makefs -t cd9660 -o isolevel=2 test.iso level2
2011-08-23 17:09:11 +00:00
wiz
8e6d328065 Re-order `usage' alphabetically;
rename option arguments in the manpage's `SYNOPSIS' section to
match those from `usage' (not the other way around; the `usage'-line
(and other parts of makefs.c) contain the correct names);
minor punctuation improvements.

From Snader_LB.
2011-08-15 14:45:01 +00:00
uch
7d18226237 newfs_v7fs(8)'s -v and -P options are obsolete. changed to newfs(8) compatible -V option. 2011-08-10 11:31:49 +00:00
christos
b166834bb8 PR/45217: Martin Matuska: Use proper lengths to space pad fields and don't
overwrite them according to the spec.
2011-08-06 23:25:19 +00:00
wiz
fc4d0f871a Bump date for previous, fix typo. 2011-07-22 13:04:00 +00:00
joerg
29d01baadc Allow cross-compiling from Linux 2011-07-19 18:29:41 +00:00
tron
12aec09384 Re-enable v7fs support in the tools version of "makefs" after the
issues have been fixed by Alan Barrett. Tested under Mac OS X.
2011-07-18 22:52:37 +00:00
tron
d341b47a1c Define "USE_V7FS" in the makefile of the directory with the actual source. 2011-07-18 21:22:55 +00:00
tron
043cc21d99 Don't include v7fs support into tool version of "makefs" because it
breaks the build.
2011-07-18 17:15:51 +00:00
tron
2c0999f3fa Fix broken error check found by GCC 4.5. 2011-07-18 17:15:07 +00:00
tron
b166bb160f Don't include v7fs support into tool version of makefs because it
breaks the build.
2011-07-18 17:15:06 +00:00
uch
dd9e830956 v7fs(7th edition(V7) file system) support. 2011-07-18 08:58:38 +00:00
enami
0b23c5aa3d Move inclusion of sys/endian.h from cd9660_eltorito.c to cd9660.h
since actual user is not cd9660_eltorito.c but iso.h and
cd9660_eltorito.h.

Actually, include order/place of sys/endian.h doesn't matter on
netbsd since it is always included by sys/types.h but it's not
true on other system.  This should fix cross build breakage on
freebsd introduced by rev. 1.16 of cd9660_eltorito.c.
Problem reported and fix suggested on twitter.
2011-06-23 02:35:56 +00:00
mrg
75e42fa7da remove most of the remaining HAVE_GCC tests that are always true in
the modern world.
2011-06-20 07:43:56 +00:00
tsutsui
79fcae9efc Apply fixes for PR bin/44114 (makefs(8) -t cd9660 -o rockridge creates
corrupted cd9660fs):
 - makefs/cd9660.c:
  - cd9660_rrip_move_directory() should also update lenght[0] and
    name_len[0] in dir->isoDirRecord
 - makefs/cd9660/iso9660_rrip.c:
  - cd9660_rrip_finalize_node() should check rr_real_parent in node->parent,
    not in node itself in RRIP_PL case
  - cd9660_rrip_initialize_node() should update only node passed as arg
    so handle RRIP_PL in DOTDOT case

Fixes malformed dotdot entries in deep (more than 8 level) directories
moved into .rr_moved dir.

Should be pulled up to netbsd-5.
(no official ISO has such deep dirs, but cobalt restorecd is affected)
2011-05-29 17:07:57 +00:00
tsutsui
72050b117c - remove unnecessary (pasto?) line on RRIP PL handling for moved dir
- RRIP RE length should be 4, not 0
2011-05-28 11:59:29 +00:00
christos
c419ca3c2c include system headers after config.h 2011-05-23 00:21:50 +00:00
christos
0477909eb4 From Nathan Whitehorn (nwhitehorn at freebsd dot org):
Add code to generate bootable ISOs on Powermac and CHRP systems.
Synthesize some partition maps (APM and MBR, respectively) pointing
to (a) the whole disk, and (b) relevant El Torito boot images that
have been added by other code. These partition maps are a little
bit funny looking, but they seem to work. FreeBSD has been using
this successfully in their release generation on powerpc, as well
as generating all non-SPARC install media. SPARC support could
probably be added as an extension of this patch.
2011-05-22 21:51:39 +00:00
christos
8bd84b0401 Fix typos in character ranges from: Baptiste Daroussin bapt at freebsd dot org 2011-03-23 13:11:51 +00:00
bouyer
063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
wiz
613c28210d Fix fd leaks in error cases. Found by cppcheck. 2011-01-04 09:48:21 +00:00
tsutsui
41610f52e9 cd9960 -> cd9660 2010-11-19 15:47:32 +00:00
christos
2ec6e0f18a Handle > 2GB images. Thanks to Greg Troxel for testing! 2010-10-27 18:51:34 +00:00
christos
203850f0b2 - simple fseek->fseeko conversion. probably needs more work.
- use a constant instead of sprinkling 2048 everywhere.
2010-10-22 00:49:15 +00:00
mbalmer
f0a888ee5f make sense 2009-11-22 18:43:27 +00:00
mbalmer
124961627e s/the the/the/ 2009-11-22 18:40:26 +00:00
snj
550147bd6a Remove 3rd and 4th clauses in christos' license. OK christos. 2009-10-21 01:07:44 +00:00
ahoka
39c5e1f59f Get rid of the DOS line endings in the file.
No change of the code intended.
2009-07-04 14:31:38 +00:00
joerg
70e3d67b70 Create images with 0666 - umask, not 0777 - umask (e.g. without x bits). 2009-04-28 22:49:26 +00:00
lukem
d877c4c3c0 Enable WARNS=4 by default, except for:
cpuctl  dumplfs  hprop  ipf  iprop-log  kadmin  kcm  kdc  kdigest
	kimpersonate  kstash  ktutil  makefs  ndbootd  ntp  pppd  quot
	racoon  racoonctl  rtadvd  sntp  sup  tcpdchk  tcpdmatch  tcpdump
	traceroute  traceroute6  user  veriexecgen  wsmoused  zic
(Mostly third-party applications)
2009-04-22 15:23:01 +00:00
dyoung
7af558eba1 Distinguish read(2) failure due to a short read from other causes, and
suggest in the error message a possible cause: the size= attribute in
the metalog (if one is given) may be different from the source file's
actual size.
2009-04-16 18:54:16 +00:00
bjh21
9d5675794b Bump date for last change. 2009-01-20 20:47:25 +00:00
pooka
aeac8f5107 Move fs-specific stuff in Makefile to fs/Makefile.inc to clarify
top-level Makefile.
2009-01-16 19:39:52 +00:00
pooka
9857fb8cb2 remove fsopts asserts - the parameter is unused, so we don't care here 2009-01-16 18:02:24 +00:00
bjh21
f8474b32a7 Add support for encoding RISC OS metadata into ISO 9660 filesystems.
This is done by adding the general ability to stuff non-SUSP data into
the end of the System Use field of a Directory Record, which required
some amount of rewriting of the SUSP support.  I think the result is
at least as good as what came before, and I've fixed at least one bug
along the way.  Tested against RISC OS 3.70 on my Risc PC.

Oh, why do we want it?  It should allow us to make acorn{26,32} CDs that
can be booted directly from RISC OS without mucking around copying the
bootloader to a native filing system.
2009-01-10 22:06:29 +00:00
he
8309b1bdfc Initialize a local variable to get rid of a "may be used uninitialized"
warning (turned into error by -Werror).
2009-01-10 11:04:36 +00:00
bjh21
7dd482c240 Fix another bug in SUSP "CE" handling: when the SUSP records fit into
the System Use field with fewer then 28 bytes to spare, we were
remembering the wrong length for the System Use field and hence
emitting a corrupt directory entry.  This could be triggered by trying
to build a filesystem containing a regular file with a 120-byte name.
Now we're a little more careful.
2009-01-09 00:24:07 +00:00
bjh21
61773f97b8 When splitting a System Use Area between a System Use field and a
Continuation Area, be sure to insert the "CE" record at the correct
point in the chain of SUSP records.  Without this, makefs emits
an invalid image if any file needs a Continuation Area.  The bug
seems to have been introduced with the conversion to TAILQs.
2009-01-08 23:31:33 +00:00
bjh21
a9eb597f96 Typo: debuging -> debugging. 2009-01-08 22:28:45 +00:00
bjh21
72846fc11e If the user specifies a cd9660-specific option that needs an integer value
without supplying a value, complain at them instead of segfaulting.
Or, to put it another way, check that the value is non-NULL before calling
set_option().
2009-01-08 22:26:19 +00:00
lukem
f9dee3872f cd9660 support has been present for a while 2009-01-03 08:25:35 +00:00
christos
33cb72e1c9 fix for 64 bit time_t and dev_t. 2008-12-28 21:51:46 +00:00
ad
577910fbd3 Make the allow-multidot option useful. 2008-11-21 10:02:12 +00:00
ahoka
40ccd11cb5 Import changes from the MirBSD Project:
Initialise memory before writing to only part of it,
making sure that the string is NUL-terminated

Allocate the maximum allowed length (including the
terminating NUL byte) for the temporary name string, make sure
the final output is NUL terminated, and copy back the NUL when
overwriting the previously created name (since maxlen is always
at least 1 less than ISO_FILENAME_MAXLENGTH_WITH_PADDING, this
is no problem)

Patches from Thorsten Glaser through freenode.net.
2008-10-30 18:43:13 +00:00
gmcgarry
3c9a95916d Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC. 2008-08-29 00:02:21 +00:00
reinoud
01c0b5bf89 Fix typo in cd9660 functionname cd9660_setup_boot_volume_descritpor ->
cd9660_setup_boot_volume_descriptor.

Interestingly the same typo was used in 3 files!
2008-07-27 10:29:32 +00:00