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

Dircount #151

Merged
merged 6 commits into from
Dec 4, 2024
Merged

Dircount #151

merged 6 commits into from
Dec 4, 2024

Conversation

carloslack
Copy link
Owner

No description provided.

JNE added 6 commits December 3, 2024 17:43
An array of names and same inode, if any, being set to all of them

Instead now is 1 for 1.

Makefile: add strip opt
and minor other changes
statx is fed by filldir(64) however, shared data
between these two is mostly meta.

Here I pave way to link concrete info between
these two, that may not be available earlier,
notably from hide-file-anywhere.

and other minor changes
Added proc command hide-directory=<dirname>

At filldir fn and statx syscall it is not
straightforward to know wheather a "filename"
is a regular file or a directory.

For us to decrement nlink kstat member, without
knowing if we're handling a directory, I had to, at
the moment the directory is hidden by the user check
dentry with S_IFDIR, and set a boolean.

This boolean is then stored and in statx syscall hook
I search for the name matching inode and directory boolen.

Then nlink can be decremented.
Update docs
A directory can be hidden with hide-file and hide-directory.
Same for regular files.
But suggestion is to use command names accordingly
if (node->name)
kfree(node->name);
kfree(node);
node = NULL;

Check notice

Code scanning / CodeQL

For loop variable changed in body Note

Loop counters should not be modified in the body of the
loop
.
@carloslack carloslack merged commit ebf11c9 into master Dec 4, 2024
2 checks passed
@carloslack carloslack deleted the dircount branch December 6, 2024 09:37
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.

1 participant