osandov / drgn

Programmable debugger
Other
1.78k stars 165 forks source link

drgn.internal.sudohelper: pass privileged command as string instead of path #418

Closed osandov closed 4 months ago

osandov commented 4 months ago

At Meta, our Python executables are packaged in a way that doesn't leave the original .py or .pyc files easily accessible or importable. This makes the sudohelper fail with:

  can't open file '/proc/self/fd/3/drgn/internal/sudohelper.pyc': [Errno 2] No such file or directory

We can work around this by passing the helper command as a string literal. It's ugly, but it works with our Meta package and with traditional installations.

@brenns10 would you mind testing this out on your systems?