Porting OpenSSH 2.9.9p2 to Dynix V4.4.4

Patrick Hess phess at best.com
Tue Oct 9 05:10:34 EST 2001


Hello Porters,

	I am attempting to compile OpenSSH 2.9.9p2 on a Dynix V4.4.4 host.
I have set USE_PIPES and BROKEN_SAVED_UIDS (the latter because there are
no functions for set{eu,eg}id() that I can find).  I configured with
"./configure  '--with-libs=-lnsl -lsec'".


	Each time I attempt to login, I get this error:

          No utmp entry.  You must exec "login" from the lowest level "sh".


	The Dynix man page for login (1) states:

          No utmp entry. You must exec "login" from the lowest level "sh"
               You attempted to execute login as a command without
               using the shell's exec internal command or from other
               than the initial shell.


	A "truss -aef" tells me that login is being execl'd like:

          27066:  execve("/bin/login", 0x080470FC, 0x0815F6CC) argc = 7
          27066:   argv: login -h <IP> -p -f -- phess
          27066:   envp: TZ=BST11 SSH_CLIENT=<IP> 1471 22 SSH_TTY=/dev/pts/31
          27066:    TERM=vt100


	Do you have any ideas what I can define in order to fix this problem?


	I also found what I believe might be a bug in uidswap.c at line 88.  It
used to look like:

-----
#ifndef SAVED_IDS_WORK_WITH_SETEUID
        /* Propagate the privileged gid to all of our gids. */
        if (setgid(getegid()) < 0)
                debug("setgid %u: %.100s", (u_int) getegid(), strerror(errno));
        /* Propagate the privileged uid to all of our uids. */
        if (setuid(geteuid()) < 0)
                debug("setuid %u: %.100s", (u_int) geteuid(), strerror(errno));
#endif /* SAVED_IDS_WORK_WITH_SETEUID */
        if (setegid(pw->pw_gid) < 0)
                fatal("setegid %u: %.100s", (u_int) pw->pw_gid,
                    strerror(errno));
        if (seteuid(pw->pw_uid) == -1)
                fatal("seteuid %u: %.100s", (u_int) pw->pw_uid,
                    strerror(errno));
-----


It now looks like:

-----
#ifdef SAVED_IDS_WORK_WITH_SETEUID
        if (setegid(pw->pw_gid) < 0)
                fatal("setegid %u: %.100s", (u_int) pw->pw_gid,
                    strerror(errno));
        if (seteuid(pw->pw_uid) == -1)
                fatal("seteuid %u: %.100s", (u_int) pw->pw_uid,
                    strerror(errno));
#else /* SAVED_IDS_WORK_WITH_SETEUID */
        /* Propagate the privileged gid to all of our gids. */
        if (setgid(getegid()) < 0)
                debug("setgid %u: %.100s", (u_int) getegid(), strerror(errno));
        /* Propagate the privileged uid to all of our uids. */
        if (setuid(geteuid()) < 0)
                debug("setuid %u: %.100s", (u_int) geteuid(), strerror(errno));
#endif /* SAVED_IDS_WORK_WITH_SETEUID */
-----


	Otherwise, I've made no changes.

	Thanks in advance.

--
Best regards,
  Patrick                             mailto:phess at best.com



More information about the openssh-unix-dev mailing list