Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Do not complain of setting time failed due to lack of permissions
Baptiste Daroussin committed 10 years ago
commit c9a0ef98b5c55bada3972e9536e77395cf5d6281
parent c5ffbc17e9c45b05764bfac2b66018e01f9161ce
1 file changed +2 -2
modified libpkg/pkg_add.c
@@ -193,7 +193,7 @@ set_attrs(int fd, char *path, mode_t perm, uid_t uid, gid_t gid,
	times[0] = *ats;
	times[1] = *mts;
	if (utimensat(fd, RELATIVE_PATH(path), times,
-
	    AT_SYMLINK_NOFOLLOW) == -1){
+
	    AT_SYMLINK_NOFOLLOW) == -1 && errno != EPERM){
		pkg_emit_error("Fail to set time on %s: %s", path,
		    strerror(errno));
		return (EPKG_FATAL);
@@ -210,7 +210,7 @@ set_attrs(int fd, char *path, mode_t perm, uid_t uid, gid_t gid,
	if (getcwd(saved_cwd, sizeof(saved_cwd)) == NULL)
		saved_cwd[0] = '\0';
	fchdir(fd);
-
	if (lutimes(RELATIVE_PATH(path), &tv) == -1) {
+
	if (lutimes(RELATIVE_PATH(path), &tv) == -1 && errno != EPERM) {
		pkg_emit_error("Fail to set time on %s: %s", path,
		    strerror(errno));
		return (EPKG_FATAL);