aft.c: Trivial spelling/whitespace fixes.
[paraslash.git] / user_list.h
1 /*
2  * Copyright (C) 2006 Andre Noll <maan@tuebingen.mpg.de>
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 /**
10  * Flags for server commands and user permissions.
11  *
12  * For each command, zero or more of these flags are ored to define the command
13  * permissions. A user is allowed to run the command if and only if all command
14  * permission flags are set for the user in the server.users config file which
15  * is read at server startup.
16  */
17 enum server_command_permissions {
18         NO_PERMISSION_REQUIRED = 0, /** None of the below. */
19         AFS_READ = 1, /** Read-only operation on the AFS database. */
20         AFS_WRITE = 2, /** Read-write operation on the AFS database. */
21         VSS_READ = 4, /** Read-only operation on the virtual streaming system. */
22         VSS_WRITE = 8 /** Read-write operation on the virtual streaming system. */
23 };
24
25 /**
26  * data needed to authenticate the user
27  */
28 struct user {
29         /** The position of this user in the list of users. */
30         struct list_head node;
31         /** The username. */
32         char *name;
33         /** The public key. */
34         struct asymmetric_key *pubkey;
35         /** The privileges of this user. */
36         unsigned int perms;
37 };
38
39 void init_user_list(char *user_list_file);
40 struct user *lookup_user(const char *name);