Magic Mount algorithm massive bug fix

This commit is contained in:
topjohnwu
2017-06-12 03:29:01 +08:00
parent 309b99eac0
commit 1777d9f751
2 changed files with 86 additions and 54 deletions

View File

@@ -311,6 +311,7 @@ int cp_afc(const char *source, const char *target) {
char buffer[PATH_MAX];
xreadlink(source, buffer, sizeof(buffer));
xsymlink(buffer, target);
lchown(target, buf.st_uid, buf.st_gid);
lgetfilecon(source, &con);
lsetfilecon(target, con);
free(con);