Bug#158916: dpkg makes device nodes as regular files
On Fri, 30 Aug 2002, Michael Smith wrote:
> Package: dpkg
> Version: 1.9.21
>
> We're using dpkg to build packages and flash images for an embedded system
> we're developing. The call to mknod() in main/archives.c passes "0" as the
> file mode, so device nodes come out as regular files. The patch below
> seems to fix it:
>
> --- main/archives.c.orig Tue Mar 12 00:36:45 2002
> +++ main/archives.c Fri Aug 30 16:06:34 2002
> @@ -526,7 +526,7 @@
> newtarobject_allmodes(fnamenewvb.buf,ti, nifd->namenode->statoverride);
> break;
> case CharacterDevice: case BlockDevice:
> - if (mknod(fnamenewvb.buf,0,ti->Device))
> + if (mknod(fnamenewvb.buf,ti->Mode,ti->Device))
> ohshite(_("error creating device `%.255s'"),ti->Name);
> debug(dbg_eachfiledetail,"tarobject CharacterDevice|BlockDevice");
> newtarobject_allmodes(fnamenewvb.buf,ti, nifd->namenode->statoverride);
This bug is valid for 1.10 and 1.11(HEAD). Also, the same fix needs to be
done for fifo's and dirs.
Reply to: