Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ././../../../../../../usr/man/man2/setreuid.2
Real path: /usr/share/man/man2/setreuid.2
Zurück
'\" te .\" Copyright (c) 2004, 2022, Oracle and/or its affiliates. .TH setreuid 2 "2 Jun 2022" "Oracle Solaris 11.4" "System Calls" .SH NAME setreuid \- set real and effective user IDs .SH SYNOPSIS .LP .nf #include <unistd.h> \fBint\fR \fBsetreuid\fR(\fBuid_t\fR \fIruid\fR, \fBuid_t\fR \fIeuid\fR); .fi .SH DESCRIPTION .sp .LP The \fBsetreuid()\fR function is used to set the real and effective user IDs of the calling process. If \fIruid\fR is \(mi1, the real user ID is not changed; if \fIeuid\fR is \(mi1, the effective user ID is not changed. The real and effective user IDs may be set to different values in the same call. .sp .LP If the {\fBPRIV_PROC_SETID\fR} privilege is asserted in the effective set of the calling process, the real user ID and the effective user \fBID\fR can be set to any legal value. .sp .LP If the {\fBPRIV_PROC_SETID\fR} privilege is not asserted in the effective set of the calling process, either the real user ID can be set to the effective user ID, or the effective user ID can either be set to the saved set-user ID from \fBexecve()\fR (see \fBexec\fR(2)) or the real user ID. .sp .LP In either case, if the real user ID is being changed (that is, if \fIruid\fR is not \fB\(mi1\fR), or the effective user ID is being changed to a value not equal to the real user ID, the saved set-user ID is set equal to the new effective user ID. .sp .LP All privileges are required to change to uid 0. .SH RETURN VALUES .sp .LP Upon successful completion, 0 is returned. Otherwise, \(mi1 is returned, \fBerrno\fR is set to indicate the error, and neither of the user IDs will be changed. .SH ERRORS .sp .LP The \fBsetreuid()\fR function will fail if: .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt The value of \fIruid\fR or \fIeuid\fR is less than \fB0\fR or greater than \fBUID_MAX\fR (defined in <\fBlimits.h\fR>). .RE .sp .ne 2 .mk .na \fB\fBEPERM\fR\fR .ad .RS 10n .rt The {PRIV_PROC_SETID} privilege is not asserted in the effective set of the calling processes and a change was specified other than changing the real user \fBID\fR to the effective user \fBID\fR, or changing the effective user \fBID\fR to the real user \fBID\fR or the saved set-user \fBID\fR. See \fBprivileges\fR(7) for additional restrictions which apply when changing to UID 0. .RE .SH USAGE .sp .LP If a set-user-\fBID\fR process sets its effective user \fBID\fR to its real user \fBID\fR, it can still set its effective user \fBID\fR back to the saved set-user \fBID\fR. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Committed _ MT-Level Async-Signal-Safe _ Standard See \fBstandards\fR(7). .TE .sp .SH SEE ALSO .sp .LP \fBsetregid\fR(2), \fBexec\fR(2), \fBgetuid\fR(2), \fBsetuid\fR(2), \fBattributes\fR(7), \fBprivileges\fR(7), \fBstandards\fR(7)