X-Git-Url: http://git.tuebingen.mpg.de/?p=adu.git;a=blobdiff_plain;f=user.h;h=acd0b8d85243220e42a09ec972233a238c4d393b;hp=aa07acc5213d5f2e85790b20eb84daa804ba808e;hb=5008f98a8208d96c3c777476d6df7534c6d2ca49;hpb=e584cd6d5a3782ddeb6640f69534ab1664da2605 diff --git a/user.h b/user.h index aa07acc..acd0b8d 100644 --- a/user.h +++ b/user.h @@ -1,3 +1,11 @@ +/* + * Copyright (C) 2008 Andre Noll + * + * 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. */ @@ -34,11 +42,11 @@ struct user_info { struct uid_range; int create_user_table(uint32_t uid, struct user_info **ui_ptr); -int read_uid_file(struct uid_range *admissible_uids); +int read_uid_file(void); int write_uid_file(void); void create_hash_table(unsigned bits); -void sort_hash_table(int (*comp)(const void *, const void *)); +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); @@ -46,3 +54,4 @@ 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);