components/krb5/patches/030-force_dns_hostname_canon.patch
changeset 6978 14cbeb78966a
parent 6599 1d033832c5e7
equal deleted inserted replaced
6977:d12ba5c9b5db 6978:14cbeb78966a
     6 # lookups. NIS has been known to cause issues with hostname canonicalization.
     6 # lookups. NIS has been known to cause issues with hostname canonicalization.
     7 #
     7 #
     8 # This patch is not meant for upstream contribution.
     8 # This patch is not meant for upstream contribution.
     9 # Patch source: in-house
     9 # Patch source: in-house
    10 #
    10 #
    11 diff --git a/src/lib/krb5/os/sn2princ.c b/src/lib/krb5/os/sn2princ.c
       
    12 --- a/src/lib/krb5/os/sn2princ.c
    11 --- a/src/lib/krb5/os/sn2princ.c
    13 +++ b/src/lib/krb5/os/sn2princ.c
    12 +++ b/src/lib/krb5/os/sn2princ.c
    14 @@ -39,6 +39,14 @@
    13 @@ -39,6 +39,14 @@
    15  #define DEFAULT_RDNS_LOOKUP 1
    14  #define DEFAULT_RDNS_LOOKUP 1
    16  #endif
    15  #endif
   113 +    if (hp2 != NULL)
   112 +    if (hp2 != NULL)
   114 +        res_freehostent(hp2);
   113 +        res_freehostent(hp2);
   115      return (*canonhost_out == NULL) ? ENOMEM : 0;
   114      return (*canonhost_out == NULL) ? ENOMEM : 0;
   116  }
   115  }
   117  
   116  
   118 diff --git a/src/util/k5test.py b/src/util/k5test.py
       
   119 --- a/src/util/k5test.py
   117 --- a/src/util/k5test.py
   120 +++ b/src/util/k5test.py
   118 +++ b/src/util/k5test.py
   121 @@ -364,6 +364,7 @@ import string
   119 @@ -364,6 +364,7 @@ import string
   122  import subprocess
   120  import subprocess
   123  import sys
   121  import sys