-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
macOS: Add a bsd_flags
column to the file
table
#5981
Conversation
initial work by alessandro, git wrangling by garret
IMO if we can avoid pre-processor logic we should, and instead use the platform-testing APIs in |
I just noticed that files are being added to |
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.
Seems reasonable to me. I'll leave for @theopolis to merge when he's happy
|
||
std::vector<std::string> label_list; | ||
|
||
for (const auto& p : kBsdFlagMap) { |
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.
Will this always iterate in the same order? I think it's desirable for output
to have a stable order.
osquery/filesystem/BUCK
Outdated
@@ -104,7 +110,8 @@ osquery_cxx_test( | |||
platform_srcs = [ | |||
( | |||
MACOSX, | |||
["tests/darwin/plist_tests.cpp"], | |||
["tests/darwin/plist_tests.cpp", |
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.
Can you write this as:
[
"tests/darwin/plist_tests.cpp",
"tests/darwin/bsd_file_flags_tests.cpp"
],
osquery/filesystem/CMakeLists.txt
Outdated
@@ -101,7 +107,10 @@ function(generateOsqueryFilesystemTest) | |||
) | |||
|
|||
if(DEFINED PLATFORM_MACOS) | |||
list(APPEND source_files tests/darwin/plist_tests.cpp) | |||
list(APPEND source_files | |||
tests/darwin/plist_tests.cpp |
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.
The indent is wrong here, it should be:
list(APPEND source_files
tests/darwin/plist_tests.cpp
tests/darwin/bsd_file_flags_tests.cpp
)
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.
updates seem fine
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 too! I'm going to go ahead and merge as it looks like all of the issues have been addressed from folks. Nice work!
Initial work by @alessandrogario , git wrangling to get it playing with current master by @GarretReece
This PR implements support for the BSD flags on macOS as documented in issue #4189.