Quoting Fiedler Roman (roman.fied...@ait.ac.at): > Hello List, > > I've accidentally destroyed some files due to following unexpected > behaviour. Is this also reproducible on trunk?
It is. > # echo "content" > file > # cat file > content > # lxc-usernsexec -m u:0:851968:65536 -m g:0:851968:65536 -- /bin/echo xxx < > file > # cat file > xxx > ent > > It seems, that the bad magic at least on Ubuntu trusty version is from: > > readlink("/proc/self/fd/0", "/tmp/file", 256) = 40 # don't know why, but > stdin link is copied Because we explicitly opentty(ttyname) on the result (ttyname) of readlink on /proc/self/fd/0, where opentty re-opens the tty for fds 0-2. I guess we should open fds 1 and 2 separately, as I can certainly see "... < script" as something you'd want to do without wiping out script. -serge _______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users