mirror of
https://github.com/NevermindZZT/letter-shell.git
synced 2025-01-21 10:02:54 +08:00
优化 telnet组件可独立设置用户
This commit is contained in:
parent
a6e391b449
commit
dc76d7aab7
@ -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);
|
||||
|
@ -36,6 +36,11 @@
|
||||
*/
|
||||
#define TELNETD_SHELL_BUFFER_SIZE 512
|
||||
|
||||
/**
|
||||
* @brief telnet shell的用户名,使用默认shell用户设置为NULL即可
|
||||
*/
|
||||
#define TELNETD_SHELL_USER NULL
|
||||
|
||||
/**
|
||||
* @brief 新线程接口
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user