From 355150088d688fafd82c54af80a583a26732d0da Mon Sep 17 00:00:00 2001 From: "Anand V. Avati" Date: Fri, 16 Oct 2009 07:30:25 +0000 Subject: posix - use lchown and lchmod in setattr Signed-off-by: Anand V. Avati BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315 --- xlators/storage/posix/src/posix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 0f0d500e420..3bd7fe025e3 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -450,7 +450,7 @@ posix_do_chmod (xlator_t *this, { int32_t ret = -1; - ret = chmod (path, stbuf->st_mode); + ret = lchmod (path, stbuf->st_mode); if ((ret == -1) && (errno == ENOSYS)) { ret = chmod (path, stbuf->st_mode); } @@ -474,7 +474,7 @@ posix_do_chown (xlator_t *this, if (valid & GF_SET_ATTR_GID) gid = stbuf->st_gid; - ret = chown (path, uid, gid); + ret = lchown (path, uid, gid); return ret; } -- cgit