mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 01:13:23 +00:00
Add passwd&group files and enable gvisor uidgid test
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
5aa3124e66
commit
2a0446265e
@ -5,7 +5,6 @@ INITRAMFS := $(BUILD_DIR)/initramfs
|
||||
INITRAMFS_IMAGE := $(BUILD_DIR)/initramfs.cpio.gz
|
||||
SHELL := /bin/bash
|
||||
INITRAMFS_EMPTY_DIRS := \
|
||||
$(INITRAMFS)/etc \
|
||||
$(INITRAMFS)/sbin \
|
||||
$(INITRAMFS)/root \
|
||||
$(INITRAMFS)/tmp \
|
||||
@ -13,6 +12,7 @@ INITRAMFS_EMPTY_DIRS := \
|
||||
$(INITRAMFS)/proc \
|
||||
$(INITRAMFS)/dev
|
||||
INITRAMFS_ALL_DIRS := \
|
||||
$(INITRAMFS)/etc \
|
||||
$(INITRAMFS)/lib/x86_64-linux-gnu \
|
||||
$(INITRAMFS)/lib64 \
|
||||
$(INITRAMFS)/bin \
|
||||
@ -36,6 +36,11 @@ $(INITRAMFS)/lib64:
|
||||
@mkdir -p $@
|
||||
@cp -L /lib64/ld-linux-x86-64.so.2 $@
|
||||
|
||||
$(INITRAMFS)/etc:
|
||||
@mkdir -p $@
|
||||
@cp $(CUR_DIR)/etc/passwd $@
|
||||
@cp $(CUR_DIR)/etc/group $@
|
||||
|
||||
# Install busybox into /bin and /usr/bin.
|
||||
$(INITRAMFS)/bin:
|
||||
@mkdir -p $@
|
||||
|
10
regression/etc/group
Normal file
10
regression/etc/group
Normal file
@ -0,0 +1,10 @@
|
||||
##
|
||||
# User group file.
|
||||
#
|
||||
# There is one entry per line, with the following format:
|
||||
# group_name:password:GID:user_list
|
||||
#
|
||||
# See the group(5) man page for additional information about this file.
|
||||
##
|
||||
root:x:0:
|
||||
nogroup:x:65534:
|
14
regression/etc/passwd
Normal file
14
regression/etc/passwd
Normal file
@ -0,0 +1,14 @@
|
||||
##
|
||||
# Password file.
|
||||
#
|
||||
# Each line of the file describes a single user, and contains seven
|
||||
# colon-separated fields:
|
||||
# name:password:UID:GID:GECOS:directory:shell
|
||||
#
|
||||
# The password field can be either the encrypted user password, an asterisk
|
||||
# (*), or the letter 'x'. See the pwconf(8) man page for explanation of 'x'.
|
||||
#
|
||||
# See the passwd(5) man page for additional information about this file.
|
||||
##
|
||||
root:x:0:0:root:/:/bin/sh
|
||||
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
|
@ -1,4 +1,4 @@
|
||||
TESTS ?= open_test read_test statfs_test chmod_test pty_test
|
||||
TESTS ?= open_test read_test statfs_test chmod_test pty_test uidgid_test
|
||||
|
||||
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||
CUR_DIR := $(patsubst %/,%,$(dir $(MKFILE_PATH)))
|
||||
|
4
regression/syscall_test/blocklists/uidgid_test
Normal file
4
regression/syscall_test/blocklists/uidgid_test
Normal file
@ -0,0 +1,4 @@
|
||||
UidGidRootTest.Setgid
|
||||
UidGidRootTest.SetgidNotFromThreadGroupLeader
|
||||
UidGidRootTest.Setregid
|
||||
UidGidRootTest.Setresgid
|
Reference in New Issue
Block a user