udp/config: fall back to default_owner when os_info has no owner; log debug

- When os_info arrives with no owner field, apply default_owner from server config
- Stop applying default_owner unconditionally in get_host_access (now deferred to os_info handling)
- os_info plugin logs debug message when injecting owner from client config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-08 08:49:42 -04:00
parent 88a3c09b51
commit b3aa7b585f
3 changed files with 5 additions and 5 deletions
+3 -4
View File
@@ -372,10 +372,9 @@ def handle_datagram(msg: dict, addr, transport, ctx: dict):
host.add_plugin_data(plugin_name, plugin_data, timestamp=now)
# If os_info reports an owner and none is configured server-side, apply it
if plugin_name == "os_info" and not host.owner:
reported_owner = plugin_data.get("owner")
if reported_owner:
host.owner = reported_owner
if plugin_name == "os_info":
if not host.owner:
host.owner = plugin_data.get("owner", config_mod.get_default_owner(cfg))
if DEBUG > 1:
print(f"Stored plugin data for {uname}: {plugin_name}")