* dump and restore backup suit
* Remy Card <card@Linux.EU.Org>, 1994-1997
* Stelian Pop <pop@cybercable.fr>, 1999-2000
+ * Stelian Pop <pop@cybercable.fr> - Alcôve <www.alcove.fr>, 2000
*/
/*-
#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.13 2000/11/10 14:42:24 stelian Exp $";
#endif /* not lint */
#ifdef __linux__
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;