This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.12-11-ga160f8d


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  a160f8d808cf8020b13bd0ef4a9eaf3c11f964ad (commit)
      from  9b1edf50c40edc1ce6e7ea7110114420f97afb17 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a160f8d808cf8020b13bd0ef4a9eaf3c11f964ad

commit a160f8d808cf8020b13bd0ef4a9eaf3c11f964ad
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Thu May 6 22:23:13 2010 -0700

    Enable IDN support in getent.

diff --git a/ChangeLog b/ChangeLog
index 05525db..aef2615 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-05-06  Ulrich Drepper  <drepper@redhat.com>
 
+	* nss/getent.c (idn_flags): Default to AI_IDN|AI_CANONIDN.
+	(args_options): Add no-idn option.
+	(ahosts_keys_int): Add idn_flags to ai_flags.
+	(parse_option): Handle 'i' option to clear idn_flags.
+
 	* malloc/malloc.c (_int_free): Possible race in the most recently
 	added check.  Only act on the data if no current modification
 	happened.
diff --git a/nss/getent.c b/nss/getent.c
index 69eea25..f6c0b5d 100644
--- a/nss/getent.c
+++ b/nss/getent.c
@@ -31,6 +31,7 @@
 #include <netdb.h>
 #include <pwd.h>
 #include <shadow.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -56,6 +57,7 @@ static const char args_doc[] = N_("database [key ...]");
 static const struct argp_option args_options[] =
   {
     { "service", 's', "CONFIG", 0, N_("Service configuration to be used") },
+    { "no-idn", 'i', NULL, 0, N_("disable IDN encoding") },
     { NULL, 0, NULL, 0, NULL },
   };
 
@@ -74,6 +76,9 @@ static struct argp argp =
     args_options, parse_option, args_doc, doc, NULL, more_help
   };
 
+/* Additional getaddrinfo flags for IDN encoding.  */
+static int idn_flags = AI_IDN | AI_CANONIDN;
+
 /* Print the version information.  */
 static void
 print_version (FILE *stream, struct argp_state *state)
@@ -377,7 +382,8 @@ ahosts_keys_int (int af, int xflags, int number, char *key[])
 
   struct addrinfo hint;
   memset (&hint, '\0', sizeof (hint));
-  hint.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG | AI_CANONNAME | xflags;
+  hint.ai_flags = (AI_V4MAPPED | AI_ADDRCONFIG | AI_CANONNAME
+		   | idn_flags | xflags);
   hint.ai_family = af;
 
   for (i = 0; i < number; ++i)
@@ -861,6 +867,10 @@ parse_option (int key, char *arg, struct argp_state *state)
 	}
       break;
 
+    case 'i':
+      idn_flags = 0;
+      break;
+
     default:
       return ARGP_ERR_UNKNOWN;
     }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog    |    5 +++++
 nss/getent.c |   12 +++++++++++-
 2 files changed, 16 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]