- out = NULL;
- status = asl_file_open_write(outfile, 0644, -1, -1, &out);
- if (status != ASL_STATUS_OK) return status;
+ /* value is required */
+ if (count == 1)
+ {
+ freeList(l);
+ return;
+ }
+
+ if (!strcasecmp(l[0], "aslmanager_debug"))
+ {
+ /* = debug {0|1} */
+ debug = atoi(l[1]);
+ }
+ else if (!strcasecmp(l[0], "store_ttl"))
+ {
+ /* = store_ttl days */
+ ttl = SECONDS_PER_DAY * (time_t)atoll(l[1]);
+ }
+ else if (!strcasecmp(l[0], "max_store_size"))
+ {
+ /* = max_file_size bytes */
+ max_size = atoi(l[1]);
+ }
+ else if (!strcasecmp(l[0], "archive"))
+ {
+ /* = archive {0|1} path */
+ if (!strcmp(l[1], "1"))
+ {
+ if (l[2] == NULL) archive = PATH_ASL_ARCHIVE;
+ else archive = strdup(l[2]); /* never freed */
+ }
+ else archive = NULL;
+ }
+ else if (!strcasecmp(l[0], "store_path"))
+ {
+ /* = archive path */
+ store_dir = strdup(l[1]); /* never freed */
+ }
+ else if (!strcasecmp(l[0], "archive_mode"))
+ {
+ archive_mode = strtol(l[1], NULL, 0);
+ if ((archive_mode == 0) && (errno == EINVAL)) archive_mode = 0400;
+ }