]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage_fs: Create directory with UID if needed
authorMartin Kletzander <mkletzan@redhat.com>
Wed, 27 May 2015 08:05:14 +0000 (10:05 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Wed, 27 May 2015 14:59:25 +0000 (16:59 +0200)
The code already exists there, it just modified different flags.  I just
noticed this when looking at the code.  This patch is better to view
with bigger context or '-W'.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/storage/storage_backend_fs.c

index bcbbb3ae252aa19d3c7f7b3e8d62502bf40472e9..337b8d3b92897256913290bc3af0f176b49cf0e2 100644 (file)
@@ -807,7 +807,7 @@ virStorageBackendFileSystemBuild(virConnectPtr conn ATTRIBUTE_UNUSED,
         (needs_create_as_uid || !virFileExists(pool->def->target.path)))
         mode = VIR_STORAGE_DEFAULT_POOL_PERM_MODE;
     if (needs_create_as_uid)
-        flags |= VIR_DIR_CREATE_AS_UID;
+        dir_create_flags |= VIR_DIR_CREATE_AS_UID;
 
     /* Now create the final dir in the path with the uid/gid/mode
      * requested in the config. If the dir already exists, just set