inetd mode with -L

Q&A's, tips, howto's
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

inetd mode with -L

Post by newdep »

Hi Lutz,

Seems that newlisp is not reacting on the -L when it runs in inetd mode.
"/usr/bin/newlisp -L -c program" does launch the program but no logging...

Regards, Norman.
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Make sure newlisp has writing permissions in it's current directory. To find out it's current diectory, just telnet into the inetd port and enter: (directory)

Lutz

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

Hi lutz,

Actualy newlisp runs within inetd as root ...
Has it someting to do with the -c ?

Regards, Norman.
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

newlisp -c -L on the command line works fine and does logging. inetd uses stdio pipes, so it should be the same. What if you create the file first with: touch newlisp-log.txt ?

Lutz

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

Hi Lutz,

I would love to say it works ;-) but I tried it all.. No results.. its odd..
Anyways.. Ill fiddle a littl emore and see what it could be..

Regards, Norman.
-- (define? (Cornflakes))

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

Hi Lutz,

I tested again the -L with mode but it does not work in combination
in inetd.conf.. not even touched.. its odd..the logfile is nowhere on my disk..

Did you had a look at it already?

net-eval stream tcp nowait newlisp.newlisp /home/newlisp/bin/newlisp -c -L /home/newlisp/bin/remote.lsp

Regards, Norman.
-- (define? (Cornflakes))

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

Sorry for all the fuzz! it works fine !

Root puts the newlisp-log.txt inside the / directory ! if running from inetd mode.

Regards, Norman.
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Yes, I looked into it and it works fine for me on OSX 10.4 using xinetd. It shouldn't be different on inetd.

This is my xinetd configuration:

Code: Select all

service net-eval
{
        socket_type = stream
        wait = no
        user = lutz
        server = /usr/bin/newlisp
        port = 4711
        server_args = -c -L
        only_from = localhost
}
The log file is written to the root directory, where the user 'lutz' has write permissions.

This must be a permissions issue. What is your inetd file configuration entry?

Try to telnet into the port and try to create a file:

(write-file "junkfile" "hello world")

Is the file written? What is the current directory?

Lutz

ps: and don't forget the entry in /etc/services

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

yups thanks no problems see above...:-)
-- (define? (Cornflakes))

Locked