Whamcloud - gitweb
LU-6245 libcfs: remove types.h from userland code
[fs/lustre-release.git] / lustre / utils / gss / lsupport.c
index ebbeb1e..8c0b971 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,6 +26,8 @@
 /*
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2014, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -47,6 +47,7 @@
 #include <sys/ipc.h>
 #include <sys/sem.h>
 
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <pwd.h>
 #include <unistd.h>
 #include <errno.h>
 #include <assert.h>
-#ifdef HAVE_GETHOSTBYNAME
+#ifdef HAVE_NETDB_H
 # include <netdb.h>
 #endif
-
+#include <lnet/nidstr.h>
 #ifdef _NEW_BUILD_
 # include "lgss_utils.h"
 #else
@@ -436,12 +437,6 @@ static int read_mapping_db(void)
         while ((line = fgets(linebuf, MAX_LINE_LEN, f)) != NULL) {
                 char *name;
 
-                if (strlen(line) >= MAX_LINE_LEN) {
-                        printerr(0, "invalid mapping db: line too long (%d)\n",
-                                 strlen(line));
-                        continue;
-                }
-
                 if (sscanf(line, "%s %s %s", princ, nid_str, dest) != 3) {
                         printerr(0, "mapping db: syntax error\n");
                         continue;