* Add extra check for owner of tty

git-svn-id: trunk@2202 -
This commit is contained in:
daniel 2006-01-07 08:43:34 +00:00
parent cd38c236a0
commit 155b36dc87

View File

@ -56,6 +56,7 @@ const result_success=0;
result_stat_error=2;
result_chown_error=3;
result_chmod_error=4;
result_not_owner_error=5;
var thistty:string;
vcs,vcsa:string;
@ -74,6 +75,8 @@ begin
{We are running on the Linux console}
if fpstat(thistty,ttystat)<>0 then
halt(result_stat_error);
if ttystat.uid<>fpgetuid then
halt(result_not_owner_error);
vcs:='/dev/vcs'+copy(thistty,9,255);
vcsa:='/dev/vcsa'+copy(thistty,9,255);