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

Added support to detect when /tmp is mounted noexec #446

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WorksButNotTested
Copy link
Contributor

No description provided.

Copy link
Member

@oleavr oleavr left a comment

Choose a reason for hiding this comment

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

Thanks! 🙌

* In Linux 2.6 rootfs mount always exists, and it makes sense to always
* ignore it.
*/
if (g_strcmp0(current->mnt_fsname, "rootfs") == 0)
Copy link
Member

Choose a reason for hiding this comment

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

(Here and elsewhere.) Can current->mnt_fsname be NULL? If not, we should be using strcmp().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The man page for getmntent_r doesn't explicitly say that the structure member can be NULL, or that it can't. Given we may find ourselves running on many different versions of libc and perhaps different variants too (e.g. uClibc, musl) is it prudent to be safe?

src/linux/system-linux.c Outdated Show resolved Hide resolved
src/linux/system-linux.c Outdated Show resolved Hide resolved
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

2 participants