summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1996-11-03 14:47:52 +0000
committerjoerg <joerg@FreeBSD.org>1996-11-03 14:47:52 +0000
commitc5c9264413cfe54c4d284c454ec39333b9433c42 (patch)
tree5122cb5780b9858f2b1e8a054249f0439edd202b /gnu
parent56a351e0465c7577fabbd487691575055cee8e26 (diff)
downloadFreeBSD-src-c5c9264413cfe54c4d284c454ec39333b9433c42.zip
FreeBSD-src-c5c9264413cfe54c4d284c454ec39333b9433c42.tar.gz
Print out permissions that could not be re-established using 0%o
instead of decimal. Also, don't use the `l' modifier for something that has just been cast to `int' anyway. Remove various bogus pathnames to look up rsh(1) at. Our rsh is in /usr/bin, but never in /usr/usb, nor would it ever be called remsh... Also, if it hasn't been found there, use execlp() to look it up. the latter is required for `weird' environments like a fixit floppy where the regular /usr/bin hiearrchy is not avaiable. tar should probably do it similar to dump/restore, and use rcmd(3) instead of forking an external process.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/tar/extract.c6
-rw-r--r--gnu/usr.bin/tar/rtapelib.c18
2 files changed, 6 insertions, 18 deletions
diff --git a/gnu/usr.bin/tar/extract.c b/gnu/usr.bin/tar/extract.c
index 4b09fad..2730cc2 100644
--- a/gnu/usr.bin/tar/extract.c
+++ b/gnu/usr.bin/tar/extract.c
@@ -550,7 +550,7 @@ extract_archive ()
if (chmod (skipcrud + current_file_name,
notumask & (int) hstat.st_mode) < 0)
{
- msg_perror ("cannot change mode of file %s to %ld",
+ msg_perror ("cannot change mode of file %s to 0%o",
skipcrud + current_file_name,
notumask & (int) hstat.st_mode);
}
@@ -755,7 +755,7 @@ extract_archive ()
if (chmod (skipcrud + current_file_name,
notumask & (int) hstat.st_mode) < 0)
{
- msg_perror ("cannot change mode of file %s to %ld",
+ msg_perror ("cannot change mode of file %s to 0%o",
skipcrud + current_file_name,
notumask & (int) hstat.st_mode);
}
@@ -933,7 +933,7 @@ restore_saved_dir_info ()
if (chmod (saved_dir_info_head->path,
notumask & saved_dir_info_head->mode) < 0)
{
- msg_perror ("cannot change mode of file %s to %ld",
+ msg_perror ("cannot change mode of file %s to 0%o",
saved_dir_info_head->path,
notumask & saved_dir_info_head->mode);
}
diff --git a/gnu/usr.bin/tar/rtapelib.c b/gnu/usr.bin/tar/rtapelib.c
index eece76f..0c23b06 100644
--- a/gnu/usr.bin/tar/rtapelib.c
+++ b/gnu/usr.bin/tar/rtapelib.c
@@ -372,28 +372,16 @@ __rmt_open (path, oflag, mode, bias)
if (*login)
{
- execl ("/usr/ucb/rsh", "rsh", system, "-l", login,
+ execl ("/usr/bin/rsh", "rsh", "-l", login, system,
"/etc/rmt", (char *) 0);
- execl ("/usr/bin/remsh", "remsh", system, "-l", login,
- "/etc/rmt", (char *) 0);
- execl ("/usr/bin/rsh", "rsh", system, "-l", login,
- "/etc/rmt", (char *) 0);
- execl ("/usr/bsd/rsh", "rsh", system, "-l", login,
- "/etc/rmt", (char *) 0);
- execl ("/usr/bin/nsh", "nsh", system, "-l", login,
+ execlp ("rsh", "rsh", "-l", login, system,
"/etc/rmt", (char *) 0);
}
else
{
- execl ("/usr/ucb/rsh", "rsh", system,
- "/etc/rmt", (char *) 0);
- execl ("/usr/bin/remsh", "remsh", system,
- "/etc/rmt", (char *) 0);
execl ("/usr/bin/rsh", "rsh", system,
"/etc/rmt", (char *) 0);
- execl ("/usr/bsd/rsh", "rsh", system,
- "/etc/rmt", (char *) 0);
- execl ("/usr/bin/nsh", "nsh", system,
+ execlp ("rsh", "rsh", system,
"/etc/rmt", (char *) 0);
}
OpenPOWER on IntegriCloud