-
Notifications
You must be signed in to change notification settings - Fork 19
tlshd: Define TLSHD_ACCESSPERMS instead of using ALLPERMS to fix musl build #88
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
base: main
Are you sure you want to change the base?
Conversation
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
First: yes, we want tlshd to build on musl-based systems. Thanks for the patch. Since ktls-utils is under the "oracle" project, you are required to sign the OCA before we can pull patches you contribute. Two thoughts:
|
OK, this is uglier than I thought it would be. No standard seems to define a mask for examining the permission bits in the stat::st_mode field. It might seem like a nit, but I'd like to avoid conditional compilation. Looks like the TLSHD_*_MODE macros ignore the sticky bits, so all we care about for now is 0777. Just add this at line 120:
And then replace ALLPERMS with TLSHD_ACCESSPERMS at line 152. |
… build ALLPERMS exists in glibc, but not on musl, so we manually define TLSHD_ACCESSPERMS and use that instaed. This fixes building on musl systems. Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
ca95e95
to
b32b034
Compare
I don't think autoconf would handle this (at least not easily) and I don't see any portable version either. A number of other projects just manually define I have updated the PR to use a new I'm just waiting on approval to sign the CLA, I'll update when it is signed |
Awesome, thanks!
I would like to include this fix in ktls-utils-1.0, which I'm planning to release as soon as you can sign the OCA. Sidebar: If you know of a YAML workflow sample I can use, I can include a GitHub Action in this repo that can do a test-build on a MUSL-based platform on every PR. Just a thought. |
Just got approved on my side, so hopefully the CLA is signed? I'm not sure how to check. I have another fix (#90) I'll send now as well.
I don't unfortunately. I'm testing with OpenEmbedded which probably isn't what you want in your CI |
Check by sending another PR. Looks like you did that, and the OCA bot still says “No Cigar”. So, “signed on my side” means WD has a blanket contributor’s agreement with Oracle, maybe? If so we will have to wait until all that gets flushed through.
I’ll ask around. It’s not a requirement, but it would be great to have something to cover that gap. |
If you have approval, you will need to sign the OCA yourself. I'm told WD does not have a company contributor's agreement with us. |
ALLPERMS exists in glibc, but not on musl, so we manually define TLSHD_ACCESSPERMS and use that instaed. This fixes building on musl systems.