The HyperNews Linux KHG Discussion Pages

Question: How to check if the user is local?

Forum: The Linux Kernel Hackers' Guide
Date: Mon, 27 Jul 1998 16:39:18 GMT
From: <>

Access to some resources should be limited for local users only (starting Xserver, access to diskette).

I wrote program that walks through /proc/*/stat files and checks if the tty field is between 1024 and 1087. If process has pseudoterminal it checks sid, ppid, sid.. etc. If it find process that is a deamon or has other terminal than vconsole or pseudoterm it tells that it is remote user.

Is it a save way?