blob: 516a7596eb258c76319b505f67204119e31b66a8 [file] [log] [blame]
Zesstra7b2fbe72017-06-17 19:05:06 +02001/* This sefun is to provide a replacement for the efun seteuid().
2 * Feel free to add it to your mudlibs, if you have much code relying on that.
3 */
4
5#if ! __EFUN_DEFINED__(seteuid)
6
7#include <configuration.h>
8
9int seteuid(string str)
10{
11 object ob = efun::previous_object();
12
13 if (!str)
14 {
15 efun::configure_object(ob, OC_EUID, 0);
16 return 1;
17 }
18
19 if (efun::call_direct(__MASTER_OBJECT__, "valid_seteuid", ob, str) != 1)
20 return 0;
21
22 efun::configure_object(ob, OC_EUID, str);
23 return 1;
24}
25
26#endif