Command line vs. call from a program
Neil Rickert
rickert at mp.cs.niu.edu
Sun Sep 30 00:37:22 AEST 1990
In article <3707 at wb3ffv.ampr.org> wmark at wb3ffv.ampr.org (Mark Winsor) writes:
>I have a need to be able to tell if a program has been invoked from the
>command line or called through a specific program. I have a menu system
>that requires that I have root permissions for some admin utilities. I'd
>like to have a setuid program that execs shell scripts but only want it
>to execute if it is called by my menu system. Any good ideas as to how to
>accomplish this? I tried setting the process group idea but this closes
>/dev/tty which is not acceptable. Any ideas would be appreciated.
The easiest method would be: chmod o-x "your setuid program"
so that the setuid program can only be called my members of a restricted
group. Then make the menu system sgid to that group.
This isn't quite what you asked, but would seem to have the equivalent
effect.
--
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
Neil W. Rickert, Computer Science <rickert at cs.niu.edu>
Northern Illinois Univ.
DeKalb, IL 60115. +1-815-753-6940
More information about the Comp.unix.questions
mailing list