Skip to content

Halcompile permissions#2296

Merged
SebKuzminsky merged 2 commits into2.8from
halcompile-permissions
Jan 28, 2023
Merged

Halcompile permissions#2296
SebKuzminsky merged 2 commits into2.8from
halcompile-permissions

Conversation

@SebKuzminsky
Copy link
Copy Markdown
Collaborator

This fixes the permissions of .so uspace realtime components built by halcompile. For some reason they come out of gcc executable, which doesn't hurt anything but still isn't right. This just chmods them after building to turn off the x bit.

Also adds checks to existing halcompile tests that verify that "userspace" (non-realtime) components are executable (they are) and realtime components are not executable (they aren't, after this PR).

JT reports on IRC that `halcompile --install` installs uspace realtime
comps (which are .so files) with execute permissions enabled, which
is wrong.

This commit modifies some existing halcompile tests to verify that
`halcompile --install` makes userspace (non-rt) comps executable, and
rt comps (at least in uspace) non-executable.

The second part of that currently fails, fixed in the following commit.

(Note that our debs correctly have no execute bits set for the .so
realtime comps.)
Not sure why gcc sets the execute bits on .so output files, but this
sledge hammer fixes the problem.
@smoe
Copy link
Copy Markdown
Collaborator

smoe commented Jan 23, 2023

The best-possible fix would probably be to find out why the exact reason why that executable flag was set. I only found

os.chmod(outfile, 0o555)
.
Either way, I approve this change.

@SebKuzminsky SebKuzminsky merged commit baf89c4 into 2.8 Jan 28, 2023
@SebKuzminsky SebKuzminsky deleted the halcompile-permissions branch January 28, 2023 16:53
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.

2 participants