<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>118508</bug_id>
          
          <creation_ts>2006-01-10 02:32 0000</creation_ts>
          <short_desc>app-crypt/heimdal-0.7.1-r1 does not set path to login(1) properly</short_desc>
          <delta_ts>2006-05-22 08:08:43 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Server</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mmokrejs@ribosome.natur.cuni.cz</reporter>
          <assigned_to>kerberos@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>mmokrejs@ribosome.natur.cuni.cz</who>
            <bug_when>2006-01-10 02:32:12 0000</bug_when>
            <thetext>It turned out that ktelnetd cannot find path to /usr/bin/login program, when I execute &quot;ktelnetd -a none&quot; through xinetd. Probably you only test ktelnetd with encryption enabled, but for fail-over purposes I need the old, non-encrypted approach. Anyway, what I propose is that you use the configure flag to set the full path to login program during the compile time (&quot;/bin/login&quot;).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mmokrejs@ribosome.natur.cuni.cz</who>
            <bug_when>2006-03-09 10:39:30 0000</bug_when>
            <thetext>To show what I meant with this, try:

# kadmin
kadmin&gt; add --random-key host/my.machine.foo.bar
Max ticket life [1 day]:
Max renewable life [1 week]:
Principal expiration time [never]:
Password expiration time [never]:
Attributes []:
kadmin&gt;

[create similarly random keys for services telnet and ftp, the principals are ftp/my.machine@FOO.BAR and telnet/my.machine@FOO.BAR. See http://www.pdc.kth.se/heimdal/heimdal.html#keytabs for more docs. Continue then with extraction of the host key from KDC server (created above) on your local machine]

kadmin&gt; ext host/my.machine.foo.bar
kadmin&gt; quit

# ktutil list
FILE:/etc/krb5.keytab:

Vno  Type                     Principal
  1  des-cbc-crc              afs/my.machine.foo.bar@FOO.BAR
  1  des-cbc-md5              host/my.machine.foo.bar@FOO.BAR
  1  des-cbc-md4              host/my.machine.foo.bar@FOO.BAR
  1  des-cbc-crc              host/my.machine.foo.bar@FOO.BAR
  1  aes256-cts-hmac-sha1-96  host/my.machine.foo.bar@FOO.BAR
  1  arcfour-hmac-md5         host/my.machine.foo.bar@FOO.BAR
  1  des3-cbc-sha1            host/my.machine.foo.bar@FOO.BAR
#
# /usr/sbin/ktelnetd -a none -debug
ktelnetd: socket af = 10: Address family not supported by protocol
[this will show on current terminal the log output]

# ktelnet my.machine.foo.bar -l me
Encryption is verbose
Trying xxx.xxx.xxx.xxx...
Connected to my.machine.foo.bar.
Escape character is &apos;^]&apos;.
Waiting for encryption to be negotiated...
[ Trying mutual KERBEROS5 (host/my.machine.foo.bar@FOO.BAR)... ]
[ Kerberos V5 accepts you as ``me/admin@FOO.BAR&apos;&apos; ]
[ Kerberos V5 accepted forwarded credentials ]
[ Output is now encrypted with type DES_CFB64 ]
[ Input is now decrypted with type DES_CFB64 ]
Encryption negotiated.

This is \n.\O (\s \m \r) \t

telnetd: /usr/bin/login: No such file or directory.
Connection closed by foreign host.
#


The fix is just a simple configure flag to be added to .ebuild!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mmokrejs@ribosome.natur.cuni.cz</who>
            <bug_when>2006-03-09 14:54:12 0000</bug_when>
            <thetext>Sorry, I forgot the --with-login flag to configure is available only in case of openssh. Configure distributed with heimdal doesn&apos;t have it. It would work out of the box with the login binary available from heimdal itself, but you install it as /usr/bin/klogin. Let me emphasize on platform (other than Linux) where for example the heimdal-x.x.x./appl/login/login.c did not support well its native authentication mechanism telnetd/ftpd/rshd call the system-wide &quot;/usr/bin/login -f&quot; to finish login procedure, that means the login binary available with heimdal is not strictly necessary. I think as the PAM support is available on Linux the login from heimdal is functionally same as login in Gentoo base system.

In my example in original comment #1 I should have said one can work around by doing:
/usr/sbin/ktelnetd -a none -debug -L /usr/bin/klogin
or
/usr/sbin/ktelnetd -a none -debug -L /bin/login

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>exg@gentoo.org</who>
            <bug_when>2006-05-03 04:30:42 0000</bug_when>
            <thetext>*** Bug 125443 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>exg@gentoo.org</who>
            <bug_when>2006-05-03 05:28:18 0000</bug_when>
            <thetext>Created an attachment (id=86069)
014_all_heimdal-path.patch

I would prefer it to be self-contained. Does this patch fix all the issues?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mmokrejs@ribosome.natur.cuni.cz</who>
            <bug_when>2006-05-03 17:25:55 0000</bug_when>
            <thetext>Quick inspection tells me one more are missing:

# strings /usr/bin/klogin | grep bin
/usr/bin:/bin
/bin/sh
/usr/bin/passwd
fork /bin/passwd
# ls -la /usr/bin/passwd
lrwxrwxrwx 1 root root 11 Mar 23 11:51 /usr/bin/passwd -&gt; /bin/passwd
# 

It should point to kpasswd.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mmokrejs@ribosome.natur.cuni.cz</who>
            <bug_when>2006-05-03 19:32:35 0000</bug_when>
            <thetext>The ktelnetd issue is fixed by the patch 014_all_heimdal-path.patch, also the krsh issue is fixed. The client rsh manpages are installed in any case now, but rhsd.8 is not. Generally, the selective installation of manpages makes me suspect not all manpages are installed on Gentoo. :(

Please fix the klogin sources as well so it executes kpasswd from proper location (comment #5).

Thanks.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mmokrejs@ribosome.natur.cuni.cz</who>
            <bug_when>2006-05-04 05:22:16 0000</bug_when>
            <thetext>heimdal developers answered my email, so here we go:

&gt; Hi,
&gt;  I had some fun on Gentoo linux with Heimdal packages and after a while I
&gt; have finally figured out that the hard-compiled-in path to login(1) is wrong.
&gt; Is there any way to tell configure which path to use?
&gt; http://bugs.gentoo.org/show_bug.cgi?id=118508


Johan, how to solve this ?

&gt;   I think Gentoo developers should be instructed how to tell  configure that
&gt; rcp/rsh will be installed under different names (krcp, krsh), etc.  It sucks
&gt; they always rename an relocate things.
&gt; http://bugs.gentoo.org/show_bug.cgi?id=125443
&gt;

--program-transform-name=&quot;s/^rsh$/krsh/;s/^rshd$/krshd/&quot; as argument  to configure.

Love </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>exg@gentoo.org</who>
            <bug_when>2006-05-04 21:55:02 0000</bug_when>
            <thetext>Created an attachment (id=86183)
014_all_heimdal-path.patch

Next time Cc us instead please. What is the problem in renaming the binaries, and what are we relocating? The only real issue is the hardcoding of path/name for the exec calls in the clients. Patch updated to fix also login.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mmokrejs@ribosome.natur.cuni.cz</who>
            <bug_when>2006-05-05 01:56:10 0000</bug_when>
            <thetext>With relocation I meant installing into other PATHs than default. Especially in case of Kerberos and its apps which look for hardcoded paths, where their configure tries to guess that kth-krb is in /usr/athena, heimdal in /usr/heimdal and mit-krb5 in /usr and is often fooled if they are not. But I pointed this many times, and current buglist shows that filenames have collisions, that kth-krb and heimdal still cannot be installed together on Gentoo ... you have no resources and users have to test and report ... and there&apos;re just a few.


I think the patch is correct, the passwd stuff I cannot test now as I don&apos;t use password expirations, which would force me to change my pass on next successfull login.

Probably the part

@@ -38,7 +38,7 @@
 #ifdef HAVE_SHADOW_H
 
 #ifndef _PATH_CHPASS
-#define _PATH_CHPASS &quot;/usr/bin/passwd&quot;
+#define _PATH_CHPASS &quot;/usr/bin/kpasswd&quot;
 #endif
 
 static int


would be replaced for consistency and just for future $bindir manipulations by
 configure with:


@@ -38,7 +38,7 @@
 #ifdef HAVE_SHADOW_H
 
 #ifndef _PATH_CHPASS
-#define _PATH_CHPASS BINDIR &quot;/passwd&quot;
+#define _PATH_CHPASS BINDIR &quot;/kpasswd&quot;
 #endif
 
 static int

Additional answer from Love Astrand Hornquist:

&gt;&gt; --program-transform-name=&quot;s/^rsh$/krsh/;s/^rshd$/krshd/&quot; as  argument  to
&gt;&gt; configure.
&gt;
&gt;
&gt; Is this really equivalent to the patch attached to the bug?
&gt;
&gt; http://bugs.gentoo.org/show_bug.cgi?id=118508


No, but it should be, I&apos;ll have a look if its possible.
rsh/rcp are one of those interesting programs that keep running each  other.

Love </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mmokrejs@ribosome.natur.cuni.cz</who>
            <bug_when>2006-05-16 11:50:07 0000</bug_when>
            <thetext>I haven&apos;t heard anything back from heimdal developers yet, so please commit the patch after taking in the changes proposed in comment #9 in the meantime; but probably keep the issue open unless we hear from upstream. Thanks.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>seemant@gentoo.org</who>
            <bug_when>2006-05-22 08:08:43 0000</bug_when>
            <thetext>fixed in 0.7.2-r2</thetext>
          </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>86069</attachid>
            <date>2006-05-03 05:28 0000</date>
            <desc>014_all_heimdal-path.patch</desc>
            <filename>014_all_heimdal-path.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGhlaW1kYWwtMC43LjIvYXBwbC9yY3AvcmNwLmMub2xkCTIwMDYtMDUtMDMgMTM6MzE6NTku
Mzk4NDkzNjI1ICswMjAwCisrKyBoZWltZGFsLTAuNy4yL2FwcGwvcmNwL3JjcC5jCTIwMDYtMDUt
MDMgMTM6MzI6MDQuNDk0NDg1OTgxICswMjAwCkBAIC0zNCw3ICszNCw3IEBACiAjaW5jbHVkZSAi
cmNwX2xvY2wuaCIKICNpbmNsdWRlIDxnZXRhcmcuaD4KIAotI2RlZmluZSBSU0hfUFJPR1JBTSAi
cnNoIgorI2RlZmluZSBSU0hfUFJPR1JBTSAia3JzaCIKIAogc3RydWN0ICBwYXNzd2QgKnB3ZDsK
IHVpZF90CXVzZXJpZDsKLS0tIGhlaW1kYWwtMC43LjIvYXBwbC9yY3AvcmNwX2xvY2wuaC5vbGQJ
MjAwNi0wNS0wMyAwMjozMDozMS42MDIwMjU0MDkgKzAyMDAKKysrIGhlaW1kYWwtMC43LjIvYXBw
bC9yY3AvcmNwX2xvY2wuaAkyMDA2LTA1LTAzIDAyOjMwOjM1Ljg4NjAxODk4MyArMDIwMApAQCAt
NjQsNCArNjQsNCBAQAogI2RlZmluZQlfUEFUSF9DUAkiL2Jpbi9jcCIKICNlbmRpZgogI3VuZGVm
IF9QQVRIX1JTSAotI2RlZmluZQlfUEFUSF9SU0gJQklORElSICIvcnNoIgorI2RlZmluZQlfUEFU
SF9SU0gJQklORElSICIva3JzaCIKLS0tIGhlaW1kYWwtMC43LjIvYXBwbC90ZWxuZXQvdGVsbmV0
ZC90ZWxuZXRkLmgub2xkCTIwMDYtMDUtMDMgMDI6MjM6MTQuNTgyNjgwOTM5ICswMjAwCisrKyBo
ZWltZGFsLTAuNy4yL2FwcGwvdGVsbmV0L3RlbG5ldGQvdGVsbmV0ZC5oCTIwMDYtMDUtMDMgMDI6
MjM6MjMuNzQ2NjY3MTkzICswMjAwCkBAIC0xOTIsNyArMTkyLDcgQEAKICNlbmRpZgogCiAjdW5k
ZWYgX1BBVEhfTE9HSU4KLSNkZWZpbmUgX1BBVEhfTE9HSU4JQklORElSICIvbG9naW4iCisjZGVm
aW5lIF9QQVRIX0xPR0lOCUJJTkRJUiAiL2tsb2dpbiIKIAogLyogZmFsbGJhY2tzICovCiAK
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>86183</attachid>
            <date>2006-05-04 21:55 0000</date>
            <desc>014_all_heimdal-path.patch</desc>
            <filename>014_all_heimdal-path.patch</filename>
            <type>text/plain</type>
            <data encoding="base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