Removed seteuid() calls
seteuid() was removed from the driver and replaced by an sefun.
However, the master should not call this sefun and calls directly
configure_object().
Change-Id: Ice6fef6da466e7612eb506fdc3110596465a2264
diff --git a/secure/master.c b/secure/master.c
index 35cc9aa..3d88928 100644
--- a/secure/master.c
+++ b/secure/master.c
@@ -66,7 +66,7 @@
set_driver_hook(H_REGEXP_PACKAGE, RE_TRADITIONAL);
- seteuid(ROOTID);
+ efun::configure_object(this_object(), OC_EUID, ROOTID);
userinfo::create();
LoadPLDenylists();
@@ -210,7 +210,7 @@
string *files, *domains;
int i;
- seteuid(ROOTID);
+ efun::configure_object(this_object(), OC_EUID, ROOTID);
ReloadBanishFile();
ReloadDeputyFile();
ReloadInsecureFile();
@@ -253,13 +253,7 @@
// Datei und Besitzer ausgeben
printf("%-50s%-15s",file,name);
- // Euid kann nicht geaendert werden -> Meldung, fertig
- if (!seteuid(name))
- {
- printf("\nEuid konnte nicht auf %s gesetzt werden\n"+
- "Sie ist nun %s.\n",name,geteuid(TO));
- return;
- }
+ efun::configure_object(this_object(), OC_EUID, name);
// Dann mal laden .. dabei Zeit messen
zeit = apply(#'+,rusage()[0..1]);
@@ -279,7 +273,7 @@
}
// Noch EUID zuruecksetzen
- seteuid(ROOTID);
+ efun::configure_object(this_object(), OC_EUID, ROOTID);
return;
}
diff --git a/secure/master/misc.c b/secure/master/misc.c
index a831d46..d8a1f39 100644
--- a/secure/master/misc.c
+++ b/secure/master/misc.c
@@ -15,6 +15,7 @@
#include "/mail/post.h"
#include "/sys/thing/language.h"
#include "/sys/thing/description.h"
+#include "/sys/configuration.h"
// Fuer CIDR-Notatio im sbanish
#include "/secure/master/cidr.c"
@@ -592,9 +593,9 @@
}
active=interactive(who);
printf("OK, renewing %O\n",who);
- seteuid(geteuid(who));
+ efun::configure_object(this_object(), OC_EUID, geteuid(who));
err=catch(newob=clone_object(query_player_object(getuid(who))); publish);
- seteuid(getuid(TO));
+ efun::configure_object(this_object(), OC_EUID, getuid(TO));
if (err)
{
printf("%O\n",err);