jkonrath@silver.ucs.indiana.edu (jon) (01/29/91)
dumb question from a non-wizard: anyone know a way to run a program from a .plan? it needs to be run at the time of the finger, and run by the fingeree. the program is to see who is doing the fingering, then put their name in a log. any way to do this in this method? i saw it done a while back, but it couldve been some method of running a background program to constantly look at who's fingering around... jon ------------------------------------------------------------------------------- Jon Konrath, Consultant jkonrath@silver.ucs.indiana.edu IUSB Computing Services ap202093@natasha.iusb.indiana.edu jkonrath@rose.ucs.indiana.edu under construction... jkonrath@sbway.iusb.indiana.edu
bzs@world.std.com (Barry Shein) (01/29/91)
>anyone know a way to run a program from a .plan? it needs to be run at the >time of the finger, and run by the fingeree. >the program is to see who is doing the fingering, then put their name in >a log. any way to do this in this method? i saw it done a while back, but >it couldve been some method of running a background program to constantly >look at who's fingering around... Unless there's some magic I don't know about within that particular version of finger (like checking for exec bits) the obvious answer is to make .plan a FIFO and have a program which waits for an open and then does its stuff (right? it's been a while since I've programmed FIFOs, but it seems like that would work, a pty might work also.) -- -Barry Shein Software Tool & Die | bzs@world.std.com | uunet!world!bzs Purveyors to the Trade | Voice: 617-739-0202 | Login: 617-739-WRLD
fwp1@CC.MsState.Edu (Frank Peters) (01/29/91)
: On 28 Jan 91 23:38:21 GMT, jkonrath@silver.ucs.indiana.edu (jon) said: jkonrath> dumb question from a non-wizard: jkonrath> anyone know a way to run a program from a .plan? it needs to be run at the jkonrath> time of the finger, and run by the fingeree. jkonrath> the program is to see who is doing the fingering, then put their name in jkonrath> a log. any way to do this in this method? i saw it done a while back, but jkonrath> it couldve been some method of running a background program to constantly It is certainly possible. The trick is to make .plan a type of special file called a FIFO (First In First Out). Your process then waits for someone to read from .plan and then writes to it. This is actually very easy to do. I wrote a quick hack to do it the last time this thread came around. Write to me if you want a copy. There are a few gotchas and limitations to be aware of: 1) The only real way to find out who is fingering you is to lok for the process that is doing it. That means that this will only work for local fingerers. The finger protocol doesn't tell you who is fingering you from a remote host. 2) If the finger server isn't running then when the process opens the .plan file it just hangs. This can lead to a few seized up fingerd processes. 3) If your home directory is shared among several machines things will lock up if anyone fingers you on any machine but the one the server is running on. This is really a special case of item 2. Regards, FWP -- -- Frank Peters Internet: fwp1@CC.MsState.Edu Bitnet: FWP1@MsState Phone: (601)325-2942 FAX: (601)325-8921
paf@nada.kth.se (Patrik F{ltstr|m) (01/29/91)
In article <BZS.91Jan28205536@world.std.com> bzs@world.std.com (Barry Shein) writes: >>anyone know a way to run a program from a .plan? it needs to be run at the >>time of the finger, and run by the fingeree. >to make .plan a FIFO and have a program which waits for an open and >then does its stuff (right? it's been a while since I've programmed >FIFOs, but it seems like that would work, a pty might work also.) > -Barry Shein Yes, that might work, but most finger daemons check the .plan that it is only a plain text-file, and also do not let control characters through. Otherwise you have some security problems in your system. You can with control-characters change the characteristic of the fingering persons terminal. So, just checking for plain text-files is not enough. I sure hope that all finger daemons in the future do this test. Patrik Faltstrom <paf@nada.kth.se>
sow@cad.luth.se (Sven-Ove Westberg) (02/01/91)
In article <1991Jan29.095905.10168@nada.kth.se> paf@nada.kth.se (Patrik F{ltstr|m) writes: |In article <BZS.91Jan28205536@world.std.com> bzs@world.std.com (Barry Shein) writes: | |>>anyone know a way to run a program from a .plan? it needs to be run at the |>>time of the finger, and run by the fingeree. | |>to make .plan a FIFO and have a program which waits for an open and |>then does its stuff (right? it's been a while since I've programmed |>FIFOs, but it seems like that would work, a pty might work also.) | |> -Barry Shein | |Yes, that might work, but most finger daemons check the .plan that |it is only a plain text-file, and also do not let control characters |through. Otherwise you have some security problems in your system. |You can with control-characters change the characteristic of the |fingering persons terminal. So, just checking for plain text-files |is not enough. | It is actually not the finger daemon that does the test it is the finger program it self. The finger daemon is a small stupid thing that just use the finger program to get the work done. So I dont think its is simple to find out who is fingering you. Sven-Ove Westberg, CAD, University of Lulea, S-951 87 Lulea, Sweden.
paf@nada.kth.se (Patrik F{ltstr|m) (02/01/91)
In article <1604@eru.mt.luth.se> sow@cad.luth.se (Sven-Ove Westberg) writes: >It is actually not the finger daemon that does the test it is >the finger program it self. The finger daemon is a small stupid thing >that just use the finger program to get the work done. So I dont >think its is simple to find out who is fingering you. > >Sven-Ove Westberg, CAD, University of Lulea, S-951 87 Lulea, Sweden. That is not the case with the GNU version of in.fingerd which is doing all of the job. The finger program only send a one-line command to the in.fingerd and prints out everything that it gets back. Patrik