Re: [PATCH] btrfs-progs: add stat check in open_ctree_fs_info

2016-03-20 Thread Qu Wenruo
Austin S. Hemmelgarn wrote on 2016/03/18 07:17 -0400: On 2016-03-17 20:38, Qu Wenruo wrote: Austin S. Hemmelgarn wrote on 2016/03/17 07:22 -0400: On 2016-03-17 05:04, Qu Wenruo wrote: Austin S. Hemmelgarn wrote on 2016/03/16 11:26 -0400: Currently, open_ctree_fs_info will open whatever

Re: [PATCH] btrfs-progs: add stat check in open_ctree_fs_info

2016-03-19 Thread David Sterba
On Fri, Mar 18, 2016 at 07:17:21AM -0400, Austin S. Hemmelgarn wrote: > >>> This one seems to be too restrict. > >>> > >>> I prefer to block char/pipe/dir and some other obvious wrong ones other > >>> than only allowing regular and block ones. > >> Running against a directory gives a cryptic error

Re: [PATCH] btrfs-progs: add stat check in open_ctree_fs_info

2016-03-19 Thread Qu Wenruo
Austin S. Hemmelgarn wrote on 2016/03/17 07:22 -0400: On 2016-03-17 05:04, Qu Wenruo wrote: Austin S. Hemmelgarn wrote on 2016/03/16 11:26 -0400: Currently, open_ctree_fs_info will open whatever path you pass it and try to interpret it as a BTRFS filesystem. While this is not nessecarily

Re: [PATCH] btrfs-progs: add stat check in open_ctree_fs_info

2016-03-19 Thread Duncan
Austin S. Hemmelgarn posted on Wed, 16 Mar 2016 11:26:11 -0400 as excerpted: > Currently, open_ctree_fs_info will open whatever path you pass it and > try to interpret it as a BTRFS filesystem. While this is not > nessecarily dangerous (except possibly if done on a character device), > it does

Re: [PATCH] btrfs-progs: add stat check in open_ctree_fs_info

2016-03-19 Thread Austin S. Hemmelgarn
On 2016-03-17 04:58, Duncan wrote: Austin S. Hemmelgarn posted on Wed, 16 Mar 2016 11:26:11 -0400 as excerpted: Currently, open_ctree_fs_info will open whatever path you pass it and try to interpret it as a BTRFS filesystem. While this is not nessecarily dangerous (except possibly if done on

Re: [PATCH] btrfs-progs: add stat check in open_ctree_fs_info

2016-03-19 Thread Austin S. Hemmelgarn
On 2016-03-17 20:38, Qu Wenruo wrote: Austin S. Hemmelgarn wrote on 2016/03/17 07:22 -0400: On 2016-03-17 05:04, Qu Wenruo wrote: Austin S. Hemmelgarn wrote on 2016/03/16 11:26 -0400: Currently, open_ctree_fs_info will open whatever path you pass it and try to interpret it as a BTRFS

Re: [PATCH] btrfs-progs: add stat check in open_ctree_fs_info

2016-03-19 Thread Austin S. Hemmelgarn
On 2016-03-17 05:04, Qu Wenruo wrote: Austin S. Hemmelgarn wrote on 2016/03/16 11:26 -0400: Currently, open_ctree_fs_info will open whatever path you pass it and try to interpret it as a BTRFS filesystem. While this is not nessecarily dangerous (except possibly if done on a character

[PATCH] btrfs-progs: add stat check in open_ctree_fs_info

2016-03-19 Thread Austin S. Hemmelgarn
Currently, open_ctree_fs_info will open whatever path you pass it and try to interpret it as a BTRFS filesystem. While this is not nessecarily dangerous (except possibly if done on a character device), it does result in some rather cryptic and non-sensical error messages when trying to run

Re: [PATCH] btrfs-progs: add stat check in open_ctree_fs_info

2016-03-18 Thread Qu Wenruo
Austin S. Hemmelgarn wrote on 2016/03/16 11:26 -0400: Currently, open_ctree_fs_info will open whatever path you pass it and try to interpret it as a BTRFS filesystem. While this is not nessecarily dangerous (except possibly if done on a character device), it does result in some rather cryptic