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

#ifndef REMOTING_BASE_PASSWD_UTILS_H_
#define REMOTING_BASE_PASSWD_UTILS_H_

#include <sys/types.h>

#include <string>
#include <vector>

#include "base/files/file_path.h"
#include "base/strings/cstring_view.h"
#include "base/types/expected.h"
#include "build/build_config.h"
#include "remoting/base/loggable.h"

namespace remoting {

struct PasswdUserInfo {
  std::string username;
  uid_t uid;
  gid_t gid;
  base::FilePath home_dir;
#if BUILDFLAG(IS_LINUX)
  std::vector<gid_t> supplementary_gids;
#endif
};

base::expected<PasswdUserInfo, Loggable> GetPasswdUserInfo(
    base::cstring_view username);

}  // namespace remoting

#endif  // REMOTING_BASE_PASSWD_UTILS_H_
