The rmt protocol didn't allow to pass a file creation mode (permission

bits) along, and rmt did the wrong thing in calling open(2) with random
garbage as third parameter.  Make it create new files with 0666
(modified by the umask of the remote shell anyway).

This removed the last show-stopper from tar not working with remote
archives.
This commit is contained in:
Joerg Wunsch 1995-04-09 09:20:47 +00:00
parent fa4733a739
commit a3e026396c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7707

View File

@ -104,7 +104,12 @@ main(argc, argv)
getstring(device);
getstring(mode);
DEBUG2("rmtd: O %s %s\n", device, mode);
tape = open(device, atoi(mode));
/*
* XXX the rmt protocol does not provide a means to
* specify the permission bits; allow rw for everyone,
* as modified by the users umask
*/
tape = open(device, atoi(mode), 0666);
if (tape < 0)
goto ioerror;
goto respond;