Skip to content

Commit

Permalink
Merge pull request #45811 from Nadrieril/fix-usbguard-auditfile
Browse files Browse the repository at this point in the history
nixos/usbguard: ensure the audit log file can be created 
nixos/usbguard: disable debug output
  • Loading branch information
srhb committed Aug 31, 2018
2 parents 7590d8b + 9b9ba84 commit bb321a2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nixos/modules/services/security/usbguard.nix
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,14 @@ in {
wants = [ "systemd-udevd.service" "local-fs.target" ];

# make sure an empty rule file and required directories exist
preStart = ''mkdir -p $(dirname "${cfg.ruleFile}") "${cfg.IPCAccessControlFiles}" && ([ -f "${cfg.ruleFile}" ] || touch ${cfg.ruleFile})'';
preStart = ''
mkdir -p $(dirname "${cfg.ruleFile}") $(dirname "${cfg.auditFilePath}") "${cfg.IPCAccessControlFiles}" \
&& ([ -f "${cfg.ruleFile}" ] || touch ${cfg.ruleFile})
'';

serviceConfig = {
Type = "simple";
ExecStart = ''${pkgs.usbguard}/bin/usbguard-daemon -P -d -k -c ${daemonConfFile}'';
ExecStart = ''${pkgs.usbguard}/bin/usbguard-daemon -P -k -c ${daemonConfFile}'';
Restart = "on-failure";
};
};
Expand Down

0 comments on commit bb321a2

Please sign in to comment.