|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
getpwent() is broken in current
try with:
# getent passwd you will see some messed up output. Index: lib/libc/gen/getpwent.c RCS file: /,v retrieving revision 1.36 diff -u -r1.36 getpwent.c lib/libc/gen/getpwent.c 25 Jun 2008 14:51:27 -0000 1.36 lib/libc/gen/getpwent.c 6 Jul 2008 21:17:07 -0000 @@ -314,7 +314,7 @@ static char *name = NULL; char *map; #endif - char bf[1 + sizeof(_pw_keynum)], pwbuf[_PW_BUF_LEN]; + char bf[1 + sizeof(_pw_keynum)]; struct passwd *pw = NULL; DBT key; @@ -438,7 +438,7 @@ bcopy((char *)&_pw_keynum, &bf[1], sizeof(_pw_keynum)); key.data = (u_char *)bf; key.size = 1 + sizeof(_pw_keynum); - if (__hashpw(&key, pwbuf, sizeof pwbuf, &_pw_passwd, &_pw_flags)) { + if (__hashpw(&key, _pw_string, sizeof _pw_string, &_pw_passwd, &_pw_flags)) { #ifdef YP static long __yppbuf[_PW_BUF_LEN / sizeof(long)]; const char *user, *host, *dom; |
![]() |
| Viewing: Web Development Archives > Mailing Lists > BSD > getpwent() is broken in current |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|