M
msigwald
I'm trying to write a little C program to run under linux, which must
gain root so it can then shutdown the computer. I can get the code to
execute the su command via system("su"), but once su comes into action,
my program it's halted and su takes over. Because of this, I can't get
my program to write the password su asks. I habe no idea on how to get
C to communicate with other running processes such as su, but I
understand it can be done. Any ideas on how I can achieve this?
Martin Sigwald
gain root so it can then shutdown the computer. I can get the code to
execute the su command via system("su"), but once su comes into action,
my program it's halted and su takes over. Because of this, I can't get
my program to write the password su asks. I habe no idea on how to get
C to communicate with other running processes such as su, but I
understand it can be done. Any ideas on how I can achieve this?
Martin Sigwald