How to check if the user is local?
The
HyperNews
Linux KHG
Discussion Pages
How to check if the user is local?Forum: The Linux Kernel Hackers' GuideDate: Mon, 27 Jul 1998 16:39:18 GMTFrom: <jb@nicol.ml.org>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?
to: "How to check if the user is local?"
w
Wyszukiwarka