[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: busybox 1.19.3 cp bug w.r.t device files?
From:       Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn () axis ! com>
Date:       2011-12-21 15:34:57
Message-ID: 1112211632260.8662 () somehost
[Download RAW message or body]

On Wed, 21 Dec 2011, Denys Vlasenko wrote:
> On Wed, Dec 21, 2011 at 2:38 PM, Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote:
> > Denys Vlasenko <vda.linux@googlemail.com> wrote on 2011/12/21 13:08:30:
> >> On Wed, Dec 21, 2011 at 12:31 PM, Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote:
> >> >
> >> > Recently installed bb 1.19.3 (gentoo) on our ppc target. Today
> >> > I discovered that cp vmlinux /dev/mtdblock5 dosn't work. The
> >> > device file is removed and a new plain file is created instead.
> >> > Feels like a bb bug, comments?
> >>
> >> config FEATURE_NON_POSIX_CP
> >>         bool "Non-POSIX, but safer, copying to special nodes"
> >>         default y
> >>         help
> >>           With this option, "cp file symlink" will delete symlink
> >>           and create a regular file. This does not conform to POSIX,
> >>           but prevents a symlink attack.
> >>           Similarly, "cp file device" will not send file's data
> >>           to the device. (To do that, use "cat file >device")
> >
> > Not 100% sure how to read this. I have CONFIG_FEATURE_NON_POSIX_CP=y
> > already. Should I change to CONFIG_FEATURE_NON_POSIX_CP=n?
>
> Yes. (however, I personally think it's better to use cat, not cp,
> for the operation you are trying to perform)

'dd' (with optimal bs) can be yet another alternative.


Cheers,

-- 
Cristian
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic