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

Add wildcard support to %include on configuration files (ticket 25140) #489

Conversation

Jigsaw52
Copy link
Contributor

@Jigsaw52 Jigsaw52 commented Nov 7, 2018

No description provided.

@Jigsaw52 Jigsaw52 force-pushed the torrc-include-wildcards-25140_rebased branch from dee5c2e to 517a3f2 Compare November 8, 2018 00:04
@coveralls
Copy link

coveralls commented Nov 8, 2018

Pull Request Test Coverage Report for Build 6152

  • 141 of 158 (89.24%) changed or added relevant lines in 6 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.06%) to 63.235%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/app/config/config.c 1 2 50.0%
src/lib/fs/conffile.c 47 49 95.92%
src/lib/fs/path.c 87 101 86.14%
Files with Coverage Reduction New Missed Lines %
src/lib/sandbox/sandbox.c 1 1.6%
Totals Coverage Status
Change from base Build 6120: 0.06%
Covered Lines: 47908
Relevant Lines: 75762

💛 - Coveralls

@Jigsaw52 Jigsaw52 force-pushed the torrc-include-wildcards-25140_rebased branch 2 times, most recently from 63a929f to 2314057 Compare November 8, 2018 16:32
Copy link
Member

@ahf ahf left a comment

Choose a reason for hiding this comment

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

Minor details that needs to be fixed. Good stuff in general.

doc/tor.1.txt Outdated Show resolved Hide resolved
src/config/torrc.sample.in Outdated Show resolved Hide resolved
src/lib/fs/path.c Outdated Show resolved Hide resolved
src/lib/fs/path.c Show resolved Hide resolved
src/lib/fs/path.c Outdated Show resolved Hide resolved
src/lib/fs/path.c Outdated Show resolved Hide resolved
src/lib/fs/path.c Outdated Show resolved Hide resolved
src/lib/fs/path.c Outdated Show resolved Hide resolved
@Jigsaw52 Jigsaw52 force-pushed the torrc-include-wildcards-25140_rebased branch 2 times, most recently from 56465f6 to 49e8156 Compare December 12, 2018 14:33
@Jigsaw52
Copy link
Contributor Author

I've fixed the mentioned issues. Additionally, I've rebased to the current master and added support for bool type on the checkSpace.pl script because it started complaining when I had functions returning bool.

Copy link
Member

@ahf ahf left a comment

Choose a reason for hiding this comment

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

Minor detail

changes/feature25140 Outdated Show resolved Hide resolved
doc/tor.1.txt Outdated Show resolved Hide resolved
src/lib/fs/conffile.c Outdated Show resolved Hide resolved
src/lib/fs/path.c Outdated Show resolved Hide resolved
src/lib/fs/path.c Outdated Show resolved Hide resolved
src/lib/fs/path.c Outdated Show resolved Hide resolved
src/lib/fs/path.c Outdated Show resolved Hide resolved
src/lib/fs/path.c Outdated Show resolved Hide resolved
doc/tor.1.txt Outdated Show resolved Hide resolved
@Jigsaw52 Jigsaw52 force-pushed the torrc-include-wildcards-25140_rebased branch 4 times, most recently from 35205d9 to 99c0024 Compare April 1, 2019 23:57
src/test/test_util.c Outdated Show resolved Hide resolved
@Jigsaw52 Jigsaw52 force-pushed the torrc-include-wildcards-25140_rebased branch 3 times, most recently from 982d549 to 357c7fc Compare April 10, 2019 00:10
tor_glob returns a list of paths matching the specified pattern
Jigsaw52 and others added 16 commits April 10, 2019 01:53
Adds support for wildcards on path components before last
Also fixes some diffrent wildcard behaviour between Windows and Linux
Adds test for get_glob_opened_files and improves tor_glob and
config tests
glob uses lstat which was not allowed by the seccomp filters
Reverting because it is a duplicate of the work done for #25140
This reverts commit ba3c785.
Co-Authored-By: Jigsaw52 <Jigsaw52@users.noreply.github.com>
Adds is_file and is_dir to files.h and some other minor
improvements
Adds documentation about using %include and Sandbox, expansion of
dot files in wildcards and Windows wildcard quirks.
Convert duplicated code on both functions to common
small auxiliary functions.
@Jigsaw52 Jigsaw52 force-pushed the torrc-include-wildcards-25140_rebased branch 4 times, most recently from 7afb7bc to 5a89381 Compare April 30, 2019 14:29
Tests wildcards in %include, reloading the config file
and response of SAVECONF and getinfo config-can-saveconf
control commands.
@Jigsaw52 Jigsaw52 force-pushed the torrc-include-wildcards-25140_rebased branch from 5a89381 to 5659899 Compare April 30, 2019 15:44
Fixes reloading torrc with seccomp sandbox enabled on machines
with libc version < 2.26. Although libc before the 2.26 version
did not used openat for opening files, it used it on readdir.
The seccomp %include rules were update to allow openat on any
%included directories. This caused the %include integration
test to fail when the seccomp sandbox was enabled.
Adds seccomp rules for socket and getpeername used by NSS
@Jigsaw52 Jigsaw52 force-pushed the torrc-include-wildcards-25140_rebased branch from 791016d to fecfdf4 Compare May 4, 2019 17:12
@ahf ahf mentioned this pull request Oct 17, 2019
@Jigsaw52 Jigsaw52 closed this Jun 3, 2020
@Jigsaw52
Copy link
Contributor Author

Jigsaw52 commented Jun 3, 2020

Closed because new pull request #1915 with new implementation was made.

@Jigsaw52 Jigsaw52 deleted the torrc-include-wildcards-25140_rebased branch August 13, 2020 22:47
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.

4 participants