ACL: add assertion and fix comment typo.
This commit is contained in:
parent
61c7688b75
commit
735cb69f12
@ -1199,12 +1199,13 @@ sds ACLLoadFromFile(const char *filename) {
|
|||||||
ACLFreeUser(fakeuser);
|
ACLFreeUser(fakeuser);
|
||||||
sdsfreesplitres(lines,totlines);
|
sdsfreesplitres(lines,totlines);
|
||||||
|
|
||||||
/* Chec if we found errors and react accordingly. */
|
/* Check if we found errors and react accordingly. */
|
||||||
if (sdslen(errors) == 0) {
|
if (sdslen(errors) == 0) {
|
||||||
/* The default user pointer is referenced in different places: instead
|
/* The default user pointer is referenced in different places: instead
|
||||||
* of replacing such occurrences it is much simpler to copy the new
|
* of replacing such occurrences it is much simpler to copy the new
|
||||||
* default user configuration in the old one. */
|
* default user configuration in the old one. */
|
||||||
user *new = ACLGetUserByName("default",7);
|
user *new = ACLGetUserByName("default",7);
|
||||||
|
serverAssert(new != NULL);
|
||||||
ACLCopyUser(DefaultUser,new);
|
ACLCopyUser(DefaultUser,new);
|
||||||
ACLFreeUser(new);
|
ACLFreeUser(new);
|
||||||
raxInsert(Users,(unsigned char*)"default",7,DefaultUser,NULL);
|
raxInsert(Users,(unsigned char*)"default",7,DefaultUser,NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user