diff options
author | kroy-the-rabbit <kroy@kroy.io> | 2020-05-19 20:44:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-19 20:44:28 -0500 |
commit | 9922afc6930d4ddf0422860bdfe23113648ca5db (patch) | |
tree | d91cba2a798ec782e5aac4e8a4e526e18e903616 /src | |
parent | 7c55de11ca140fd8eed980c0c9db6302e1a05974 (diff) | |
download | vyos-1x-9922afc6930d4ddf0422860bdfe23113648ca5db.tar.gz vyos-1x-9922afc6930d4ddf0422860bdfe23113648ca5db.zip |
T2465: Permissions on vyos-hostsd socket incorrect
The DHCP server is unable to apply entries to the hosts file because the permissions on the socket are getting created wrong.
```
$ ls -al /run/vyos-hostsd.sock
srwxrwxrwx 1 root vyattacfg 0 May 20 01:38 /run/vyos-hostsd.sock
```
This gives it the correct permissions so that the nobody/nobody user/group can change it.
Diffstat (limited to 'src')
-rwxr-xr-x | src/services/vyos-hostsd | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/services/vyos-hostsd b/src/services/vyos-hostsd index 647cbc8c1..6017cea82 100755 --- a/src/services/vyos-hostsd +++ b/src/services/vyos-hostsd @@ -278,7 +278,11 @@ if __name__ == '__main__': context = zmq.Context() socket = context.socket(zmq.REP) + + # Set the right permissions on the socket, then change it back + o_mask = os.umask(0) socket.bind(SOCKET_PATH) + os.umask(o_mask) while True: # Wait for next request from client |