Recently in BSD life...我养魔鬼 Category

永远都不要修改root的shell..

| 3 Comments | No TrackBacks

有几个月没有去碰freebsd的东西了,今天想趁空闲给某台机器做个升级。用portupgrade升级时出了些问题,结果bash被卸载了。当我发现这个问题的时候网络连接正好也中断了……于是root被锁在了屋外Innocent

多年前出过类似的错误,没想到这次又是——不知道出于什么原因,这台机器的root默认shell竟然是bash。这样就造成无法su或者直接登录成root。

2种解决办法,一种是如果普通用户可以登录,并且允许su,那么执行"su -m",这样做可以使成为root的时候继续使用当前用户的shell及其他的一系列环境变量。另外一种解决办法是需要能sftp或者ftp方式访问到/bin,将/bin下面的sh或者csh复制到bash对应的目录,直接覆盖即可,让sh或者csh临时"当作"bash以便用户能凑合登录进去。

永远都不要用外带的shell,永远都不要修改root的默认shell……

试用了ZFS

| No Comments | No TrackBacks

今天在一台外挂EMC存储的Sun Solaris 10的机器上测试了ZFS。

在默认情况下Solaris对超过1T容量的磁盘支持似乎有不少问题,如果使用UFS不但需要在newfs的时候增加特别的参数, 而且还有可能需要对i-node分配进行调优。使用ZFS就没有这些麻烦问题了,特别简单的几条命令就搞定了一切。

在网上搜索ZFS资料的时候搜索到了一个blog,感觉内容挺好、ZFS是我使用过的管理起来最简单的文件系统,更多的特性还需要进一步挖掘。

不要在生产机玩火……

| No Comments | No TrackBacks

做了个错误的操作……某个log被误删了……

脑子不清醒的时候可以写代码,但是不要在生产机上玩火……再次提醒自己…… 

poor ru

| No Comments | No TrackBacks

昨天从delphij获知ru@freebsd的妻子最终还是离开了。

虽然从来没有见过ru@,估计他也不会记得曾经和我在邮件中针对技术的讨论,但是我每天都在用着他写的代码和Makefile。

在去年FreeBSD CoreTeam 发起捐助时,我和delphij都向她捐了很少的一点点钱,并且向ru@写信安慰。可惜有些时候医疗并不是能解除一切的病痛的,最终解除痛苦的只有离开。

升级了liukang.com

| 1 Comment | No TrackBacks
很久都没折腾FreeBSD了,用了昨天+今天的两个时间段把liukang.com升级到FreeBSD 6.2了。这次升级是通过手机上的putty完成的。

写信放弃了维护tomcat@freebsd

| No Comments | No TrackBacks

刚才给hq@freebsd.org 要求放弃继续维护tomcat在freebsd上的ports了,并且推荐delphij为新的maintainer。我知道这绝不是一个冲动的决定,我想我该放弃一些东西,以便让自己的精力更为集中。

有些时候主动放弃是一个痛苦的选择。

今天在delphij的blog上看到的消息, ru@freebsd.org的老婆生了重病,急需资助。于是我赠送了delphij 2年的delphij.net域名服务,请他替我给ru@捐赠了20美元。算是义卖了。

唉,有啥别有病,没啥别没钱。希望ru@ 和他的老婆能顺利度过难关。

ru@freebsd.org的求助信节选如下:

Last edited: June 22, 2006

Hi all!

I've got quite serious issues going on in my real life, and therefore I have to ask for your help. My wife Elena is seriously ill and needs a very long and expensive treatment. She will receive treatment in one of the best oncological clinics in Moscow for approximately 6-8 months, maybe longer, and it will cost us several tens of thousands of dollars. We do not yet know if she will survive, but we need to explore any possibility, and will hope for the best. If you wish and have the ability to help financially, please send your donations.

Thanks, and I wish very good health to you and your families. May God bless you!

E-mail me, I'm trying to answer all emails. Feel free to spread this news, keeping the reference to this page.

 全文见http://people.freebsd.org/~ru/help/en/

 

Problem Report ports/99438 : [maintainer] update www/phpbb to 2.0.21

很久都没有给自己维护的Ports写Patch了,今天实在是没什么事情做,于是把几周前就该写patch写了,其实很简单的patch,呵呵

第一次长时间感受MAC OS

| 1 Comment | No TrackBacks
今天第一次长时间感受mac os,感觉界面很好用,但是就是中文输入法不是很好,输入起来不是很舒服。打算长时间使用这个操作系统了。

用C#写的第一个XML程序

| No Comments | No TrackBacks
今天在daiyue和liyinghao的帮助下,不断的按F1看MSDN文档,终于实现用C#读取xml文件,并且存在相应的数据结构里面了。虽然这个程序只是一个特别简单的,而且还有bug,但是能凑合体现出来如何读取了。稍微纪念一下。

m$,呵呵……

| No Comments | No TrackBacks
放一个关于m$的Video,大概是Apple的爱好者收集起来专门为了给微软揭底用的…… Video来自这里

submitter is not maintainer?

| No Comments | No TrackBacks


Class-Changed-From-To: maintainer-update->change-request
Class-Changed-By: edwin
Class-Changed-When: Wed Dec 14 07:54:15 UTC 2005
Class-Changed-Why:
Fix category (submitter is not maintainer)

http://www.freebsd.org/cgi/query-pr.cgi?pr=90380
State-Changed-From-To: open->feedback
State-Changed-By: edwin
State-Changed-When: Wed Dec 14 07:54:24 UTC 2005
State-Changed-Why:
Awaiting maintainers feedback

http://www.freebsd.org/cgi/query-pr.cgi?pr=90380
State-Changed-From-To: feedback->open
State-Changed-By: lawrance
State-Changed-When: Wed Dec 14 08:16:27 UTC 2005
State-Changed-Why:
Submitter is maintainer. Please send from your MAINTAINER
address next time.

Class-Changed-From-To: change-request->maintainer-update
Class-Changed-By: lawrance
Class-Changed-When: Wed Dec 14 08:16:27 UTC 2005
Class-Changed-Why:
Submitter is maintainer. Please send from your MAINTAINER
address next time.



今天由于使用非maintainer的email发送PR,结果被edwin这家伙给当作提交错了……

生成UUID

| No Comments | 1 TrackBack


#include <stdio.h>
#include <uuid.h>

main()
{
uuid_t *uuid;
char *s;
uuid = (uuid_t*)malloc(sizeof(uuid_t));
uuidgen(uuid,1);
uuid_to_string(uuid,&s,NULL);
printf("%s\n",s);
}


一个很简单的生成UUID的例子。

见到了pat@freebsd

| 2 Comments | No TrackBacks

今天晚上和delphij、pat@freebsd去吃了顿毛家菜,然后又带pat@freebsd参观了学校的机房和Frontfree

[maintainer] update www/phpbb to 2.0.16

| No Comments | No TrackBacks

[maintainer] update www/phpbb to 2.0.16
今天phpbb又升级了,感觉这东西的bug无数,每隔一段时间都会来一个升级。

howto query&hide version.bind

| No Comments | No TrackBacks

今天给某服务器的bind做了一些维护,在google搜索了一些资料,得知按照下面的方法可以查询bind的版本号:
执行nslookup,然后执行下面3个命令,

> set q=txt
> set class=chaos
> bind.version

通常会得到的显示会是:
Server: dnsservername
Address: 123.123.123.123
VERSION.BIND text =
"8.4.x-REL"

修改named.conf,在options的大括号范围内加入version "Stupid Penguin"; 然后保存退出。重新启动named进程,再执行上面的步骤就会看到显示出来的会是:
Server: dnsservername
Address: 123.123.123.123
VERSION.BIND text =
"Stupid Penguin"

昨天收到了Kris@ 自动发出的抱怨的信件,jakarta-tomcat4的文件fetch不了了。今天向delphij要了一个account,给tomcat4找了个新家。
ports/79267: [maintainer] Add new MASTER_SITES for www/jakarta-tomcat4

今天早上起床之后发现krion@ commit了一个des@要求修改的变化,结果所有的tomcat都无法正常的安装了。本想起床之后测试一下新的daemonctl的计划被打乱了……好在晚上的时候连续收到des@的两封信件,并且附带了patch..des真是好人啊。。赶紧发PR.
顺便在PR里面纪念了一下smth bbs...
Problem Report ports/79052[maintainer] Fix patching problem in www/jakarta-tomcatX
Environment
FreeBSD for.the.memory.of.smthbbs 5.3-STABLE

今天终于有时间把jakata-tomcat3的ports修正了,似乎已经超过预计修正时间2周多了。PR: ports/75487 [maintainer] let www/jakarta-tomcat3 backup config files during deinstall

继续收拾tomcat的PR:备份配置文件的问题

| No Comments

今天晚上基本解决了PR:ports/43565的遗留问题,提交了一个新的patch,使用这个patch能保证make deinstall的时候保留配置文件,以便符合要求。先放在list里面几天看看,如果大家反应好的话就要求commit进去。

开始整理jakarta-tomcat

| No Comments

遇到的问题主要有3个:
1. manpages的位置
2. bsd.java.mk 2.0的支持
3. 升级到最新

一觉醒来,统治了整个tomcat@freebsd

| No Comments

昨天睡觉前发现znerd不愿意去继续维护他负责的那些ports了,jdk的ports都被指向了java@,其他的一些ports指向了ports@。hq@freebsd在list里面发信大声问谁愿意管那些ports,我赶紧给他写信说我去负责tomcat系列的。早上醒来发现收到hq@freebsd发来的信,jakarta-tomcat系列的ports的maintainer已经都指向我了……

Rootkit Hunter

| No Comments

Rootkit Hunter是一个很好用的检查*nix系统是否安全的小工具。昨天用这个检查出了gkp机器上被人中的rootkit :D

见到了murray@freebsd

| No Comments

murray是freebsd core成员之一。今天有幸见到了他,和他一起在华龙路的毛家菜吃了晚饭,又绕着紫禁城走了半圈。中间聊了一些很简单的技术问题,以及其他的一些事情。

Welcome Xin LI (delphij at frontfree.net) to the club

| No Comments

delphij成为了freebsd commiter,值得庆祝的一天:)

jakarta-tomcat5已经out of fetch好几天了,竟然没有人提PR...sigh..
只好自己动手了……
PR: ports/69617 [maintainer] update www/jakarta-tomcat5 to 5.0.27

今天在调php的时候遇到了一个问题,程序总是显示"session_start(): Failed to initialize storage module..."。根据PHP Bug #25876的建议,将session.save_handler修改为files后解决了问题。

vim@vs2003

| No Comments

vim@vs2003
今天给自己的机器上安装了一个vim for windows,因为前几天好多次在命令行界面上敲vi,发现windows竟然没有类似的命令…… 于是赶紧找了一个vim for win...在vs2003的command prompt下运行vim,有种想笑的邪恶感觉,嘿嘿……

Problem Report ports/67623 [maintainer] update www/jakarta-tomcat5 to 5.0.25

有个鬼子比较积极的提了jakarta-tomcat5升级的PR,不过他提的有一些问题,没有修改pkg-plist。我只好重新写一个patch,顺便把我的邮件地址修改成@bjut的了……

有人带了一顶尖帽子

| No Comments

今天晚上忽然收到了一封pav@的commit mail: cvs commit: ports/www/phpbb Makefile ports/www/phpbb/files patch-common.php patch-includes-sessions.php
吓了我一跳,没有approve就给commit上去了……
赶紧回信,表示对这个commit感到很吃惊,pav回信说这个patch看起来没问题。看来他是把我和delphij给弄混了……于是我写信说应该先经过approve再commit,delphij也给他写了一封信说他不是maintainer。几分钟之后,phpbb迎来了一次force commit。其中log里面写着:
For confusing submitter with maintainer:
Pointy hat to: pav
嘿嘿……
phpbb.Makefile.Revision++

potential vulnerability in phpbb

| No Comments

今天收到了一封信,关于一个刚刚在bugtraq上揭露的phpbb的安全漏洞。无意中看到了FreeBSD新成立了一个邮件列表叫做freebsd-vuxml。给我发信的那个家伙竟然是第3个在那里列表里发文章的人,我给他的回复是第4篇文章……

[patch]update devel/maven to 1.0-rc2

| No Comments

今天提了一个黄东兄上次在FreeBSD聚会上讲的maven的patch
Problem Report ports/65703 [patch]update devel/maven to 1.0-rc2
心情不太好的时候,不做些技术就会感觉浑身不舒服,呵呵……老毛病还没改啊

SUN和微软联合?

| No Comments

CSDN_Dev_Image_2004-4-62023180.jpg
From CSDN,点击图片察看大图

David 讲解 AMD64

| No Comments

David talks about AMD64

David debug frontfree

| No Comments

David debug Frontfree
David O'Brien 在调试放飞网的新服务器。delphij@frontfree在使用FreeBSD5-Current的时候遇到了一个奇怪的问题。

with David O'Brien

| 2 Comments

SANY0091.JPG
今天见到了大名鼎鼎的obrien@freebsd,他接受了我们的邀请来北工大的网络中心作了一些关于AMD64CPU的讲解,并且解答了一些我们提出的关于FreeBSD ports和其他相关的问题。能见到这样的牛人感觉真好:D

今天决定使用正式的apache mirror sites来为jakarta-tomcat5提供distfile了。这主要是看到java/jakarta-log4j使用了这个macro。
Problem Report ports/65158 [maintainer] use MASTER_SITE_APACHE_JAKARTA as MASTER_SITES in www/jakarta-tomcat5

偶然间发现znerd似乎写错了一个一个Makefile,于是我没有费任何力气就根据这个错误写了一个PR,嘿嘿
[patch] possible wrong LATEST_LINK in java/linux-blackdown-jdk14

bsd.java.mk 2.0被导入ports tree了,我看了看,改动不大,赶紧先把jakarta-tomcat5给更新了吧。由于这次的更新实在是太小了,我觉得都不用bump PORTREVISION.
Problem Report ports/65118 [maintainer] A small change in www/jakarta-tomcat5 for bsd.java.mk 2.0 compatible

got a mail from obrien@freebsd

| No Comments

obrien@freebsd 来北京了,我和delphij还有另外的一个人准备在下周周末举办一个小规模的聚会。就要面对真正的FreeBSD开发者了,希望能通过他看到更多的外边对FreeBSD的开发情况。
obrien的个人页面@FreeBSD

[maintainer] update www/phpbb to 2.0.8a

| No Comments

昨天比较忙,一直没写升级phpbb的PR,今天有时间了,凑合写了一个。
Problem Report ports/64939 [maintainer] update www/phpbb to 2.0.8a
由于上一次的补丁已经修复安全漏洞了,所以这次我这样设置的:
Severity
non-critical
Priority
low
不用着急,等有时间再fix就行了……

今天有个家伙在bugtraq上说phpbb2.0.8出了sql注入问题,我测试了一下确实有。于是赶紧写PRpenguin walks away...
Problem Report ports/64803 [maintainer][SECURITY]Fix another SQL injection in www/phpbb

在我上一个关于phpbb的PR被接受几个小时之后,phpbb被marked as forbidden了,原因是出了新的2.0.8,修正了数个安全问题……
Problem Report ports/64770 [maintainer]SECURITY FIX,update www/phpbb to 2.0.8

update phpbb to 2.0.7a

| No Comments

似乎phpbb每周不出一些漏洞都对不起使用它的用户的感情……这次又来了一个潜在的SQL注入问题。昨天我发了一个针对该漏洞的问题报告,刚才发现已经被接受了。
Problem Report ports/64679 [maintainer]update www/phpbb to 2.0.7a to fix SQL injection

20 mins late II

| No Comments

对方的来信如下:

发件人: Matthew Seaman
收件人: Kang Liu
抄送:
邮件主题: Re: ports/64570: [patch]update databases/phpmyadmin to 2.5.6
发件日期: Mon, 22 Mar 2004 12:56:39 +0000

来信内容:


On Mon, Mar 22, 2004 at 04:38:23AM -0800, Kang Liu wrote:
>
> >Number: 64570
> >Category: ports
> >Synopsis: [patch]update databases/phpmyadmin to 2.5.6
> >Confidential: no
> >Severity: serious
> >Priority: medium
> >Responsible: freebsd-ports-bugs
> >State: open

Snap! as in PR ports/64568. Great minds think alike, and all that.

We should probably decide between ourselves which of us should take on
the maintainership.

Cheers,

Matthew

--
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK


20mins late...

| No Comments

今天写了一个关于phpMyadmin的PR:
Problem Report ports/64570: [patch]update databases/phpmyadmin to 2.5.6
在提交PR后,我马上收到了一封来自英国的信件,对方说他刚刚提交了相应的问题报告:
Problem Report ports/64568: [SECURITY] databases/phpmyadmin -- update to 2.5.6
我比他晚了20分钟。。。
或许开始的时间是一样的,我只是为了确保patch没有问题,多用了20分钟进行检查。这是否在预示着什么呢……

update phpbb to 2.0.7

Thanks god
phpbb的这帮家伙终于rls新的版本了……
不过还是为了修复安全漏洞才rls的
PR: ports/64239: [maintainer]update www/phpbb to 2.0.7
使用phpbb的兄弟们赶紧修复吧。

duplicate LATEST_LINK in www/jakarta-tomcat5

| No Comments

前几天znerd@freebsd对我负责的www/jakarta-tomat做了一个没有必要的commit,我已经在Makefile(revision1.12)上设置了LATEST_LINK了,但是znerd一激动又给设置了一个……/lh
前几天给znerd写信询问,但是那家伙竟然没有回复我的信件。看来私了是不可能了,还是PR吧/db
PR: ports/64134: duplicate LATEST_LINK in www/jakarta-tomcat5

补充: 这篇blog还没写完就发现已经被commit了。。。10分钟零5秒的时间就被接受了。发抖的企鹅

pr, phpbb又偷偷摸摸的升级了

| 1 Comment

前几天在bugtraq里面又公布了一个phpbb的安全漏洞,昨天发现phpbb偷偷摸摸的出了一个2.0.6d版。这帮开发人员竟然又一次不更换版本号,直接就更换打包好的文件。唉,这种开发素质竟然还能拿到sourceforge大奖……
今天提交了一个PR,[maintainer]update www/phpbb to 2.0.6d to fix security related issue。这个世界上估计也就phpbb能和m$的操作系统出现漏洞的频率相比较了,sigh...

2 pr about LATEST_LINK

| 1 Comment

Today, I received a mail from Kris Kennaway, he gave me a list ports of that have duplicate LATEST_LINK values. In that list, jakarta-tomcat3,4,41,5 has the same LATEST_LINK.
Here is the patches I wrote: ports/63209 & ports/63210.

[maintainer]update jakarta-tomcat5 to 5.0.19

| No Comments

今天看到jakarta-tomcat5出5.0.19了,连changelog都没有仔细看就先写了一个升级的Problem Report ports/63062。这次我认为一个比较大的动作就是在distinfo里面加入了SIZE这个参数,即使下载没有完全也能检查distfile是否完整。这个选项真的不错,希望能早日commit :)

My new pgp key

| No Comments

As Jan Schaumann [jschauma@netbsd.org] required in mirror-maintainers@netbsd.org , I must use pgp signed email when contact with mirrors@netbsd.org. Unfortunately, I forget the passpharse of my old pgpkey, so I have to create a new one.
Here is my public key.

update jakarta-tomcat5 to 5.0.18

| No Comments

1月22日提交的PR今天被commit了,简单记录一下:
Problem Report ports/61767 [maintainer]update jakarta-tomcat5 to 5.0.18

这两天总有人在水木清华BBS上写信问我tomcat5的问题,很奇怪,默认的安装也不能用,我怀疑他的jdk好像有问题,推荐他用native的1.3,希望能解决问题。

荷兰校友的作业-3

| No Comments

Study the tar and the gzip commands. These connamds are the UNIX (Linux) version of pkzip or arj in Dos.
Write a script which backups you're home directory into one compressed file in a subdirectory called backup of you're home directory.
If you like you can study at and/or cron(tab) to schedule a daily or weekly backup of you're home directory in one file.

荷兰校友的作业-2

| No Comments

a) Write a script IsFilePresent which expects one parameter.
When a file is present in the current directory its output is:"File is present." Else it's output is: File is nto present.
Make sure the script gives a useful error if one or two or more parameters are given.
b) change the script from 4.a) so it will accept any number of parameters. (Hint: find information on the shift command).
c) Make the script of assignemnt4 b) interactively. So it will ask for a file name, state the presents of that file and ask if you want to type another filename or not.
If yes it asks for a new file name. Quit when "stop" is given as filename.

荷兰校友的作业-1

| No Comments

1.Write a script which displeays the amount of times you are logged in to the system (it's possible to logon more than once).
My answer is:
#!/usr/local/sbin/bash
echo You have logged in `/usr/bin/last |grep $USER |wc -l` times.

十分简单的题目,一开始没有想明白,本来想自己实现计数器,结果忽然想起来last这个命令已经提供了记录了,对数据整形一下就能直接用。

假设有一个很多行的文件,忽然发现某个带有特殊标记的偶数行和他的下面的一行是完全一样的。这种事情在一个代码里通常是不被允许出现的。
提问:现在要用某种手段删除这个偶数行,但是要保持某特殊标记在所有偶数行中出现的次数和以前一样,如何实现?:)

这是今天在看FreeBSDrouted的代码的时候发现的问题,已经提交了一个关于这个问题的报告给FreeBSD开发组织。

FreeBSD reverse proxy down...

| No Comments

今天想用freebsdcvsweb找一些东西,结果发现cvsweb不能用了……
于是赶紧写PR说有问题,好在有关的管理人员及时得知消息了,似乎是squid的日志满了,清除了日志之后就能继续工作了。不管怎么样,先丢出去一个PR再说,这大约就是提PR上瘾的最大症状了……

名气大了就是有人会仿冒

| No Comments

今天在www.freshports.org上面无意中看到了一篇文章,说有人假冒freshports.org要求捐助。具体信息看这里
什么东西都怕出名,这年头假冒名人行骗的事情好像全世界各地都在发生。据说仿冒的那个网站以前是色情网站,后来开始直接打着freshports的旗号四处骗钱。from sweden with love ,这是Martin Gumucio在讨论中给出的标题,哈哈。

I'm the maintainer of...

| 1 Comment

去年比较走运,由于给phpbb提交了几个PR,于是混上了他的maintainer,具体记录看这里
后来又发现jakarta-tomcat5竟然没有port进来,于是几乎照搬了tomcat4的port就给tomcat5弄进来了

ClustrMaps

Archives

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.25
Creative Commons License
This blog is licensed under a Creative Commons License.

August 2009

Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          

About this Entry

This page contains a single entry by Kang published on February 24, 2004 10:52 PM.

被感染…… was the previous entry in this blog.

不再信任m$ is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Google ADs