possible portability bug in bsd-getcwd.c

Terry Wilson linuxfreak at partition.com
Thu Nov 23 06:42:56 EST 2000


I have Red Hat Linux 6.2; kernel 2.2.14; glibc 2.1.3, and downloaded portable OpenSSH 2.3.0.

make choked on lines 172, 189, 209, 210 on the "dp->d_namlen" expression.  dp is a pointer to an object of dirent type declared in my /usr/src/linux/include/linux/dirent.h header file.  The downside is that struct dirent in that file does not have a d_namlen member.  Based on the name, and two associated calls to bcopy() function, it seems like d_namlen describes the length of the dirent member d_name.  I have noted in my dirent.h that d_name is a char array of explicit length 256.  I'm thinking about attempting to compensate by regex replacing dp->d_namlen with a #defined constant of 255, unless there is something better.  I'm a little worried that 255 might somehow frag up bup or bpt as I am not that familiar with this code.  Any comments or suggestions?

Terry Wilson
aka Tux the Linux Freak


______________________________________________________________________
Get Your Own Private, Free Email Account at http://www.dotcomemail.com
Now With Over 1,500 Com, Net, and Org Domains to Choose From!






More information about the openssh-unix-dev mailing list