View | Details | Raw Unified | Return to bug 244967 | Differences between
and this patch

Collapse All | Expand All

(-)usr.sbin/pw/rm_r.c (-1 / +4 lines)
Lines 71-75 Link Here
71
	closedir(d);
71
	closedir(d);
72
	if (fstatat(rootfd, path, &st, AT_SYMLINK_NOFOLLOW) != 0)
72
	if (fstatat(rootfd, path, &st, AT_SYMLINK_NOFOLLOW) != 0)
73
		return;
73
		return;
74
	unlinkat(rootfd, path, S_ISDIR(st.st_mode) ? AT_REMOVEDIR : 0);
74
	if (S_ISLNK(st.st_mode))
75
		unlinkat(rootfd, path, 0);
76
	else if (st.st_uid == uid)
77
		unlinkat(rootfd, path, AT_REMOVEDIR);
75
}
78
}

Return to bug 244967