ravthan / all-eyes

Automatically exported from code.google.com/p/all-eyes
0 stars 0 forks source link

make 'ae' a true daemon #64

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

'ae' should be a made a true daemon.  So, do the following:

- Fork off the parent process.  
- if fork succeeds, exit out of the parent process.

In the child process do the following:

  *  Change (umask) file mode mask
  *  Open any logs for writing (already being done)
  *  Create a unique Session ID (SID)
  *  Change the current working directory to a safe place (Where should it go?)
  *  Close standard file descriptors - important
  * Enter actual daemon code

ravi.

Original issue reported on code.google.com by ravt...@gmail.com on 9 Nov 2012 at 1:39

GoogleCodeExporter commented 8 years ago

It will be nice to make ae as a daemon.  Fix the security issues first, before 
make it a daemon.  It is difficult to debug things in a daemonized mode,
ravi.

Original comment by ravt...@gmail.com on 10 Nov 2012 at 5:20

GoogleCodeExporter commented 8 years ago
In addition to the above steps in making it a daemon, also make sure only a 
single copy is being run using a lock file as classic daemons do.  
http://www.enderunix.org/docs/eng/daemon.php is a good link to look into,
ravi.

Original comment by ravt...@gmail.com on 10 Nov 2012 at 5:32

GoogleCodeExporter commented 8 years ago
Not scheduled for this class project release.  All steps to be done are well 
documented.  Making it a daemon will make it difficult to debug.  Barely 
reaching the point of end to end working securely.
Want to do a good job of what we already have,
ravi.

Original comment by ravt...@gmail.com on 12 Nov 2012 at 2:23

GoogleCodeExporter commented 8 years ago
Issue 2 has been merged into this issue.

Original comment by ravt...@gmail.com on 12 Nov 2012 at 2:36

GoogleCodeExporter commented 8 years ago
As part of making the daemon, only raise the privilege to root when needed 
(during dropPriviliges) and rest of the time run under 'ae' user privilege.  We 
do not want a process running with 'root' privilege connected to the net,
ravi.

Original comment by ravt...@gmail.com on 14 Nov 2012 at 5:02

GoogleCodeExporter commented 8 years ago
As part of making it a daemon, make sure only one instance of 'ae' is running.  
May be using a lock file?
ravi.

Original comment by ravt...@gmail.com on 4 Dec 2012 at 4:36