mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 17:57:58 +02:00
* Add extra check for owner of tty
git-svn-id: trunk@2202 -
This commit is contained in:
parent
cd38c236a0
commit
155b36dc87
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user