X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0141F565D0 for ; Sun, 13 Mar 2005 14:12:16 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 33760-09 for ; Sun, 13 Mar 2005 14:12:14 +0000 (GMT) Received: from uucp.dinoex.sub.de (uucp.dinoex.sub.de [194.45.71.2]) by svr1.postgresql.org (Postfix) with ESMTP id 151DB565B8 for ; Sun, 13 Mar 2005 14:12:12 +0000 (GMT) Received: from uucp.dinoex.sub.de (uucp@uucp.dinoex.sub.de [194.45.71.2] (may be forged)) by uucp.dinoex.sub.de (8.13.3/8.13.3) with ESMTP id j2DEC5AO053335; Sun, 13 Mar 2005 15:12:05 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) Received: from citylink.dinoex.sub.org (uucp@localhost) by uucp.dinoex.sub.de (8.13.3/8.13.3/Submit) with UUCP id j2DEC5J1053334; Sun, 13 Mar 2005 15:12:05 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by citylink.dinoex.sub.de (8.13.1/8.13.1) with ESMTP id j2DE8P8P051764; Sun, 13 Mar 2005 15:08:25 +0100 (CET) (envelope-from peter@gate.oper.dinoex.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by gate.oper.dinoex.org (8.13.1/8.13.1) with ESMTP id j2DE7pr2051704; Sun, 13 Mar 2005 15:07:52 +0100 (CET) (envelope-from peter@gate.oper.dinoex.org) Received: (from peter@localhost) by gate.oper.dinoex.org (8.13.1/8.13.1/Submit) id j2DE7pMD051703; Sun, 13 Mar 2005 15:07:51 +0100 (CET) (envelope-from peter) Date: Sun, 13 Mar 2005 15:07:51 +0100 From: Peter Much To: pgsql-interfaces@postgresql.org Subject: [Tcl] did pgaccess ever work with kerberos? Message-ID: <20050313140751.GA46146@gate.oper.dinoex.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Milter: Spamilter (Reciever: uucp.dinoex.sub.de; Sender-ip: 194.45.71.2; Sender-helo: uucp.dinoex.sub.de; ) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200503/43 X-Sequence-Number: 5372 Hi all, I am trying to get postgresql 7.4.5 running, and am stuck in problems with pgaccess. That is, pgaccess does not want to connect with kerbneros authentication, and I have analyzed this so far that it seems to me this is a fundamental question about doing a connect with kerberos from a plain tcl script. Pgaccess tries to load the libpgtcl. It does so first by trying package require Pgtcl and this fails for reasons yet unknown to me. Then it does by load /usr/local/lib/libpqtcl.so and this fails because it does not find symbols which are in the kerberos libraries: ERROR MESSAGE: couldn't load file "/usr/local/lib/libpgtcl.so": /usr/local/lib/libpq.so.3: Undefined symbol "krb5_cc_get_principal" If I list all the kerberos libraries in the pgaccess script, so that they are also loaded, then it complains about the initialisation procedures in these libraries. This seems not the way to go. If I try to connect from pgtclsh, that works just fine. But pgtclsh is not a plain Tcl script. It is a binary, and so it does not have to load sharedlibs explicitely, but gets them on-demand from the system loader. The fun is, I have postgresql 7.1.3 running, and that old pgaccess that did come with 7.1.3, and that does work with kerberos. So I checked how this happens. That pgaccess does also load /usr/local/lib/libpgtcl.so and there it works. But the point is, I am running heimdal kerberos, and postgresql 7.1.3 did not support heimdal kerberos. Therefore I linked that postgres against MIT kerberos, and I linked it statically (I removed all the *.so libraries at linktime, so that the linker would only see the *.a libraries). Therefore, my libpq.so got rather large and does CONTAIN all needed kerberos functions. Is this the only trick to get it running? Or is there a more clean way? Fundamentally, my question is, if I do not use pgtclsh, but plain tclsh (or wish), and want to use libpgtcl and access the database from there, how do I do this (and get the kerberos support)? PMc