Within my Perl CGI, I need to check the status of an arbitrary user account. This is done with the Linix command "/usr/bin/passwd -S jdoe". The blog warning is: "You may not change the password for jdoe." The CGI completes, so I do get my webpage (less the status info I need). My script runs SUID root (by means of a wrapper).
My line in the script is:
`/usr/bin/passwd -S $login`
I've cleared the PATH with:
$ENV{"PATH"} = "";
I've synced with realUID and effectiveUID with:
$< = $>;
I've untainted the $login variable ("jdoe" with:
$login =~ /(.+)/; $login = "$1";
Anyone been here before?
-Mike
My line in the script is:
`/usr/bin/passwd -S $login`
I've cleared the PATH with:
$ENV{"PATH"} = "";
I've synced with realUID and effectiveUID with:
$< = $>;
I've untainted the $login variable ("jdoe" with:
$login =~ /(.+)/; $login = "$1";
Anyone been here before?
-Mike