chromium/services/audio/audio_sandbox_hook_linux.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "services/audio/audio_sandbox_hook_linux.h"

#include <dlfcn.h>
#include <unistd.h>
#include <string>
#include <string_view>
#include <vector>

#include "base/environment.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/strings/stringprintf.h"
#include "sandbox/linux/syscall_broker/broker_command.h"
#include "sandbox/linux/syscall_broker/broker_file_permission.h"

BrokerFilePermission;
MakeBrokerCommandSet;

namespace audio {

namespace {

#if defined(USE_ALSA)
void AddAlsaFilePermissions(std::vector<BrokerFilePermission>* permissions) {}
#endif

#if defined(USE_PULSEAUDIO)
// Utility function used to grant permissions on paths used by PulseAudio which
// are specified through environment variables. |recursive_only| is used to
// determine if the path itself should be allowed access or only its content.
void AllowAccessToEnvSpecifiedPath(
    std::string_view variable_name,
    std::vector<BrokerFilePermission>* permissions,
    bool recursive_only) {}

void AddPulseAudioFilePermissions(
    std::vector<BrokerFilePermission>* permissions) {}
#endif

std::vector<BrokerFilePermission> GetAudioFilePermissions() {}

void LoadAudioLibraries() {}

}  // namespace

bool AudioPreSandboxHook(sandbox::policy::SandboxLinux::Options options) {}

}  // namespace audio