mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 22:03:49 +03:00
virSecurityDACSetOwnershipInternal: Fix WIN32 code
I must admit, I have no idea why we build such POSIX dependent code as DAC driver for something such not POSIX as WIN32. Anyway, the code which is supposed to set error is not doing that. The proper way is to mimic what chown() does: On error, -1 is returned, and errno is set to indicate the error. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
b332c2cf89
commit
6fba030fed
@ -700,7 +700,8 @@ virSecurityDACSetOwnershipInternal(const virSecurityDACData *priv,
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
rc = ENOSYS;
|
||||
rc = -1;
|
||||
errno = ENOSYS;
|
||||
#else /* !WIN32 */
|
||||
rc = chown(path, uid, gid);
|
||||
#endif /* !WIN32 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user