Return an username by its name, or NULL if the user does not exist. */
| 1171 | |
| 1172 | /* Return an username by its name, or NULL if the user does not exist. */ |
| 1173 | user *ACLGetUserByName(const char *name, size_t namelen) { |
| 1174 | void *myuser = raxFind(Users,(unsigned char*)name,namelen); |
| 1175 | if (myuser == raxNotFound) return NULL; |
| 1176 | return (user*)myuser; |
| 1177 | } |
| 1178 | |
| 1179 | /* Check if the command is ready to be executed in the client 'c', already |
| 1180 | * referenced by c->cmd, and can be executed by this client according to the |
no test coverage detected