from samba.messaging import Messaging
from samba.dcerpc.messaging import MSG_AUTH_LOG, AUTH_EVENT_NAME
from samba.param import LoadParm
+from samba import string_is_guid
import time
import json
import os
-import re
def getAudit(message):
# No new messages. We’ve probably got them all.
break
- GUID_RE = re.compile(
- "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")
-
- #
- # Is the supplied GUID string correctly formatted
- #
def is_guid(self, guid):
- return self.GUID_RE.fullmatch(guid)
+ """Is the supplied GUID string correctly formatted"""
+ return string_is_guid(guid)
def get_session(self):
return self.auth_context["sessionId"]