diff options
author | jilles <jilles@FreeBSD.org> | 2009-05-30 10:36:14 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2009-05-30 10:36:14 +0000 |
commit | b0b0c85b53c56817fa1eed3bbb233fe5de5d4759 (patch) | |
tree | 2dfad0b05927b6d4db675e13720379396b079612 /bin/cp/utils.c | |
parent | ddadeb61d5877eaa186b7cb6a0c0bcd89c276f16 (diff) | |
download | FreeBSD-src-b0b0c85b53c56817fa1eed3bbb233fe5de5d4759.zip FreeBSD-src-b0b0c85b53c56817fa1eed3bbb233fe5de5d4759.tar.gz |
Preserve file flags on symlinks in cp -Rp.
This reported ENOSYS before.
PR: bin/111226 (part of)
Submitted by: Martin Kammerhofer
Approved by: ed (mentor)
MFC after: 3 weeks
Diffstat (limited to 'bin/cp/utils.c')
-rw-r--r-- | bin/cp/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c index aaa12d6..c27c788 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -365,7 +365,7 @@ setfile(struct stat *fs, int fd) if (!gotstat || fs->st_flags != ts.st_flags) if (fdval ? fchflags(fd, fs->st_flags) : - (islink ? (errno = ENOSYS) : + (islink ? lchflags(to.p_path, fs->st_flags) : chflags(to.p_path, fs->st_flags))) { warn("chflags: %s", to.p_path); rval = 1; |