X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=common%2Fdumprmt.c;h=4f6b3c790e674f224362dd704e39be4631efdf2f;hp=dbbe618485159856189496c5ef9d4717cb4d1e9f;hb=2c168f5fb53e1e1d3905bdd7fac64497e0ab3875;hpb=abc63c56d1d2615509730085dfbe905497be888e diff --git a/common/dumprmt.c b/common/dumprmt.c index dbbe618..4f6b3c7 100644 --- a/common/dumprmt.c +++ b/common/dumprmt.c @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] = - "$Id: dumprmt.c,v 1.11 2000/01/21 10:17:41 stelian Exp $"; + "$Id: dumprmt.c,v 1.12 2000/11/03 18:28:58 stelian Exp $"; #endif /* not lint */ #ifdef __linux__ @@ -205,6 +205,12 @@ rmtgetconn(void) rshcmd[4] = rmt; rshcmd[5] = NULL; + /* Restore the uid and gid. We really don't want + * to execute whatever is put into RSH variable with + * more priviledges than needed... */ + setuid(getuid()); + setgid(getgid()); + if ((rshpid = piped_child(rshcmd)) < 0) { msg("cannot open connection\n"); return 0;