Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Dec 2004 12:28:54 -0700 (MST)
From:      Warner Losh <imp@harmony.village.org>
To:        kientzle@FreeBSD.org
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libarchive archive_entry.c
Message-ID:  <20041211.122854.74737190.imp@harmony.village.org>
In-Reply-To: <200412110711.iBB7BgLi030397@repoman.freebsd.org>

index | next in thread | previous in thread | raw e-mail

>   Be more careful about assembling/disassembling
>   device numbers.  In particular, this should fix
>   a bug where archiving a device node with a very
>   large minor number would sometimes overflow and
>   corrupt the major number.

This also pointed out a bug in our mknod() routine in one edge case.
I believe we should return EINVAL when that happens in the syscall.

Specifically "mknod foo c 255 0xffff00ff" results in a file foo with
major/minor number of 0.  This is because VNOVAL is -1 and there
appear to be checks against it in the code later, hence we end up with
0, 0.  I believe that we should either make it work (hard), or we
should return EINVAL from the syscall wrapper or some routine early in
the path.

Comments?

Warner



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041211.122854.74737190.imp>