Skip to content
Snippets Groups Projects
Commit 0b85837c authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Fixed some more droppings bugs.

Rev: src/modules/system/system.c:1.69
parent ab83a822
No related branches found
No related tags found
No related merge requests found
/* /*
* $Id: system.c,v 1.68 1999/04/16 15:08:13 grubba Exp $ * $Id: system.c,v 1.69 1999/04/16 20:40:57 grubba Exp $
* *
* System-call module for Pike * System-call module for Pike
* *
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "system_machine.h" #include "system_machine.h"
#include "system.h" #include "system.h"
RCSID("$Id: system.c,v 1.68 1999/04/16 15:08:13 grubba Exp $"); RCSID("$Id: system.c,v 1.69 1999/04/16 20:40:57 grubba Exp $");
#ifdef HAVE_WINSOCK_H #ifdef HAVE_WINSOCK_H
#include <winsock.h> #include <winsock.h>
#endif #endif
...@@ -511,6 +511,7 @@ void f_getgroups(INT32 args) ...@@ -511,6 +511,7 @@ void f_getgroups(INT32 args)
#ifdef HAVE_SETUID #ifdef HAVE_SETUID
void f_setuid(INT32 args) void f_setuid(INT32 args)
{ {
int err;
INT32 id; INT32 id;
#ifdef PIKE_SECURITY #ifdef PIKE_SECURITY
...@@ -527,9 +528,9 @@ void f_setuid(INT32 args) ...@@ -527,9 +528,9 @@ void f_setuid(INT32 args)
id = sp[-args].u.integer; id = sp[-args].u.integer;
} }
/* FIXME: Check return-code */ err = setuid(id);
setuid(id); pop_n_elems(args);
pop_n_elems(args-1); push_int(err);
} }
#endif #endif
...@@ -1083,7 +1084,7 @@ void pike_module_init(void) ...@@ -1083,7 +1084,7 @@ void pike_module_init(void)
#ifdef HAVE_SETUID #ifdef HAVE_SETUID
/* function(int:void) */ /* function(int:void) */
ADD_EFUN("setuid", f_setuid,tFunc(tInt,tVoid), OPT_SIDE_EFFECT); ADD_EFUN("setuid", f_setuid,tFunc(tInt,tInt), OPT_SIDE_EFFECT);
#endif #endif
#ifdef HAVE_SETGID #ifdef HAVE_SETGID
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment