[libvirt] [PATCH] storage: backend: Log uid/gid when initializing storage file backend
Peter Krempa
pkrempa at redhat.com
Fri Dec 5 09:12:09 UTC 2014
On 12/04/14 21:36, Eric Blake wrote:
> On 12/04/2014 12:24 PM, Peter Krempa wrote:
>> To ease debugging permission problems add uid/gid values to the debug
>> message when initializing a storage file backend.
>> ---
>> src/storage/storage_backend_fs.c | 4 ++--
>> src/storage/storage_backend_gluster.c | 4 ++--
>> 2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
>> index 0ee1d09..b831268 100644
>> --- a/src/storage/storage_backend_fs.c
>> +++ b/src/storage/storage_backend_fs.c
>> @@ -1370,9 +1370,9 @@ virStorageFileBackendFileInit(virStorageSourcePtr src)
>> {
>> virStorageFileBackendFsPrivPtr priv = NULL;
>>
>> - VIR_DEBUG("initializing FS storage file %p (%s:%s)", src,
>> + VIR_DEBUG("initializing FS storage file %p (%s:%s[%u:%u])", src,
>> virStorageTypeToString(virStorageSourceGetActualType(src)),
>> - src->path);
>> + src->path, src->drv->uid, src->drv->gid);
>
> You'll need casts to keep gcc happy on all platforms. On at least
> 32-bit cygwin, uid_t is typed as 'long' instead of 'int'. Look at
> src/util/virutil.c for examples.
>
> ACK with the casts added.
>
I've adjusted the patch and pushed. I also found a few places where we
use different (signed) or no typecasts in the storage driver. I'll post
a separate patch to clean that up.
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141205/ed961b74/attachment-0001.sig>
More information about the libvir-list
mailing list