added gnutls backend and moved backend code into new files
[ircu2.10.12-pk.git] / ircd / fileio.c
index 38667868279b4837445f488bea02b211efa311db..af225c54a70aecc814408ecb312ab977808aac0d 100644 (file)
@@ -26,8 +26,9 @@
 
 #include "fileio.h"
 #include "ircd_alloc.h"         /* MyMalloc, MyFree */
+#include "ircd_log.h"           /* assert */
 
-#include <assert.h>             /* assert */
+/* #include <assert.h> -- Now using assert in ircd_log.h */       /* assert */
 #include <fcntl.h>              /* O_RDONLY, O_WRONLY, ... */
 #include <stdio.h>              /* BUFSIZ, EOF */
 #include <sys/stat.h>           /* struct stat */
@@ -67,11 +68,11 @@ FBFILE* fbopen(const char *filename, const char *mode)
       break;
     case 'w':
       openmode = O_WRONLY | O_CREAT | O_TRUNC;
-      pmode = S_IREAD | S_IWRITE;
+      pmode = S_IRUSR | S_IWUSR;
       break;
     case 'a':
       openmode = O_WRONLY | O_CREAT | O_APPEND;
-      pmode = S_IREAD | S_IWRITE;
+      pmode = S_IRUSR | S_IWUSR;
       break;
     case '+':
       openmode &= ~(O_RDONLY | O_WRONLY);
@@ -84,7 +85,7 @@ FBFILE* fbopen(const char *filename, const char *mode)
   }
   /*
    * stop NFS hangs...most systems should be able to open a file in
-   * 3 seconds. -avalon (curtesy of wumpus)
+   * 3 seconds. -avalon (courtesy of wumpus)
    */
   alarm(3);
   if ((fd = open(filename, openmode, pmode)) == -1) {