刚才有人写信问我,可能是也出现这现象了,
我们站这样搞的,写出来给用smth1.2的参考一下
把utmp.c里getnewutmpent和getnewutmpent2两个函数的同一个地方改了一下:
把:
utmphead->hashhead[0] = utmphead->next[pos];
if (utmpshm->uinfo[pos].active)
if (utmpshm->uinfo[pos].pid) {
bbslog("3system", "utmp: alloc a active utmp! old:%s new:%s", utmpshm->uin
fo[pos].userid, up->userid);
kill(utmpshm->uinfo[pos].pid, SIGHUP);
}
改成:
if (utmpshm->uinfo[pos].active)
if (utmpshm->uinfo[pos].pid) {
bbslog("3system", "utmp: alloc a active utmp! old:%s new:%s", utmp
shm->uin
fo[pos].userid, up->userid);
utmp_setreadonly(1);
utmp_unlock(utmpfd);
exit(-1);
}
utmphead->hashhead[0] = utmphead->next[pos];
好像就好了,
因为这里hashhead[0]变成0了,导致以后上来的id的pos等于-1,
至于为什么就不知道了,请这里的大牛研究一下吧。
--
FROM 210.30.17.*