1 |
|
|
2 |
/* Copyright (C) 2001 Beau Kuiper |
/* Copyright (C) 2001 Beau Kuiper |
3 |
|
|
4 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
19 |
|
|
20 |
#ifndef HAVE_SETEUID |
#ifndef HAVE_SETEUID |
21 |
#error huh |
#error huh |
22 |
|
|
23 |
/* seteuid replacement for systems without it, uses setresuid */ |
/* seteuid replacement for systems without it, uses setresuid */ |
24 |
|
|
25 |
int seteuid(uid_t euid) |
int seteuid(uid_t euid) |
26 |
{ |
{ |
27 |
return setresuid((uid_t)-1, euid, (uid_t)-1); |
return setresuid((uid_t) - 1, euid, (uid_t) - 1); |
28 |
} |
} |
29 |
|
|
30 |
#endif /* HAVE_SETEUID */ |
#endif /* HAVE_SETEUID */ |
35 |
|
|
36 |
int setegid(gid_t egid) |
int setegid(gid_t egid) |
37 |
{ |
{ |
38 |
return setresgid((gid_t)-1, egid, (gid_t)-1); |
return setresgid((gid_t) - 1, egid, (gid_t) - 1); |
39 |
} |
} |
40 |
|
|
41 |
#endif /* HAVE_SETEGID */ |
#endif /* HAVE_SETEGID */ |