summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog/lib/src
diff options
context:
space:
mode:
authorRaghavendra Talur <rtalur@redhat.com>2014-01-30 19:50:06 +0530
committerVijay Bellur <vbellur@redhat.com>2014-02-05 23:05:34 -0800
commit3bc23e1ad08e212538d325ec0196ec7488ae7e62 (patch)
tree05b95af125145ec01c1484147146af59fc3dc23f /xlators/features/changelog/lib/src
parente3162ed7e91510185316eae36f5c2c25bde53a68 (diff)
changelog: Restrict length of unix socket files to UNIX_PATH_MAX.
Bug fix for Coverity-CID 1124847. Change-Id: I410ef8e06cbc491b1f72535298fae5e9bc77220d BUG: 789278 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/6870 Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/changelog/lib/src')
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog-helpers.h2
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/xlators/features/changelog/lib/src/gf-changelog-helpers.h b/xlators/features/changelog/lib/src/gf-changelog-helpers.h
index 3aa6ed7b8e2..7e13d937640 100644
--- a/xlators/features/changelog/lib/src/gf-changelog-helpers.h
+++ b/xlators/features/changelog/lib/src/gf-changelog-helpers.h
@@ -51,7 +51,7 @@ typedef struct gf_changelog {
/* connection retries */
int gfc_connretries;
- char gfc_sockpath[PATH_MAX];
+ char gfc_sockpath[UNIX_PATH_MAX];
char gfc_brickpath[PATH_MAX];
diff --git a/xlators/features/changelog/lib/src/gf-changelog.c b/xlators/features/changelog/lib/src/gf-changelog.c
index ca8e373e700..1b014640e94 100644
--- a/xlators/features/changelog/lib/src/gf-changelog.c
+++ b/xlators/features/changelog/lib/src/gf-changelog.c
@@ -173,7 +173,7 @@ gf_changelog_notification_init (xlator_t *this, gf_changelog_t *gfc)
}
CHANGELOG_MAKE_SOCKET_PATH (gfc->gfc_brickpath,
- gfc->gfc_sockpath, PATH_MAX);
+ gfc->gfc_sockpath, UNIX_PATH_MAX);
gf_log (this->name, GF_LOG_INFO,
"connecting to changelog socket: %s (brick: %s)",
gfc->gfc_sockpath, gfc->gfc_brickpath);