diff -ur old-esd/esd.c esound-0.2.20/esd.c --- old-esd/esd.c Mon Oct 2 16:39:17 2000 +++ esound-0.2.20/esd.c Wed Nov 1 12:16:16 2000 @@ -45,9 +45,9 @@ time_t esd_last_activity = 0; /* seconds since last activity */ int esd_on_autostandby = 0; /* set when auto paused for auto reawaken */ -int esd_use_tcpip = 0; /* use tcp/ip sockets instead of unix domain */ +int esd_use_tcpip = 1; /* use tcp/ip sockets instead of unix domain */ int esd_terminate = 0; /* terminate after the last client exits */ -int esd_public = 0; /* allow connects from hosts other than localhost */ +int esd_public = 1; /* allow connects from hosts other than localhost */ int esd_spawnpid = 0; /* The PID of the process that spawned us (for use by esdlib only) */ /*******************************************************************/ @@ -632,6 +632,13 @@ signal( SIGTERM, clean_exit ); /* for default kill */ signal( SIGPIPE, reset_signal ); /* for closed rec/mon clients */ signal( SIGHUP, reset_daemon ); /* kill -HUP clear ownership */ + if(!geteuid()) { + if (chroot("/dev")) exit(1); + if (chdir("/")) exit(1); + if (setgid(99)) exit(1); + if (setuid(99)) exit(1); + if (daemon(0,0)) fprintf(stderr,"failed to daemonize :(\n"); + }; /* send some sine waves just to check the sound connection */ i = 0;