virDomainDiskTranslateSourcePoolAuth(virStorageSourcePtr src,
                                     virStoragePoolSourcePtr source)
{
    /* Only necessary when authentication set */
    if (!source->auth)
        return 0;

    src->auth = virStorageAuthDefCopy(source->auth);
    if (!src->auth)
        return -1;
    /* A <disk> doesn't use <auth type='%s', so clear that out for the disk */
    src->auth->authType = VIR_STORAGE_AUTH_TYPE_NONE;
    return 0;
}
virDomainDiskTranslateSourcePoolAuth(virStorageSourcePtr src,
                                     virStoragePoolSourcePtr source)
{
     
    if (!source->auth)
        return 0;

    src->auth = virStorageAuthDefCopy(source->auth);
    if (!src->auth)
        return -1;
     
    src->auth->authType = VIR_STORAGE_AUTH_TYPE_NONE;
    return 0;
}