@@ -143,7 +143,9 @@ void vlog_set_verbosity(const char *arg);
void vlog_set_pattern(enum vlog_destination, const char *pattern);
int vlog_set_log_file(const char *file_name);
int vlog_reopen_log_file(void);
-void vlog_change_owner(uid_t, gid_t);
+#ifndef _WIN32
+void vlog_change_owner_unix(uid_t, gid_t);
+#endif
/* Configure method how vlog should send messages to syslog server. */
void vlog_set_syslog_method(const char *method);
@@ -849,7 +849,7 @@ daemon_become_new_user__(bool access_datapath)
{
/* If vlog file has been created, change its owner to the non-root user
* as specifed by the --user option. */
- vlog_change_owner(uid, gid);
+ vlog_change_owner_unix(uid, gid);
if (LINUX) {
if (LIBCAPNG) {
@@ -430,12 +430,13 @@ vlog_reopen_log_file(void)
}
}
+#ifndef _WIN32
/* In case a log file exists, change its owner to new 'user' and 'group'.
*
* This is useful for handling cases where the --log-file option is
* specified ahead of the --user option. */
void
-vlog_change_owner(uid_t user, gid_t group)
+vlog_change_owner_unix(uid_t user, gid_t group)
{
if (!log_file_name) {
return;
@@ -450,6 +451,7 @@ vlog_change_owner(uid_t user, gid_t group)
log_file_name, ovs_strerror(errno));
}
}
+#endif
/* Set debugging levels. Returns null if successful, otherwise an error
* message that the caller must free(). */