Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20190702 update kdb support for 389 #52

Merged
merged 2 commits into from
Jul 8, 2019

Conversation

Firstyear
Copy link
Collaborator

This is a large rework of kdb for 389, fixing a large number of issues
that prevented the kdb setup from operating correctly. It now is able
to correctly configure and setup Kerberos against a 389 Directory
Server instance.

This is a large rework of kdb for 389, fixing a large number of issues
that prevented the kdb setup from operating correctly. It now is able
to correctly configure and setup Kerberos against a 389 Directory
Server instance.
@Firstyear
Copy link
Collaborator Author

As a follow up, we'd like this to get into LEAP 15.2, so is there anything else I need to do to make sure that happens?

@@ -23,6 +25,7 @@ def initialize(url, bind_dn, bind_pw)

# modify invokes ldapmodify and returns tuple of command output and boolean (success or not).
def modify(ldif_input, ignore_existing)
log.info('modify: %s' % ldif_input)
Copy link
Member

Choose a reason for hiding this comment

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

just hint. Format ( aliases by %operator) is mainly useful for translations. For logging usually interpolation is easier. So it can look like log.info "modify: #{ldif_input}"

@@ -49,10 +53,17 @@ def create_person(dn_prefix, cnsn, suffix)
sn: #{cnsn}", true)
end

def create_container(container_dn)
return self.add("dn: #{container_dn}
Copy link
Member

Choose a reason for hiding this comment

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

I suggest to use explicit line ending and formatting like

def create_container(container_dn)
  add(
    "dn: #{container_dn}\n" \
      "objectClass: top\n" \
      "objectClass: nsContainer",
    true
   )

return
end
if !MITKerberos.restart_kadmind
Popup.Error(_('Failed to start kadmind, please inspect the journal of kadmind.service'))
UI.ReplaceWidget(Id(:busy), Empty())
Copy link
Member

Choose a reason for hiding this comment

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

hint: this pattern is repeated many times, maybe it can be in own method. At least something like:

def report_error(msg)
  Popup.Error(msg)
  UI.ReplaceWidget(Id(:busy), Empty())
end

# and use it like
if !MITKerberos.restart_kadmind
  report_error(_('Failed to start kadmind, please inspect the journal of kadmind.service'))
  return
end

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I might do this in a future refactor?

Copy link
Member

@jreidinger jreidinger left a comment

Choose a reason for hiding this comment

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

nothing critical

@Firstyear
Copy link
Collaborator Author

Thanks for the review, I've integrated most of you changes except making popup a method, because I think that cleanup/refactor can be done later?

@jreidinger
Copy link
Member

yes, feel free to merge.

@Firstyear Firstyear merged commit 2fff8c5 into yast:master Jul 8, 2019
@Firstyear Firstyear deleted the 20190701-add-kdb-dependency branch July 8, 2019 07:34
@yast-bot
Copy link

yast-bot commented Jul 8, 2019

✔️ Public Jenkins job #8 successfully finished
✔️ Created OBS submit request #713972

@yast-bot
Copy link

yast-bot commented Jul 8, 2019

✔️ Internal Jenkins job #3 successfully finished
✔️ Created IBS submit request #196234

jreidinger pushed a commit that referenced this pull request Jan 30, 2020
20190702 update kdb support for 389

This is a large rework of kdb for 389, fixing a large number of issues
that prevented the kdb setup from operating correctly. It now is able
to correctly configure and setup Kerberos against a 389 Directory
Server instance.
@jreidinger jreidinger mentioned this pull request Jan 30, 2020
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.

None yet

3 participants