Home
last modified time | relevance | path

Searched refs:userContainer (Results 1 – 7 of 7) sorted by relevance

/kernel/liteos_a/kernel/extended/container/
Dlos_credentials.c55 newCredentials->userContainer = NULL; in CreateNewCredential()
66 newCredentials->userContainer = runProcessCB->credentials->userContainer; in PrepareCredential()
67 LOS_AtomicInc(&newCredentials->userContainer->rc); in PrepareCredential()
77 if (credentials->userContainer != NULL) { in FreeCredential()
78 LOS_AtomicDec(&credentials->userContainer->rc); in FreeCredential()
79 if (LOS_AtomicRead(&credentials->userContainer->rc) <= 0) { in FreeCredential()
80 FreeUserContainer(credentials->userContainer); in FreeCredential()
81 credentials->userContainer = NULL; in FreeCredential()
110 newCredentials->userContainer = parent->credentials->userContainer; in CreateCredentials()
111 LOS_AtomicInc(&newCredentials->userContainer->rc); in CreateCredentials()
[all …]
Dlos_user_container.c67 UserContainer *userContainer = LOS_MemAlloc(m_aucSysMem1, sizeof(UserContainer)); in OsCreateUserContainer() local
68 if (userContainer == NULL) { in OsCreateUserContainer()
71 (VOID)memset_s(userContainer, sizeof(UserContainer), 0, sizeof(UserContainer)); in OsCreateUserContainer()
74 userContainer->containerID = OsAllocContainerID(); in OsCreateUserContainer()
75 userContainer->parent = parentUserContainer; in OsCreateUserContainer()
76 newCredentials->userContainer = userContainer; in OsCreateUserContainer()
79 LOS_AtomicSet(&userContainer->rc, 1); in OsCreateUserContainer()
80 userContainer->level = parentUserContainer->level + 1; in OsCreateUserContainer()
81 userContainer->owner = newCredentials->euid; in OsCreateUserContainer()
82 userContainer->group = newCredentials->egid; in OsCreateUserContainer()
[all …]
Dlos_container.c716 if ((processCB->credentials == NULL) || (processCB->credentials->userContainer == NULL)) { in OsSetNs()
720 UserContainer *userContainer = processCB->credentials->userContainer; in OsSetNs() local
721 ret = OsSetNsUserContainer(userContainer, curr); in OsSetNs()
/kernel/liteos_a/kernel/base/include/
Dlos_user_container_pri.h67 VOID FreeUserContainer(UserContainer *userContainer);
69 UINT32 OsFromKuidMunged(UserContainer *userContainer, UINT32 kuid);
71 UINT32 OsFromKgidMunged(UserContainer *userContainer, UINT32 kgid);
73 UINT32 OsMakeKuid(UserContainer *userContainer, UINT32 uid);
75 UINT32 OsMakeKgid(UserContainer *userContainer, UINT32 gid);
Dlos_credentials_pri.h48 struct UserContainer *userContainer; member
/kernel/liteos_a/fs/proc/os_adapt/
Dprocess_proc.c418 if ((processCB->credentials == NULL) || (processCB->credentials->userContainer == NULL)) { in ProcIDMapWrite()
423 UserContainer *userContainer = processCB->credentials->userContainer; in ProcIDMapWrite() local
424 if (userContainer->parent == NULL) { in ProcIDMapWrite()
431 &userContainer->uidMap, &userContainer->parent->uidMap); in ProcIDMapWrite()
434 &userContainer->gidMap, &userContainer->parent->gidMap); in ProcIDMapWrite()
451 if ((processCB->credentials == NULL) || (processCB->credentials->userContainer == NULL)) { in ProcIDMapRead()
455 UserContainer *userContainer = processCB->credentials->userContainer; in ProcIDMapRead() local
456 if ((userContainer != NULL) && (userContainer->parent == NULL)) { in ProcIDMapRead()
457 UidGidExtent uidGidExtent = userContainer->uidMap.extent[0]; in ProcIDMapRead()
/kernel/liteos_a/syscall/
Dprocess_syscall.c623 UserContainer *userContainer = CurrentCredentials()->userContainer; in SysSetUserID() local
631 UINT32 kuid = OsMakeKuid(userContainer, uid); in SysSetUserID()
780 UserContainer *userContainer = CurrentCredentials()->userContainer; in SysSetGroupID() local
790 unsigned int kgid = OsMakeKgid(userContainer, gid); in SysSetGroupID()