mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
builtin: uid and gid configuration for builtin app
File uid and gid configuration for builtin fs, if set-user-ID bit is set in the file permissions, then the euid of process set as file uid. Use the confiuration to emulate builtin app set. MODE must octal number and use similar with linux chmod OCTAL-MODE FILE UID = 2000 GID = 3000 MODE = 06555 Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
This commit is contained in:
parent
75f04dd775
commit
b0933fe431
3 changed files with 35 additions and 0 deletions
|
|
@ -253,10 +253,19 @@ REGLIST := $(addprefix $(BUILTIN_REGISTRY)$(DELIM),$(addsuffix .bdat,$(PROGNAME)
|
|||
APPLIST := $(PROGNAME)
|
||||
|
||||
$(REGLIST): $(DEPCONFIG) Makefile
|
||||
ifeq ($(CONFIG_SCHED_USER_IDENTITY),y)
|
||||
$(call REGISTER,$(firstword $(APPLIST)),$(firstword $(PRIORITY)),$(firstword $(STACKSIZE)),$(if $(BUILD_MODULE),,$(firstword $(APPLIST))_main),$(firstword $(UID)),$(firstword $(GID)),$(firstword $(MODE)))
|
||||
else
|
||||
$(call REGISTER,$(firstword $(APPLIST)),$(firstword $(PRIORITY)),$(firstword $(STACKSIZE)),$(if $(BUILD_MODULE),,$(firstword $(APPLIST))_main))
|
||||
endif
|
||||
$(eval APPLIST=$(filter-out $(firstword $(APPLIST)),$(APPLIST)))
|
||||
$(if $(filter-out $(firstword $(PRIORITY)),$(PRIORITY)),$(eval PRIORITY=$(filter-out $(firstword $(PRIORITY)),$(PRIORITY))))
|
||||
$(if $(filter-out $(firstword $(STACKSIZE)),$(STACKSIZE)),$(eval STACKSIZE=$(filter-out $(firstword $(STACKSIZE)),$(STACKSIZE))))
|
||||
ifeq ($(CONFIG_SCHED_USER_IDENTITY),y)
|
||||
$(if $(filter-out $(firstword $(UID)),$(UID)),$(eval UID=$(filter-out $(firstword $(UID)),$(UID))))
|
||||
$(if $(filter-out $(firstword $(GID)),$(GID)),$(eval GID=$(filter-out $(firstword $(GID)),$(GID))))
|
||||
$(if $(filter-out $(firstword $(MODE)),$(MODE)),$(eval MODE=$(filter-out $(firstword $(MODE)),$(MODE))))
|
||||
endif
|
||||
|
||||
register:: $(REGLIST)
|
||||
@:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue