Hi,

I was trying to install ssh-2.0.13 on AIX 4.2 powerpc and after
getting this message after the "make" :

====
Making all in sshsession
        cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I. -I.
-I../.. -I../.
.         -I../sshutil -I./../sshutil  -g -c sshunixuser.c
"sshunixuser.c", line 90.14: 1506-275 (S) Unexpected text t encountered.
"sshunixuser.c", line 91.5: 1506-275 (S) Unexpected text 'struct' encountered.
"sshunixuser.c", line 91.31: 1506-277 (S) Syntax error: possible missing
';' or ','?
"sshunixuser.c", line 91.12: 1506-045 (S) Undeclared identifier
SshCalendarTimeRec.
"sshunixuser.c", line 92.9: 1506-045 (S) Undeclared identifier
account_is_locked.
"sshunixuser.c", line 122.21: 1506-280 (W) Function argument assignment
between types "
unsigned char*" and "const unsigned char*" is not allowed.
"sshunixuser.c", line 157.5: 1506-045 (S) Undeclared identifier t.
"sshunixuser.c", line 158.26: 1506-045 (S) Undeclared identifier tm.
"sshunixuser.c", line 412.77: 1506-045 (S) Undeclared identifier user.
"sshunixuser.c", line 745.29: 1506-280 (W) Function argument assignment
between types "
unsigned char*" and "const unsigned char*" is not allowed.
make: 1254-004 The error code from the last command is 1.

==============

I checked on lib/sshutil/sshtime.h and founded that line 89 of 
sshunixuser.c should be

    SshTime t;

and not

    ssh_time t;


After fixing this, i run "make" crashed again and got this message:

======

Making all in sshsession
        cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I. -I.
-I../..
 -I../..         -I../sshutil -I./../sshutil  -g -c sshunixuser.c
"sshunixuser.c", line 122.21: 1506-280 (W) Function argument assignment
between 
types "unsigned char*" and "const unsigned char*" is not allowed.
"sshunixuser.c", line 412.77: 1506-045 (S) Undeclared identifier user.
"sshunixuser.c", line 745.29: 1506-280 (W) Function argument assignment
between 
types "unsigned char*" and "const unsigned char*" is not allowed.
make: 1254-004 The error code from the last command is 1.

========

looking at like 412 in sshunixuser.c, , there is this piece of code :

=====

#ifdef HAVE_ETC_SECURITY_PASSWD_ADJUNCT
      {
        struct passwd_adjunct *sp = getpwanam(ssh_user_name(uc));
        if (sp)
          strncpy(correct_passwd, sp->pwa_passwd, sizeof(correct_passwd));
        endpwaent();
      }
#else /* HAVE_ETC_SECURITY_PASSWD_ADJUNCT */
#ifdef HAVE_ETC_SECURITY_PASSWD /* AIX, at least.  Is there an easier way? */
      {
        FILE *f;
        char line[1024], looking_for_user[200], *cp;
        int found_user = 0;
        f = fopen("/etc/security/passwd", "r");
        if (f)
          {
            /* XXX: user next line was server_user, is this OK? */

/* FIX HERE ============================================
   I switch "user" for "pw->pw_name"
  original line of code :  
            snprintf(looking_for_user, sizeof(looking_for_user), "%.190s:",
user);
*/============================================
            snprintf(looking_for_user, sizeof(looking_for_user), "%.190s:",
pw->pw_name);

            while (fgets(line, sizeof(line), f))
              {
                if (strchr(line, '\n'))
                  *strchr(line, '\n') = 0;
                if (strcmp(line, looking_for_user) == 0)
                  found_user = 1;
                else
                  if (line[0] != '\t' && line[0] != ' ')
                    found_user = 0;
                  else
                    if (found_user)
                      {
                        for (cp = line; *cp == ' ' || *cp == '\t'; cp++)
                          ;
                        if (strncmp(cp, "password = ", strlen("password =
")) == 0)
                          {
                            strncpy(correct_passwd, cp + strlen("password =
"),
                                    sizeof(correct_passwd));
                            correct_passwd[sizeof(correct_passwd) - 1] = 0;
                            break;
                          }
                      }
              }
========================

I don't know if the fix i did were right, I'd be happy if someone tell me
if everything I did was alright.

After fixing those problem, ssh has compile.  Are those problem AIX related ?

Thanks



Mathieu Legar�, Analyste syst�me 
Service de l'informatique 
Universit� du Qu�bec � Trois-Rivi�res 
T�l�phone: (819) 376-5100, x2439 

Reply via email to