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