- Delete own_socketfile to resolve race condition where the permissions
change fails on a Unix socket because it hasn't been created yet (libmilter will do this correctly on its own based on umask, the milter doesn't need to do it) (LP: #1849712)
This commit is contained in:
@@ -146,16 +146,6 @@ def write_pid(milterconfig):
|
||||
return pid
|
||||
|
||||
|
||||
def own_socketfile(milterconfig):
|
||||
"""If socket is Unix socket, chown to UserID before dropping privileges"""
|
||||
import os
|
||||
user, group = user_group(milterconfig.get('UserID'))
|
||||
if milterconfig.get('Socket')[:1] == '/':
|
||||
os.chown(milterconfig.get('Socket')[1:], user, group)
|
||||
if milterconfig.get('Socket')[:6] == "local:":
|
||||
os.chown(milterconfig.get('Socket')[6:], user, group)
|
||||
|
||||
|
||||
def read_keyfile(milterconfig, keytype):
|
||||
"""Read private key from file."""
|
||||
import syslog
|
||||
|
||||
Reference in New Issue
Block a user