forked from osquery/osquery
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor macOS system profile report retrieval (osquery#8251)
Move the report retrieval into a utility file and then refactor the two current tables that use it (`connected_displays` and `secureboot`) to use the new helper. Tested that the tables continue to work on both Intel and ARM64.
- Loading branch information
Showing
9 changed files
with
204 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Copyright (c) 2014-present, The osquery authors | ||
* | ||
* This source code is licensed as defined by the LICENSE file found in the | ||
* root directory of this source tree. | ||
* | ||
* SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only) | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <osquery/utils/status/status.h> | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
namespace osquery { | ||
|
||
/** | ||
* @brief Retrieve data from the macOS System Profiler/System Information | ||
* utility. | ||
* | ||
* This could be called from within an @autoreleasepool. | ||
* | ||
* @param datatype the data type to request (see `system_profiler | ||
* -listDataTypes`). | ||
* @param result the NSDictionary pointer for returning results. | ||
* | ||
* @return an instance of Status, indicating success or failure. | ||
*/ | ||
Status getSystemProfilerReport(const std::string& datatype, | ||
NSDictionary*& result); | ||
|
||
} // namespace osquery |
Oops, something went wrong.