#include "util-debug.h"
#include "util-error.h"
#include "util-daemon.h"
+#include "util-byte.h"
#include "reputation.h"
#include "output.h"
#endif
AppLayerSetup();
+ /* Suricata will use this umask if provided. By default it will use the
+ umask passed on from the shell. */
+ const char *custom_umask;
+ if (ConfGet("umask", &custom_umask) == 1) {
+ uint16_t mask;
+ if (ByteExtractStringUint16(&mask, 8, strlen(custom_umask),
+ custom_umask) > 0) {
+ umask((mode_t)mask);
+ }
+ }
+
/* Check for the existance of the default logging directory which we pick
* from suricata.yaml. If not found, shut the engine down */
suri->log_dir = ConfigGetLogDirectory();
# Default: "/"
#daemon-directory: "/"
+# Umask.
+# Suricata will use this umask if it is provided. By default it will use the
+# umask passed on by the shell.
+#umask: 022
+
# Suricata core dump configuration. Limits the size of the core dump file to
# approximately max-dump. The actual core dump size will be a multiple of the
# page size. Core dumps that would be larger than max-dump are truncated. On