Quote:
I want to know the technique to compare the shadowed password and grant the root privileges to user.
|
md5...?
that is to compare the shadowed password
but i think you will make your sys even more vulnerable with that prog... !
but you could write it to use 'su' and let su execute a 2nd part of your app (splitting your c app into 2 parts, one run by the user, the other called by 'su -c <path-to-app>'
adding commandline params will give you the option of continuing whatever has been started - or by saving stuff to a temporary file!)
and whatever you do, test it well - let others test it - make sure every user entry is exactly what you want... and make sure you have no space for somebody using your app in a negative way... make it secure