pidns: add pidns image file definition

TODO: create correct magic

Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber 2020-05-05 14:53:08 +00:00 committed by Andrei Vagin
parent 99c8487837
commit 4e7ec3c88b
8 changed files with 12 additions and 0 deletions

View file

@ -103,6 +103,7 @@ struct cr_fd_desc_tmpl imgset_template[CR_FD_MAX] = {
FD_ENTRY(NETNF_EXP, "netns-exp-%u"),
FD_ENTRY(FILES, "files"),
FD_ENTRY(TIMENS, "timens-%u"),
FD_ENTRY(PIDNS, "pidns-%u"),
[CR_FD_STATS] = {
.fmt = "stats-%s",

View file

@ -27,6 +27,7 @@ enum {
CR_FD_MNTS,
CR_FD_USERNS,
CR_FD_TIMENS,
CR_FD_PIDNS,
_CR_FD_IPCNS_FROM,
CR_FD_IPC_VAR,

View file

@ -96,6 +96,7 @@
#define FILES_MAGIC 0x56303138 /* Toropets */
#define MEMFD_INODE_MAGIC 0x48453499 /* Dnipro */
#define TIMENS_MAGIC 0x43114433 /* Beslan */
#define PIDNS_MAGIC 0x12345678
#define IFADDR_MAGIC RAW_IMAGE_MAGIC
#define ROUTE_MAGIC RAW_IMAGE_MAGIC

View file

@ -66,6 +66,7 @@ enum {
PB_TIMENS,
PB_IMG_STREAMER_REQUEST,
PB_IMG_STREAMER_REPLY,
PB_PIDNS,
/* PB_AUTOGEN_STOP */

View file

@ -38,6 +38,7 @@
#include "images/timer.pb-c.h"
#include "images/utsns.pb-c.h"
#include "images/timens.pb-c.h"
#include "images/pidns.pb-c.h"
#include "images/ipc-var.pb-c.h"
#include "images/ipc-shm.pb-c.h"
#include "images/ipc-msg.pb-c.h"

View file

@ -55,6 +55,7 @@ proto-obj-y += rpc.o
proto-obj-y += ext-file.o
proto-obj-y += cgroup.o
proto-obj-y += userns.o
proto-obj-y += pidns.o
proto-obj-y += google/protobuf/descriptor.o # To make protoc-c happy and compile opts.proto
proto-obj-y += opts.o
proto-obj-y += seccomp.o

5
images/pidns.proto Normal file
View file

@ -0,0 +1,5 @@
syntax = "proto2";
message pidns_entry {
optional string ext_key = 1;
}

View file

@ -467,6 +467,7 @@ handlers = {
'CREDS': entry_handler(pb.creds_entry),
'UTSNS': entry_handler(pb.utsns_entry),
'TIMENS': entry_handler(pb.timens_entry),
'PIDNS': entry_handler(pb.pidns_entry),
'IPC_VAR': entry_handler(pb.ipc_var_entry),
'FS': entry_handler(pb.fs_entry),
'GHOST_FILE': ghost_file_handler(),