[Fedora-directory-commits] ldapserver/ldap/servers/slapd snmp_collator.c, 1.19, 1.20
Nathan Kinder
nkinder at fedoraproject.org
Wed Dec 17 17:22:24 UTC 2008
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17143/ldap/servers/slapd
Modified Files:
snmp_collator.c
Log Message:
Resolves: 445305
Summary: Ensure directories created by installer get the requested mode applied.
Index: snmp_collator.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/snmp_collator.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- snmp_collator.c 12 Dec 2008 23:38:54 -0000 1.19
+++ snmp_collator.c 17 Dec 2008 17:22:22 -0000 1.20
@@ -528,17 +528,22 @@
if (errno == EEXIST) {
/* It appears that we didn't exit cleanly last time and left the semaphore
* around. Recreate it since we don't know what state it is in. */
- sem_unlink(stats_sem_name);
+ if (sem_unlink(stats_sem_name) != 0) {
+ LDAPDebug( LDAP_DEBUG_ANY, "Failed to delete old semaphore for stats file (%s). "
+ "Error %d (%s).\n", szStatsFile, errno, slapd_system_strerror(errno) );
+ exit(1);
+ }
+
if ((stats_sem = sem_open(stats_sem_name, O_CREAT | O_EXCL, SLAPD_DEFAULT_FILE_MODE, 1)) == SEM_FAILED) {
/* No dice */
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to create semaphore for stats file (%s). Error %d.\n",
- szStatsFile, errno, 0 );
+ LDAPDebug( LDAP_DEBUG_ANY, "Failed to create semaphore for stats file (%s). Error %d (%s).\n",
+ szStatsFile, errno, slapd_system_strerror(errno) );
exit(1);
}
} else {
/* Some other problem occurred creating the semaphore. */
- LDAPDebug( LDAP_DEBUG_ANY, "Failed to create semaphore for stats file (%s). Error %d.\n",
- szStatsFile, errno, 0 );
+ LDAPDebug( LDAP_DEBUG_ANY, "Failed to create semaphore for stats file (%s). Error %d.(%s)\n",
+ szStatsFile, errno, slapd_system_strerror(errno) );
exit(1);
}
}
More information about the Fedora-directory-commits
mailing list