]> git.tuebingen.mpg.de Git - adu.git/blobdiff - user.c
fd.c: Avoid gcc warning regarding fchdir().
[adu.git] / user.c
diff --git a/user.c b/user.c
index 2ed3d471bf9227424993383ac4e314aeedbf5b48..ed16463afed9372426c5c08284a65ec863a19e2e 100644 (file)
--- a/user.c
+++ b/user.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2008 Andre Noll <maan@tuebingen.mpg.de>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -10,7 +10,6 @@
 #include <dirent.h> /* readdir() */
 #include <sys/types.h>
 #include <pwd.h>
-#include "cmdline.h" /* TODO: This file should be independent of command line options */
 #include "user.h"
 #include "fd.h"
 #include "string.h"
@@ -45,7 +44,7 @@ enum uid_info_flags {
  *
  * Even users that are not taken into account because of the --uid
  * option occupy a slot in this hash table. This allows to find out
- * quicky whether a uid is admissible. And yes, this has to be fast.
+ * quickly whether a uid is admissible. And yes, this has to be fast.
  */
 static struct user_info *uid_hash_table;
 
@@ -467,7 +466,7 @@ static char *get_uid_list_name(void)
  * \a admissible_uids. If so, it sets the admissible bit for this slot and
  * opens the osl table of the uid.
  *
- * \return Stamdard.
+ * \return Standard.
  */
 int open_admissible_user_tables(struct uid_range *admissible_uids)
 {
@@ -512,7 +511,7 @@ int read_uid_file(void)
        size_t size;
        uint32_t n;
        char *filename = get_uid_list_name(), *map;
-       int ret = mmap_full_file(filename, O_RDONLY, (void **)&map, &size, NULL);
+       int ret = mmap_file_ro(filename, (void **)&map, &size);
        unsigned bits;
 
        if (ret < 0) {