[libvirt] [PATCH 1/4] storage: Use virFileUnlink instead of rmdir
John Ferlan
jferlan at redhat.com
Mon Sep 21 12:11:42 UTC 2015
On 09/21/2015 06:43 AM, Michal Privoznik wrote:
> On 18.09.2015 20:20, John Ferlan wrote:
>> Similar to commit id '35847860', it's possible to attempt to create
>> a 'netfs' directory in an NFS root-squash environment which will cause
>> the 'vol-delete' command to fail. It's also possible error paths from
>> the 'vol-create' would result in an error to remove a created directory
>> if the permissions were incorrect (and disallowed root access).
>>
>> Signed-off-by: John Ferlan <jferlan at redhat.com>
>> ---
>> src/storage/storage_backend_fs.c | 20 +++++++++-----------
>> src/util/virfile.c | 23 +++++++++++++++++------
>> 2 files changed, 26 insertions(+), 17 deletions(-)
>>
>
[...]
>>
>
> Since this function is now able to work with dirs too, maybe it should
> be renamed to something like virFileDirRemove? But that can be saved for
> a follow up patch. Not a show stopper to me.
>
OK, but rather than go through more churn - I've sent a v2 of patch 1.
I've followed the C API then and named it 'virFileRemove'
John
More information about the libvir-list
mailing list