diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-06-15 07:16:31 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-06-15 23:12:01 -0700 |
commit | 8f29c29480ad4f716229d480ada7fc2b6711f22e (patch) | |
tree | a5236c3e43a41e093bedd490933f7ff81b6095e5 | |
parent | e298a2183a8a294abda9c656879dc30f6c17f027 (diff) |
Do stat to check mode of the export directory in storage/posix.
Doing an lstat means init fails if the export directory
is a symlink pointing to a directory.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
-rw-r--r-- | xlators/storage/posix/src/posix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index b730b136f48..301bc48729a 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -3823,7 +3823,7 @@ init (xlator_t *this) umask (000); // umask `masking' is done at the client side /* Check whether the specified directory exists, if not create it. */ - op_ret = lstat (dir_data->data, &buf); + op_ret = stat (dir_data->data, &buf); if ((ret != 0) || !S_ISDIR (buf.st_mode)) { gf_log (this->name, GF_LOG_ERROR, "Directory '%s' doesn't exist, exiting.", |