提交 932da9d5 编写于 作者: H hzcheng

Fix shell password issue #92

上级 cd017909
......@@ -57,7 +57,7 @@ TAOS *shellInit(struct arguments *args) {
}
if (args->is_use_passwd) {
args->password = getpass("Enter password: ");
if (args->password == NULL) args->password = getpass("Enter password: ");
} else {
args->password = tsDefaultPass;
}
......
......@@ -72,10 +72,8 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) {
arguments->host = arg;
break;
case 'p':
if (arg)
arguments->password = arg;
else
arguments->is_use_passwd = true;
arguments->is_use_passwd = true;
if (arg) arguments->password = arg;
break;
case 'P':
tsMgmtShellPort = atoi(arg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册