setuid vs seteuid函数 [英] setuid vs seteuid function

查看:93
本文介绍了setuid vs seteuid函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

setuid和seteuid函数之间有什么区别.在手册页中,两个功能都有相似的描述.

What is the difference between setuid and seteuid function. In man page both of the function have similar description.

setuid:

DESCRIPTION

   setuid()  sets  the  effective user ID of the calling process.  If the effective UID of the caller is root, the real UID and saved
   set-user-ID are also set.

seteuid:

DESCRIPTION

   seteuid()  sets  the  effective user ID of the calling process.  Unprivileged user processes may only set the effective user ID to
   the real user ID, the effective user ID or the saved set-user-ID.

在两个描述中均包含sets the effective user ID of the calling process.那么之间有什么区别 这两个以及这些功能之间的功能差异.

In both of the description contains sets the effective user ID of the calling process. So what is the difference between these two and how the functionality differs between these functions.

还有一个疑问是,仅使用chmod(chmod u + s) 可以设置文件的设置用户ID权限.然后,仅在程序运行时,该进程才具有设置权限的权限 用户身份.除了这些功能之外,这些功能如何设置有效的用户标识.

And One more doubt is, using chmod(chmod u+s ) only we can set the set user id permission to the file. Then only during runtime of the program, the process have permission who is set to set user id. Apart from these how these functions set the effective userid to the process.

推荐答案

来自 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆