Checkpath: print the path when correcting the owner

Checkpath was printing the path it was working with unless it was
correcting the owner. In this case, it was printing "checkpath", which
is not very useful.

Reported-by: <devurandom@gmx.net>
X-Gentoo-Bug: 439014
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439014
This commit is contained in:
William Hubbs 2012-10-27 12:59:58 -05:00
parent 5148047f89
commit e634376482

View File

@ -133,7 +133,7 @@ do_check(char *path, uid_t uid, gid_t gid, mode_t mode, inode_t type,
} }
if (mode && (st.st_mode & 0777) != mode) { if (mode && (st.st_mode & 0777) != mode) {
einfo("%s: correcting mode", applet); einfo("%s: correcting mode", path);
if (chmod(path, mode)) { if (chmod(path, mode)) {
eerror("%s: chmod: %s", applet, strerror(errno)); eerror("%s: chmod: %s", applet, strerror(errno));
return -1; return -1;