Bug 1044648

Summary: glfs_set_volfile_server() should accept NULL as transport
Product: [Community] GlusterFS Reporter: Kelly Burkhart <kelly.burkhart>
Component: libgfapiAssignee: bugs <bugs>
Status: CLOSED EOL QA Contact: Sudhir D <sdharane>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.4.5CC: bugs, gluster-bugs
Target Milestone: ---Keywords: EasyFix, Patch, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1152617 (view as bug list) Environment:
Last Closed: 2015-10-07 14:01:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1183547    
Bug Blocks: 1152617    

Description Kelly Burkhart 2013-12-18 18:28:30 UTC
Description of problem:
glfs_set_volfile_server documentation (in glfs.h) states that the transport parameter can be NULL, in which case the default transport (tcp) is used.  In glfs.c, line 466 this parameter is gf_strdup-d which causes a crash if NULL

Version-Release number of selected component (if applicable):
3.4.1 release

How reproducible:
always

Steps to Reproduce:
1.  Call glfs_set_volfile_server with NULL transport argument
2.  compile
3.  run

Actual results:
crash (segfault)

Expected results:
api states that default transport will be used if null is passed in.  If this is not true, then the call should check it's args and fail gracefully.  And header documentation should be fixed.

Additional info:

Comment 3 Niels de Vos 2015-01-21 08:01:13 UTC
A backport of http://review.gluster.org/9464 is needed.

Comment 4 Niels de Vos 2015-05-17 21:59:46 UTC
GlusterFS 3.7.0 has been released (http://www.gluster.org/pipermail/gluster-users/2015-May/021901.html), and the Gluster project maintains N-2 supported releases. The last two releases before 3.7 are still maintained, at the moment these are 3.6 and 3.5.

This bug has been filed against the 3,4 release, and will not get fixed in a 3.4 version any more. Please verify if newer versions are affected with the reported problem. If that is the case, update the bug with a note, and update the version if you can. In case updating the version is not possible, leave a comment in this bug report with the version you tested, and set the "Need additional information the selected bugs from" below the comment box to "bugs".

If there is no response by the end of the month, this bug will get automatically closed.

Comment 5 Kaleb KEITHLEY 2015-10-07 14:01:10 UTC
GlusterFS 3.4.x has reached end-of-life.

If this bug still exists in a later release please reopen this and change the version or open a new bug.