Skip to content
Snippets Groups Projects
Commit 8e0b57b1 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Import ITS#2007 and ITS#2009 bug fixes from HEAD

parent 2f4e4f28
No related branches found
No related tags found
No related merge requests found
......@@ -57,13 +57,13 @@ write_reject(
int rc;
ldap_pvt_thread_mutex_lock( &sglob->rej_mutex );
sprintf( rejfile, "%s" LDAP_DIRSEP "%s:%d.rej", sglob->slurpd_rdir,
ri->ri_hostname, ri->ri_port );
snprintf( rejfile, sizeof rejfile, "%s" LDAP_DIRSEP "%s:%d.rej",
sglob->slurpd_rdir, ri->ri_hostname, ri->ri_port );
if ( access( rejfile, F_OK ) < 0 ) {
/* Doesn't exist - try to create */
int rjfd;
if (( rjfd = open( rejfile, O_RDWR | O_APPEND | O_CREAT,
if (( rjfd = open( rejfile, O_RDWR|O_APPEND|O_CREAT|O_EXCL,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP )) < 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG ( SLURPD, ERR, "write_reject: "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment