MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ACLSetUserStringError

Function ACLSetUserStringError

app/redis-6.2.6/src/acl.c:1018–1041  ·  view source on GitHub ↗

Return a description of the error that occurred in ACLSetUser() according to * the errno value set by the function on error. */

Source from the content-addressed store, hash-verified

1016/* Return a description of the error that occurred in ACLSetUser() according to
1017 * the errno value set by the function on error. */
1018const char *ACLSetUserStringError(void) {
1019 const char *errmsg = "Wrong format";
1020 if (errno == ENOENT)
1021 errmsg = "Unknown command or category name in ACL";
1022 else if (errno == EINVAL)
1023 errmsg = "Syntax error";
1024 else if (errno == EEXIST)
1025 errmsg = "Adding a pattern after the * pattern (or the "
1026 "'allkeys' flag) is not valid and does not have any "
1027 "effect. Try 'resetkeys' to start with an empty "
1028 "list of patterns";
1029 else if (errno == EISDIR)
1030 errmsg = "Adding a pattern after the * pattern (or the "
1031 "'allchannels' flag) is not valid and does not have any "
1032 "effect. Try 'resetchannels' to start with an empty "
1033 "list of channels";
1034 else if (errno == ENODEV)
1035 errmsg = "The password you are trying to remove from the user does "
1036 "not exist";
1037 else if (errno == EBADMSG)
1038 errmsg = "The password hash must be exactly 64 characters and contain "
1039 "only lowercase hexadecimal characters";
1040 return errmsg;
1041}
1042
1043/* Initialize the default user, that will always exist for all the process
1044 * lifetime. */

Callers 4

ACLLoadConfiguredUsersFunction · 0.85
ACLLoadFromFileFunction · 0.85
aclCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected