paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Data Structures | Enumerations | Functions
user_list.h File Reference

exported functions from user_list.c More...

Data Structures

struct  user
 data needed to authenticate the user More...
 

Enumerations

enum  server_command_permissions {
  NO_PERMISSION_REQUIRED = 0, AFS_READ = 1, AFS_WRITE = 2, VSS_READ = 4,
  VSS_WRITE = 8
}
 Flags for server commands and user permissions. More...
 

Functions

void user_list_init (const char *user_list_file)
 Initialize the list of users allowed to connect to para_server. More...
 
void user_list_deplete (void)
 Remove all entries from the user list. More...
 
const struct useruser_list_lookup (const char *name)
 Lookup a user in the user list. More...
 

Detailed Description

exported functions from user_list.c

Enumeration Type Documentation

◆ server_command_permissions

Flags for server commands and user permissions.

For each command, zero or more of these flags are ored to define the command permissions. A user is allowed to run the command if and only if all command permission flags are set for the user in the server.users config file which is read at server startup.

Enumerator
NO_PERMISSION_REQUIRED 
AFS_READ 

None of the below.

AFS_WRITE 

Read-only operation on the AFS database.

VSS_READ 

Read-write operation on the AFS database.

VSS_WRITE 

Read-only operation on the virtual streaming system.

Function Documentation

◆ user_list_init()

void user_list_init ( const char *  user_list_file)

Initialize the list of users allowed to connect to para_server.

Parameters
user_list_fileThe file containing access information.

If this function is called for the second time, the contents of the previous call are discarded, i.e. the user list is reloaded.

This function either succeeds or calls exit(3).

References user_list_deplete().

◆ user_list_deplete()

void user_list_deplete ( void  )

Remove all entries from the user list.

This is called on shutdown and when the user list is reloaded because the server received SIGHUP.

References list_for_each_entry_safe.

Referenced by user_list_init().

◆ user_list_lookup()

const struct user* user_list_lookup ( const char *  name)

Lookup a user in the user list.

Parameters
nameThe name of the user.
Returns
A pointer to the corresponding user struct if the user was found, NULL otherwise.

References list_for_each_entry.