X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=user_list.c;h=b7d739c130fc08d5d69c159be3c46d927f894df2;hp=abd47e181273e0bdc539ba1ffe5e0fef3e7e9969;hb=48107fb4b9ad286edc38bc336a8703eea7048f88;hpb=1fe76952bf4244b93808da5e8fc45e92d8b37c58 diff --git a/user_list.c b/user_list.c index abd47e18..b7d739c1 100644 --- a/user_list.c +++ b/user_list.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 Andre Noll + * Copyright (C) 2006-2007 Andre Noll * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -70,16 +70,16 @@ static void populate_user_list(char *user_list_file) u->perms = 0; while (num > 0) { num--; - if (!strcmp(tmp[num], "AFS_READ")) - u->perms |= AFS_READ; - else if (!strcmp(tmp[num], "AFS_WRITE")) - u->perms |= AFS_WRITE; + if (!strcmp(tmp[num], "VSS_READ")) + u->perms |= VSS_READ; + else if (!strcmp(tmp[num], "VSS_WRITE")) + u->perms |= VSS_WRITE; else if (!strcmp(tmp[num], "DB_READ")) u->perms |= DB_READ; else if (!strcmp(tmp[num], "DB_WRITE")) u->perms |= DB_WRITE; else /* unknown permission */ - PARA_WARNING_LOG("unknown permission: %s\n", + PARA_WARNING_LOG("ignoring unknown permission: %s\n", tmp[num]); } para_list_add(&u->node, &user_list); @@ -93,6 +93,14 @@ out: exit(EXIT_FAILURE); } +/** + * initialize the list of users allowed to connecto to para_server + * + * \param user_list_file the file containing access information + * + * If this function is called a second time, the contents of the + * previous call are discarded. + */ void init_user_list(char *user_list_file) { struct user *u, *tmp;