feat: harden nysh
This commit is contained in:
parent
d6c16ee186
commit
805ed8e3b9
1 changed files with 10 additions and 4 deletions
|
@ -24,15 +24,21 @@ in
|
||||||
"multi-user.target"
|
"multi-user.target"
|
||||||
"graphical-session.target"
|
"graphical-session.target"
|
||||||
];
|
];
|
||||||
|
partOf = [ "graphical-session.target" ];
|
||||||
|
after = [ "graphical-session-pre.target" ];
|
||||||
|
|
||||||
unitConfig = {
|
|
||||||
After = [ "graphical-session-pre.target" ];
|
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = "/bin/sh -lc ${cfg.package}/bin/nysh";
|
ExecStart = "/bin/sh -lc ${cfg.package}/bin/nysh";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
|
||||||
|
NoNewPrivileges = true;
|
||||||
|
PrivateMounts = true;
|
||||||
|
ProtectHostname = true;
|
||||||
|
ProtectKernelTunables = true;
|
||||||
|
ProtectProc = true;
|
||||||
|
PrivateTmp = true;
|
||||||
|
IPAddressDeny = "any";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue