-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add initial code for syscall redirection, fix path lookup failures. #21
base: master
Are you sure you want to change the base?
Conversation
I still need to test this a bit before merging, but seems to work so far. |
b8d9339
to
4c78b09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re: Make sure libclang can be loaded properly, I think commit message is incorrect since you add rules for clang and llvm.
Also the changes need to be applied to all rules that use tooling e.g. the debian obs rules.
preload/syscalls.c
Outdated
* syscallgate -- syscall() GATE for the scratchbox2 preload library | ||
* | ||
* Copyright (C) 2023 Jolla Ltd. | ||
* Contact: Franz-Josef Haider <[email protected]> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should skip adding contact addresses here.
The header misses the license, I would suggest:
*
* SPDX-FileCopyrightText: 2022, Jolla Ltd.
* SPDX-License-Identifier: GPL-2.0
*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a header, is it ok like i did it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah looks good, we should check the contact address
4028239
to
6615f60
Compare
After sailfishos/scratchbox2#21 is merged, we can now let syscalls go through the C syscall function.
dcf761b
to
d851745
Compare
After sailfishos/scratchbox2#21 is merged, we can now let syscalls go through the C syscall function.
03ce75d
to
25414dc
Compare
|
||
#define GET_MACRO(_0,_1,_2,_3,_4,_5,_6,NAME,...) NAME | ||
#define FOR_EACH(action,...) \ | ||
GET_MACRO(_0,__VA_ARGS__,EXPAND_6,EXPAND_5,EXPAND_4,EXPAND_3,EXPAND_2,EXPAND_1,EXPAND_0)(action,__VA_ARGS__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is brilliant!
LGTM, except for the "WIP" in title |
After sailfishos/scratchbox2#21 is merged, we can now let syscalls go through the C syscall function.
After sailfishos/scratchbox2#21 is merged, we can now let syscalls go through the C syscall function.
pathmapping/pathmapping_interf.c
Outdated
if (asprintf(&virtual_abs_path_at_fd, "%s/%s", dirfd_path, virtual_path) < 0) { | ||
/* asprintf failed */ | ||
abort(); | ||
if (!virtual_path) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!virtual_path || *virtual_path == '\0'
would avoid trailing slash in the latter case I think.
…uldn't be found for real. JB#59837
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.