On Fri, Sep 08, 2006 at 02:09:16AM -0300, Avi Alkalay wrote:
> Well, these issues jumped to next releases.
> 
> Also, to make the daemon really work with full permissions, I had to put a
> setuid(0) call inside main(). And I changed the RPM spec so it now installs
> kdbd as a +s program.

That should never be needed, and when I say never, it is really never ;-).

> I was thinking about the next steps for the daemon:
> 
> - The libelektra-daemon.so should try to connect to a daemon. If it can't
> find one, it should be started with exec() or system(). Thats why kdbd is
> +s.

I disagree with that design. A kdbd should be started by the super user
(or equivalent) at boot, and not by a user at will. setuid programs bring
too much security issues. There are allready much to be worried about since
the daemon may be feed with incorrect data, so adding a setuid bit is 
really bad.

> - An eventual newly started daemon should open the listening socket. If it
> already finds the file there (so it can't open it), it should test if there
> is another daemon already running with some sort of ping, and there should
> be some logic to decide when and how to kill a problematic daemon. Only one
> kdbd should be running on the system.

That's gonna be hard to be robust. The daemon should just be started
in a classical init.d, drop the pid in /var/run such that it may be killed
easily. But I think that apps should error out when the daemon is not 
started and not blindly launch another one, giving too much power to the 
user. And if the socket is allready taken it should also error out instead of
trying to automatically solve an issue that cannot be automatically solved.
Having a script or something like that which automates problem solving
should be right, but doing that automatically from any app accessing 
configuration seems wrong to me.

> - So I think at least a ping mechanism with timeouts should exist between
> client and server, and server and server.
> 
> Thoughts ?

Indeed, but to report the timeout, and not to fix it automatically.

--
Pat

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Registry-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/registry-list

Reply via email to