2007年8月31日
修正 libgmail 报HTTP Error 400: Bad Request 的 BUG
这几天发现不能用了,总是报 HTTP Error 400: Bad Request
上网搜了一下,是因为 gmail 把 URL 改了,(越来越不厚道了)
来源:http://www.thescripts.com/forum/thread696534.html
修改 libgmail v0.1.5.1
第 317 行
try:
link = re.search(RE_PAGE_REDIRECT, pageData).group(1)
redirectURL = urllib.unquote(link)
增加一行,变成:
try:
link = re.search(RE_PAGE_REDIRECT, pageData).group(1)
redirectURL = urllib.unquote(link)
redirectURL = redirectURL.replace('\\x26','&')
---
2007年6月19日
修改了 curlftpfs 在挂载 AIX 和 HP-UX 时的问题
可以参见我在 ubuntu bug 提交的出错报告 [ 我的QQ是274980,不过很少在线 ]
现在发现的不兼容情况如下:
1、在AIX上,早于6个月的数据会显示年份而不显示分秒。这种情况本来
是在程序的考虑范围之内的,但是不知道为什么程序少去掉了一个空格,
导致部分文件名比实际文件名前多了一个空格,自然访问报错。
I'v reported that curlftpfs 0.9 + libcurl 7.15.5 works unnormal with aix ftpserver,
( https:/
so,i updated curlftpfs to 0.9.1 and update libcurl to 7.16.2,things goes even badder.
with curlftpfs 0.9.1 + 7.16.2 ( mount remote aix ftp direcotry to local linux system ):
files and directories older than six month are displayed error with a space before it.
I had to modify ftpfs-ls.c ,
line 61:
/* "%5s" "%*c" year */
line 73:
/* "%5s" "%*c" year */
thing goes well, i can list direcotries and vi files now .
NOTICE!! havn't test under other ftpservers !!
files lists by aix ftpserver is:
-rw-r--r-- 1 smisdep tsgrp 502 Nov 16 2006 card_type
-rw-r--r-- 1 smisdep tsgrp 3853069 Nov 22 2006 info.txt
-rw-r--r-- 1 smisdep tsgrp 7827 Nov 22 2006 inst.txt
-rw-r--r-- 1 smisdep tsgrp 12590 Dec 01 2006 m_bmw_data_
-rw-r--r-- 1 smisdep tsgrp 15054 Dec 01 2006 m_bmw_data_
-rw-r--r-- 1 smisdep tsgrp 201344 Dec 11 2006 888
-rw-r--r-- 1 smisdep tsgrp 81308 Dec 21 10:23 111.txt
-rw-r--r-- 1 smisdep tsgrp 4533 Dec 21 10:26 create_
-rw-rw-rw- 1 smisdep tsgrp 1528 Dec 25 15:31 makeGroup.log
-rw-r----- 1 smisdep tsgrp 12753 Dec 25 16:37 makegroup.sql
-rw-r--r-- 1 smisdep tsgrp 128 Dec 28 10:44 wlq.sql
files modifed at 2006 have double space before it's name ,and those modifed at 2007
have only one space before it's name.
2、第二种情况还没有汇报(因为这是中文Locale的问题,不知道是否有通用性)
在HP-UX 下面设置FTP服务器显示中文日期后,格式如下:
有多种情况,而且空格的出现也不是非常有规律,为了方便说明,我把 年月日用??
代替,大家应该看得明白
drwx------ 2 pcrm pcrm 8192 6??18?? 09:17 bin
drwxrwxrwx 1 pcrm pcrm 18 2006??6?? 8?? data
drwx------ 2 pcrm pcrm 8192 6?? 7?? 16:12 etc
drwx------ 3 pcrm pcrm 8192 6??18?? 09:17 include
drwx------ 6 pcrm pcrm 8192 3??19?? 10:38 init
drwx------ 3 pcrm pcrm 32768 6??18?? 23:04 log
drwx------ 11 pcrm pcrm 8192 6?? 8?? 16:21 public
-rw-r--r-- 1 pcrm pcrm 22266 5??23?? 11:02 t_mng_reportinfo.txt
-rw-r--r-- 1 pcrm pcrm 15977 6?? 7?? 15:48 t_prod_info.txt
-rw-rw-rw- 1 pcrm pcrm 19070 6??15?? 17:54 time20070531.txt
drwx------ 4 pcrm pcrm 8192 6??18?? 08:48 tmp
------------------------------------------------------------------------------
花了两天时间把 curlftpfs的 ftpfs-ls.c 文件进行了修改(版本是curlftpfs-0.9.1)
增加函数 parse_dir_hpux_zhcn
test code here, ( base on curlftpfs0.9.1 -- ftpfs-ls.c )
支持 AIX 下
-rw-r--r-- 1 smisdep tsgrp 502 Nov 16 2006 card_type
支持 HP-UX 下
drwxrwxrwx 1 pcrm pcrm 18 2006年6月 8日 data
------------------------------------------------------------------------------
2007年6月17日
Linux下使用 sshfs 挂载 HP-UX 时遇到的巨大BUG
我在用sshfs挂载HP-UX时出现了下面的情况,大家分析一下:
本地系统是 OpenSUSE 10.2,具体的sshfs和fuse版本不记得了(未升过级)
远端是 HP-UX B.11.11 U 9000/800
sshfs 挂载 deva@hp-ux 到 biff@linux下
远程主机名hp-ux,用户 deva 的 uid=1234,gid=105
本地是linux系统,用户 biff 的 uid=1000,gid=100
fstab内容如下:
sshfs#deva@hp_ux_server:/ /mnt/src fuse
user,noauto,umask=007,uid=1000,gid=100 0 0
(留意下面 test 文件UID及GID的变化)
操作过程大至如下:
第一步
local:/mnt/src$ touch test ( 产生一个 test 文件 )
因为 /mnt/src 是挂载的 hp-ux 的目录,在 hp-ux 的 /dev/src 下会产生一个 test 文件
本地 ls -l 查看,test 文件是属于 linux 的 biff 用户,uid=1000,gid=100
远程 ls -l 查看,test 文件是属于 hp-ux 的 deva 用户,udi=1234,gid=105 (正常)
第二步
local:/mnt/src$ gzip -9 test ( 应该产生一个 test.gz 文件 )
本地 ls -l 查看,test.gz 文件是属于 linux 的 biff 用户,uid=1000,gid=100
远程 ls -l 查看,test.gz 文件是属于 hp-ux 的 1000 用户,uid=1000,gid=100 (出错了)
通过这两步操作,我们会在HP-UX系统上产生一个别人用户的文件(文件的UID != deva用户的UID)
telnet hp-ux ,用户名 deva
rm /dev/src/test.gz 提示没有权限访问
产个一两个异常文件还可以在本端用rm干掉,最要命的是不知什么时候产生了一个bak目录,
这个bak目录在HP-UX主机上用户名、用户组分别是 100/1000,
不论本地还是telnet到远端都不能进入,也不能删除,但是可以改名(因为所在目录的写权限是正常的)
HP-UX竟然轻易的让 deva 用户产生了一个非 deva 用户的文件,我认为这是HP UNIX系统的BUG