Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Please unblock package udfclient New upstream version fixes CVE-2017-8305 (Buffer overflow in strlcpy implementation), debian bug #861347. As protection for buffer overflows, package has now enabled hardening. Source debdiff is attached. unblock udfclient/0.8.7-1 -- Pali Rohár pali.ro...@gmail.com
diff -Nru udfclient-0.8.7/cd_disect.c udfclient-0.8.8/cd_disect.c --- udfclient-0.8.7/cd_disect.c 2017-01-16 15:35:03.000000000 +0100 +++ udfclient-0.8.8/cd_disect.c 2017-04-03 11:38:13.000000000 +0200 @@ -2,7 +2,7 @@ /* * File "cd_disect.c" is part of the UDFclient toolkit. - * File $Id: cd_disect.c,v 1.80 2016/04/25 20:55:30 reinoud Exp $ $Name: $ + * File $Id: cd_disect.c,v 1.81 2017/04/03 08:48:51 reinoud Exp $ $Name: $ * * Copyright (c) 2003, 2004, 2005, 2006, 2011 * Reinoud Zandijk <rein...@netbsd.org> @@ -211,7 +211,7 @@ if (cntrl & 1) strcat(scrap, "; incremental "); else strcat(scrap, "; uninterrupted"); } else { strcat(scrap, "audio track"); - if (cntrl & 1) strcat(scrap, "; pre-emphasis of 50/15 µs"); else strcat(scrap, "; no pre-emphasis"); + if (cntrl & 1) strcat(scrap, "; pre-emphasis of 50/15 microseconds"); else strcat(scrap, "; no pre-emphasis"); } if (cntrl & 2) strcat(scrap, "; copy prohibited"); @@ -1384,7 +1384,7 @@ if (cntrl & 1) printf("; incremental "); else printf("; uninterrupted"); } else { printf("audio track"); - if (cntrl & 1) printf("; pre-emphasis of 50/15 µs"); else printf("; no pre-emphasis"); + if (cntrl & 1) printf("; pre-emphasis of 50/15 microseconds"); else printf("; no pre-emphasis"); } if (cntrl & 2) printf("; copy prohibited"); printf(")\n"); diff -Nru udfclient-0.8.7/configure udfclient-0.8.8/configure --- udfclient-0.8.7/configure 2017-01-16 15:35:03.000000000 +0100 +++ udfclient-0.8.8/configure 2017-04-03 11:38:13.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for udfclient 0.8.7. +# Generated by GNU Autoconf 2.69 for udfclient 0.8.8. # # Report bugs to <rein...@netbsd.org>. # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='udfclient' PACKAGE_TARNAME='udfclient' -PACKAGE_VERSION='0.8.7' -PACKAGE_STRING='udfclient 0.8.7' +PACKAGE_VERSION='0.8.8' +PACKAGE_STRING='udfclient 0.8.8' PACKAGE_BUGREPORT='rein...@netbsd.org' PACKAGE_URL='' @@ -1239,7 +1239,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures udfclient 0.8.7 to adapt to many kinds of systems. +\`configure' configures udfclient 0.8.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1304,7 +1304,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of udfclient 0.8.7:";; + short | recursive ) echo "Configuration of udfclient 0.8.8:";; esac cat <<\_ACEOF @@ -1384,7 +1384,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -udfclient configure 0.8.7 +udfclient configure 0.8.8 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1810,7 +1810,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by udfclient $as_me 0.8.7, which was +It was created by udfclient $as_me 0.8.8, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4537,7 +4537,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by udfclient $as_me 0.8.7, which was +This file was extended by udfclient $as_me 0.8.8, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4590,7 +4590,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -udfclient config.status 0.8.7 +udfclient config.status 0.8.8 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru udfclient-0.8.7/configure.ac udfclient-0.8.8/configure.ac --- udfclient-0.8.7/configure.ac 2017-01-16 15:35:03.000000000 +0100 +++ udfclient-0.8.8/configure.ac 2017-04-03 11:38:13.000000000 +0200 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT([udfclient], [0.8.7], [rein...@netbsd.org]) +AC_INIT([udfclient], [0.8.8], [rein...@netbsd.org]) #AC_CONFIG_SRCDIR([udf.c]) AC_CANONICAL_HOST #AC_CONFIG_HEADER([config.h]) diff -Nru udfclient-0.8.7/debian/changelog udfclient-0.8.8/debian/changelog --- udfclient-0.8.7/debian/changelog 2017-01-24 23:43:34.000000000 +0100 +++ udfclient-0.8.8/debian/changelog 2017-04-27 22:10:27.000000000 +0200 @@ -1,3 +1,14 @@ +udfclient (0.8.8-1) unstable; urgency=low + + * New upstream release. + - CVE-2017-8305: Fix buffer overflow in strlcpy implementation + (Closes: #861347) + * Enable hardening. + * Install new man pages. + * Update debian/watch. + + -- Pali Rohár <pali.ro...@gmail.com> Thu, 27 Apr 2017 22:10:27 +0200 + udfclient (0.8.7-1) unstable; urgency=low * New upstream release. diff -Nru udfclient-0.8.7/debian/manpages udfclient-0.8.8/debian/manpages --- udfclient-0.8.7/debian/manpages 1970-01-01 01:00:00.000000000 +0100 +++ udfclient-0.8.8/debian/manpages 2017-04-27 21:51:04.000000000 +0200 @@ -0,0 +1,2 @@ +mmc_format.8 +newfs_udf.8 diff -Nru udfclient-0.8.7/debian/rules udfclient-0.8.8/debian/rules --- udfclient-0.8.7/debian/rules 2016-07-28 23:22:14.000000000 +0200 +++ udfclient-0.8.8/debian/rules 2017-04-27 22:03:12.000000000 +0200 @@ -2,6 +2,7 @@ # -*- makefile -*- export DH_VERBOSE=1 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ --buildsystem=bmake diff -Nru udfclient-0.8.7/debian/watch udfclient-0.8.8/debian/watch --- udfclient-0.8.7/debian/watch 2016-07-28 23:22:14.000000000 +0200 +++ udfclient-0.8.8/debian/watch 2017-04-27 21:46:09.000000000 +0200 @@ -1,2 +1,2 @@ version=3 -http://www.13thmonkey.org/udfclient/releases/UDFclient\.([^r].*)\.tgz +http://www.13thmonkey.org/udfclient/releases/UDFclient\.([^r].*)\.tgz debian uupdate diff -Nru udfclient-0.8.7/Makefile udfclient-0.8.8/Makefile --- udfclient-0.8.7/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ udfclient-0.8.8/Makefile 2017-04-03 13:11:21.000000000 +0200 @@ -0,0 +1,88 @@ +# +# UDFclient toolkit +# +# Copyright 2003,2004,2005 Reinoud P.Zandijk +# +# +# File $Id: Makefile.in,v 1.24 2017/01/10 09:52:30 reinoud Exp $ $Name: $ +# + +srcdir= . + +prefix= /usr/local +exec_prefix= ${prefix} +sbindir= ${exec_prefix}/sbin +mandir= ${datarootdir}/man +bindir= ${exec_prefix}/bin +datarootdir= ${prefix}/share + +CC= clang +LD= $(CC) +CPPFLAGS= -DNO_DIRENT_NAMLEN -DSCSI -DUSCSI_SCSIPI -DPACKAGE_NAME=\"udfclient\" -DPACKAGE_TARNAME=\"udfclient\" -DPACKAGE_VERSION=\"0.8.8\" -DPACKAGE_STRING=\"udfclient\ 0.8.8\" -DPACKAGE_BUGREPORT=\"rein...@netbsd.org\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_ENDIAN_H=1 -DHAVE_MACHINE_ENDIAN_H=1 -DHAVE_MACHINE_BSWAP_H=1 -DHAVE_SYS_BSWAP_H=1 -DHAVE_MACHINE_INT_FMTIO_H=1 -DHAVE_STRUCT_STAT_ST_ATIMESPEC=1 -DHAVE_STRUCT_STAT_ST_BIRTHTIMESPEC=1 -DHAVE_DEV_SCSIPI_SCSIPI_ALL_H=1 -I$(srcdir) +CFLAGS= -g -O2 +LDFLAGS= + +INSTALL= /usr/bin/install -c + +# NetBSD +#CFLAGS+= -Wall \ +# -Wuninitialized \ +# -fno-strict-aliasing \ +# -Wextra -Werror +# -Werror ${COPTS} \ +# -DNDEBUG + +# Anonymising this client (for comformity) +#CFLAGS+= -D__ANONYMOUSUDF__ + +#CFLAGS+= -fPIC -DPIC +POSTOBJ+= -lpthread -lc + + +# For use with the cpuflags package +#CPROCFLAGS != cpuflags +CFLAGS+= ${CPROCFLAGS} + + +# Main programs +APPS= udfdump udfclient newfs_udf cd_sessions +SCSI_APPS= cd_disect mmc_format +LIB= osta.o udf.o udf_bmap.o udf_allocentries.o udf_discop.o uio.o +LIB+= udf_verbose.o udf_readwrite.o udf_unix.o vfs_dirhash.o +USCSILIB= uscsi_sense.o uscsi_subr.o + +CFLAGS+= -DNEEDS_ISPRINT $(CPPFLAGS) + +all: $(APPS) $(SCSI_APPS) + +install: $(APPS) $(SCSI_APPS) + $(INSTALL) -d $(DESTDIR)/$(bindir) + for app in $(APPS) $(SCSI_APPS); do \ + echo "$(INSTALL) $$app $(DESTDIR)/$(bindir)/$$app"; \ + $(INSTALL) $$app $(DESTDIR)/$(bindir)/$$app; \ + done + +depend: + mkdep $(CFLAGS) *.c + +clean: + rm -f *.o *.a *.core core.* core .depend *~ *.bak $(APPS) $(SCSI_APPS) + rm -fr autom*.cache config.log config.status configure.lineno + +cleandir: clean + rm -f Makefile + +libuscsi.a: $(USCSILIB) + ar -rsc libuscsi.a $(USCSILIB) + +libudf.a: $(LIB) + ar -rsc libudf.a $(LIB) + +$(SCSI_APPS): $(.TARGET).o libuscsi.a + $(LD) -o $(.TARGET) $(LDFLAGS) $(.TARGET).o libuscsi.a $(POSTOBJ) + +$(APPS): $(.TARGET).o libuscsi.a libudf.a + $(LD) -o $(.TARGET) $(LDFLAGS) $(.TARGET).o libudf.a libuscsi.a $(POSTOBJ) + + +# DO NOT DELETE diff -Nru udfclient-0.8.7/Makefile.in udfclient-0.8.8/Makefile.in --- udfclient-0.8.7/Makefile.in 2017-01-16 15:36:50.000000000 +0100 +++ udfclient-0.8.8/Makefile.in 2017-04-03 11:39:08.000000000 +0200 @@ -45,7 +45,7 @@ # Main programs -APPS= udfdump udfclient newfs_udf cd_sessions +APPS= udfdump udfclient newfs_udf cd_sessions SCSI_APPS= cd_disect mmc_format LIB= osta.o udf.o udf_bmap.o udf_allocentries.o udf_discop.o uio.o LIB+= udf_verbose.o udf_readwrite.o udf_unix.o vfs_dirhash.o diff -Nru udfclient-0.8.7/mmc_format.8 udfclient-0.8.8/mmc_format.8 --- udfclient-0.8.7/mmc_format.8 1970-01-01 01:00:00.000000000 +0100 +++ udfclient-0.8.8/mmc_format.8 2017-04-03 11:38:13.000000000 +0200 @@ -0,0 +1,136 @@ +.\" $NetBSD: mmcformat.8,v 1.6 2014/03/18 18:20:47 riastradh Exp $ +.\" +.\" Copyright (c) 2008 Reinoud Zandijk +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in +.\" the documentation and/or other materials provided with the +.\" distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY +.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" +.Dd May 9, 2008 +.Dt MMCFORMAT 8 +.Os +.Sh NAME +.Nm mmc_format +.Nd format optical media +.Sh SYNOPSIS +.Nm +.Op Fl BDFGHhIMOpRrSsw +.Op Fl b Ar blockingnr +.Op Fl c Ar cert-num +.\" .Op X format is not implemented yet +.Ar special +.Sh DESCRIPTION +The +.Nm +utility formats optical media conforming to the MMC standard. +This includes CD, DVD, and Blu-Ray (BD) media. +.Pp +The options are as follows: +.Bl -tag -width XbXblockingnrXX +.It Fl B +Blank media when possible before formatting it. +.It Fl b Ar blockingnr +Explicitly select packet size in sectors +.Pq for CD-RW only . +It is not recommended to change this from its default of 32. +.It Fl c Ar cert-num +Certify media for DVD-RAM / DV-RE. +The argument cert-num specifies: +.Bl -tag -offset indent +.It 0 +no certification +.It 1 +full certification +.It 2 +quick certification +.El +.It Fl D +Debug mode. +Print all SCSI/ATAPI command errors. +.It Fl F +Format media. +.It Fl G +Grow last CD-RW/DVD-RW session. +.It Fl H +Show help and print formatting choices for the inserted media. +.It Fl h +Show help and print formatting choices for the inserted media. +.It Fl I +Show help and print formatting choices for the inserted media. +.It Fl M +Select MRW (Mount Rainier) error correcting background format. +.It Fl O +Old style CD-RW formatting; recommended for CD-RW. +.It Fl p +Explicitly set packet format. +.It Fl R +Restart previously stopped MCD-MRW or DVD+RW background format. +.It Fl r +Recompile defect list for DVD-RAM. +.It Fl S +Grow spare space DVD-RAM / BD-RE. +.It Fl s +Format DVD+MRW / BD-RE with extra spare space. +.It Fl w +Wait until completion of background format. +.El +.Sh NOTES +Due to the enormous varieties in optical media, +.Nm +is made as generic as possible. +This can result in confusion. +.Sh EXAMPLES +.Dl Ic mmc_format -B -O /dev/rcd0d +.Pp +Blanks and then formats a CD-RW disc using the +.Dq old style +format command. +It is recommended to use this +.Dq old style +command unless your drive reports that it's not supported; in that case, resort +to the default +.Fl F . +Note that a CD-RW disc can be reformatted without being blanked. +Blanking switches between sequential and fixed packet writing by +erasing the disc. +This can also help to revive old discs. +.Pp +.Dl Ic mmc_format -F -M /dev/rcd0d +.Pp +Format a CD-RW or a DVD+RW to use MRW (Mount Rainier). +This format tries to hide media flaws as much as possible by +relocation. +.Sh SEE ALSO +.Xr scsictl 8 +.Sh HISTORY +The +.Nm +command first appeared in +.Nx 5.0 . +.Sh AUTHORS +.An Reinoud Zandijk Aq Mt rein...@netbsd.org +.Sh BUGS +.Nm +could be merged with +.Xr scsictl 8 +but that tool is very hard disk oriented. diff -Nru udfclient-0.8.7/newfs_udf.c udfclient-0.8.8/newfs_udf.c --- udfclient-0.8.7/newfs_udf.c 2017-01-17 22:21:38.000000000 +0100 +++ udfclient-0.8.8/newfs_udf.c 2017-04-03 11:38:13.000000000 +0200 @@ -2,7 +2,7 @@ /* * File "newfs_udf.c" is part of the UDFclient toolkit. - * File $Id: newfs_udf.c,v 1.45 2016/04/25 21:01:39 reinoud Exp $ $Name: $ + * File $Id: newfs_udf.c,v 1.46 2017/01/18 14:23:35 reinoud Exp $ $Name: $ * * Copyright (c) 2004, 2005, 2006, 2011 * Reinoud Zandijk <rein...@netbsd.org> diff -Nru udfclient-0.8.7/newfs_udf.8 udfclient-0.8.8/newfs_udf.8 --- udfclient-0.8.7/newfs_udf.8 1970-01-01 01:00:00.000000000 +0100 +++ udfclient-0.8.8/newfs_udf.8 2017-04-03 11:38:13.000000000 +0200 @@ -0,0 +1,191 @@ +.\" $NetBSD: newfs_udf.8,v 1.18 2013/08/06 12:15:20 wiz Exp $ +.\" +.\" Copyright (c) 2008 Reinoud Zandijk +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in +.\" the documentation and/or other materials provided with the +.\" distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS +.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY +.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" +.Dd August 2, 2013 +.Dt NEWFS_UDF 8 +.Os +.Sh NAME +.Nm newfs_udf +.Nd construct a new UDF file system +.Sh SYNOPSIS +.Nm +.Op Fl cFM +.Op Fl B Ar blockingsize +.Op Fl L Ar loglabel +.Op Fl P Ar discid +.Op Fl p Ar percentage +.Op Fl S Ar sectorsize +.Op Fl s Ar size +.Op Fl t Ar gmtoff +.Op Fl V Ar max_udf +.Op Fl v Ar min_udf +.Ar special +.Sh DESCRIPTION +The +.Nm +utility creates an UDF file system on device +.Ar special +suitable for the media currently inserted. +.Pp +The options are as follow: +.Bl -tag -width indent +.It Fl B Ar blockingsize +When creating image files, specify the blocking size or packetsize of the media +to +.Ar blockingsize . +.It Fl c +Perform a crude surface check first to weed out disc faults on rewritable +media. +.It Fl F +Force file system construction on non-empty recordable media or create an +image file. +.It Fl L Ar loglabel +Set the disc logical label to the specified +.Ar loglabel . +.It Fl M +Disable metadata partition creation when selected UDF version or media dictates +this. +For strict conformance and interchange, don't disable this unless +its causing problems. +.It Fl P Ar discid +Set the physical disc label to the specified +.Ar discid . +.Pp +Prepend +.Ar discid +with volsetname separated with a ':' if wanted. +For strict conformance and interchange, don't set this manually unless it has +a unique hex number in the first 8 character positions. +.It Fl p Ar percentage +Percentage of partition to be initially reserved for metadata on the Metadata +partition. +It defaults to 20 %. +.It Fl S Ar sectorsize +Set the sectorsize for image files. +For strict conformance and interchange, don't set this manually. +.It Fl s Ar size +For image files, set the file size to the humanized size +.Ar size . +.It Fl t Ar gmtoff +Use the specified +.Ar gmtoff +as gmt time offset for recording times on the disc. +.It Fl V Ar max_udf +Select +.Ar max_udf +as the maximum UDF version to be supported. +For UDF version 2.50, use +.Dq 0x250 +or +.Dq 2.50 . +.It Fl v Ar min_udf +Select +.Ar min_udf +as the minimum UDF version to be supported. +For UDF version 2.01, use +.Dq 0x201 +or +.Dq 2.01 . +.El +.Sh NOTES +The UDF file system is defined for the entire optical medium. +It can only function on the entire CD/DVD/BD so the raw partition +has to be specified for read/write actions. +For +.Nm +this means specifying the raw device with the raw partition, i.e. +.Pa /dev/rcd0d +or +.Pa /dev/rcd0c . +.Pp +Some rewritable optical media needs to be formatted first before it can be +used by UDF. +This can be done using +.Xr mmcformat 8 . +.Pp +The default UDF version is version 2.01. +.Sh EXAMPLES +Create a file system, using the specified names on the device +.Pa /dev/rcd0d +with the default UDF version : +.Bd -literal -offset indent +newfs_udf -P "Encyclopedia:copy-nr-1" -L "volume 2" /dev/rcd0d +.Ed +.Pp +Create a 4.8 GiB sparse file and configure it using +.Xr vnconfig 8 +to be a 2048 sector size disc and create a new UDF file system on +.Pa /dev/rvnd0d +: +.Bd -literal -offset indent +dd if=/dev/zero of=bigdisk.2048.udf seek=9999999 count=1 +vnconfig -c vnd0 bigdisk.2048.udf 2048/1/1/1 +newfs_udf -L bigdisk /dev/rvnd0d +.Ed +.Pp +Create a 2 GiB file and create a new UDF file system on it using the default +512 byte sector size : +.Bd -literal -offset indent +newfs_udf -L bigdisk2 -F -s 2G bigdisk2.iso +.Ed +.Pp +Create a 200 MiB file and create a new UDF file system on it using a sector size +of 2048 : +.Bd -literal -offset indent +newfs_udf -L bigdisk2 -F -s 200M -S 2048 bigdisk3.iso +.Ed +.Pp +Create a new UDF file system on the inserted USB stick using its +native sectorsize of 512 : +.Bd -literal -offset indent +newfs_udf -L "My USB stick" /dev/rsd0d +.Ed +.Sh SEE ALSO +.Xr disktab 5 , +.Xr disklabel 8 , +.Xr mmcformat 8 , +.Xr newfs 8 +.Sh HISTORY +The +.Nm +command first appeared in +.Nx 5.0 . +.Sh AUTHORS +.An Reinoud Zandijk Aq Mt rein...@netbsd.org +.Sh BUGS +The +.Ar P +and the +.Ar S +arguments have changed meaning. +The meaning of +.Ar S +has been merged into +.Ar P +since +.Nx 6.1 . diff -Nru udfclient-0.8.7/Session.vim udfclient-0.8.8/Session.vim --- udfclient-0.8.7/Session.vim 1970-01-01 01:00:00.000000000 +0100 +++ udfclient-0.8.8/Session.vim 2017-04-03 11:38:13.000000000 +0200 @@ -0,0 +1,301 @@ +let SessionLoad = 1 +if &cp | set nocp | endif +let s:cpo_save=&cpo +set cpo&vim +imap <S-Right> <Down><Home> +imap <S-Left> <Up><End> +map :bn<NL> +map :bp<NL> +map Q gq +nmap gx <Plug>NetrwBrowseX +nnoremap <silent> <Plug>NetrwBrowseX :call netrw#NetrwBrowseX(expand("<cWORD>"),0) +imap gq{gq} +imap c \cite{p} +let &cpo=s:cpo_save +unlet s:cpo_save +set autoindent +set background=dark +set backspace=2 +set backup +set cindent +set comments=sr:/*,mb:*,el:*/,:// +set formatoptions=croql +set guifont=Monospace\ 8 +set hidden +set highlight=8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:IncSearch,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,t:Title,v:Visual,w:WarningMsg +set hlsearch +set mouse=a +set ruler +set termencoding=utf-8 +set textwidth=78 +set visualbell +set window=79 +let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 +let v:this_session=expand("<sfile>:p") +silent only +cd ~/UDF/src +if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' + let s:wipebuf = bufnr('%') +endif +set shortmess=aoO +badd +41 cd_disect.c +badd +1 cd_sessions.c +badd +1 config.h +badd +1 defs.h +badd +1 dirhash.h +badd +136 ecma167-udf.h +badd +1 mmc_format.c +badd +31 newfs_udf.c +badd +1 osta.c +badd +1 osta.h +badd +1 queue.h +badd +5182 udf.c +badd +527 udf.h +badd +1 udf_allocentries.c +badd +1 udf_bmap.c +badd +1 udf_bswap.h +badd +1 udf_discop.c +badd +1 udf_discop.h +badd +1 udf_readwrite.c +badd +1 udf_unix.c +badd +1 udf_unix.h +badd +1370 udf_verbose.c +badd +714 udfclient.c +badd +206 udfdump.c +badd +1 uio.c +badd +1 uio.h +badd +1 uscsi_sense.c +badd +1 uscsi_subr.c +badd +1 uscsilib.h +badd +1 uscsilib_machdep.h +badd +423 vfs_dirhash.c +badd +554 /usr/src/sys/fs/udf/udf_vnops.c +badd +4684 /usr/src/sys/fs/udf/udf_subr.c +args cd_disect.c cd_sessions.c config.h defs.h dirhash.h ecma167-udf.h mmc_format.c newfs_udf.c osta.c osta.h queue.h udf.c udf.h udf_allocentries.c udf_bmap.c udf_bswap.h udf_discop.c udf_discop.h udf_readwrite.c udf_unix.c udf_unix.h udf_verbose.c udfclient.c udfdump.c uio.c uio.h uscsi_sense.c uscsi_subr.c uscsilib.h uscsilib_machdep.h vfs_dirhash.c +edit vfs_dirhash.c +set splitbelow splitright +wincmd _ | wincmd | +split +1wincmd k +wincmd w +set nosplitbelow +set nosplitright +wincmd t +set winheight=1 winwidth=1 +exe '1resize ' . ((&lines * 26 + 40) / 80) +exe '2resize ' . ((&lines * 51 + 40) / 80) +argglobal +edit vfs_dirhash.c +setlocal autoindent +setlocal balloonexpr= +setlocal nobinary +setlocal bufhidden= +setlocal buflisted +setlocal buftype= +setlocal cindent +setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e +setlocal cinoptions= +setlocal cinwords=if,else,while,do,for,switch +setlocal comments=sr:/*,mb:*,el:*/,:// +setlocal commentstring=/*%s*/ +setlocal complete=.,w,b,u,t,i +setlocal completefunc= +setlocal nocopyindent +setlocal nocursorcolumn +setlocal nocursorline +setlocal define= +setlocal dictionary= +setlocal nodiff +setlocal equalprg= +setlocal errorformat= +setlocal noexpandtab +if &filetype != 'c' +setlocal filetype=c +endif +setlocal foldcolumn=0 +setlocal foldenable +setlocal foldexpr=0 +setlocal foldignore=# +setlocal foldlevel=0 +setlocal foldmarker={{{,}}} +setlocal foldmethod=manual +setlocal foldminlines=1 +setlocal foldnestmax=20 +setlocal foldtext=foldtext() +setlocal formatexpr= +setlocal formatoptions=croql +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* +setlocal grepprg= +setlocal iminsert=0 +setlocal imsearch=0 +setlocal include= +setlocal includeexpr= +setlocal indentexpr= +setlocal indentkeys=0{,0},:,0#,!^F,o,O,e +setlocal noinfercase +setlocal iskeyword=@,48-57,_,192-255 +setlocal keywordprg= +setlocal nolinebreak +setlocal nolisp +setlocal nolist +setlocal makeprg= +setlocal matchpairs=(:),{:},[:] +setlocal modeline +setlocal modifiable +setlocal nrformats=octal,hex +setlocal nonumber +setlocal numberwidth=4 +setlocal omnifunc= +setlocal path= +setlocal nopreserveindent +setlocal nopreviewwindow +setlocal quoteescape=\\ +setlocal noreadonly +setlocal noscrollbind +setlocal shiftwidth=8 +setlocal noshortname +setlocal nosmartindent +setlocal softtabstop=0 +setlocal nospell +setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ +setlocal spellfile= +setlocal spelllang=en +setlocal statusline= +setlocal suffixesadd= +setlocal swapfile +setlocal synmaxcol=3000 +if &syntax != 'c' +setlocal syntax=c +endif +setlocal tabstop=8 +setlocal tags= +setlocal textwidth=78 +setlocal thesaurus= +setlocal nowinfixheight +setlocal nowinfixwidth +setlocal wrap +setlocal wrapmargin=0 +silent! normal! zE +let s:l = 341 - ((19 * winheight(0) + 13) / 26) +if s:l < 1 | let s:l = 1 | endif +exe s:l +normal! zt +341 +normal! 0 +wincmd w +argglobal +edit udf.c +setlocal autoindent +setlocal balloonexpr= +setlocal nobinary +setlocal bufhidden= +setlocal buflisted +setlocal buftype= +setlocal cindent +setlocal cinkeys=0{,0},0),:,0#,!^F,o,O,e +setlocal cinoptions= +setlocal cinwords=if,else,while,do,for,switch +setlocal comments=sr:/*,mb:*,el:*/,:// +setlocal commentstring=/*%s*/ +setlocal complete=.,w,b,u,t,i +setlocal completefunc= +setlocal nocopyindent +setlocal nocursorcolumn +setlocal nocursorline +setlocal define= +setlocal dictionary= +setlocal nodiff +setlocal equalprg= +setlocal errorformat= +setlocal noexpandtab +if &filetype != 'c' +setlocal filetype=c +endif +setlocal foldcolumn=0 +setlocal foldenable +setlocal foldexpr=0 +setlocal foldignore=# +setlocal foldlevel=0 +setlocal foldmarker={{{,}}} +setlocal foldmethod=manual +setlocal foldminlines=1 +setlocal foldnestmax=20 +setlocal foldtext=foldtext() +setlocal formatexpr= +setlocal formatoptions=croql +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* +setlocal grepprg= +setlocal iminsert=0 +setlocal imsearch=0 +setlocal include= +setlocal includeexpr= +setlocal indentexpr= +setlocal indentkeys=0{,0},:,0#,!^F,o,O,e +setlocal noinfercase +setlocal iskeyword=@,48-57,_,192-255 +setlocal keywordprg= +setlocal nolinebreak +setlocal nolisp +setlocal nolist +setlocal makeprg= +setlocal matchpairs=(:),{:},[:] +setlocal modeline +setlocal modifiable +setlocal nrformats=octal,hex +setlocal nonumber +setlocal numberwidth=4 +setlocal omnifunc= +setlocal path= +setlocal nopreserveindent +setlocal nopreviewwindow +setlocal quoteescape=\\ +setlocal noreadonly +setlocal noscrollbind +setlocal shiftwidth=8 +setlocal noshortname +setlocal nosmartindent +setlocal softtabstop=0 +setlocal nospell +setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ +setlocal spellfile= +setlocal spelllang=en +setlocal statusline= +setlocal suffixesadd= +setlocal swapfile +setlocal synmaxcol=3000 +if &syntax != 'c' +setlocal syntax=c +endif +setlocal tabstop=8 +setlocal tags= +setlocal textwidth=78 +setlocal thesaurus= +setlocal nowinfixheight +setlocal nowinfixwidth +setlocal wrap +setlocal wrapmargin=0 +silent! normal! zE +let s:l = 5895 - ((22 * winheight(0) + 25) / 51) +if s:l < 1 | let s:l = 1 | endif +exe s:l +normal! zt +5895 +normal! 0 +wincmd w +2wincmd w +exe '1resize ' . ((&lines * 26 + 40) / 80) +exe '2resize ' . ((&lines * 51 + 40) / 80) +tabnext 1 +if exists('s:wipebuf') + silent exe 'bwipe ' . s:wipebuf +endif +unlet! s:wipebuf +set winheight=1 winwidth=20 shortmess=filnxtToO +let s:sx = expand("<sfile>:p:r")."x.vim" +if file_readable(s:sx) + exe "source " . s:sx +endif +let &so = s:so_save | let &siso = s:siso_save +doautoall SessionLoadPost +unlet SessionLoad +" vim: set ft=vim : diff -Nru udfclient-0.8.7/udf.c udfclient-0.8.8/udf.c --- udfclient-0.8.7/udf.c 2017-01-16 15:35:03.000000000 +0100 +++ udfclient-0.8.8/udf.c 2017-04-03 14:36:39.000000000 +0200 @@ -2,7 +2,7 @@ /* * File "udf.c" is part of the UDFclient toolkit. - * File $Id: udf.c,v 1.297 2016/04/27 08:05:46 reinoud Exp $ $Name: $ + * File $Id: udf.c,v 1.302 2017/04/03 12:36:21 reinoud Exp $ $Name: $ * * Copyright (c) 2003, 2004, 2005, 2006, 2011 * Reinoud Zandijk <rein...@netbsd.org> @@ -992,12 +992,14 @@ return; } /* FILL in {atime, mtime, attrtime} TIMES! */ -#ifndef NO_STAT_BIRTHTIME - udf_timespec_to_timestamp(&stat->st_birthtimespec, ctime); -#endif udf_timespec_to_timestamp(&stat->st_atimespec, atime); udf_timespec_to_timestamp(&stat->st_mtimespec, mtime); udf_timespec_to_timestamp(&stat->st_ctimespec, attrtime); +#ifndef NO_STAT_BIRTHTIME + udf_timespec_to_timestamp(&stat->st_birthtimespec, ctime); +#else + memcpy(ctime, mtime, sizeof(*ctime)); +#endif return; } @@ -3074,7 +3076,7 @@ struct udf_part_mapping *part_mapping, *data_part_mapping, *search_part_mapping; union udf_pmap *pmap; uint32_t part_cnt, pmap_type, pmap_size; - int32_t data_part_num; + uint32_t data_part_num; uint8_t *pmap_pos; logical = udf_search_logical_volume_in_primary(primary, incomming->logvol_id); @@ -3601,7 +3603,7 @@ uint32_t spar_loc; uint64_t first_vat_loc, vat_loc, last_vat_loc; uint32_t sector_size, lb_size; - int part_num, spar_num, data_part_num, vpart_num; + uint32_t part_num, spar_num, data_part_num, vpart_num; int session_num; int error; @@ -5081,7 +5083,7 @@ int udf_create_empty_anchor_volume_descriptor(uint32_t sector_size, uint16_t dscr_ver, uint32_t main_vds_loc, uint32_t reserve_vds_loc, uint32_t length, struct anchor_vdp **vdp) { assert(vdp); - assert(abs(main_vds_loc - reserve_vds_loc) >= length); + assert(main_vds_loc - reserve_vds_loc >= length); *vdp = malloc(sector_size); if (!*vdp) return ENOMEM; diff -Nru udfclient-0.8.7/uscsi_sense.c udfclient-0.8.8/uscsi_sense.c --- udfclient-0.8.7/uscsi_sense.c 2017-01-16 15:35:03.000000000 +0100 +++ udfclient-0.8.8/uscsi_sense.c 2017-04-03 11:38:13.000000000 +0200 @@ -603,9 +603,7 @@ size_t strlcpy(char *dst, const char *src, size_t size) { - strncpy(dst, src, size-1); - dst[size] = '\0'; - + snprintf(dst, size, "%s", src); return strlen(src); }
signature.asc
Description: This is a digitally signed message part.