Differences between current version and previous revision of SetUid.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 5 | Last edited on Monday, May 15, 2006 12:55:10 pm | by CraigBox | |
Older page: | version 4 | Last edited on Monday, October 25, 2004 2:04:11 pm | by AristotlePagaltzis | Revert |
@@ -1,17 +1 @@
-''InNeedOfRefactor: should be
[SUID] instead; same applies for the other pages in this group''
-
-
SetUid is when a program has the <tt>u+s</tt> permission bit set. This means that the program runs with the EffectiveUid of the person that owns the file, not the person that runs the program. For instance a SetUid program owned by <tt>root</tt> would run as <tt>root</tt> instead of a normal user when executed.
-
-To run a progam completely as a new user, it needs to be SetUid to that user, and you need to execute
-
-<verbatim>
-setregid( getegid(), getegid() );
-setreuid( geteuid(), getegid() );
-</verbatim>
-
-Many progams need this, as they will drop any [EUID
] permissions on startup
. You can do so using:
-
-<verbatim>
-setregid( getgid(), getgid() );
-setreuid( getuid(), getuid() );
-</verbatim>
+Describe
[SetUid] here
.