2 * Copyright (C) 2008 Andre Noll <maan@systemlinux.org>
4 * Licensed under the GPL v2. For licencing details see COPYING.
7 /** \file user.h \brief User structures and exported symbols from user.c. */
9 /** The columns of the id table. */
10 enum user_table_columns {
11 /** The numer of the directory. */
13 /** The number of bytes of all regular files in this dir owned by this id. */
15 /** The number of files in this dir owned by this id. */
17 /** Number of columns in this table. */
21 /** Information about one admissible user. */
25 /** \sa enum uid_info_flags. */
29 /** The user table of this user.*/
30 struct osl_table *table;
31 /** The description of the user table. */
32 struct osl_table_description *desc;
35 /** An opaque struct that contains info about which users are admissible. */
38 int create_user_table(const char *dirname, uint32_t uid,
39 struct user_info **ui_ptr);
40 int read_uid_file(const char *dirname);
41 int write_uid_file(const char *dirname);
43 void create_hash_table(unsigned bits);
44 int for_each_admissible_user(int (*func)(struct user_info *, void *),
46 int parse_uid_arg(const char *orig_arg, struct uid_range **ur);
47 int append_users(char **users, int num_users,
48 struct uid_range **admissible_uids, int num_uid_ranges);
49 void close_user_tables(void);
50 int open_admissible_user_tables(const char *dirname,
51 struct uid_range *admissible_uids);