Command handlers only need to read this structure.
int dummy; /* none at the moment */
};
-static int parse_auth_request(char *buf, int len, struct user **u,
+static int parse_auth_request(char *buf, int len, const struct user **u,
struct connection_features *cf)
{
int ret;
/** Per connection data available to command handlers. */
struct command_context {
/** The paraslash user that executes this command. */
- struct user *u;
+ const struct user *u;
/** File descriptor and crypto keys. */
struct stream_cipher_context scc;
};
* \return A pointer to the corresponding user struct if the user was found, \p
* NULL otherwise.
*/
-struct user *lookup_user(const char *name)
+const struct user *lookup_user(const char *name)
{
- struct user *u;
+ const struct user *u;
list_for_each_entry(u, &user_list, node) {
if (strcmp(u->name, name))
continue;
};
void init_user_list(char *user_list_file);
-struct user *lookup_user(const char *name);
+const struct user *lookup_user(const char *name);