diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1996-09-01 15:29:22 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1996-09-01 15:29:22 +0000 |
commit | 79a9ba373b39d4532cb368863c51a21fc8764344 (patch) | |
tree | a5c40d38d3958afcdda4da168f5654d2c8790c80 /bin/mt | |
parent | ecd93961665fe972cae803dbba2b5fb21e608256 (diff) |
check rcmd() return val and exit nicely.
Diffstat (limited to 'bin/mt')
-rw-r--r-- | bin/mt/mtrmt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/mt/mtrmt.c b/bin/mt/mtrmt.c index 46a993f3f2e..db811d58fb1 100644 --- a/bin/mt/mtrmt.c +++ b/bin/mt/mtrmt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mtrmt.c,v 1.2 1996/08/09 03:11:53 millert Exp $ */ +/* $OpenBSD: mtrmt.c,v 1.3 1996/09/01 15:29:21 millert Exp $ */ /* $NetBSD: mtrmt.c,v 1.2 1996/03/06 06:22:07 scottr Exp $ */ /*- @@ -150,6 +150,8 @@ rmtgetconn() rmtape = rcmd(&rmtpeer, (u_short)sp->s_port, pwd->pw_name, tuser, _PATH_RMT, (int *)0); (void) setuid(uid); /* Just to be Really Really Safe */ + if (rmtape == -1) + exit(1); /* rcmd already printed error message */ size = TP_BSIZE; if (size > 60 * 1024) /* XXX */ |