s3-net: allow to list a keytab generated using net rpc vampire.
authorGünther Deschner <gd@samba.org>
Tue, 2 Dec 2008 11:57:02 +0000 (12:57 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 2 Dec 2008 11:59:22 +0000 (12:59 +0100)
Guenther

source3/libads/kerberos_keytab.c

index 883f5824452cb5fc4045e394110aab8180d9efdc..c4e67091ddbea2f1e2727f025f408baf730ccf1c 100644 (file)
@@ -725,8 +725,11 @@ int ads_keytab_list(const char *keytab_name)
 
                ret = smb_krb5_enctype_to_string(context, enctype, &etype_s);
                if (ret) {
-                       SAFE_FREE(princ_s);
-                       goto out;
+                       if (asprintf(&etype_s, "UNKNOWN: %d\n", enctype) == -1)
+                       {
+                               SAFE_FREE(princ_s);
+                               goto out;
+                       }
                }
 
                printf("%3d  %s\t\t %s\n", kt_entry.vno, etype_s, princ_s);