[PATCH] Remove support for old kerberos5 api.
Paulo Cesar Pereira de Andrade
pcpa at mandriva.com.br
Wed Feb 4 09:04:54 PST 2009
The support has already been removed from the X Server for a long
time, and removal of some bits not under #ifdef K5AUTH from libXau
caused xhost to fail compilation.
It should be very unlikely someone is using "current" xorg to
interface with 1993 X Servers. But the proper solution as pointed
in the libXau commit would be to upgrade to current/modern Kerberos
API, and correct X Server, libXau, and xhost.
Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa at mandriva.com.br>
---
xhost.c | 50 --------------------------------------------------
1 files changed, 0 insertions(+), 50 deletions(-)
diff --git a/xhost.c b/xhost.c
index 90a9b9c..1b2d966 100644
--- a/xhost.c
+++ b/xhost.c
@@ -232,9 +232,6 @@ main(int argc, char *argv[])
case FamilyNetname:
printf("NIS:");
break;
- case FamilyKrb5Principal:
- printf("KRB:");
- break;
case FamilyLocalHost:
printf("LOCAL:");
break;
@@ -404,16 +401,6 @@ change_host(Display *dpy, char *name, Bool add)
return 0;
#endif
}
- else if (!strncmp("krb:", lname, 4)) {
-#ifdef K5AUTH
- family = FamilyKrb5Principal;
- name +=4;
-#else
- fprintf (stderr, "%s: not compiled for Kerberos 5\n", ProgramName);
- free(lname);
- return 0;
-#endif
- }
else if (!strncmp("local:", lname, 6)) {
family = FamilyLocalHost;
}
@@ -490,31 +477,6 @@ change_host(Display *dpy, char *name, Bool add)
return 1;
}
#endif /* DNETCONN */
-#ifdef K5AUTH
- if (family == FamilyKrb5Principal) {
- krb5_error_code retval;
-
- retval = krb5_parse_name(name, &princ);
- if (retval) {
- krb5_init_ets(); /* init krb errs for error_message() */
- fprintf(stderr, "%s: cannot parse Kerberos name: %s\n",
- ProgramName, error_message(retval));
- return 0;
- }
- XauKrb5Encode(princ, &kbuf);
- ha.length = kbuf.length;
- ha.address = kbuf.data;
- ha.family = family;
- if (add)
- XAddHost(dpy, &ha);
- else
- XRemoveHost(dpy, &ha);
- krb5_free_principal(princ);
- free(kbuf.data);
- printf( "%s %s\n", name, add ? add_msg : remove_msg);
- return 1;
- }
-#endif
if (family == FamilyLocalHost) {
ha.length = 0;
ha.address = "";
@@ -866,18 +828,6 @@ get_hostname(XHostAddress *ha)
return(nodeaddr);
}
#endif
-#ifdef K5AUTH
- if (ha->family == FamilyKrb5Principal) {
- kbuf.data = ha->address;
- kbuf.length = ha->length;
- XauKrb5Decode(kbuf, &princ);
- krb5_unparse_name(princ, &kname);
- krb5_free_principal(princ);
- strncpy(kname_out, kname, sizeof (kname_out));
- free(kname);
- return kname_out;
- }
-#endif
if (ha->family == FamilyLocalHost) {
return "";
}
--
1.6.1
------=_20090204170726_29440--
More information about the xorg
mailing list