Dependency Utilisation

Can anyone point me in the direction of learning how to correctly utilise existing packages in my c++ code?

Say I wanted to call adduser within my code. I shouldn't use popen() or anything like that, so is there a SAFE way of doing it?

A very basic example would be awesome!

Thanks

G
Say I wanted to call adduser within my code. I shouldn't use popen() or anything like that
That's not necessarily true.

I'm not sure such rules exist. It's more a matter of understanding what happens underneath and writing reasonable code that doesn't seem to do something wrong.
Thanks for your reply!

I have been told on these forums in the past that I just shouldn't use popen(), system() etc.

There was suggestion someone might be able to MITM the call to the third party tool. I guess explicit paths would resolve this issue?

If program A has a dependency on program B when I install it from the repositories, HOW have they (probably) utilised that program? Is there a way NOT using popen() etc?

Cheers

Edit: In windows I could link to a DLL. What is the equivalent in linux?
Last edited on
Topic archived. No new replies allowed.