|
发表于 2006-5-28 12:44:27
|
显示全部楼层
If the shell is started with the effective user (group) id not equal to the real user (group) id, and the -p option is not supplied, no startup files are read, shell functions are not inherited from the environment, the SHELLOPTS variable, if it appears in the environment, is ignored, and the effective user id is set to the real user id. If the -p option is supplied at invocation, the startup behavior is the same, but the effective user id is not reset.
从bash manual里面摘下来的,很明显的,如果bash发现EUID和UID不一样,而且没有-p参数,就会把EUID设为UID了,如果有-p参数就保持EUID不变。多谢各位的讨论,本来还不太了解这个-p有什么用呢。不过个人感觉这样挺危险的,而且bash将不再读取任何启动文件,有些配置就没有,好像没什么意义。 |
|