BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / bbs-man-dev / #496同步于 1 周前
BBSMan_Dev机器人发帖

新装的bbs程序,用老数据,没法登录了

diarytea.
1 周前镜像同步23 回复
转信站: BYR!news.happynet.org!news.neu.edu.cn!news.newsmth.org!NEWSMTH 老站的site.h里面,HAVE_USERMONEY未定义,HAVE_WFORUM是0 新站用的最新的CVS代码,拷贝老站的site.h过来后, 在最后一个#endif之前加上OWN_USEREC的定义,以及从老的struct.h中复制过来userec的定义.加的代码附后. 编译安装没问题,没有 make install-home 从旧站拷来数据,放到对应的地方.起bbs,所有用户都显示是不正确的用户帐号. 如果make install-home后再复制旧站数据 那么guest可以登录,看到版面,精华区等都成功转移了. 部分用户包括SYSOP可以输入密码,然后显示系统错误或封禁登录. 部分用户还是不正确的帐号. 老站上和新站上sizeof(struct userec)都是176 问题出在哪呢 #define OWN_USEREC 1 #ifdef HAVE_IPV6_SMTH #define IPLEN 46 /* Length of most string data */ #else #define IPLEN 16 #endif /* old userec structure */ struct userec { /* Structure used to hold information in */ char userid[ IDLEN + 2]; /* PASSFILE */ char flags; /*一些标志,戒网,版面排序之类的*/ unsigned char title; /*用户级别*/ time_t firstlogin; char lasthost[ IPLEN]; unsigned int numlogins; unsigned int numposts; #ifdef CONV_PASS char passwd[ OLDPASSLEN]; char unused_padding[ 2]; #endif char username[ NAMELEN]; unsigned int club_read_rights[ MAXCLUB>>5]; unsigned int club_write_rights[ MAXCLUB>>5]; unsigned char md5passwd[ MD5PASSLEN]; #ifndef OS_64BIT unsigned int userlevel; #endif time_t lastlogin; time_t stay; #ifdef OS_64BIT /* align 8 bytes... */ unsigned int userlevel; #endif int signature; unsigned int userdefine[ 2]; time_t notedate; int noteline; int notemode; time_t exittime; /* 生日数据转移到 userdata 结构中 */ unsigned int usedspace; /* used space of user's mailbox, in bytes */ #ifdef HAVE_USERMONEY int money; int score; char unused[ 20]; #endif };
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
cnbird.机器人#1 · 1 周前
转信站: BYR!news.happynet.org!news.neu.edu.cn!news.newsmth.org!NEWSMTH HAVE_WFORUM是0 新代码里HAVE_WFORUM也是0么?否则就是1,那就不对吧 另外其他一些问题,参考看atppp关于数据结构改变的那篇文摘有没有帮助 【 在 diarytea (相信且只相信一见钟情 日记茶) 的大作中提到: 】 : 老站的site.h里面,HAVE_USERMONEY未定义,HAVE_WFORUM是0 : 新站用的最新的CVS代码,拷贝老站的site.h过来后, : 在最后一个#endif之前加上OWN_USEREC的定义,以及从老的struct.h中复制过来userec的定义.加的代码附后. : ...................
diarytea.机器人#2 · 1 周前
转信站: BYR!news.happynet.org!news.neu.edu.cn!news.newsmth.org!NEWSMTH 新代码里面的site.h也是从旧站考的阿,然后加了最后那些,HAVE_WFORUM当然是0了 置底已经看了 后来能输密码的时候,如果输错,还是会说密码错阿 输对了就说系统错误或封禁登录 说明有些用户的密码还是读出来了 【 在 cnbird (阿七) 的大作中提到: 】 : HAVE_WFORUM是0 新代码里HAVE_WFORUM也是0么?否则就是1,那就不对吧 : 另外其他一些问题,参考看atppp关于数据结构改变的那篇文摘有没有帮助
atppp.机器人#3 · 1 周前
转信站: BYR!news.happynet.org!news.newsmth.org!NEWSMTH 【 在 diarytea (相信且只相信一见钟情 日记茶) 的大作中提到: 】 : 老站的site.h里面,HAVE_USERMONEY未定义,HAVE_WFORUM是0 : 新站用的最新的CVS代码,拷贝老站的site.h过来后, : 在最后一个#endif之前加上OWN_USEREC的定义,以及从老的struct.h中复制过来userec的定义.加的代码附后. : 编译安装没问题,没有 make install-home : 从旧站拷来数据,放到对应的地方.起bbs,所有用户都显示是不正确的用户帐号. 这里你确定起bbs之前共享内存没东西?可以用root执行ipcs来确认。 : 如果make install-home后再复制旧站数据 : 那么guest可以登录,看到版面,精华区等都成功转移了. : 部分用户包括SYSOP可以输入密码,然后显示系统错误或封禁登录. : 部分用户还是不正确的帐号. 还是部分用户正确?正确的帐号有规律么... : 老站上和新站上sizeof(struct userec)都是176 这个是如何确认的? 另是否开了ipv6 另error log是否看过有有用的信息 另...好奇怪啊,我暂时也不知道了 : 问题出在哪呢 : #define OWN_USEREC 1 : #ifdef HAVE_IPV6_SMTH : #define IPLEN 46 /* Length of most string data */ : #else : #define IPLEN 16 : #endif : /* old userec structure */ : struct userec { : /* Structure used to hold information in */ : char userid[ IDLEN + 2]; /* PASSFILE */ : char flags; /*一些标志,戒网,版面排序之类的*/ : unsigned char title; /*用户级别*/ : time_t firstlogin; : char lasthost[ IPLEN]; : unsigned int numlogins; : unsigned int numposts; : #ifdef CONV_PASS : char passwd[ OLDPASSLEN]; : char unused_padding[ 2]; : #endif : char username[ NAMELEN]; : unsigned int club_read_rights[ MAXCLUB>>5]; : unsigned int club_write_rights[ MAXCLUB>>5]; : unsigned char md5passwd[ MD5PASSLEN]; : #ifndef OS_64BIT : unsigned int userlevel; : #endif : time_t lastlogin; : time_t stay; : #ifdef OS_64BIT /* align 8 bytes... */ : unsigned int userlevel; : #endif : int signature; : unsigned int userdefine[ 2]; : time_t notedate; : int noteline; : int notemode; : time_t exittime; : /* 生日数据转移到 userdata 结构中 */ : unsigned int usedspace; /* used space of user's mailbox, in bytes */ : #ifdef HAVE_USERMONEY : int money; : int score; : char unused[ 20]; : #endif : };
diarytea.机器人#4 · 1 周前
转信站: BYR!news.happynet.org!news.newsmth.org!NEWSMTH 【 在 atppp (Big Mouse) 的大作中提到: 】 : 标 题: Re: 新装的bbs程序,用老数据,没法登录了 : 发信站: 水木社区 (Mon Dec 19 18:01:37 2005), 转信 : : : 【 在 diarytea (相信且只相信一见钟情 日记茶) 的大作中提到: 】 : : 老站的site.h里面,HAVE_USERMONEY未定义,HAVE_WFORUM是0 : : 新站用的最新的CVS代码,拷贝老站的site.h过来后, : : 在最后一个#endif之前加上OWN_USEREC的定义,以及从老的struct.h中复制过来userec的定义.加的代码附后. : : 编译安装没问题,没有 make install-home : : 从旧站拷来数据,放到对应的地方.起bbs,所有用户都显示是不正确的用户帐号. : 这里你确定起bbs之前共享内存没东西?可以用root执行ipcs来确认。 起之前执行过 ipcs -m | awk '$0~/bbs/ {system(sprintf("ipcrm shm %s",$2));}' : : 如果make install-home后再复制旧站数据 : : 那么guest可以登录,看到版面,精华区等都成功转移了. : : 部分用户包括SYSOP可以输入密码,然后显示系统错误或封禁登录. : : 部分用户还是不正确的帐号. : 还是部分用户正确?正确的帐号有规律么... 没啥规律.. 但是存在的用户,用guest看他的信息,上站次数,生命力,文章数等等都是错的 会不会是cpu存数据格式不一样的问题 老站是 TI UltraSparc II (BlackBird) 新站是 Intel(R) Celeron(R) CPU 2.66GHz 我不太清楚sparc是什么样的 : : 老站上和新站上sizeof(struct userec)都是176 : 这个是如何确认的? 比如在lazybm.c的main()最开头加个 printf("%d",sizeof(struct userec)); : 另是否开了ipv6 内核有这个...ifconfig也能看到,但是其他没配置过了 : 另error log是否看过有有用的信息 : 另...好奇怪啊,我暂时也不知道了 : : 问题出在哪呢 : : #define OWN_USEREC 1 : : #ifdef HAVE_IPV6_SMTH : : #define IPLEN 46 /* Length of most string data */ : : #else : : #define IPLEN 16 : : #endif : : /* old userec structure */ : : struct userec { : : /* Structure used to hold information in */ : : char userid[ IDLEN + 2]; /* PASSFILE */ : : char flags; /*一些标志,戒网,版面排序之类的*/ : : unsigned char title; /*用户级别*/ : : time_t firstlogin; : : char lasthost[ IPLEN]; : : unsigned int numlogins; : : unsigned int numposts; : : #ifdef CONV_PASS : : char passwd[ OLDPASSLEN]; : : char unused_padding[ 2]; : : #endif : : char username[ NAMELEN]; : : unsigned int club_read_rights[ MAXCLUB>>5]; : : unsigned int club_write_rights[ MAXCLUB>>5]; : : unsigned char md5passwd[ MD5PASSLEN]; : : #ifndef OS_64BIT : : unsigned int userlevel; : : #endif : : time_t lastlogin; : : time_t stay; : : #ifdef OS_64BIT /* align 8 bytes... */ : : unsigned int userlevel; : : #endif : : int signature; : : unsigned int userdefine[ 2]; : : time_t notedate; : : int noteline; : : int notemode; : : time_t exittime; : : /* 生日数据转移到 userdata 结构中 */ : : unsigned int usedspace; /* used space of user's mailbox, in bytes */ : : #ifdef HAVE_USERMONEY : : int money; : : int score; : : char unused[ 20]; : : #endif : : }; : : : -- : ╭︿︿︿╮╭︿︿︿╮╭︿︿︿╮╭︿︿︿╮╭︿︿︿╮ : {/-◎◎-\}{/-◎◎-\}{/-◎◎-\}{/-◎◎-\}{/-◎◎-\} : ( (oo) ) ( (oo) ) ( (oo) ) ( (oo) ) ( (oo) ) : ︶ ︶ ︶ ︶ ︶ : : : ※ 来源:·水木社区 newsmth.net·[FROM: 61.182.213.*]
atppp.机器人#5 · 1 周前
转信站: BYR!news.happynet.org!news.neu.edu.cn!news.newsmth.org!NEWSMTH sparc是big endian 80x86是little endian... 看起来问题就是这了... 【 在 diarytea (相信且只相信一见钟情 日记茶) 的大作中提到: 】 : 起之前执行过 : ipcs -m | awk '$0~/bbs/ {system(sprintf("ipcrm shm %s",$2));}' : 没啥规律.. : ...................
diarytea.机器人#6 · 1 周前
转信站: BYR!news.happynet.org!news.neu.edu.cn!news.newsmth.org!NEWSMTH 我r..... 就是因为cpu所以以前附件不正常,然后换的新机器...考!服了 【 在 atppp (Big Mouse) 的大作中提到: 】 : sparc是big endian : 80x86是little endian... : 看起来问题就是这了... : ...................
flyriver.机器人#7 · 1 周前
转信站: BYR!news.happynet.org!news.neu.edu.cn!news.newsmth.org!NEWSMTH 1.2 版的没有问题。 【 在 diarytea (相信且只相信一见钟情 日记茶) 的大作中提到: 】 : 我r..... : 就是因为cpu所以以前附件不正常,然后换的新机器...考!服了
diarytea.机器人#8 · 1 周前
转信站: BYR!news.happynet.org!news.neu.edu.cn!news.newsmth.org!NEWSMTH 恩,把userec的字节序换了就都能登录了 不过.DIR的数据结构不太清楚,是不是就是fileheader? 另外版面文章的具体结构在哪里定义? 【 在 atppp (Big Mouse) 的大作中提到: 】 : sparc是big endian : 80x86是little endian... : 看起来问题就是这了... : ...................
atppp.机器人#9 · 1 周前
转信站: BYR!news.happynet.org!news.newsmth.org!NEWSMTH 【 在 diarytea (相信且只相信一见钟情 日记茶) 的大作中提到: 】 : 恩,把userec的字节序换了就都能登录了 : 不过.DIR的数据结构不太清楚,是不是就是fileheader? 是 : 另外版面文章的具体结构在哪里定义? 文章就是纯文本的阿... 不过貌似要大小endian转换的话,还有好多磁盘数据文件都要转