amend gitignore

This commit is contained in:
2026-07-23 15:23:47 +08:00
parent 6f34caf845
commit 3d62194fec
19 changed files with 875 additions and 597 deletions
+6
View File
@@ -0,0 +1,6 @@
#ifndef CAPABILITIES_H
#define CAPABILITIES_H
int capabilities(void);
#endif
+9
View File
@@ -0,0 +1,9 @@
#ifndef CGROUP_H
#define CGROUP_H
#include "container.h"
int resources(struct child_config *config);
int free_resources(struct child_config *config);
#endif
+41
View File
@@ -0,0 +1,41 @@
#ifndef CONTAINER_H
#define CONTAINER_H
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
#include <pwd.h>
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <sys/mount.h>
#include <sys/prctl.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/sysmacros.h>
#include <sys/utsname.h>
#include <sys/wait.h>
#include <linux/capability.h>
#include <linux/limits.h>
#define STACK_SIZE (1024 * 1024)
#define USERNS_OFFSET 10000
#define USERNS_COUNT 2000
#define FD_COUNT 64
struct child_config {
int argc;
uid_t uid;
int fd;
char *hostname;
char **argv;
char *mount_dir;
};
#endif
+6
View File
@@ -0,0 +1,6 @@
#ifndef CONTAINER_SECCOMP_H
#define CONTAINER_SECCOMP_H
int syscalls(void);
#endif
+8
View File
@@ -0,0 +1,8 @@
#ifndef HOSTNAME_H
#define HOSTNAME_H
#include <stddef.h>
int choose_hostname(char *buff, size_t len);
#endif
+8
View File
@@ -0,0 +1,8 @@
#ifndef MOUNT_H
#define MOUNT_H
#include "container.h"
int mounts(struct child_config *config);
#endif
+9
View File
@@ -0,0 +1,9 @@
#ifndef USERNS_H
#define USERNS_H
#include "container.h"
int userns(struct child_config *config);
int handle_child_uid_map(pid_t child_pid, int fd);
#endif