/base/startup/init/interfaces/innerkits/fd_holder/ |
H A D | fd_holder_internal.c | 40 msghdr->msg_controllen += CMSG_SPACE(sizeof(struct ucred)); in BuildControlMessage() 58 // build ucred info in BuildControlMessage() 67 struct ucred *ucred; in BuildControlMessage() local 70 cmsg->cmsg_len = CMSG_LEN(sizeof(struct ucred)); in BuildControlMessage() 71 ucred = (struct ucred*) CMSG_DATA(cmsg); in BuildControlMessage() 72 ucred->pid = getpid(); in BuildControlMessage() 73 ucred->uid = getuid(); in BuildControlMessage() 74 ucred in BuildControlMessage() 99 struct ucred *ucred = (struct ucred*)CMSG_DATA(cmsg); GetFdsFromMsg() local [all...] |
/base/security/selinux_adapter/framework/policycoreutils/src/ |
H A D | param_checker.c | 29 const struct ucred *ucred; member 39 if (!msg->name || !msg->ucred) { in SelinuxAuditCallback() 43 if (snprintf_s(buf, len, len - 1, "parameter=%s pid=%d uid=%u gid=%u", msg->name, msg->ucred->pid, msg->ucred->uid, in SelinuxAuditCallback() 44 msg->ucred->gid) <= 0) { in SelinuxAuditCallback() 60 static int CheckPerm(const char *paraName, const char *srcContext, const char *destContext, const struct ucred *uc) in CheckPerm() 70 msg.ucred = uc; in CheckPerm()
|
/base/hiviewdfx/hilog/frameworks/libhilog/socket/ |
H A D | dgram_socket_server.cpp | 22 int DgramSocketServer::RecvPacket(std::vector<char>& buffer, struct ucred *cred) in RecvPacket() 33 std::array<char, CMSG_SPACE(sizeof(struct ucred))> control = {0}; in RecvPacket() 60 struct ucred *receivedUcred = (struct ucred*)CMSG_DATA(cmsg); in RecvPacket()
|
H A D | seq_packet_socket_server.cpp | 62 struct ucred cred = { 0 }; in AcceptingLoop() 63 socklen_t len = sizeof(struct ucred); in AcceptingLoop()
|
H A D | hilog_input_socket_server.cpp | 76 ucred cred; in ServingThread()
|
H A D | socket.cpp | 33 void Socket::SetCredential(struct ucred& cred) in SetCredential()
|
/base/hiviewdfx/hilog/frameworks/libhilog/socket/include/ |
H A D | socket.h | 32 void SetCredential(struct ucred& cred); 46 struct ucred socketCred = { 0 };
|
H A D | dgram_socket_server.h | 32 int RecvPacket(std::vector<char>& buffer, struct ucred *cred = nullptr);
|
H A D | hilog_input_socket_server.h | 34 using HandlingFunc = std::function<void(const ucred& credential, std::vector<char>& data, int dataLen)>;
|
/base/tee/tee_client/services/teecd/include/ |
H A D | tee_ca_auth.h | 18 int SendLoginInfo(const struct ucred *cr, const CaRevMsg *caRevInfo, int fd);
|
/base/tee/tee_client/services/teecd/src/ |
H A D | tee_ca_auth.c | 28 static int GetLoginInfo(const struct ucred *cr, int fd, uint8_t *buf, unsigned int bufLen)
in GetLoginInfo() 46 int SendLoginInfo(const struct ucred *cr, const CaRevMsg *caRevInfo, int fd)
in SendLoginInfo()
|
H A D | tee_ca_daemon.c | 114 static int ProcessCaMsg(const struct ucred *cr, const CaRevMsg *caInfo, int socket)
in ProcessCaMsg() 152 struct ucred cr;
in ProcessAccept() 166 socklen_t len = sizeof(struct ucred);
in ProcessAccept()
|
/base/hiviewdfx/faultloggerd/interfaces/innerkits/faultloggerd_client/ |
H A D | faultloggerd_socket.h | 28 bool RecvMsgCredFromSocket(int sockfd, struct ucred* pucred);
|
H A D | faultloggerd_socket.cpp | 190 bool RecvMsgCredFromSocket(int sockfd, struct ucred* pucred) in RecvMsgCredFromSocket() 201 char buf[CMSG_SPACE(sizeof(struct ucred))]; in RecvMsgCredFromSocket() 203 /* Space large enough to hold a 'ucred' structure */ in RecvMsgCredFromSocket() 232 if (memcpy_s(pucred, sizeof(struct ucred), CMSG_DATA(cmsg), sizeof(struct ucred)) != 0) { in RecvMsgCredFromSocket()
|
/base/security/selinux_adapter/interfaces/policycoreutils/include/ |
H A D | selinux_parameter.h | 42 struct ucred uc;
|
/base/hiviewdfx/hilog/services/hilogd/include/ |
H A D | log_collector.h | 39 void onDataRecv(const ucred& cred, std::vector<char>& data, int dataLen);
|
/base/startup/init/ueventd/ |
H A D | ueventd_socket.c | 67 char credMsg[CMSG_SPACE(sizeof(struct ucred))]; in ReadUeventMessage()
|
/base/hiviewdfx/hiview/plugins/sysevent_source/ |
H A D | event_server.cpp | 117 void InitMsgh(char* buffer, int bufferLen, std::array<char, CMSG_SPACE(sizeof(struct ucred))>& control,
in InitMsgh() 139 struct ucred* uCredRecv = reinterpret_cast<struct ucred*>(CMSG_DATA(cmsg));
in ReadPidFromMsgh() 238 std::array<char, CMSG_SPACE(sizeof(struct ucred))> control = {0};
in ReceiveMsg()
|
/base/hiviewdfx/hilog/services/hilogd/ |
H A D | log_collector.cpp | 69 void LogCollector::onDataRecv(const ucred& cred, std::vector<char>& data, int dataLen) in onDataRecv()
|
H A D | main.cpp | 153 auto onDataReceive = [&logCollector](const ucred& cred, std::vector<char>& data, int dataLen) { in HilogdEntry()
|
/base/startup/init/test/unittest/param/ |
H A D | param_stub.h | 61 struct ucred uc;
|
/base/startup/init/interfaces/innerkits/control_fd/ |
H A D | control_fd_service.c | 41 struct ucred uc = {-1, -1, -1}; in CheckSocketPermission()
|
/base/startup/init/services/loopevent/task/ |
H A D | le_streamtask.c | 170 struct ucred cred = {-1, -1, -1};
in DumpStreamConnectTaskInfo_() 171 socklen_t credSize = sizeof(struct ucred);
in DumpStreamConnectTaskInfo_()
|
/base/startup/init/services/param/linux/ |
H A D | param_service.c | 167 struct ucred cr = {-1, -1, -1};
in HandleParamSet() 318 struct ucred cr = {-1, -1, -1};
in HandleParamSave()
|
/base/hiviewdfx/faultloggerd/test/unittest/faultloggerd_client/ |
H A D | faultloggerd_client_test.cpp | 413 struct ucred rcred; in DoServerProcess()
|