#endif
#include "config.pb-c.h"
-void nsjail__id_map__init(Nsjail__IdMap * message) {
+void nsjail__id_map__init(Nsjail__IdMap * message)
+{
static Nsjail__IdMap init_value = NSJAIL__ID_MAP__INIT;
*message = init_value;
}
-size_t nsjail__id_map__get_packed_size(const Nsjail__IdMap * message) {
+size_t nsjail__id_map__get_packed_size(const Nsjail__IdMap * message)
+{
assert(message->base.descriptor == &nsjail__id_map__descriptor);
return protobuf_c_message_get_packed_size((const ProtobufCMessage *)(message));
}
-size_t nsjail__id_map__pack(const Nsjail__IdMap * message, uint8_t * out) {
+size_t nsjail__id_map__pack(const Nsjail__IdMap * message, uint8_t * out)
+{
assert(message->base.descriptor == &nsjail__id_map__descriptor);
return protobuf_c_message_pack((const ProtobufCMessage *)message, out);
}
-size_t nsjail__id_map__pack_to_buffer(const Nsjail__IdMap * message, ProtobufCBuffer * buffer) {
+size_t nsjail__id_map__pack_to_buffer(const Nsjail__IdMap * message, ProtobufCBuffer * buffer)
+{
assert(message->base.descriptor == &nsjail__id_map__descriptor);
return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message, buffer);
}
protobuf_c_message_unpack(&nsjail__id_map__descriptor, allocator, len, data);
}
-void nsjail__id_map__free_unpacked(Nsjail__IdMap * message, ProtobufCAllocator * allocator) {
+void nsjail__id_map__free_unpacked(Nsjail__IdMap * message, ProtobufCAllocator * allocator)
+{
assert(message->base.descriptor == &nsjail__id_map__descriptor);
protobuf_c_message_free_unpacked((ProtobufCMessage *) message, allocator);
}
-void nsjail__ns_jail_config__init(Nsjail__NsJailConfig * message) {
+void nsjail__mount_pt__init(Nsjail__MountPt * message)
+{
+ static Nsjail__MountPt init_value = NSJAIL__MOUNT_PT__INIT;
+ *message = init_value;
+}
+
+size_t nsjail__mount_pt__get_packed_size(const Nsjail__MountPt * message)
+{
+ assert(message->base.descriptor == &nsjail__mount_pt__descriptor);
+ return protobuf_c_message_get_packed_size((const ProtobufCMessage *)(message));
+}
+
+size_t nsjail__mount_pt__pack(const Nsjail__MountPt * message, uint8_t * out)
+{
+ assert(message->base.descriptor == &nsjail__mount_pt__descriptor);
+ return protobuf_c_message_pack((const ProtobufCMessage *)message, out);
+}
+
+size_t nsjail__mount_pt__pack_to_buffer(const Nsjail__MountPt * message, ProtobufCBuffer * buffer)
+{
+ assert(message->base.descriptor == &nsjail__mount_pt__descriptor);
+ return protobuf_c_message_pack_to_buffer((const ProtobufCMessage *)message, buffer);
+}
+
+Nsjail__MountPt *nsjail__mount_pt__unpack
+ (ProtobufCAllocator * allocator, size_t len, const uint8_t * data) {
+ return (Nsjail__MountPt *)
+ protobuf_c_message_unpack(&nsjail__mount_pt__descriptor, allocator, len, data);
+}
+
+void nsjail__mount_pt__free_unpacked(Nsjail__MountPt * message, ProtobufCAllocator * allocator)
+{
+ assert(message->base.descriptor == &nsjail__mount_pt__descriptor);
+ protobuf_c_message_free_unpacked((ProtobufCMessage *) message, allocator);
+}
+
+void nsjail__ns_jail_config__init(Nsjail__NsJailConfig * message)
+{
static Nsjail__NsJailConfig init_value = NSJAIL__NS_JAIL_CONFIG__INIT;
*message = init_value;
}
-size_t nsjail__ns_jail_config__get_packed_size(const Nsjail__NsJailConfig * message) {
+size_t nsjail__ns_jail_config__get_packed_size(const Nsjail__NsJailConfig * message)
+{
assert(message->base.descriptor == &nsjail__ns_jail_config__descriptor);
return protobuf_c_message_get_packed_size((const ProtobufCMessage *)(message));
}
-size_t nsjail__ns_jail_config__pack(const Nsjail__NsJailConfig * message, uint8_t * out) {
+size_t nsjail__ns_jail_config__pack(const Nsjail__NsJailConfig * message, uint8_t * out)
+{
assert(message->base.descriptor == &nsjail__ns_jail_config__descriptor);
return protobuf_c_message_pack((const ProtobufCMessage *)message, out);
}
NULL, NULL, NULL /* reserved[123] */
};
+char nsjail__mount_pt__options__default_value[] = "";
+static const protobuf_c_boolean nsjail__mount_pt__is_bind__default_value = 0;
+static const protobuf_c_boolean nsjail__mount_pt__is_ro__default_value = 0;
+static const ProtobufCFieldDescriptor nsjail__mount_pt__field_descriptors[7] = {
+ {
+ "src",
+ 1,
+ PROTOBUF_C_LABEL_REQUIRED,
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(Nsjail__MountPt, src),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "dst",
+ 2,
+ PROTOBUF_C_LABEL_REQUIRED,
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(Nsjail__MountPt, dst),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "fstype",
+ 3,
+ PROTOBUF_C_LABEL_REQUIRED,
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(Nsjail__MountPt, fstype),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "options",
+ 4,
+ PROTOBUF_C_LABEL_REQUIRED,
+ PROTOBUF_C_TYPE_STRING,
+ 0, /* quantifier_offset */
+ offsetof(Nsjail__MountPt, options),
+ NULL,
+ &nsjail__mount_pt__options__default_value,
+ 0, /* flags */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "is_bind",
+ 5,
+ PROTOBUF_C_LABEL_REQUIRED,
+ PROTOBUF_C_TYPE_BOOL,
+ 0, /* quantifier_offset */
+ offsetof(Nsjail__MountPt, is_bind),
+ NULL,
+ &nsjail__mount_pt__is_bind__default_value,
+ 0, /* flags */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "is_ro",
+ 6,
+ PROTOBUF_C_LABEL_REQUIRED,
+ PROTOBUF_C_TYPE_BOOL,
+ 0, /* quantifier_offset */
+ offsetof(Nsjail__MountPt, is_ro),
+ NULL,
+ &nsjail__mount_pt__is_ro__default_value,
+ 0, /* flags */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
+ },
+ {
+ "is_dir",
+ 7,
+ PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_TYPE_BOOL,
+ offsetof(Nsjail__MountPt, has_is_dir),
+ offsetof(Nsjail__MountPt, is_dir),
+ NULL,
+ NULL,
+ 0, /* flags */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
+ },
+};
+
+static const unsigned nsjail__mount_pt__field_indices_by_name[] = {
+ 1, /* field[1] = dst */
+ 2, /* field[2] = fstype */
+ 4, /* field[4] = is_bind */
+ 6, /* field[6] = is_dir */
+ 5, /* field[5] = is_ro */
+ 3, /* field[3] = options */
+ 0, /* field[0] = src */
+};
+
+static const ProtobufCIntRange nsjail__mount_pt__number_ranges[1 + 1] = {
+ {1, 0},
+ {0, 7}
+};
+
+const ProtobufCMessageDescriptor nsjail__mount_pt__descriptor = {
+ PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
+ "nsjail.MountPt",
+ "MountPt",
+ "Nsjail__MountPt",
+ "nsjail",
+ sizeof(Nsjail__MountPt),
+ 7,
+ nsjail__mount_pt__field_descriptors,
+ nsjail__mount_pt__field_indices_by_name,
+ 1, nsjail__mount_pt__number_ranges,
+ (ProtobufCMessageInit) nsjail__mount_pt__init,
+ NULL, NULL, NULL /* reserved[123] */
+};
+
char nsjail__ns_jail_config__hostname__default_value[] = "NSJAIL";
char nsjail__ns_jail_config__cwd__default_value[] = "/";
char nsjail__ns_jail_config__bindhost__default_value[] = "::";
static const protobuf_c_boolean nsjail__ns_jail_config__clone_newipc__default_value = 1;
static const protobuf_c_boolean nsjail__ns_jail_config__clone_newuts__default_value = 1;
static const protobuf_c_boolean nsjail__ns_jail_config__clone_newcgroup__default_value = 0;
-static const ProtobufCFieldDescriptor nsjail__ns_jail_config__field_descriptors[39] = {
+static const ProtobufCFieldDescriptor nsjail__ns_jail_config__field_descriptors[40] = {
{
"mode",
1,
0, /* flags */
0, NULL, NULL /* reserved1,reserved2, etc */
},
+ {
+ "mount",
+ 42,
+ PROTOBUF_C_LABEL_REPEATED,
+ PROTOBUF_C_TYPE_MESSAGE,
+ offsetof(Nsjail__NsJailConfig, n_mount),
+ offsetof(Nsjail__NsJailConfig, mount),
+ &nsjail__mount_pt__descriptor,
+ NULL,
+ 0, /* flags */
+ 0, NULL, NULL /* reserved1,reserved2, etc */
+ },
};
static const unsigned nsjail__ns_jail_config__field_indices_by_name[] = {
11, /* field[11] = log_level */
7, /* field[7] = max_conns_per_ip */
0, /* field[0] = mode */
+ 39, /* field[39] = mount */
15, /* field[15] = pass_fd */
25, /* field[25] = persona_addr_compat_layout */
28, /* field[28] = persona_addr_limit_3gb */
static const ProtobufCIntRange nsjail__ns_jail_config__number_ranges[2 + 1] = {
{1, 0},
{6, 3},
- {0, 39}
+ {0, 40}
};
const ProtobufCMessageDescriptor nsjail__ns_jail_config__descriptor = {
"Nsjail__NsJailConfig",
"nsjail",
sizeof(Nsjail__NsJailConfig),
- 39,
+ 40,
nsjail__ns_jail_config__field_descriptors,
nsjail__ns_jail_config__field_indices_by_name,
2, nsjail__ns_jail_config__number_ranges,
#error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
#endif
typedef struct _Nsjail__IdMap Nsjail__IdMap;
+typedef struct _Nsjail__MountPt Nsjail__MountPt;
typedef struct _Nsjail__NsJailConfig Nsjail__NsJailConfig;
/* --- enums --- */
{ PROTOBUF_C_MESSAGE_INIT (&nsjail__id_map__descriptor) \
, nsjail__id_map__inside_id__default_value, nsjail__id_map__outside_id__default_value, 1u, 0 }
+struct _Nsjail__MountPt {
+ ProtobufCMessage base;
+ char *src;
+ char *dst;
+ char *fstype;
+ char *options;
+ protobuf_c_boolean is_bind;
+ protobuf_c_boolean is_ro;
+ protobuf_c_boolean has_is_dir;
+ protobuf_c_boolean is_dir;
+};
+extern char nsjail__mount_pt__options__default_value[];
+#define NSJAIL__MOUNT_PT__INIT \
+ { PROTOBUF_C_MESSAGE_INIT (&nsjail__mount_pt__descriptor) \
+ , NULL, NULL, NULL, nsjail__mount_pt__options__default_value, 0, 0, 0,0 }
+
struct _Nsjail__NsJailConfig {
ProtobufCMessage base;
Nsjail__Mode mode;
Nsjail__IdMap **uidmap;
size_t n_gidmap;
Nsjail__IdMap **gidmap;
+ size_t n_mount;
+ Nsjail__MountPt **mount;
};
extern char nsjail__ns_jail_config__hostname__default_value[];
extern char nsjail__ns_jail_config__cwd__default_value[];
extern char nsjail__ns_jail_config__bindhost__default_value[];
#define NSJAIL__NS_JAIL_CONFIG__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&nsjail__ns_jail_config__descriptor) \
- , NSJAIL__MODE__ONCE, NULL, 0, nsjail__ns_jail_config__hostname__default_value, nsjail__ns_jail_config__cwd__default_value, 0u, nsjail__ns_jail_config__bindhost__default_value, 0u, 600u, 0, NULL, 0,0, 0, 0, 0, 0,NULL, 0, 0, 512ull, 0ull, 600ull, 1ull, 32ull, 0,0, 0,0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0,NULL, 0,NULL }
+ , NSJAIL__MODE__ONCE, NULL, 0, nsjail__ns_jail_config__hostname__default_value, nsjail__ns_jail_config__cwd__default_value, 0u, nsjail__ns_jail_config__bindhost__default_value, 0u, 600u, 0, NULL, 0,0, 0, 0, 0, 0,NULL, 0, 0, 512ull, 0ull, 600ull, 1ull, 32ull, 0,0, 0,0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0,NULL, 0,NULL, 0,NULL }
/* Nsjail__IdMap methods */
void nsjail__id_map__init(Nsjail__IdMap * message);
Nsjail__IdMap *nsjail__id_map__unpack
(ProtobufCAllocator * allocator, size_t len, const uint8_t * data);
void nsjail__id_map__free_unpacked(Nsjail__IdMap * message, ProtobufCAllocator * allocator);
+/* Nsjail__MountPt methods */
+void nsjail__mount_pt__init(Nsjail__MountPt * message);
+size_t nsjail__mount_pt__get_packed_size(const Nsjail__MountPt * message);
+size_t nsjail__mount_pt__pack(const Nsjail__MountPt * message, uint8_t * out);
+size_t nsjail__mount_pt__pack_to_buffer(const Nsjail__MountPt * message, ProtobufCBuffer * buffer);
+Nsjail__MountPt *nsjail__mount_pt__unpack
+ (ProtobufCAllocator * allocator, size_t len, const uint8_t * data);
+void nsjail__mount_pt__free_unpacked(Nsjail__MountPt * message, ProtobufCAllocator * allocator);
/* Nsjail__NsJailConfig methods */
void nsjail__ns_jail_config__init(Nsjail__NsJailConfig * message);
size_t nsjail__ns_jail_config__get_packed_size(const Nsjail__NsJailConfig * message);
typedef void (*Nsjail__IdMap_Closure)
(const Nsjail__IdMap * message, void *closure_data);
+typedef void (*Nsjail__MountPt_Closure)
+ (const Nsjail__MountPt * message, void *closure_data);
typedef void (*Nsjail__NsJailConfig_Closure)
(const Nsjail__NsJailConfig * message, void *closure_data);
extern const ProtobufCEnumDescriptor nsjail__mode__descriptor;
extern const ProtobufCEnumDescriptor nsjail__log_level__descriptor;
extern const ProtobufCMessageDescriptor nsjail__id_map__descriptor;
+extern const ProtobufCMessageDescriptor nsjail__mount_pt__descriptor;
extern const ProtobufCMessageDescriptor nsjail__ns_jail_config__descriptor;
PROTOBUF_C__END_DECLS