Lines Matching refs:newCredentials
42 Credentials *newCredentials = LOS_MemAlloc(m_aucSysMem1, size);
43 if (newCredentials == NULL) {
49 (VOID)memcpy_s(newCredentials, sizeof(Credentials), oldCredentials, sizeof(Credentials));
50 LOS_AtomicSet(&newCredentials->rc, 1);
52 (VOID)memset_s(newCredentials, sizeof(Credentials), 0, sizeof(Credentials));
53 LOS_AtomicSet(&newCredentials->rc, 3); /* 3: Three system processes */
55 newCredentials->userContainer = NULL;
56 return newCredentials;
61 Credentials *newCredentials = CreateNewCredential(runProcessCB);
62 if (newCredentials == NULL) {
66 newCredentials->userContainer = runProcessCB->credentials->userContainer;
67 LOS_AtomicInc(&newCredentials->userContainer->rc);
68 return newCredentials;
104 Credentials *newCredentials = CreateNewCredential(parent);
105 if (newCredentials == NULL) {
110 newCredentials->userContainer = parent->credentials->userContainer;
111 LOS_AtomicInc(&newCredentials->userContainer->rc);
112 return newCredentials;
116 ret = OsCreateUserContainer(newCredentials, parent->credentials->userContainer);
118 ret = OsCreateUserContainer(newCredentials, NULL);
121 FreeCredential(newCredentials);
124 return newCredentials;
165 Credentials *newCredentials = CreateNewCredential(runProcess);
166 if (newCredentials == NULL) {
170 runProcess->credentials = newCredentials;
171 newCredentials->userContainer = targetContainer;
186 INT32 CommitCredentials(Credentials *newCredentials)
190 if (LOS_AtomicRead(&newCredentials->rc) < 1) {
194 OsCurrProcessGet()->credentials = newCredentials;