* Fixed oopseth in control.c that might call fileno(NULL)
authorArt Cancro <ajc@citadel.org>
Fri, 1 Sep 2000 17:31:47 +0000 (17:31 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 1 Sep 2000 17:31:47 +0000 (17:31 +0000)
citadel/ChangeLog
citadel/control.c

index dce8b3c484b94a6b374a89851a984a309a8f32c6..09da23ba30d857c00375117e51d66147abf8efe6 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 572.37  2000/09/01 17:31:47  ajc
+ * Fixed oopseth in control.c that might call fileno(NULL)
+
  Revision 572.36  2000/09/01 13:37:16  ajc
  * control.c: chown citadel.control to bbsuid when opening/creating as root
 
@@ -2030,3 +2033,6 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
+
+
+
index 950df391ddd42f52d12809a0492da030b1905c4e..10dc78212a78789ac50116d79a92901ac10978db 100644 (file)
@@ -44,7 +44,9 @@ void get_control(void) {
        memset(&CitControl, 0, sizeof(struct CitControl));
        if (control_fp == NULL) {
                control_fp = fopen("citadel.control", "rb+");
-               fchown(fileno(control_fp), config.c_bbsuid, -1);
+               if (control_fp != NULL) {
+                       fchown(fileno(control_fp), config.c_bbsuid, -1);
+               }
        }
        if (control_fp == NULL) {
                control_fp = fopen("citadel.control", "wb+");