8000 OpenBSD support by arthepsy · Pull Request #3381 · kanidm/kanidm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

OpenBSD support #3381

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

Merged
merged 2 commits into from
Feb 3, 2025
Merged

OpenBSD support #3381

merged 2 commits into from
Feb 3, 2025

Conversation

arthepsy
Copy link
Contributor
@arthepsy arthepsy commented Feb 1, 2025

Implement OpenBSD support

With this patch compiles and runs fine on OpenBSD 7.6, rust 1.81.0. Did basic tests, all good, no issues.
Had to install openssl-3.3.2, because there were multiple failures (in various dependencies) using OpenBSD's libressl, but that's about it.

Only exception is unix_integrations/pam_kanidm (OpenBSD doesn't have built-in PAM), which I just commented out in Cargo.toml, when building and everything was build successfully.

Regarding this, I had an idea to rework Cargo.toml to exclude this while building on OpenBSD, but it seems that it isn't supported by cargo (read multiple issues by people requesting it, checked ignored pull requests, etc.) or my knowledge how to do is lacking. Maybe this can be reworked some-how (ab)using features, but that's to be researched. Anyhow, I think the best case would be to rework pam_kanidm for OpenBSD to use OpenPAM, which is available as a package.

Please, give feedback about how to handle pam_kanidm for OpenBSD, so I can work on this.

Checklist

  • This PR contains no AI generated code
  • book chapter included (if relevant)
  • design document included (if relevant)

@yaleman
Copy link
Member
yaleman commented Feb 2, 2025

I'd say stub them out using similar cfg flags to what we use to avoid trying to build on windows etc, eg:

#[cfg(target_family = "unix")]
mod pam;

@arthepsy
Copy link
Contributor Author
arthepsy commented Feb 2, 2025

I'd say stub them out using similar cfg flags to what we use to avoid trying to build on windows etc, eg:

#[cfg(target_family = "unix")]
mod pam;

Yeah, tried that, but then core.rs generates multiple Pam* reference errors, therefore, as I suggested, either the whole package should be "disabled" or reworked to support OpenPAM. Up to You guys to decide and I'll try to make it happen and test.

@yaleman
Copy link
Member
yaleman commented Feb 2, 2025

Hey if you can make it work with OpenPAM (on just OpenBSD), and want to maintain it, you're welcome to 😄

@arthepsy
Copy link
Contributor Author
arthepsy commented Feb 3, 2025

Hey if you can make it work with OpenPAM (on just OpenBSD), and want to maintain it, you're welcome to 😄

Sure, can do, will work on that next. Anyhow, is there something else required for this pull request to go forward? I'd like to have those things separate, as this adds OpenBSD support regardless of what is decided with pam module.

@yaleman
Copy link
Member
yaleman commented Feb 3, 2025

Looks good to me, can you rebase it and add yourself to the contributors file and we can merge it.

@arthepsy
Copy link
Contributor Author
arthepsy commented Feb 3, 2025

Looks good to me, can you rebase it and add yourself to the contributors file and we can merge it.

✔️

@yaleman yaleman enabled auto-merge (squash) February 3, 2025 22:21
@yaleman yaleman merged commit d4c5a6f into kanidm:master Feb 3, 2025
23 checks passed
@Firstyear
Copy link
Member

@arthepsy Sounds awesome, we'd love to see openbsd support here. Perhaps open an issue so we can track the work and what's needed? Thank you!

@arthepsy
Copy link
Contributor Author
arthepsy commented Feb 7, 2025

@arthepsy Sounds awesome, we'd love to see openbsd support here. Perhaps open an issue so we can track the work and what's needed? Thank you!

Great! And I'm willing to help make this happen. What kind of issue You had in mind (just so that I do everything correctly) - labels, tags, etc.?

@Firstyear
Copy link
Member

@arthepsy Done, made a bsd label for you. but we're pretty chill about it, just as long as we can see what's going on :)

You may be interested in: #3404 which resolves some nss issues on freebsd that it looks like openbsd would have hit also. I was looking into it and I think we'd need a login_-kanidm next for login.conf on openbsd?

@yaleman yaleman added the BSD FreeBSD and OpenBSD support label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BSD FreeBSD and OpenBSD support
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants
0