mike-jumper commented on a change in pull request #201: GUACAMOLE-547: Add support for SSH NONE authentication method URL: https://github.com/apache/guacamole-server/pull/201#discussion_r295077837
########## File path: src/common-ssh/common-ssh/ssh.h ########## @@ -25,6 +25,20 @@ #include <guacamole/client.h> #include <libssh2.h> +/** + * Handler for retrieving additional credentials. + * + * @param client + * The Guacamole Client associated with this need for additional + * credentials. + * + * @param cred_name + * The name of the credential being requested, which will be shared + * with the client in order to generate a meaningful prompt. + * Review comment: Looks better, but: > ... which should be a dynamically-allocated such that it can be freed as required. More than that, the returned value _must_ be dynamically-allocated, as the caller will eventually attempt to free it with a call to `free()`. For example: https://github.com/apache/guacamole-server/blob/5e2ddb890a90e840a419f4878381b0c511cc6f25/src/terminal/terminal/terminal.h#L664-L670 and https://github.com/apache/guacamole-server/blob/6dad6cd91933a19bc18095854e93354b6764d763/src/protocols/rdp/tests/fs/normalize_path.c#L174-L179 While we're here: is there a meaning for returning `NULL`? If not, that's fine, and the documentation covers what it needs to cover. Well-behaved implementations won't return `NULL` unless it's actually documented as a legal return value. However, if an implementation returning `NULL` is intended and has a specific meaning, that should be documented here, too. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
