projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14ab5b2
)
ctdlsh: if 'passwd' entered without arguments, ask for an account name
author
Art Cancro
<ajc@uncensored.citadel.org>
Thu, 23 Feb 2012 16:08:16 +0000
(11:08 -0500)
committer
Art Cancro
<ajc@uncensored.citadel.org>
Thu, 23 Feb 2012 16:08:16 +0000
(11:08 -0500)
ctdlsh/src/passwd.c
patch
|
blob
|
history
diff --git
a/ctdlsh/src/passwd.c
b/ctdlsh/src/passwd.c
index 65ae280e9097662c38f38cc321219a3eae14204d..51936f37af80d995fab06a2d12ff2866f29bdb69 100644
(file)
--- 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') {