logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

seteuid.3p (2719B)


  1. '\" et
  2. .TH SETEUID "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. seteuid
  12. \(em set effective user ID
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <unistd.h>
  17. .P
  18. int seteuid(uid_t \fIuid\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. If
  22. .IR uid
  23. is equal to the real user ID or the saved set-user-ID, or if the
  24. process has appropriate privileges,
  25. \fIseteuid\fR()
  26. shall set the effective user ID of the calling process to
  27. .IR uid ;
  28. the real user ID and saved set-user-ID shall remain unchanged.
  29. .P
  30. The
  31. \fIseteuid\fR()
  32. function shall not affect the supplementary group list in any way.
  33. .SH "RETURN VALUE"
  34. Upon successful completion, 0 shall be returned; otherwise, \-1 shall
  35. be returned and
  36. .IR errno
  37. set to indicate the error.
  38. .SH ERRORS
  39. The
  40. \fIseteuid\fR()
  41. function shall fail if:
  42. .TP
  43. .BR EINVAL
  44. The value of the
  45. .IR uid
  46. argument is invalid and is not supported by the implementation.
  47. .TP
  48. .BR EPERM
  49. The process does not have appropriate privileges and
  50. .IR uid
  51. does not match the real user ID or the saved set-user-ID.
  52. .LP
  53. .IR "The following sections are informative."
  54. .SH EXAMPLES
  55. None.
  56. .SH "APPLICATION USAGE"
  57. None.
  58. .SH RATIONALE
  59. Refer to the RATIONALE section in
  60. .IR "\fIsetuid\fR\^(\|)".
  61. .SH "FUTURE DIRECTIONS"
  62. None.
  63. .SH "SEE ALSO"
  64. .IR "\fIexec\fR\^",
  65. .IR "\fIgetegid\fR\^(\|)",
  66. .IR "\fIgeteuid\fR\^(\|)",
  67. .IR "\fIgetgid\fR\^(\|)",
  68. .IR "\fIgetuid\fR\^(\|)",
  69. .IR "\fIsetegid\fR\^(\|)",
  70. .IR "\fIsetgid\fR\^(\|)",
  71. .IR "\fIsetregid\fR\^(\|)",
  72. .IR "\fIsetreuid\fR\^(\|)",
  73. .IR "\fIsetuid\fR\^(\|)"
  74. .P
  75. The Base Definitions volume of POSIX.1\(hy2017,
  76. .IR "\fB<sys_types.h>\fP",
  77. .IR "\fB<unistd.h>\fP"
  78. .\"
  79. .SH COPYRIGHT
  80. Portions of this text are reprinted and reproduced in electronic form
  81. from IEEE Std 1003.1-2017, Standard for Information Technology
  82. -- Portable Operating System Interface (POSIX), The Open Group Base
  83. Specifications Issue 7, 2018 Edition,
  84. Copyright (C) 2018 by the Institute of
  85. Electrical and Electronics Engineers, Inc and The Open Group.
  86. In the event of any discrepancy between this version and the original IEEE and
  87. The Open Group Standard, the original IEEE and The Open Group Standard
  88. is the referee document. The original Standard can be obtained online at
  89. http://www.opengroup.org/unix/online.html .
  90. .PP
  91. Any typographical or formatting errors that appear
  92. in this page are most likely
  93. to have been introduced during the conversion of the source files to
  94. man page format. To report such errors, see
  95. https://www.kernel.org/doc/man-pages/reporting_bugs.html .