aac_afh.c: Fix serious memory leak.
[paraslash.git] / user_list.h
1 /*
2 * Copyright (C) 2006-2007 Andre Noll <maan@systemlinux.org>
3 *
4 * Licensed under the GPL v2. For licencing details see COPYING.
5 */
6
7 /** \file user_list.h exported functions from user_list.c */
8
9 #include "list.h"
10 #include "crypt.h"
11
12 /**
13 * permission flags that can be set individually for any server command
14 *
15 * - AFS_READ: read-only command of the audio file selector
16 * - AFS_WRITE: command changes state of the audio file selector
17 * - VSS_READ: command reads information about the current audio stream
18 * - VSS_WRITE: command changes the current audio stream
19 */
20 enum {AFS_READ = 1, AFS_WRITE = 2, VSS_READ = 4, VSS_WRITE = 8};
21
22 /**
23 * data needed to authenticate the user
24 */
25 struct user {
26 /** the position of this user in the list of users */
27 struct list_head node;
28 /** the username */
29 char *name;
30 /** the public RSA key */
31 RSA *rsa;
32 /** the privileges that this user has */
33 unsigned int perms;
34 };
35
36 void init_user_list(char *user_list_file);
37 struct user *lookup_user(const char *name);