1 /* Copyright (C) 2006 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
3 /** \file user_list.h exported functions from user_list.c */
6 * Flags for server commands and user permissions.
8 * For each command, zero or more of these flags are ored to define the command
9 * permissions. A user is allowed to run the command if and only if all command
10 * permission flags are set for the user in the server.users config file which
11 * is read at server startup.
13 enum server_command_permissions {
14 NO_PERMISSION_REQUIRED = 0, /** None of the below. */
15 AFS_READ = 1, /** Read-only operation on the AFS database. */
16 AFS_WRITE = 2, /** Read-write operation on the AFS database. */
17 VSS_READ = 4, /** Read-only operation on the virtual streaming system. */
18 VSS_WRITE = 8 /** Read-write operation on the virtual streaming system. */
22 * data needed to authenticate the user
25 /** The position of this user in the list of users. */
26 struct list_head node;
29 /** The public key. */
30 struct asymmetric_key *pubkey;
31 /** The privileges of this user. */
35 void user_list_init(const char *user_list_file);
36 void user_list_deplete(void);
37 const struct user *user_list_lookup(const char *name);