[Fedora-directory-commits] ldapserver/ldap/servers/slapd protect_db.c, 1.9, 1.10

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Thu Aug 16 19:29:00 UTC 2007


Author: rmeggins

Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29502/ldapserver/ldap/servers/slapd

Modified Files:
	protect_db.c 
Log Message:
Resolves: bug 253047
Bug Description: Does not build on Fedora 8
Fix Description: If using the O_CREAT flag with open(), the file mode must also be given.  Also, the bdb calls to use ->open() must use parentheses around the function pointer access e.g. (DB->open)(args...) instead of just DB->open(args).
Platforms tested: RHEL4, Fedora 8
Flag Day: no
Doc impact: no



Index: protect_db.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/protect_db.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- protect_db.c	10 Nov 2006 23:45:40 -0000	1.9
+++ protect_db.c	16 Aug 2007 19:28:57 -0000	1.10
@@ -116,7 +116,7 @@
     t.tv_sec = 0;
     t.tv_usec = WAIT_TIME * 1000;
         for(x = 0; x < NUM_TRIES; x++) {
-            if ((fd = open(lockfile, O_RDWR | O_CREAT | O_EXCL)) != -1) {
+            if ((fd = open(lockfile, O_RDWR | O_CREAT | O_EXCL, 0664)) != -1) {
                 /* Got the lock */
                 write(fd, (void *) &pid, sizeof(pid_t));
         close(fd);




More information about the Fedora-directory-commits mailing list