xref: /third_party/musl/src/unistd/seteuid.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/musl/src/unistd/
1570af302Sopenharmony_ci#include <unistd.h>
2570af302Sopenharmony_ci#include "syscall.h"
3570af302Sopenharmony_ci#include "libc.h"
4570af302Sopenharmony_ci#ifdef __LITEOS_A__
5570af302Sopenharmony_ci#include "errno.h"
6570af302Sopenharmony_ci#endif
7570af302Sopenharmony_ci
8570af302Sopenharmony_ciint seteuid(uid_t euid)
9570af302Sopenharmony_ci{
10570af302Sopenharmony_ci#ifdef __LITEOS_A__
11570af302Sopenharmony_ci	if (euid == -1) {
12570af302Sopenharmony_ci		errno = EINVAL;
13570af302Sopenharmony_ci		return -1;
14570af302Sopenharmony_ci	}
15570af302Sopenharmony_ci#endif
16570af302Sopenharmony_ci	return __setxid(SYS_setresuid, -1, euid, -1);
17570af302Sopenharmony_ci}
18

Indexes created Thu Nov 07 10:32:03 CST 2024