Skip to content

Commit f5883db

Browse files
Treehugger RobotGerrit Code Review
authored andcommitted
Merge "libbinder: Add log when FDs aren't supported in RpcSession" into main
2 parents 5a1c5a1 + f4c9b48 commit f5883db

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

libs/binder/Parcel.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,10 +1585,15 @@ status_t Parcel::writeFileDescriptor(int fd, bool takeOwnership) {
15851585
fdVariant = borrowed_fd(fd);
15861586
}
15871587
if (!mAllowFds) {
1588+
ALOGE("FDs are not allowed in this parcel. Both the service and the client must set "
1589+
"the FileDescriptorTransportMode and agree on the support.");
15881590
return FDS_NOT_ALLOWED;
15891591
}
15901592
switch (rpcFields->mSession->getFileDescriptorTransportMode()) {
15911593
case RpcSession::FileDescriptorTransportMode::NONE: {
1594+
ALOGE("FDs are not allowed in this RpcSession. Both the service and the client "
1595+
"must set "
1596+
"the FileDescriptorTransportMode and agree on the support.");
15921597
return FDS_NOT_ALLOWED;
15931598
}
15941599
case RpcSession::FileDescriptorTransportMode::UNIX:

0 commit comments

Comments
 (0)