blob: f55fbb9ab3e9b5ed1b131425bcd97265140f7a1f [file] [log] [blame]
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/enterprise_companion/ipc_security.h"
#include <sys/types.h>
#include <unistd.h>
#include "base/functional/bind.h"
#include "components/named_mojo_ipc_server/connection_info.h"
namespace enterprise_companion {
IpcTrustDecider CreateIpcTrustDecider() {
return base::BindRepeating(
[](const named_mojo_ipc_server::ConnectionInfo& connector) {
return connector.credentials.uid == geteuid();
});
}
} // namespace enterprise_companion