Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 117124 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/sbin/ddclient-orig (-8 / +3 lines)
Lines 776-790 Link Here
776
	# fatal("Cannot open file '%s'. ($!)", $file);
776
	# fatal("Cannot open file '%s'. ($!)", $file);
777
	warning("Cannot open file '%s'. ($!)", $file);
777
	warning("Cannot open file '%s'. ($!)", $file);
778
    }
778
    }
779
    # Check for only owner has any access to config file
779
    # Guard against world-readability of config file
780
    my ($dev, $ino, $mode, @statrest) = stat(FD);
780
    my ($dev, $ino, $mode, @statrest) = stat(FD);
781
    if ($mode & 077) {                          
781
    if ($mode & 007) {
782
	if (-f FD && (chmod 0600, $file)) {
782
		fatal("Must not be world-accessible\nchange its permissions using e.g.\nchmod 640", $file);
783
	    warning("file $file must be accessible only by its owner (fixed).");
784
	} else {
785
	    # fatal("file $file must be accessible only by its owner.");
786
	    warning("file $file must be accessible only by its owner.");
787
	}
788
    }
783
    }
789
784
790
    local $lineno       = 0;
785
    local $lineno       = 0;

Return to bug 117124