mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-08 18:33:54 +00:00
ce6eabb58b
Summary: I'm going to it as one of the decorators for streaming events. To be able to associate event with a certain machine on the backend side. Why a new directory in osquery/? There are some libraries that depend on core/database and any monster modules. To be able to keep utils simple, lightweight and independent we should not put stuff like filesystem or network under utils/ directory. But we need a single place to put all system assosiated libs. So, let's make a `system` in the root of osquery. Reviewed By: guliashvili Differential Revision: D14706186 fbshipit-source-id: d40fde3872ca6b6677a1d8f89cfd8eda63c6b83d
24 lines
529 B
C++
24 lines
529 B
C++
/**
|
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed in accordance with the terms specified in
|
|
* the LICENSE file found in the root directory of this source tree.
|
|
*/
|
|
|
|
#include <osquery/system/network/hostname.h>
|
|
|
|
#include <osquery/system.h>
|
|
#include <osquery/utils/status/status.h>
|
|
|
|
namespace osquery {
|
|
|
|
HostIdentity HostIdentity::localhost() {
|
|
auto inst = HostIdentity{};
|
|
inst.fqdn = getFqdn();
|
|
getHostUUID(inst.uuid);
|
|
return inst;
|
|
}
|
|
|
|
} // namespace osquery
|