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
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include <nuttx/lib/builtin.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
|
@ -43,7 +45,11 @@
|
|||
const struct builtin_s g_builtins[] =
|
||||
{
|
||||
# include "builtin_list.h"
|
||||
#ifdef CONFIG_SCHED_USER_IDENTITY
|
||||
{ NULL, 0, 0, 0, 0, 0, 0 }
|
||||
#else
|
||||
{ NULL, 0, 0, 0 }
|
||||
#endif
|
||||
};
|
||||
|
||||
const int g_builtin_count = sizeof(g_builtins) / sizeof(g_builtins[0]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue