Ticket #176: chroot-fix.patch

File chroot-fix.patch, 875 bytes (added by human, 3 years ago)

Proposed patch

  • src/rrd_tool.c

    diff -urN rrdtool-1.3.1.orig/src/rrd_tool.c rrdtool-1.3.1.patched/src/rrd_tool.c
    old new  
    419419                   == 0) { 
    420420 
    421421#ifdef HAVE_CHROOT 
    422                 chroot(argv[2]); 
    423                 if (errno != 0) { 
     422                if (chroot(argv[2]) != 0) { 
    424423                    fprintf(stderr, 
    425424                            "ERROR: can't change root to '%s' errno=%d\n", 
    426425                            argv[2], errno); 
     
    439438            } 
    440439        } 
    441440        if (strcmp(firstdir, "")) { 
    442             chdir(firstdir); 
    443             if (errno != 0) { 
     441            if (chdir(firstdir) != 0) { 
    444442                fprintf(stderr, "ERROR: %s\n", rrd_strerror(errno)); 
    445443                exit(errno); 
    446444            } 

NOTE: The content of this website is accessible with any browser. The graphical design though relies completely on CSS2 styles. If you see this text, this means that your browser does not support CSS2. Consider upgrading to a standard conformant browser like Mozilla Firefox or Opera but also Apple's Safari or KDE's Konqueror for example. It may also be that you are looking at a mirror page which did not copy the CSS for this page. Or if some pictu res are missing, then the mirror may not have picked up the contents of the inc directory.