| 108 | } |
| 109 | |
| 110 | int authRequired(client *c) { |
| 111 | /* Check if the user is authenticated. This check is skipped in case |
| 112 | * the default user is flagged as "nopass" and is active. */ |
| 113 | int auth_required = (!(DefaultUser->flags & USER_FLAG_NOPASS) || |
| 114 | (DefaultUser->flags & USER_FLAG_DISABLED)) && |
| 115 | !c->authenticated; |
| 116 | return auth_required; |
| 117 | } |
| 118 | |
| 119 | client *createClient(connection *conn) { |
| 120 | client *c = zmalloc(sizeof(client)); |
no outgoing calls
no test coverage detected