summaryrefslogtreecommitdiffstats
path: root/testing/kbuild/lchmod.patch
blob: de111867d4d036b3eab940f2ed35dc10144b6bf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- ./src/kmk/kmkbuiltin/chmod.c.orig
+++ ./src/kmk/kmkbuiltin/chmod.c
@@ -177,9 +177,9 @@
 	} else
 		fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL;
 
-	if (hflag)
+/*	if (hflag)
 		change_mode = lchmod;
-	else
+	else */
 		change_mode = chmod;
 
 	mode = *argv;
diff --git a/src/kmk/kmkbuiltin/cp_utils.c b/src/kmk/kmkbuiltin/cp_utils.c
index 1773815..a1ff924 100644
--- a/src/kmk/kmkbuiltin/cp_utils.c
+++ b/src/kmk/kmkbuiltin/cp_utils.c
@@ -359,7 +359,7 @@ setfile(struct stat *fs, int fd)
 
 	if (!gotstat || fs->st_mode != ts.st_mode)
 		if (fdval ? fchmod(fd, fs->st_mode) :
-		    (islink ? lchmod(to.p_path, fs->st_mode) :
+		    (islink ? chmod(to.p_path, fs->st_mode) :
 		    chmod(to.p_path, fs->st_mode))) {
 			warn("chmod: %s", to.p_path);
 			rval = 1;