From 8f6c5f831282c135230448c6a5004261a041b147 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 23 Feb 2012 11:08:16 -0500 Subject: [PATCH] ctdlsh: if 'passwd' entered without arguments, ask for an account name --- ctdlsh/src/passwd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ctdlsh/src/passwd.c b/ctdlsh/src/passwd.c index 65ae280e9..51936f37a 100644 --- a/ctdlsh/src/passwd.c +++ b/ctdlsh/src/passwd.c @@ -13,6 +13,9 @@ int cmd_passwd(int server_socket, char *cmdbuf) { char *p2; strcpy(account_name, &cmdbuf[7]); + if (strlen(account_name) == 0) { + strncpy(account_name, readline("Enter account name: "), sizeof account_name); + } sock_printf(server_socket, "AGUP %s\n", account_name); sock_getln(server_socket, buf, sizeof buf); if (buf[0] != '2') { -- 2.30.2