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

Collapse All | Expand All

(-)a/src/rc/checkpath.c (-1 / +8 lines)
Lines 133-138 static int do_check(char *path, uid_t uid, gid_t gid, mode_t mode, Link Here
133
	}
133
	}
134
134
135
	if (mode && (st.st_mode & 0777) != mode) {
135
	if (mode && (st.st_mode & 0777) != mode) {
136
		if ((type != inode_dir) && (st.st_nlink != 1)) {
137
			eerror("%s: chown: %s %s", applet, "Too many hard links to", path);
138
			return -1;
139
		}
136
		einfo("%s: correcting mode", path);
140
		einfo("%s: correcting mode", path);
137
		if (chmod(path, mode)) {
141
		if (chmod(path, mode)) {
138
			eerror("%s: chmod: %s", applet, strerror(errno));
142
			eerror("%s: chmod: %s", applet, strerror(errno));
Lines 141-146 static int do_check(char *path, uid_t uid, gid_t gid, mode_t mode, Link Here
141
	}
145
	}
142
146
143
	if (chowner && (st.st_uid != uid || st.st_gid != gid)) {
147
	if (chowner && (st.st_uid != uid || st.st_gid != gid)) {
148
		if ((type != inode_dir) && (st.st_nlink != 1)) {
149
			eerror("%s: chown: %s %s", applet, "Too many hard links to", path);
150
			return -1;
151
		}
144
		einfo("%s: correcting owner", path);
152
		einfo("%s: correcting owner", path);
145
		if (chown(path, uid, gid)) {
153
		if (chown(path, uid, gid)) {
146
			eerror("%s: chown: %s", applet, strerror(errno));
154
			eerror("%s: chown: %s", applet, strerror(errno));
147
- 

Return to bug 540006