Browse Source

* Add extra check for owner of tty

git-svn-id: trunk@2202 -
daniel 19 years ago
parent
commit
155b36dc87
1 changed files with 3 additions and 0 deletions
  1. 3 0
      utils/grab_vcsa.pp

+ 3 - 0
utils/grab_vcsa.pp

@@ -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);