Summary: Directory Server should shutdown if it fails to write logs
https://bugzilla.redhat.com/show_bug.cgi?id=173873
------- Additional Comments From nhosoi(a)redhat.com 2007-10-04 18:04 EST -------
Created an attachment (id=216781)
--> (
https://bugzilla.redhat.com/attachment.cgi?id=216781&action=view)
cvs diff ldapserver/ldap/servers/slapd/{log.c, libglobs.c}
Files:
ldapserver/ldap/servers/slapd/log.c
/libglobs.c
Change Description:
1. introduced a new static function log__error_emergency, which is called at
emergency to log to the syslog and at least try to log into the errors log one
more time.
2. added an error parameter to the macro LOG_WRITE_NOW to return if the writing
to the log was successful or not.
3. if opening an errors log or writing to an errors log failed, call
g_set_shutdown to shutdown the server gracefully.
4. log__error_emergency calls writing log function (LDAPDebug -->
slapd_log_error_proc_internal)
with ERROR_LOCK_WRITE unlocked, if locked.
------- Additional Comments From nhosoi(a)redhat.com 2007-10-04 19:32 EST -------
Created an attachment (id=216791)
--> (
https://bugzilla.redhat.com/attachment.cgi?id=216791&action=view)
test cases
Error cases:
. opening errors log
. rotating errors log
. writing to errors log