#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    245
    Rep Power
    12

    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 10:24 AM.

IMN logo majestic logo threadwatch logo seochat tools logo