mirror of
https://github.com/xcat2/confluent.git
synced 2025-08-26 13:10:38 +00:00
Try to use socket to get SO_PEERCRED
Newer socket includes SO_PEERCRED. Try to use that before resorting to the 17 assumption.
This commit is contained in:
@@ -42,7 +42,10 @@ import confluent.core as pluginapi
|
||||
|
||||
tracelog = None
|
||||
auditlog = None
|
||||
SO_PEERCRED = 17
|
||||
try:
|
||||
SO_PEERCRED = socket.SO_PEERCRED
|
||||
except AttributeError:
|
||||
SO_PEERCRED = 17
|
||||
|
||||
|
||||
class ClientConsole(object):
|
||||
|
Reference in New Issue
Block a user