[Fedora-directory-devel] Please review: [Bug 173873] Directory Server should shutdown if it fails to write logs

Noriko Hosoi nhosoi at redhat.com
Thu Oct 4 23:39:56 UTC 2007


Summary: Directory Server should shutdown if it fails to write logs

https://bugzilla.redhat.com/show_bug.cgi?id=173873


------- Additional Comments From nhosoi at 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 at 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20071004/3a18dac4/attachment.bin>


More information about the Fedora-directory-devel mailing list