[eDVBCAHandler] Fall back to /proc/PID/comm when readlink on /proc/PI…

Status
Not open for further replies.

GitHub

Moderator
[eDVBCAHandler] Fall back to /proc/PID/comm when readlink on /proc/PID/exe fails

Some kernels (observed on dm520) do not implement readlink on
/proc/PID/exe. The Protocol-3 client identification then defaulted
to "legacy client" for every connection - which prevented the
DVBAPI_CLIENT_INFO handshake with oscam, kept oscam at
client_proto_version=0, kept ca_soft_csa[demux_id]=0 and triggered
"ioctl(CA_SET_DESCR_MODE): Invalid argument" on every CW update.
SoftCSA channels were unwatchable in that state.

Fall back to /proc/PID/comm (the process name, truncated to
TASK_COMM_LEN) when readlink fails. The blacklist match below uses
strncasecmp(basename, *p, strlen(*p)) which still matches the
prefix correctly even on truncated names. On boxes where readlink
works (typical case) the new branch is never entered, so no
behavior change.

(cherry picked from commit 13035e8038824a9537f78ac044384c749aa0fdaa)

Continue reading...
 
Status
Not open for further replies.
Back
Top