Skip to content

Commit

Permalink
Fix typos across source code (osquery#6901)
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-myers-tob authored Jan 15, 2021
1 parent 107a744 commit b803743
Show file tree
Hide file tree
Showing 219 changed files with 236 additions and 236 deletions.
4 changes: 2 additions & 2 deletions osquery/core/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,12 +614,12 @@ void Initializer::start() const {
}

/**
* This is a small interruptable thread implementation.
* This is a small interruptible thread implementation.
*
* The goal is to wait until interrupted or an alarm timeout. If the timeout
* occurs then osquery is stuck shutting down and we force-terminate.
*/
class AlarmRunnable : public InterruptableRunnable {
class AlarmRunnable : public InterruptibleRunnable {
public:
/// Thread entry point.
void run() {
Expand Down
2 changes: 1 addition & 1 deletion osquery/core/plugins/sql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* Abstracting the SQL implementation behind the osquery registry allows
* the SDK (libosquery) to describe how the SQL implementation is used without
* having dependencies on the thrird-party code.
* having dependencies on the third-party code.
*
* When osqueryd/osqueryi are built libosquery_additional, the library which
* provides the core plugins and core virtual tables, includes SQLite as
Expand Down
2 changes: 1 addition & 1 deletion osquery/core/plugins/sql.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* Abstracting the SQL implementation behind the osquery registry
* allows the SDK (libosquery) to describe how the SQL implementation
* is used without having dependencies on the thrird-party code.
* is used without having dependencies on the third-party code.
*
* When osqueryd/osqueryi are built libosquery_additional, the library
* which provides the core plugins and core virtual tables, includes
Expand Down
2 changes: 1 addition & 1 deletion osquery/core/query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ inline void addLegacyFieldsAndDecorations(const QueryLogItem& item,
doc.add("epoch", static_cast<size_t>(item.epoch), obj);
doc.add("counter", static_cast<size_t>(item.counter), obj);

// Apply field indicatiting if numerics are serialized as numbers
// Apply field indicating if numerics are serialized as numbers
doc.add("numerics", FLAGS_logger_numerics, obj);

// Append the decorations.
Expand Down
2 changes: 1 addition & 1 deletion osquery/core/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class Query {
* which can be accessed via the getColumnFamilyName getter method.
*
* @param name The query name.
* @param q a SheduledQuery struct.
* @param q a ScheduledQuery struct.
*/
explicit Query(std::string name, const ScheduledQuery& q)
: query_(q.query), name_(std::move(name)) {}
Expand Down
2 changes: 1 addition & 1 deletion osquery/core/sql/column.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace osquery {
* @brief Column options allow for more-complicated modeling of concepts.
*
* To accommodate the oddities of operating system concepts we make use of
* simple SQLite abstractions like indexs/keys and foreign keys, we also
* simple SQLite abstractions like indexes/keys and foreign keys, we also
* allow for optimizing based on query constraints (WHERE).
*
* There are several 'complications' where the default table filter (SELECT)
Expand Down
4 changes: 2 additions & 2 deletions osquery/database/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Mutex kDatabaseReset;
*/
const size_t kDatabaseMaxRetryCount{25};

/// Number of millisecons to pause between database initialize retries.
/// Number of milliseconds to pause between database initialize retries.
const size_t kDatabaseRetryDelay{200};

Status DatabasePlugin::reset() {
Expand Down Expand Up @@ -479,7 +479,7 @@ Status initDatabasePlugin() {
}

if (FLAGS_disable_database) {
// Do not try multiple times to initialize the emphemeral plugin.
// Do not try multiple times to initialize the ephemeral plugin.
break;
}
sleepFor(kDatabaseRetryDelay);
Expand Down
2 changes: 1 addition & 1 deletion osquery/database/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class DatabasePlugin : public Plugin {
* Database value access indexing is abstracted into domains and keys.
* Both are string values but exist separately for simple indexing without
* API-enforcing tokenization. In some cases we do add a component-specific
* tokeninzation to keys.
* tokenization to keys.
*
* @param domain A string value representing abstract storage indexing.
* @param key A string value representing the lookup/retrieval key.
Expand Down
6 changes: 3 additions & 3 deletions osquery/dispatcher/dispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace osquery {
/// The worker_threads define the default thread pool size.
FLAG(int32, worker_threads, 4, "Number of work dispatch threads");

void InterruptableRunnable::interrupt() {
void InterruptibleRunnable::interrupt() {
// Set the service as interrupted.
if (!interrupted_.exchange(true)) {
// Tear down the service's resources such that exiting the expected run
Expand All @@ -29,11 +29,11 @@ void InterruptableRunnable::interrupt() {
}
}

bool InterruptableRunnable::interrupted() {
bool InterruptibleRunnable::interrupted() {
return interrupted_;
}

void InterruptableRunnable::pause(std::chrono::milliseconds milli) {
void InterruptibleRunnable::pause(std::chrono::milliseconds milli) {
std::unique_lock<std::mutex> lock(condition_lock);
if (!interrupted_) {
condition_.wait_for(lock, milli);
Expand Down
8 changes: 4 additions & 4 deletions osquery/dispatcher/dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ namespace osquery {
class Status;
class Dispatcher;

class InterruptableRunnable {
class InterruptibleRunnable {
public:
virtual ~InterruptableRunnable() = default;
virtual ~InterruptibleRunnable() = default;

/**
* @brief The std::thread's interruption point.
Expand All @@ -52,7 +52,7 @@ class InterruptableRunnable {
/// Put the runnable into an interruptible sleep.
void pause(std::chrono::milliseconds milli);

/// Name of the InterruptableRunnable which is also the thread name
/// Name of the InterruptibleRunnable which is also the thread name
std::string runnable_name_;

private:
Expand All @@ -75,7 +75,7 @@ class InterruptableRunnable {
};

class InternalRunnable : private boost::noncopyable,
public InterruptableRunnable {
public InterruptibleRunnable {
public:
InternalRunnable(const std::string& name) : run_(false) {
runnable_name_ = name;
Expand Down
2 changes: 1 addition & 1 deletion osquery/distributed/distributed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Status Distributed::acceptWork(const std::string& work) {
"distributed_accelerate_checkins_expire",
std::to_string(getUnixTime() + duration));
} else {
VLOG(1) << "Falied to Accelerate: Timeframe is not an integer";
VLOG(1) << "Failed to Accelerate: Timeframe is not an integer";
}
}
return Status::success();
Expand Down
2 changes: 1 addition & 1 deletion osquery/events/darwin/fsevents.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class FSEventsEventPublisher
std::set<std::string> transformSubscription(
FSEventsSubscriptionContextRef& sc) const;

/// Build the set of excluded paths for which events are not to be propogated.
/// Build the set of excluded paths for which events are not to be propagated.
void buildExcludePathsSet();

private:
Expand Down
2 changes: 1 addition & 1 deletion osquery/events/darwin/openbsm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Status OpenBSMEventPublisher::configureAuditPipe() {
}

if (true == FLAGS_audit_allow_user_events) {
// capture user (login, autherization etc...) events
// capture user (login, authorization, etc.) events
ev_classes.insert("lo");
ev_classes.insert("aa");
}
Expand Down
2 changes: 1 addition & 1 deletion osquery/events/eventfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ Status EventFactory::run(const std::string& type_id) {
break;
}
publisher->restart_count_++;
// This is a 'default' cool-off implemented in InterruptableRunnable.
// This is a 'default' cool-off implemented in InterruptibleRunnable.
// If a publisher fails to perform some sort of interruption point, this
// prevents the thread from thrashing through exiting checks.
publisher->pause(std::chrono::milliseconds(200));
Expand Down
2 changes: 1 addition & 1 deletion osquery/events/eventpublisherplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
namespace osquery {

class EventPublisherPlugin : public Plugin,
public InterruptableRunnable,
public InterruptibleRunnable,
public Eventer {
public:
/**
Expand Down
2 changes: 1 addition & 1 deletion osquery/events/linux/bpf/bpfeventpublisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Status BPFEventPublisher::setUp() {

if (tracer_allocator.syscall_name == "openat2") {
verbose_message << ". This syscall may not be available on this "
"system, continuining despite the error";
"system, continuing despite the error";
}

VLOG(1) << verbose_message.str();
Expand Down
2 changes: 1 addition & 1 deletion osquery/events/linux/inotify.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class INotifyEventPublisher
bool monitorSubscription(INotifySubscriptionContextRef& sc,
bool add_watch = true);

/// Build the set of excluded paths for which events are not to be propogated.
/// Build the set of excluded paths for which events are not to be propagated.
void buildExcludePathsSet();

/// Remove an INotify watch (monitor) from our tracking.
Expand Down
2 changes: 1 addition & 1 deletion osquery/events/linux/syslog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ void SyslogEventPublisher::unlockPipe() {

Status SyslogEventPublisher::run() {
// This run function will be called by the event factory with ~100ms pause
// (see InterruptableRunnable::pause()) between runs. In case something goes
// (see InterruptibleRunnable::pause()) between runs. In case something goes
// weird and there is a huge amount of input, we limit how many logs we
// take in per run to avoid pegging the CPU.

Expand Down
2 changes: 1 addition & 1 deletion osquery/events/linux/syslog.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class NonBlockingFStream : public boost::noncopyable {
* a complete line was dequeued from the managed stream. If too much data is
* written and our internal buffer overflows then no data will be output.
*
* Overflowing the internal buffer does not break the reading. If this occures
* Overflowing the internal buffer does not break the reading. If this occurs
* then expect a line to be truncated and only yield the max bytes.
*/
Status getline(std::string& output);
Expand Down
2 changes: 1 addition & 1 deletion osquery/events/pathset.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace osquery {
/**
* @brief multiset based implementation for path search.
*
* 'multiset' is used because with patterns we can serach for equivalent keys.
* 'multiset' is used because with patterns we can search for equivalent keys.
* Since '/This/Path/is' ~= '/This/Path/%' ~= '/This/Path/%%' (equivalent).
*
* multiset is protected by lock. It is threadsafe.
Expand Down
2 changes: 1 addition & 1 deletion osquery/events/tests/linux/bpf/systemstatetracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,7 @@ TEST_F(SystemStateTrackerTests, saveFileHandle) {
EXPECT_EQ(context.file_handle_struct_map.count(index), 1U);
EXPECT_EQ(context.file_handle_struct_index.size(), 1U);

// Make sure that the handle was saved correcly
// Make sure that the handle was saved correctly
auto first_item_it = context.file_handle_struct_map.begin();
const auto& file_handle_struct = first_item_it->second;

Expand Down
2 changes: 1 addition & 1 deletion osquery/extensions/extensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ Status getExtensions(const std::string& manager_path,
// Add the extension manager to the list called (core).
extensions[0] = {"core", kVersion, "0.0.0", kSDKVersion};

// Convert from Thrift-internal list type to RouteUUID/ExtenionInfo type.
// Convert from Thrift-internal list type to RouteUUID/ExtensionInfo type.
for (const auto& ext : ext_list) {
extensions[ext.first] = {ext.second.name,
ext.second.version,
Expand Down
2 changes: 1 addition & 1 deletion osquery/extensions/extensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class ExternalSQLPlugin : public SQLPlugin {
TableColumns& columns) const override;
};

/// Status get a list of active extenions.
/// Status get a list of active extensions.
Status getExtensions(ExtensionList& extensions);

/// Internal getExtensions using a UNIX domain socket path.
Expand Down
10 changes: 5 additions & 5 deletions osquery/filesystem/linux/proc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ Status procGetSocketList(int family,
switch (family) {
case AF_INET:
if (kLinuxProtocolNames.count(protocol) == 0) {
return Status(1,
"Invalid family " + std::to_string(protocol) +
" for AF_INET familiy");
return Status(
1,
"Invalid family " + std::to_string(protocol) + " for AF_INET family");
} else {
path += kLinuxProtocolNames.at(protocol);
}
Expand All @@ -238,7 +238,7 @@ Status procGetSocketList(int family,
if (kLinuxProtocolNames.count(protocol) == 0) {
return Status(1,
"Invalid protocol " + std::to_string(protocol) +
" for AF_INET6 familiy");
" for AF_INET6 family");
} else {
path += kLinuxProtocolNames.at(protocol) + "6";
}
Expand All @@ -248,7 +248,7 @@ Status procGetSocketList(int family,
if (protocol != IPPROTO_IP) {
return Status(1,
"Invalid protocol " + std::to_string(protocol) +
" for AF_UNIX familiy");
" for AF_UNIX family");
} else {
path += "unix";
}
Expand Down
2 changes: 1 addition & 1 deletion osquery/filesystem/posix/fileops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ Status platformIsTmpDir(const fs::path& dir) {
Status platformIsFileAccessible(const fs::path& path) {
struct stat link_stat;
if (::lstat(path.c_str(), &link_stat) < 0) {
return Status(1, "File is not acccessible");
return Status(1, "File is not accessible");
}
return Status::success();
}
Expand Down
2 changes: 1 addition & 1 deletion osquery/filesystem/windows/fileops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,7 @@ Status platformStat(const fs::path& path, WINDOWS_STAT* wfile_stat) {
<< std::setw(sizeof(unsigned long long) * 2) << std::hex << file_index;
std::string file_id(stream.str());

// Windows has fileid's that are displayed in hex using:
// Windows has file IDs that are displayed in hex using:
// fsutil file queryfileid <filename>
wfile_stat->file_id = file_id;

Expand Down
2 changes: 1 addition & 1 deletion osquery/logger/data_logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void initStatusLogger(const std::string& name, bool init_glog = true);

/**
* @brief Initialize the osquery Logger facility by dumping the buffered status
* logs and configurating status log forwarding.
* logs and configuring status log forwarding.
*
* initLogger will disable the `BufferedLogSink` facility, dump any status logs
* emitted between process start and this init call, then configure the new
Expand Down
2 changes: 1 addition & 1 deletion osquery/logger/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class BufferedLogSink : public google::LogSink, private boost::noncopyable {
const char* message,
size_t message_len) override;

/// Pop from the aync sender queue and wait for one send to complete.
/// Pop from the async sender queue and wait for one send to complete.
void WaitTillSent() override;

public:
Expand Down
2 changes: 1 addition & 1 deletion osquery/main/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace osquery {
* @brief Install osqueryd as a service for the platform.
*
* Currently, this is only used by Windows. POSIX platforms use a companion
* script called osquerycrl to move files and install launch daemons or init
* script called osquerycrtl to move files and install launch daemons or init
* scripts/systemd units.
*
* This disconnect of install flows is a limitation. The POSIX install flows
Expand Down
2 changes: 1 addition & 1 deletion osquery/numeric_monitoring/numeric_monitoring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ FLAG(string,
FLAG(uint64,
numeric_monitoring_pre_aggregation_time,
60,
"Time period in seconds for numeric monitoring pre-aggreagation buffer.");
"Time period in seconds for numeric monitoring pre-aggregation buffer.");

namespace {
using monitoring::PreAggregationType;
Expand Down
2 changes: 1 addition & 1 deletion osquery/registry/registry_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class RegistryFactory : private boost::noncopyable {
const std::string& item_name);

/// Get a registry's active plugin.
std::string getActive(const std::string& registry_nane) const;
std::string getActive(const std::string& registry_name) const;

bool exists(const std::string& registry_name) const {
return (registries_.count(registry_name) > 0);
Expand Down
2 changes: 1 addition & 1 deletion osquery/remote/serializers/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class JSONSerializer : public Serializer {
Status serialize(const JSON& json, std::string& serialized);

/**
* @brief See Serializer::desiralize
* @brief See Serializer::deserialize
*/
Status deserialize(const std::string& serialized, JSON& json);

Expand Down
2 changes: 1 addition & 1 deletion osquery/remote/transports/tls.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class TLSTransport : public Transport {
* This returns basic/generial options.
*
* Use these options if you are communicating with AWS or generic Internet
* infrastrucutre.
* infrastructure.
*/
http::Client::Options getOptions();

Expand Down
4 changes: 2 additions & 2 deletions osquery/tables/events/windows/ntfs_journal_events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,14 @@ void processConfiguration(const NTFSEventSubscriptionContextRef context,
// resolveFilePattern should filter out any nonexistent files,
// so this should never be the case (except for TOCTOU).
if (file_hnd == INVALID_HANDLE_VALUE) {
TLOG << "Couldn't open " << path << " while buiding FRN set";
TLOG << "Couldn't open " << path << " while building FRN set";
continue;
}

// NOTE(woodruffw): This shouldn't fail once we have a valid handle, but
// there's another TOCTOU here: another process could delete the file before
// we get its information. We don't want to lock the file, though, since it
// could be something imporant used by another process.
// could be something important used by another process.
USNFileReferenceNumber frn{};

#if _WIN32_WINNT > _WIN32_WINNT_WIN7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class ExtendedAttributesTableTests : public testing::Test {
for (const auto& p : kTestAttributeList) {
const auto& attribute_name = p.first;
if (attribute_name.find("user.") != 0U) {
throw std::logic_error("Invalud test attribute name");
throw std::logic_error("Invalid test attribute name");
}

const auto& desc = p.second;
Expand Down
Loading

0 comments on commit b803743

Please sign in to comment.