r110: Incorporate patch from Maxim Syrchin to fix segfault if no auth file has been
authoryoe <yoe>
Fri, 16 Sep 2005 10:00:52 +0000 (10:00 +0000)
committeryoe <yoe>
Fri, 16 Sep 2005 10:00:52 +0000 (10:00 +0000)
given.

nbd-server.c

index caaa194..fda0c9e 100644 (file)
 #define F_AUTOREADONLY 8  /**< flag to tell us a file is set to autoreadonly */
 GHashTable *children;
 char pidfname[256]; /**< name of our PID file */
+char default_authname[] = "/etc/nbd_server.allow"; /**< default name of allow file */
 
 /**
  * Variables associated with a server.
@@ -296,6 +297,7 @@ SERVER* cmdline(int argc, char *argv[]) {
                case 'm':
                        serve->flags |= F_MULTIFILE;
                        serve->hunksize = 1*GIGA;
+                       serve->authname = default_authname;
                        break;
                case 'c': 
                        serve->flags |=F_COPYONWRITE;