diff options
Diffstat (limited to 'ldap/servers/slapd')
-rw-r--r-- | ldap/servers/slapd/log.c | 2 | ||||
-rw-r--r-- | ldap/servers/slapd/proto-slap.h | 2 | ||||
-rw-r--r-- | ldap/servers/slapd/util.c | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/ldap/servers/slapd/log.c b/ldap/servers/slapd/log.c index effeae75..1c9502f2 100644 --- a/ldap/servers/slapd/log.c +++ b/ldap/servers/slapd/log.c @@ -3540,11 +3540,13 @@ log__open_errorlogfile(int logfile_state, int locked) return LOG_UNABLE_TO_OPENFILE; } +#ifndef _WIN32 /* make sure the logfile is owned by the localuser. If one of the * alternate ns-slapd modes, such as db2bak, tries to log an error * at startup, it will create the logfile as root! */ slapd_chown_if_not_owner(loginfo.log_error_file, pw->pw_uid, -1); +#endif loginfo.log_error_fdes = fp; if (logfile_state == LOGFILE_REOPENED) { diff --git a/ldap/servers/slapd/proto-slap.h b/ldap/servers/slapd/proto-slap.h index c159964d..30f88b5c 100644 --- a/ldap/servers/slapd/proto-slap.h +++ b/ldap/servers/slapd/proto-slap.h @@ -607,7 +607,9 @@ void g_set_accesslog_level(int val); */ void slapd_nasty(char* str, int c, int err); int strarray2str( char **a, char *buf, size_t buflen, int include_quotes ); +#ifndef _WIN32 int slapd_chown_if_not_owner(const char *filename, uid_t uid, gid_t gid); +#endif int slapd_comp_path(char *p0, char *p1); diff --git a/ldap/servers/slapd/util.c b/ldap/servers/slapd/util.c index 9870e351..22e3253d 100644 --- a/ldap/servers/slapd/util.c +++ b/ldap/servers/slapd/util.c @@ -717,6 +717,7 @@ strarray2str( char **a, char *buf, size_t buflen, int include_quotes ) Returns 0 upon success or non-zero otherwise, usually -1 if some system error occurred */ +#ifndef _WIN32 int slapd_chown_if_not_owner(const char *filename, uid_t uid, gid_t gid) { @@ -737,6 +738,7 @@ slapd_chown_if_not_owner(const char *filename, uid_t uid, gid_t gid) return result; } +#endif /* * Compare 2 pathes |