]> git.sur5r.net Git - openldap/commitdiff
Set O_EXCL
authorKurt Zeilenga <kurt@openldap.org>
Mon, 5 Aug 2002 19:49:27 +0000 (19:49 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 5 Aug 2002 19:49:27 +0000 (19:49 +0000)
libraries/libldap/test.c

index 05e9cf90f86ba1b440ea4eec4b2ba269ae8550ec..1300418abcaaf9c66dd431a9e09dc156f050a01a 100644 (file)
@@ -357,7 +357,7 @@ main( int argc, char **argv )
        }
 
        if ( copyfname != NULL ) {
-               if ( ( ld->ld_sb->sb_fd = open( copyfname, O_WRONLY | O_CREAT,
+               if ( ( ld->ld_sb->sb_fd = open( copyfname, O_WRONLY|O_CREAT|O_EXCL,
                    0600 ))  == -1 ) {
                        perror( copyfname );
                        exit ( EXIT_FAILURE );