Blame nfs-utils-1.0.6-gssd_mixed_case.patch
|
|
7060f16 |
--- nfs-utils-1.0.6/utils/gssd/gssd_proc.c.gssd 2006-03-02 14:36:10.000000000 -0500
|
|
|
7060f16 |
+++ nfs-utils-1.0.6/utils/gssd/gssd_proc.c 2006-03-02 14:38:47.000000000 -0500
|
|
|
7060f16 |
@@ -53,6 +53,7 @@
|
|
|
7060f16 |
#include <pwd.h>
|
|
|
7060f16 |
#include <grp.h>
|
|
|
7060f16 |
#include <string.h>
|
|
|
7060f16 |
+#include <ctype.h>
|
|
|
7060f16 |
#include <dirent.h>
|
|
|
7060f16 |
#include <poll.h>
|
|
|
7060f16 |
#include <fcntl.h>
|
|
|
7060f16 |
@@ -115,6 +116,7 @@ read_service_info(char *info_file_name,
|
|
|
7060f16 |
int fd = -1;
|
|
|
7060f16 |
struct hostent *ent = NULL;
|
|
|
7060f16 |
int numfields;
|
|
|
7060f16 |
+ char *s;
|
|
|
7060f16 |
|
|
|
7060f16 |
*servicename = *servername = *protocol = NULL;
|
|
|
7060f16 |
|
|
|
7060f16 |
@@ -155,6 +157,12 @@ read_service_info(char *info_file_name,
|
|
|
7060f16 |
printerr(0, "ERROR: can't resolve server %s name\n", address);
|
|
|
7060f16 |
goto fail;
|
|
|
7060f16 |
}
|
|
|
7060f16 |
+
|
|
|
7060f16 |
+ /* don't allow mixed-case names to rain on our parade */
|
|
|
7060f16 |
+ for (s = ent->h_name; s && *s; s++) {
|
|
|
7060f16 |
+ *s = tolower((int)*s);
|
|
|
7060f16 |
+ }
|
|
|
7060f16 |
+
|
|
|
7060f16 |
if (!(*servername = calloc(strlen(ent->h_name) + 1, 1)))
|
|
|
7060f16 |
goto fail;
|
|
|
7060f16 |
memcpy(*servername, ent->h_name, strlen(ent->h_name));
|