Use setuid() and setgid(), not setreuid() and setregid().

This commit is contained in:
mycroft 1994-09-19 02:56:37 +00:00
parent d339fcc90b
commit 4ded5e85bb
2 changed files with 6 additions and 6 deletions

View File

@ -18,7 +18,7 @@
*/ */
#ifndef lint #ifndef lint
static char rcsid[] = "$Id: main.c,v 1.11 1994/07/04 19:30:22 deraadt Exp $"; static char rcsid[] = "$Id: main.c,v 1.12 1994/09/19 02:56:37 mycroft Exp $";
#endif #endif
#define SETSID #define SETSID
@ -1144,8 +1144,8 @@ device_script(program, in, out)
} }
if (pid == 0) { if (pid == 0) {
setreuid(getuid(), getuid()); setuid(getuid());
setregid(getgid(), getgid()); setgid(getgid());
sigprocmask(SIG_SETMASK, &mask, NULL); sigprocmask(SIG_SETMASK, &mask, NULL);
dup2(in, 0); dup2(in, 0);
dup2(out, 1); dup2(out, 1);

View File

@ -18,7 +18,7 @@
*/ */
#ifndef lint #ifndef lint
static char rcsid[] = "$Id: main.c,v 1.11 1994/07/04 19:30:22 deraadt Exp $"; static char rcsid[] = "$Id: main.c,v 1.12 1994/09/19 02:56:37 mycroft Exp $";
#endif #endif
#define SETSID #define SETSID
@ -1144,8 +1144,8 @@ device_script(program, in, out)
} }
if (pid == 0) { if (pid == 0) {
setreuid(getuid(), getuid()); setuid(getuid());
setregid(getgid(), getgid()); setgid(getgid());
sigprocmask(SIG_SETMASK, &mask, NULL); sigprocmask(SIG_SETMASK, &mask, NULL);
dup2(in, 0); dup2(in, 0);
dup2(out, 1); dup2(out, 1);