mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +09:00
Improve the docu of channel_request_env().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@698 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -1237,13 +1237,18 @@ int channel_request_sftp( CHANNEL *channel){
|
|||||||
return channel_request_subsystem(channel, "sftp");
|
return channel_request_subsystem(channel, "sftp");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief set the environement variables
|
/**
|
||||||
* \param channel channel
|
* @brief Set environement variables.
|
||||||
* \param name name of the variable
|
*
|
||||||
* \param value value
|
* @param channel The channel to set the environement variables.
|
||||||
* \return SSH_SUCCESS on success\n
|
*
|
||||||
* SSH_ERROR on error
|
* @param name The name of the variable.
|
||||||
* \warning some environement variables may be refused by security
|
*
|
||||||
|
* @param value The value to set.
|
||||||
|
*
|
||||||
|
* @return SSH_SUCCESS on success, SSH_ERROR on error.
|
||||||
|
*
|
||||||
|
* @warning Some environement variables may be refused by security reasons.
|
||||||
* */
|
* */
|
||||||
int channel_request_env(CHANNEL *channel, const char *name, const char *value) {
|
int channel_request_env(CHANNEL *channel, const char *name, const char *value) {
|
||||||
BUFFER *buffer = NULL;
|
BUFFER *buffer = NULL;
|
||||||
@@ -1274,7 +1279,7 @@ int channel_request_env(CHANNEL *channel, const char *name, const char *value) {
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = channel_request(channel,"env",buffer,1);
|
rc = channel_request(channel, "env", buffer,1);
|
||||||
error:
|
error:
|
||||||
buffer_free(buffer);
|
buffer_free(buffer);
|
||||||
string_free(str);
|
string_free(str);
|
||||||
|
|||||||
Reference in New Issue
Block a user