Differences between version 5 and predecessor to the previous major change of SetUid.
Other diffs: Previous 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 | Revert |
Older page: | version 1 | Last edited on Monday, May 5, 2003 12:26:28 pm | by PerryLorier | Revert |
@@ -1,10 +1 @@
-SetUid is when a program has the u+s 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 program owned by the user "root" and has the u+s (SetUid) bit set, would run as root instead of a normal user when executed.
-
-To run a progam completely as a new user, it needs to be suid to that user, and you need to execute
- setregid(getegid(),getegid());
- setreuid(geteuid(),getegid());
-Many progams need this, as they will drop any euid permissions on startup.
-
-To drop euid permissions
- setregid(getgid(),getgid());
- setregid(getuid(),getuid());
+Describe [
SetUid] here
.