- getstring(mode);
- DEBUG2("rmtd: O %s %s\n", device, mode);
- tape = open(device, atoi(mode));
+ getstring(filemode);
+ DEBUG2("rmtd: O %s %s\n", device, filemode);
+ /*
+ * 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(filemode), 0666);