-
Sep02
-
修改 /etc/ssh/ssh_config,设置 GSSAPIAuthentication no
修改 /etc/ssh/sshd_config,设置 UseDNS no
重启sshd
-
No Comments » GSSAPI ssh 连接慢
-
Sep01
Linux高危root提权漏洞[09年9月1日]
Posted in Linux, 441 views
-
注:本文转载自http://baoz.net/linux-localroot-no-patch-again/
Linux内核漏洞最近几乎是一月一爆,在8月15号才爆了一个几乎通杀所有版本所有内核所有架构的内核漏洞;今天在学生返校的大喜日子里,竟然又爆了一个,通杀内核2.6 < 2.6.19的所有32位Linux,算是google security team给祖国学生的礼物吧。
就现在的情况看,RedHat暂时还没发布官方补丁,貌似也没有什么临时修复方案,系统管理员唯一能做的就是等待再等待。
我想Linux内核的开发团队需要考虑引入微软的SDL安全开发生命周期以增强Linux内核的安全性,否则用户用着真是提心吊胆。
下面展示一下这个漏洞的威力:
别说我是标题党,的确是一个命令就可以获得root权限吧,在32位的RHEL4里基本上是百发百中,永不落空。
包子将密切关注RedHat、Debian、Ubuntu、Gentoo等主流发行版针对此漏洞的动向,出于对用户的保护,如果您需要了解和跟踪漏洞的细节,漏洞的重现方式和重现经验,敬请关注 http://baoz.net/linux-localroot-no-patch-again/ 以获取最新资讯
-
No Comments » linux root 提权 漏洞 高危
-
Jul27
-
如果本站相册中的照片无法显示,可以通过修改hosts文件来恢复正常
在C:\WINDOWS\system32\drivers\etc目录中,找到hosts文件,用记事本打开,添加以下内容,保存,最后刷新页面
203.208.33.100 lh1.ggpht.com
203.208.33.100 lh2.ggpht.com
203.208.33.100 lh3.ggpht.com
203.208.33.100 lh4.ggpht.com
203.208.33.100 lh5.ggpht.com
203.208.33.100 lh6.ggpht.com
203.208.33.100 lh7.ggpht.com
203.208.33.100 lh8.ggpht.com -
1 Comment »
-
Jul24
-
好玩的TD游戏
在Flash上右键-播放开始游戏 -
No Comments » flash game td vector-td
-
Jul22
oralce10g shrink
Posted in Database, 516 views
-
1、在10G 以前收缩表空间是用:
1.exp/imp
2.alter table xxx move2、10G后用shrink收缩表空间
表空间中支持自动段空间管理 (ASSM), 否则会报 ORA-10635: Invalid segment or tablespace type
Shrink操作适用于
表(堆组织表或索引组织表)
分区
子分区
索引
大对象(数据或索引段)
物化视图
物化视图日志堆组织段(heap-organized segments)必须开启行迁移功能:
alter table tbname enable row movement shrink保持HWM
alter table tbname shrink space compact;回缩表与HWM
alter table tbname shrink space;回缩表与相关索引
alter table tbname shrink space cascade;回缩索引
alter index idxname shrink space;
相关限制:
1)cluster中的表。
2)有long字段的表。
3)有on_commit物化视图的表。
4)有基于rowid物化视图的表。
5)IOT映射表。
6)有基于函数索引的表 -
No Comments » 10g oracle shrink
-
Jul02
undo相关的sql
Posted in Database, 460 views
-
查UNDO统计信息语句:
SELECT TO_CHAR(BEGIN_TIME,'HH24:MI:SS') BEGIN_TIME,
TO_CHAR(END_TIME,'HH24:MI:SS') END_TIME,
UNDOBLKS
FROM V$UNDOSTAT;
-------------------------------------------结果--------------------------------------------------------------
begin_time end_time undoblocks
9:48:30 9:53:07 76293
9:38:30 9:48:30 143670
9:28:30 9:38:30 130921
9:18:30 9:28:30 122500
9:08:30 9:18:30 149030
8:58:30 9:08:30 144586
8:48:30 8:58:30 108095
8:38:30 8:48:30 63533
8:28:30 8:38:30 72819
8:18:30 8:28:30 23321
8:08:30 8:18:30 2026
7:58:30 8:08:30 15480
7:48:30 7:58:30 91111
7:38:30 7:48:30 15810
7:28:30 7:38:30 56922
7:18:30 7:28:30 30449
7:08:30 7:18:30 6096
6:58:30 7:08:30 15022
6:48:30 6:58:30 91904
6:38:30 6:48:30 38794
6:28:30 6:38:30 111884
----------------------------------------------------------------------------------------------------------
查UNDO表空间的使用情况:
select
a.a1 表空间名,
substr(b.b2/1024/1024/1024,1,5) 表空间大小G,
substr(a.a2/1024/1024/1024,1,5) 剩余表空间G,
substr((b.b2-a.a2)/1024/1024/1024,1,5) 实际使用表空间G,
substr((b.b2-a.a2)/b.b2*100,1,5) 利用率,
c.c2 类型,
c.c3 区管理方式
from
(select tablespace_name a1,sum(Nvl(bytes,0)) a2 from dba_free_space group by tablespace_name) a,
(select tablespace_name b1,sum(bytes) b2 from dba_data_files group by tablespace_name) b,
(select tablespace_name c1,contents c2,extent_management c3 from dba_tablespaces) c
where a.a1=b.b1 and b.b1=c.c1
order by c.c2 desc
-------------------------------------------------结果--------------------------------------------------------------------
表空间名 表空间大小(G) 剩余(G) 使用 利用率 表空间类型 管理方式
UNDOTBS1 17.24 1.124 16.12 93.48 UNDO LOCAL
----------------------------------------------------------------------------------------------------------------------------
建议UNDO峰值:
select ur undo_retention,dbs db_block_size, ((ur * (ups * dbs)) + (dbs * 24)) / 1024 / 1024 as "M_bytes"
from (select value as ur from v$parameter where name = 'undo_retention'),
(select (undoblks / ((end_time - begin_time) * 86400)) ups from v$undostat where undoblks in (select max(undoblks) from v$undostat ) ),
(select value as dbs from v$parameter where name = 'db_block_size');
----------------------------------------------结果------------------------------------------------------------------
undo_retention db_block_size M_bytes
10800 8192 33,376.96875 -
No Comments » oracle SQL undo
-
Jul02
用插件解决wordpress引号问题
Posted in Program, 488 views
-
Wordpress默认会将英文标点转换为中文全角标点,单纯写文字的话这是个不错的功能,但是如果文章中包含各种代码,尤其是单双引号,就惨不忍睹了……
Quotmarks Replacer 是一个通过禁用 wptexturize 函数,解决 WordPress 自动将半角的单引号、双引号和省略号转换为全角标点的问题。使后台输入的标点格式与前台读者浏览的标点格式保持一致的插件。
这里下载:http://wordpress.org/extend/plugins/quotmarks-replacer/
-
1 Comment » quotmarks-replacer wordpress 引号
-
Jul02
compatible参数
Posted in Database, 398 views
-
用rman复制数据库时,遇到ORA-01130错误,如下:
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: Duplicate Db 命令 (在 07/02/2009 00:40:44 上) 失败
RMAN-06136: 来自辅助数据库的 ORACLE 错误: ORA-01503: CREATE CONTROLFILE 失败
ORA-01130: 数据库文件版本 10.2.0.1.0 与 ORACLE 版本 10.2.0.0.0 不兼容
ORA-01110: 数据文件 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\AUXILIARY\SYSTEM01.DBF'这是因为auxiliary库的compatible参数被设定为默认值10.2.0:
SQL> alter system set compatible='10.2.0.1.0' scope=spfile;
系统已更改。然后重启数据库即可。
-
No Comments » compatible duplicate ora-01130 oracle
-
Jul02
windows平台上的LRM-00116
Posted in Database, 627 views
-
建auxiliary数据库时,照《Creating and Updating Duplicate Databases with RMAN》中的例子建立init.ora。
示例文件:
DB_NAME=newdb
CONTROL_FILES=(/dup/oracle/oradata/trgt/control01.ctl,
/dup/oracle/oradata/trgt/control02.ctl)
# note that the following two initialization parameters have equivalents
# on the DUPLICATE command itself
DB_FILE_NAME_CONVERT=(/oracle/oradata/trgt/,/dup/oracle/oradata/trgt/)
LOG_FILE_NAME_CONVERT=(/oracle/oradata/trgt/redo,/dup/oracle/oradata/trgt/redo)改为Windows平台适用:
DB_NAME=auxi
CONTROL_FILES=(D:\oracle\product\10.2.0\oradata\auxiliary\control01.ctl,
D:\oracle\product\10.2.0\oradata\auxiliary\control02.ctl)
# note that the following two initialization parameters have equivalents
# on the DUPLICATE command itself
DB_FILE_NAME_CONVERT=(D:\oracle\product\10.2.0\oradata\test\,D:\oracle\product\10.2.0\oradata\auxiliary\)
LOG_FILE_NAME_CONVERT=(D:\oracle\product\10.2.0\oradata\test\,D:\oracle\product\10.2.0\oradata\auxiliary\)SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 7月 1 23:23:04 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
已连接到空闲例程。
SQL> create spfile from pfile;
create spfile from pfile
*
第 1 行出现错误:
ORA-01078: failure in processing system parameters
LRM-00116: syntax error at 'LOG_FILE_NAME_CO' following 'D:\oracle\produc'修正init.ora中表达式,给路径加上双引号:
DB_FILE_NAME_CONVERT=("D:\oracle\product\10.2.0\oradata\test\","D:\oracle\product\10.2.0\oradata\auxiliary\")
LOG_FILE_NAME_CONVERT=("D:\oracle\product\10.2.0\oradata\test\","D:\oracle\product\10.2.0\oradata\auxiliary\")SQL> create spfile from pfile;
文件已创建。
-
No Comments » LRM-00116 oracle pfile spfile
-
Jun29
Palm Mojo SDK keyboard & mouse controls
Posted in Program, 2,873 views
-
Palm Pre 采用的web OS系统的SDK(Mojo)已经发布,其中包含有web OS模拟器。Palm Pre的操作有多种形式,本文列出SDK中用键盘和鼠标操作模拟器的方法。
Mojo SDK keyboard & mouse controls
--------------------------------------------------------------------------------
Here's my Q&D notes on emulator. Thanks to others for some info.
--Keyboard
Escape is Back Gesture,
Home is Center Button,
End is the Flick Up Gesture (like to bring up card view or the launcher),
Left/Right arrows switch applications,
Shift is Shift (duh!),
Alt is Option (orange),
Left Ctrl+letter does Sym for that letter,
and of course there's the keyboard too.--Mouse
Left Mouse click is "touching screen".
Left Mouse drag is "dragging on screen". Useful in card view to "swipe up" (close),and drag left right (card view, launcher, etc.).
Left Mouse click and hold will select card in card view for shuffling cards, or changing out Quick Launch applications.
Double left mouse click, is zoom in/out on selected paragraph in browser. Not same as two finger zoom?
To bring up the Quick Launch "wave", drag up from the bottom of the screen. Note that this is hard to get to work, as one has to start in the exact bottom row of pixels.--Emulator
The "Host" key defaults to Right Ctrl, used for accessing emulator menus. Following is a short list:
Tap and release Host key to return keyboard capture to PC (i.e. done using emulator). Note if using "Activation follows mouse (X-Mouse)", this is not required (see "Tweak UI", MS Power Toy, for info).
Host+F Full screen toggle
Host+N Session information dialog
Host+S Take a snapshot (from emulator)
Host+Q Close emulator--Helper Batch Files, in "C:\Program Files\Palm\SDK\bin" (I've not tried, YMMV):
palm-emulator.bat - Starts emulator.
palm-generate.bat - Create Application template. Will create directory if it doesn't exist.
palm-inspector.bat - Runs Palm inspector. Appears to be the debugger interface.
palm-install.bat - Installs App on USB connected Prē (usb), or emulator (tcp).
palm-launch.bat - Launch App on USB connected Prē (usb), or emulator (tcp). With debugging options.
palm-package.bat - Package App into ipk format.
Open up "DOS" command shell to use. Installing SDK adds bin directory to your path.Run batch file with no arguments to get usage.
--Mojo API
TBD
See sample code in "C:\Program Files\Palm\SDK\share\samples" for now. -
2 Comments » emulator keyboard mojo mouse palm pre sdk


Comments