dellastreet / NBD-SparseImager

A disk imaging solution for creating partial, sparse, binary images of windows machines for forensic analysis.
2 stars 0 forks source link

broadcast_daemon doesn't work when daemon #16

Closed dellastreet closed 14 years ago

dellastreet commented 14 years ago

commit f9c62f9b2514bb4616d7725faf20c29cfaf7e935 Author: Della Street dellastreet@live.nl Date: Sun Mar 21 13:32:48 2010 -0700

Fixed issue 16: broadcast_daemon doesn't work when daemon
Resolution: open database connection after forking into background

Problem description: daemon function will close all file descriptors including the database connection, even when it would leave it open it would be dubious  if it would work. THe database destructor in the closing processes would probably also create a mess.

diff --git a/broadcast_listener b/broadcast_listener index 958597b..9592b05 100755 --- a/broadcast_listener +++ b/broadcast_listener @@ -15,8 +15,6 @@ protocols={socket.IPPROTO_TCP:'tcp', socket.IPPROTO_UDP:'udp', socket.IPPROTO_ICMP:'icmp'}

-ImgDB=imagerdb.ImagerDb()

def decode_ip_packet(s): d={} d['version']=(ord(s[0]) & 0xf0) >> 4 @@ -87,6 +85,7 @@ if name=='main':

run as www user

os.setuid(33)