
August 7th, 2003, 07:43 PM
|
|
Contributing User
|
|
Join Date: Jun 2003
Posts: 245
Time spent in forums: 11 m 27 sec
Reputation Power: 6
|
|
|
Bug in c code calling bash code
Bug in c code calling bash code
ERROR: value too long for type character varying(16)
Bad script
=====================================
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
start_processes()
{
FILE *f, *fopen();
f = popen ("/usr/suid/webofc/getdata | suid-to webofc "
"ssh `grep \"^10.0.0.1\" /etc/hosts | head -n 1 "
"| awk '{print $4}'` -C suid putdata update && "
"suid updatefirewall && suid "
" updatemirrorhosts ", "w");
}
/****************************************/
main()
{
start_processes();
}
Last edited by linh : August 8th, 2003 at 11:24 AM.
|