X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=user.h;h=c64983e251c6aa4fec56016f0f42c6dccfa0e367;hb=d623adf133aaaee36091b840b8644c1884cd970c;hp=c561a3fe8335a90d1cc8261ba4fafa63543273a3;hpb=3bb9b0ca535be1eb28b64972bdf0e205e6afc93e;p=adu.git diff --git a/user.h b/user.h index c561a3f..c64983e 100644 --- a/user.h +++ b/user.h @@ -4,6 +4,8 @@ * Licensed under the GPL v2. For licencing details see COPYING. */ +/** \file user.h \brief User structures and exported symbols from user.c. */ + /** The columns of the id table. */ enum user_table_columns { /** The numer of the directory. */ @@ -26,12 +28,6 @@ struct user_info { char *pw_name; /** The user table of this user.*/ struct osl_table *table; - /** Total number of files owned by this user. */ - uint64_t files; - /** Total number of bytes owned by this user. */ - uint64_t bytes; - /** Total number of directories that contain at least one file */ - uint64_t dirs; /** The description of the user table. */ struct osl_table_description *desc; }; @@ -39,17 +35,17 @@ struct user_info { /** An opaque struct that contains info about which users are admissible. */ struct uid_range; -int create_user_table(uint32_t uid, struct user_info **ui_ptr); -int read_uid_file(void); -int write_uid_file(void); +int create_user_table(const char *dirname, uint32_t uid, + struct user_info **ui_ptr); +int read_uid_file(const char *dirname); +int write_uid_file(const char *dirname); void create_hash_table(unsigned bits); -void sort_hash_table(int (*comp)(struct user_info *, struct user_info *)); - int for_each_admissible_user(int (*func)(struct user_info *, void *), void *data); int parse_uid_arg(const char *orig_arg, struct uid_range **ur); int append_users(char **users, int num_users, struct uid_range **admissible_uids, int num_uid_ranges); void close_user_tables(void); -int open_admissible_user_tables(struct uid_range *admissible_uids); +int open_admissible_user_tables(const char *dirname, + struct uid_range *admissible_uids);