mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Mark GetNamespaceDescription const
PiperOrigin-RevId: 554460753 Change-Id: I3304fb7d19f93750b1d74aeb1b8213af2f0fea85
This commit is contained in:
parent
dd664400d7
commit
4890c86cec
|
@ -27,12 +27,12 @@
|
|||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "sandboxed_api/sandbox2/violation.pb.h"
|
||||
#include "sandboxed_api/util/fileops.h"
|
||||
#include "sandboxed_api/util/path.h"
|
||||
#include "sandboxed_api/util/raw_logging.h"
|
||||
|
@ -351,7 +351,8 @@ void Namespace::InitializeInitialNamespaces(uid_t uid, gid_t gid) {
|
|||
"remounting rootfs read-only failed");
|
||||
}
|
||||
|
||||
void Namespace::GetNamespaceDescription(NamespaceDescription* pb_description) {
|
||||
void Namespace::GetNamespaceDescription(
|
||||
NamespaceDescription* pb_description) const {
|
||||
pb_description->set_clone_flags(clone_flags_);
|
||||
*pb_description->mutable_mount_tree_mounts() = mounts_.GetMountTree();
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ class Namespace final {
|
|||
std::string hostname, bool allow_mount_propagation);
|
||||
|
||||
// Stores information about this namespace in the protobuf structure.
|
||||
void GetNamespaceDescription(NamespaceDescription* pb_description);
|
||||
void GetNamespaceDescription(NamespaceDescription* pb_description) const;
|
||||
|
||||
int32_t clone_flags() const { return clone_flags_; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user