Disk redirection actually uses share names; not drive letters.
Make sure we truncate share names longer than 8 chars. Documentation updated. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@746 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
4acb0f3f31
commit
60704a5c00
10
disk.c
10
disk.c
@ -149,16 +149,14 @@ disk_enum_devices(uint32 * id, char *optarg)
|
|||||||
while ((pos = next_arg(optarg, ',')) && *id < RDPDR_MAX_DEVICES)
|
while ((pos = next_arg(optarg, ',')) && *id < RDPDR_MAX_DEVICES)
|
||||||
{
|
{
|
||||||
pos2 = next_arg(optarg, '=');
|
pos2 = next_arg(optarg, '=');
|
||||||
strcpy(g_rdpdr_device[*id].name, optarg);
|
|
||||||
|
|
||||||
toupper_str(g_rdpdr_device[*id].name);
|
strncpy(g_rdpdr_device[*id].name, optarg, sizeof(g_rdpdr_device[*id].name));
|
||||||
|
if (strlen(optarg) > 8)
|
||||||
/* add trailing colon to name. */
|
fprintf(stderr, "share name %s truncated to %s\n", optarg,
|
||||||
strcat(g_rdpdr_device[*id].name, ":");
|
g_rdpdr_device[*id].name);
|
||||||
|
|
||||||
g_rdpdr_device[*id].local_path = xmalloc(strlen(pos2) + 1);
|
g_rdpdr_device[*id].local_path = xmalloc(strlen(pos2) + 1);
|
||||||
strcpy(g_rdpdr_device[*id].local_path, pos2);
|
strcpy(g_rdpdr_device[*id].local_path, pos2);
|
||||||
printf("DISK %s to %s\n", g_rdpdr_device[*id].name, g_rdpdr_device[*id].local_path);
|
|
||||||
g_rdpdr_device[*id].device_type = DEVICE_TYPE_DISK;
|
g_rdpdr_device[*id].device_type = DEVICE_TYPE_DISK;
|
||||||
count++;
|
count++;
|
||||||
(*id)++;
|
(*id)++;
|
||||||
|
@ -138,9 +138,10 @@ OSes you would use stty. Bidirectional/Read support requires Windows XP or newer
|
|||||||
In Windows 2000 it will create a port, but it's not seamless, most
|
In Windows 2000 it will create a port, but it's not seamless, most
|
||||||
shell programs will not work with it.
|
shell programs will not work with it.
|
||||||
.TP
|
.TP
|
||||||
.BR "-r disk:<driveletter>=<path>,..."
|
.BR "-r disk:<sharename>=<path>,..."
|
||||||
Redirects a path to the drive letter of your choice on the server.
|
Redirects a path to the share \\\\tsclient\\<sharename> on the server
|
||||||
(requires Windows XP or newer).
|
(requires Windows XP or newer). The share name is limited to 8
|
||||||
|
characters.
|
||||||
.TP
|
.TP
|
||||||
.BR "-r lptport:<lptport>=<device>,..."
|
.BR "-r lptport:<lptport>=<device>,..."
|
||||||
Redirects parallel devices on your client to the server.
|
Redirects parallel devices on your client to the server.
|
||||||
|
@ -22,8 +22,8 @@ disk mapping
|
|||||||
-------------
|
-------------
|
||||||
Multiple mappings possible: yes
|
Multiple mappings possible: yes
|
||||||
Default: no disk redirected
|
Default: no disk redirected
|
||||||
Syntax: -r disk:<driveletter>=<path>
|
Syntax: -r disk:<sharename>=<path>
|
||||||
Example: -r disk:H=/home/johndoe
|
Example: -r disk:home=/home/johndoe
|
||||||
|
|
||||||
|
|
||||||
printer mapping
|
printer mapping
|
||||||
|
@ -129,8 +129,8 @@ usage(char *program)
|
|||||||
" '-r comport:COM1=/dev/ttyS0': enable serial redirection of /dev/ttyS0 to COM1\n");
|
" '-r comport:COM1=/dev/ttyS0': enable serial redirection of /dev/ttyS0 to COM1\n");
|
||||||
fprintf(stderr, " or COM1=/dev/ttyS0,COM2=/dev/ttyS1\n");
|
fprintf(stderr, " or COM1=/dev/ttyS0,COM2=/dev/ttyS1\n");
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
" '-r disk:A=/mnt/floppy': enable redirection of /mnt/floppy to A:\n");
|
" '-r disk:floppy=/mnt/floppy': enable redirection of /mnt/floppy to 'floppy' share\n");
|
||||||
fprintf(stderr, " or A=/mnt/floppy,D=/mnt/cdrom'\n");
|
fprintf(stderr, " or 'floppy=/mnt/floppy,cdrom=/mnt/cdrom'\n");
|
||||||
fprintf(stderr, " '-r clientname=<client name>': Set the client name displayed\n");
|
fprintf(stderr, " '-r clientname=<client name>': Set the client name displayed\n");
|
||||||
fprintf(stderr, " for redirected disks\n");
|
fprintf(stderr, " for redirected disks\n");
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
|
2
rdpdr.c
2
rdpdr.c
@ -266,6 +266,8 @@ rdpdr_send_available(void)
|
|||||||
{
|
{
|
||||||
out_uint32_le(s, g_rdpdr_device[i].device_type);
|
out_uint32_le(s, g_rdpdr_device[i].device_type);
|
||||||
out_uint32_le(s, i); /* RDP Device ID */
|
out_uint32_le(s, i); /* RDP Device ID */
|
||||||
|
/* Is it possible to use share names longer than 8 chars?
|
||||||
|
/astrand */
|
||||||
out_uint8p(s, g_rdpdr_device[i].name, 8);
|
out_uint8p(s, g_rdpdr_device[i].name, 8);
|
||||||
|
|
||||||
switch (g_rdpdr_device[i].device_type)
|
switch (g_rdpdr_device[i].device_type)
|
||||||
|
Loading…
Reference in New Issue
Block a user