-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
对deepin-face服务进行安全加固 Task: https://pms.uniontech.com/task-view-361193.html
- Loading branch information
1 parent
83ce880
commit 6fb287e
Showing
4 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#Type Path Mode User Group Age Argument | ||
f /var/log/deepin-face.log 0644 deepin-daemon deepin-daemon - - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,39 @@ | ||
[Unit] | ||
Description=Deepin Face Authenticate Driver | ||
|
||
# Ask for the dbus socket. | ||
Wants=dbus.socket | ||
After=dbus.socket | ||
|
||
[Service] | ||
User=root | ||
Type=dbus | ||
BusName=org.deepin.dde.Face1 | ||
User=deepin-daemon | ||
SupplementaryGroups=video | ||
BusName=com.deepin.face | ||
ExecStart=/usr/libexec/deepin-face | ||
|
||
ProtectSystem=strict | ||
#ReadOnlyPaths=/usr/share/seetaface-models/ | ||
ReadWritePaths=/var/log/deepin-face.log | ||
|
||
DeviceAllow=char-video4linux | ||
DevicePolicy=closed | ||
|
||
NoNewPrivileges=yes | ||
ProtectHome=yes | ||
ProtectKernelTunables=yes | ||
ProtectKernelModules=yes | ||
ProtectControlGroups=yes | ||
PrivateMounts=yes | ||
PrivateTmp=yes | ||
# 需要video device | ||
#PrivateDevices=yes | ||
PrivateNetwork=yes | ||
PrivateUsers=yes | ||
RestrictNamespaces=yes | ||
LockPersonality=yes | ||
RestrictRealtime=yes | ||
RemoveIPC=yes | ||
MemoryDenyWriteExecute=yes | ||
# 内存占用TODO | ||
#MemoryLimit=100M |