Commit 4d31b38a authored by Stanislav Kinsburskiy's avatar Stanislav Kinsburskiy Committed by Pavel Emelyanov

protobuf: autofs entry introduced

This entry will be used to carry all the autofs parameters, required to
restore mount point.
Signed-off-by: 's avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent c8911f28
......@@ -78,6 +78,7 @@ struct cr_fd_desc_tmpl imgset_template[CR_FD_MAX] = {
FD_ENTRY_F(IP6TABLES, "ip6tables-%d", O_NOBUF),
FD_ENTRY_F(TMPFS_IMG, "tmpfs-%d.tar.gz", O_NOBUF),
FD_ENTRY_F(TMPFS_DEV, "tmpfs-dev-%d.tar.gz", O_NOBUF),
FD_ENTRY_F(AUTOFS, "autofs-%d", O_NOBUF),
FD_ENTRY(BINFMT_MISC, "binfmt-misc-%d"),
FD_ENTRY(TTY_FILES, "tty"),
FD_ENTRY(TTY_INFO, "tty-info"),
......
......@@ -49,4 +49,8 @@
#define BINFMTFS_MAGIC 0x42494e4d
#endif
#ifndef AUTOFS_SUPER_MAGIC
#define AUTOFS_SUPER_MAGIC 0x0187
#endif
#endif /* __CR_FS_MAGIC_H__ */
......@@ -105,6 +105,8 @@ enum {
CR_FD_FANOTIFY_MARK,
CR_FD_EVENTPOLL_TFD,
CR_FD_AUTOFS,
CR_FD_MAX
};
......
......@@ -92,6 +92,7 @@
#define USERNS_MAGIC 0x55474906 /* Kazan */
#define SECCOMP_MAGIC 0x64413049 /* Kostomuksha */
#define BINFMT_MISC_MAGIC 0x67343323 /* Apatity */
#define AUTOFS_MAGIC 0x49353943 /* Sochi */
#define IFADDR_MAGIC RAW_IMAGE_MAGIC
#define ROUTE_MAGIC RAW_IMAGE_MAGIC
......
......@@ -58,6 +58,7 @@ enum {
PB_NETNS,
PB_BINFMT_MISC, /* 50 */
PB_TTY_DATA,
PB_AUTOFS,
/* PB_AUTOGEN_STOP */
......
......@@ -63,6 +63,7 @@
#include "images/userns.pb-c.h"
#include "images/seccomp.pb-c.h"
#include "images/binfmt-misc.pb-c.h"
#include "images/autofs.pb-c.h"
struct cr_pb_message_desc cr_pb_descs[PB_MAX];
......
......@@ -59,6 +59,7 @@ proto-obj-y += seccomp.o
proto-obj-y += binfmt-misc.o
proto-obj-y += time.o
proto-obj-y += sysctl.o
proto-obj-y += autofs.o
CFLAGS += -iquote $(obj)/
......
message autofs_entry {
required int32 fd = 1;
required int32 pgrp = 2;
required int32 timeout = 3;
required int32 minproto = 4;
required int32 maxproto = 5;
required int32 mode = 6;
optional int32 uid = 7;
optional int32 gid = 8;
optional int32 read_fd = 9;
}
......@@ -453,6 +453,7 @@ handlers = {
'NETNS' : entry_handler(netns_entry),
'USERNS' : entry_handler(userns_entry),
'SECCOMP' : entry_handler(seccomp_entry),
'AUTOFS' : entry_handler(autofs_entry),
}
def __rhandler(f):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment