1
0
mirror of https://github.com/NevermindZZT/letter-shell.git synced 2025-01-21 10:02:54 +08:00

优化 telnet组件可独立设置用户

This commit is contained in:
Letter 2021-08-10 22:04:44 +08:00
parent a6e391b449
commit dc76d7aab7
2 changed files with 10 additions and 0 deletions

View File

@ -154,6 +154,11 @@ static void telnetdConnection(int client)
shellCompanionAdd(telnetdShell, SHELL_COMPANION_ID_TELNETD, (void *)client);
shellInit(telnetdShell, shellBuffer, TELNETD_SHELL_BUFFER_SIZE);
if (TELNETD_SHELL_USER)
{
shellRun(telnetdShell, TELNETD_SHELL_USER);
}
while (1)
{
len = recv(client, data, 1, 0);

View File

@ -36,6 +36,11 @@
*/
#define TELNETD_SHELL_BUFFER_SIZE 512
/**
* @brief telnet shell的用户名使shell用户设置为NULL即可
*/
#define TELNETD_SHELL_USER NULL
/**
* @brief 线
*