Block unpriviledged apps which create keepalives with null fd
Currently, socketKeepalive implementation is accepting null fd due to backward compatibility with legacy packet keepalive API. However, due to lack of the fd, the service cannot guarantee the port is not reused by another app if the caller release the port for any reason. Thus, grant the null fd access only for priviledged apps. This commit also address some comments from aosp/918533. Bug: 126699232 Test: atest FrameworksNetTests Change-Id: I0baf582ff4ca8af6082c3754e8dfbcd867f39792
Loading
Please register or sign in to comment