Skip to content

Conversation

@highTowerSU
Copy link

Description

Besser Auffindbarkeit bei Angabe eines Domainnamens...

Fixes # (issue)

Type of change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Live Tested

Checklist:

  • I have performed a self-review of my own code
  • My changes generate no new warnings

Besser Auffindbarkeit bei Angabe eines Domainnamens...
Besser Auffindbarkeit bei Angabe eines Domainnamens...
@dorianim
Copy link
Member

Hi @highTowerSU ,
thank you for your contribution. Please elaborate on what problem this PR solves or what behavior it changes.

@dorianim
Copy link
Member

Closing duento inactivity. Feel free to ping me if you want to continue working on this pr.

@dorianim dorianim closed this Oct 30, 2025
@highTowerSU
Copy link
Author

Hi @dorianim,

this PR addresses an issue on some clients where srv.linuxmuster.lan resolves correctly, but the search domain (lookup on srv) does not always resolve as expected.
By allowing an optional domain parameter to be passed to realm discover, the discovery command can explicitly target a specific domain, ensuring reliable detection even when the search domain fails.

@dorianim dorianim reopened this Nov 7, 2025
Copy link
Member

@dorianim dorianim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I understand. I have added some comments, please fix them, then we can merge :)

:rtype: tuple
"""
result = subprocess.run("realm discover --name-only", stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, shell=True)
result = subprocess.run("realm discover --name-only '" + domain + "'", stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, shell=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause an error when domain is None.

def _readConfigFromString(string):
configParser = configparser.ConfigParser()
configParser.read_string(string)
return configParser
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid these kind of changes.

logging.info(f"* {obsoleteDirectory}")
fileHelper.deleteDirectory(obsoleteDirectory)

return True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid these kind of changes.

def discoverDomains(domain=None):
"""
Searches for avialable domains on the current network
Searches for avialable domains on the current network"realm discover --name-only '" + domain + "'"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert or change to a normal sentence. Like this, it does not add any valuable information to the comment.

@dorianim
Copy link
Member

dorianim commented Nov 8, 2025

Implemented in 3d06523

@dorianim dorianim closed this Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants