]> git.sur5r.net Git - openldap/commitdiff
Set O_EXCL (ITS#2009)
authorKurt Zeilenga <kurt@openldap.org>
Mon, 5 Aug 2002 19:43:01 +0000 (19:43 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 5 Aug 2002 19:43:01 +0000 (19:43 +0000)
servers/slurpd/reject.c

index 91e1c6a11e42daaf4075f738db85893930d7e6f8..2596ab57bc6b49f2b4e410f3c891f60957f28449 100644 (file)
@@ -63,7 +63,7 @@ write_reject(
     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: "