Skip to content

Commit

Permalink
Base: Run ProtocolServer as a separate "protocol" user
Browse files Browse the repository at this point in the history
This is probably not the final design we'll want for this, but for now
let's run the HTTP client code as a separate user to reduce exposure
for the standard "anon" user account.

Note that "protocol" is also added to the "lookup" group, in order to
allow ProtocolServer to contact LookupServer for DNS requests.
  • Loading branch information
awesomekling committed Jan 11, 2020
1 parent 83f5941 commit d0a708f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Base/etc/SystemServer.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ Priority=high

[ProtocolServer]
Socket=/tmp/portal/protocol
SocketPermissions=660
Lazy=1
Priority=low
KeepAlive=1
User=anon
User=protocol

[LookupServer]
Socket=/tmp/portal/lookup
Expand Down
3 changes: 2 additions & 1 deletion Base/etc/group
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ wheel:x:1:anon
tty:x:2:
phys:x:3:anon
audio:x:4:anon
lookup:x:10:anon
lookup:x:10:protocol,anon
protocol:x:11:anon
users:x:100:anon
1 change: 1 addition & 0 deletions Base/etc/passwd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
root:x:0:0:root:/:/bin/sh
lookup:x:10:10:LookupServer,,,:/:/bin/false
protocol:x:11:11:ProtocolServer,,,:/:/bin/false
anon:x:100:100:Anonymous,,,:/home/anon:/bin/sh
nona:x:200:200:Nona,,,:/home/nona:/bin/sh

0 comments on commit d0a708f

Please sign in to comment.