From e73fc9939aecfa9f7955653d02f12243aba02fc6 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Tue, 8 Apr 2014 17:10:25 +0530 Subject: glusterd : Volname, brickpath & volfpath length validation While creating a volume and adding a brick validation for _POSIX_PATH_MAX is done on absolute pathname instead of relative pathname due to which a brickpath having less than _POSIX_PATH_MAX may also fail the validation if the directory length is greater than (_POSIX_PATH_MAX -strlen(brickpath/volume name). Also this fix addresses one cli response message correction which says the volume file is too long instead of brick path is too long (when brickpath length validation doesn't fail and vol file length validation fails.) It is also important to note that with the current design of volfile naming, it can not be guranteed that volname and brickpath can have max of _POSIX_PATH_MAX characters. Change-Id: I1283d1f9dea96ae797620002c8723719f26a866d BUG: 1085330 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/7420 Reviewed-by: Niels de Vos Reviewed-by: Krishnan Parthasarathi Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-op-sm.h | 1 - 1 file changed, 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.h b/xlators/mgmt/glusterd/src/glusterd-op-sm.h index cb673192d0c..229ee469598 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.h +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.h @@ -31,7 +31,6 @@ #include "glusterd.h" #include "protocol-common.h" -#define GD_VOLUME_NAME_MAX 256 #define GD_OP_PROTECTED (0x02) #define GD_OP_UNPROTECTED (0x04) -- cgit