|
@@ -240,6 +240,12 @@ dprintf(int idx, const char *format, ...)
|
|
|
if (idx < 0) {
|
|
if (idx < 0) {
|
|
|
tputs(-idx, buf, len);
|
|
tputs(-idx, buf, len);
|
|
|
} else if (idx > 0x7FF0) {
|
|
} else if (idx > 0x7FF0) {
|
|
|
|
|
+ if (idx == DP_LOG || idx == DP_STDOUT || idx == DP_STDOUT) {
|
|
|
|
|
+ colorbuf(buf, len, -1);
|
|
|
|
|
+ buf[sizeof(buf) - 1] = 0;
|
|
|
|
|
+ len = strlen(buf);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
switch (idx) {
|
|
switch (idx) {
|
|
|
case DP_LOG:
|
|
case DP_LOG:
|
|
|
putlog(LOG_MISC, "*", "%s", buf);
|
|
putlog(LOG_MISC, "*", "%s", buf);
|
|
@@ -975,7 +981,7 @@ int check_cmd_pass(const char *cmd, char *pass)
|
|
|
if (!egg_strcasecmp(cmd, cp->name)) {
|
|
if (!egg_strcasecmp(cmd, cp->name)) {
|
|
|
char tmp[32] = "";
|
|
char tmp[32] = "";
|
|
|
|
|
|
|
|
- encrypt_pass(pass, tmp);
|
|
|
|
|
|
|
+ encrypt_cmd_pass(pass, tmp);
|
|
|
if (!strcmp(tmp, cp->pass))
|
|
if (!strcmp(tmp, cp->pass))
|
|
|
return 1;
|
|
return 1;
|
|
|
return 0;
|
|
return 0;
|