summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/config.c6
-rw-r--r--src/server.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index c852b01b7..bc92a423d 100644
--- a/src/config.c
+++ b/src/config.c
@@ -794,7 +794,11 @@ void loadServerConfigFromString(char *config) {
} else if (!strcasecmp(argv[0],"user") && argc >= 2) {
int argc_err;
if (ACLAppendUserForLoading(argv,argc,&argc_err) == C_ERR) {
- err = "Syntax error in user declaration";
+ char buf[1024];
+ char *errmsg = ACLSetUserStringError();
+ snprintf(buf,sizeof(buf),"Error in user declaration '%s': %s",
+ argv[argc_err],errmsg);
+ err = buf;
goto loaderr;
}
} else if (!strcasecmp(argv[0],"loadmodule") && argc >= 2) {
diff --git a/src/server.h b/src/server.h
index cbf995d4e..a694a4dc2 100644
--- a/src/server.h
+++ b/src/server.h
@@ -1739,6 +1739,7 @@ int ACLSetUser(user *u, const char *op, ssize_t oplen);
sds ACLDefaultUserFirstPassword(void);
uint64_t ACLGetCommandCategoryFlagByName(const char *name);
int ACLAppendUserForLoading(sds *argv, int argc, int *argc_err);
+char *ACLSetUserStringError(void);
/* Sorted sets data type */