From 8f29c29480ad4f716229d480ada7fc2b6711f22e Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Mon, 15 Jun 2009 07:16:31 +0000 Subject: 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 --- xlators/storage/posix/src/posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/storage/posix') 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.", -- cgit