Re: SOLVED: Daemon Programming

2005-01-13 Thread Shyamal Prasad
"Sergio" == Sergio Cuéllar Valdés <[EMAIL PROTECTED]> writes: Sergio> sprintf(message, "/usr/local/bin/say -s 4 -a \"%s\"", buffer); Note that this is a classic security problem since both message and buffer are exactly the same size (BUFSIZE == 1024). Use snprintf or otherwise validate t

Re: SOLVED: Daemon Programming

2005-01-13 Thread Sergio Cuéllar Valdés
Yep, thats a good point, that I havent realized. The security stuff is very very important. I have to change the code to be able to manage this problems. This is the next step. Thanks for your advice ;-) Sergio Cuellar Valdes On Fri, 14 Jan 2005 03:58:44 +, Steve Kemp <[EMAIL PROTECTED]> w

Re: SOLVED: Daemon Programming

2005-01-13 Thread Steve Kemp
On Thu, Jan 13, 2005 at 09:41:29PM -0600, Sergio Cu?llar Vald?s wrote: > Marc, thanks that was the problem !!! > > sprintf(message, "say -s 4 -a \"%s\"", buffer); < this was the big > big big mistake It certainly was. > I added the hole path to the instructions: > > sprintf(message, "/usr/lo

Re: SOLVED: Daemon Programming

2005-01-13 Thread Sergio Cuéllar Valdés
Marc, thanks that was the problem !!! sprintf(message, "say -s 4 -a \"%s\"", buffer); < this was the big big big mistake I added the hole path to the instructions: sprintf(message, "/usr/local/bin/say -s 4 -a \"%s\"", buffer); Thanks to all of you who helped me !! :-) Sincerely, Sergio Cuéll

Re: Daemon Programming

2005-01-13 Thread Sergio Cuéllar Valdés
Yes Marc !! I use the system() instruction !! But how can I avoid using this instruction ? In line 153 (http://rafb.net/paste/results/vkgCRD46.html) is where is use system(), Maybe if I use the complete path to that instruction can help. Thanks again for your help On Thu, 13 Jan 2005 21:44:39

Re: Daemon Programming

2005-01-13 Thread Sergio Cuéllar Valdés
Hans-Georg Bork: I have already tried the S99my_serverd change, but it doesnt work. J.A. Bezemer: I have tried the ./yourprog /dev/null 2>/dev/null and the program dies, I cant see with a ps ax Clare Jarvis: The program should listen to a port, and a client program will send a string, and this

Daemon Programming

2005-01-13 Thread Sergio Cuéllar
Hi, I hope you can help me. I have made a program that will be listening to a port. I want to start the program every time the machine boots, so I created the script to use in init.d and Ive also created the symlinks. The machine boots, and the programs starts. I use ps ax and I can see that the p