Posts

Showing posts from 2022

Debug a C/C++ application which requires root privileges using Eclipse CDT

Image
Spanish version / Versión en Español Hi! It's been a long time, but this blog is not dead! It just happened that so far, I haven't ran into a case which hadn't been documented by someone else already. I am glad to inform that today, I found good enough reason to make a post, since the information was already in the web, but scattered among different sites. So I am putting it together here for future reference. Going back to the problem described in the title: initially, you would think that for a scenario like this, the only way is to run Eclipse itself with root privileges. However, security concerns aside, doing so would imply losing all the Eclipse settings, because they would be associated to the original non-root user. The optimal solution would be to refactor the application to avoid requiring root privileges. Sometimes, that can be achieved without even touching the app's source code. For example, it might be possible to define a user group with the

Depurar una aplicación C/C++ que requiere privilegios de root usando Eclipse CDT

Image
Versión en inglés / English version ¡Hola! Ha pasado mucho tiempo, ¡pero este blog sigue con vida! El problema fue que en todo este tiempo, todos los temas con los que me topé ya estaban documentados en detalle en la web. Es un placer informar que hoy encontré una buena razón para postear, ya que la información estaba en la web, pero desperdigada entre diversos sitios. Así que la recopilé aquí para referencia futura. Volviendo al problema mencionado en el título: inicialmente, uno pensaría que para un escenario así, la única solución sería ejecutar Eclipse con privilegios administrativos, o sea como root . Sin embargo, más allá de los potenciales problemas de seguridad, hacer eso implicaría perder toda la configuración de Eclipse, porque la misma está asociada al usuario original, que no es root . La mejor solución sería refactorizas la aplicación para que no requiera privilegios administrativos. A veces, eso puede hacerse incluso sin tocar el código fuente. Por ejemplo,