~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201210021442

« back to all changes in this revision

Viewing changes to services/plugins/unity/ghiShellAction.x

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-03-31 14:20:05 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110331142005-3n9red91p7ogkweo
Tags: 2011.03.28-387002-0ubuntu1
* Merge latest upstream git tag.  This has the unlocked_ioctl change
  needed to fix dkms build failures (LP: #727342)
* Changes in debian/rules:
  - work around a bug in toolbox/Makefile, where install-exec-hook is
    not happening.  This needs to get fixed the right way.
  - don't install 'vmware-user' which seems to no longer exist
  - move /etc/xdg into open-vm-toolbox (which should be done using .install)
* debian/open-vm-tools.init: add 'modprobe [-r] vmblock'. (LP: #332323)
* debian/rules and debian/open-vm-toolbox.lintian-overrides:
  - Make vmware-user-suid-wrapper suid-root (LP: #332323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*********************************************************
 
2
 * Copyright (C) 2008 VMware, Inc. All rights reserved.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify it
 
5
 * under the terms of the GNU Lesser General Public License as published
 
6
 * by the Free Software Foundation version 2.1 and no later version.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful, but
 
9
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 
10
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
 
11
 * License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public License
 
14
 * along with this program; if not, write to the Free Software Foundation, Inc.,
 
15
 * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
 
16
 *
 
17
 *********************************************************/
 
18
 
 
19
/*
 
20
 * ghiShellAction.x --
 
21
 *
 
22
 *    Definition of the data structures used in the GuestRpc commands to
 
23
 *    open files, applications or URLs in either guest or host.
 
24
 */
 
25
 
 
26
 
 
27
/*
 
28
 * Enumerates the different versions of the messages.
 
29
 */
 
30
enum GHIShellActionVersion {
 
31
    GHI_SHELL_ACTION_V1 = 1
 
32
};
 
33
 
 
34
/*
 
35
 * The Windows MAX_PATH define specifies that paths may be up to 260 character
 
36
 * units in length. To allow for expansion when going to UTF8 we multiply that
 
37
 * value by 4 here.
 
38
 */
 
39
const GHI_SHELL_ACTION_URI_MAX_SIZE = 1040;
 
40
 
 
41
/*
 
42
 * Maximum size of a location URI - although RFC2397 doesn't define a max size
 
43
 * for a URI some browsers may limit the URI size so we define a hard limit
 
44
 * for URI's at 8K in length (this matches a limit in IE8 for example)
 
45
 */
 
46
const GHI_SHELL_ACTION_LOCATION_MAX_SIZE = 8192;
 
47
 
 
48
/*
 
49
 * Maximum number of locations that may be encoded in a single
 
50
 * XDR array.
 
51
 */
 
52
const GHI_SHELL_ACTION_MAX_NUM_LOCATIONS = 32;
 
53
 
 
54
struct GHIShellActionLocation {
 
55
   string location<GHI_SHELL_ACTION_LOCATION_MAX_SIZE>;
 
56
};
 
57
 
 
58
struct GHIShellActionV1 {
 
59
   /*
 
60
    * The actionURI - typically something like x-vmware-action:///run or
 
61
    * x-vmware-action:///browse.
 
62
    */
 
63
   string actionURI<GHI_SHELL_ACTION_URI_MAX_SIZE>;
 
64
 
 
65
   /*
 
66
    * The target of the action - may be a URI encoded path to an executable.
 
67
    */
 
68
   string targetURI<GHI_SHELL_ACTION_URI_MAX_SIZE>;
 
69
 
 
70
   /*
 
71
    * A list of locations to be operated on using the actionURI and targetURI.
 
72
    */
 
73
   struct GHIShellActionLocation locations<GHI_SHELL_ACTION_MAX_NUM_LOCATIONS>;
 
74
};
 
75
 
 
76
/*
 
77
 * This defines the protocol for a 'shellAction' messages. The union allows
 
78
 * us to create new versions of the protocol later by creating new values
 
79
 * in the GHIShellActionVersion enumeration, without having to change much of
 
80
 * the code calling the (de)serialization functions.
 
81
 *
 
82
 * Since the union doesn't have a default case, de-serialization will fail
 
83
 * if an unknown version is provided on the wire.
 
84
 */
 
85
union GHIShellAction switch (GHIShellActionVersion ver) {
 
86
case GHI_SHELL_ACTION_V1:
 
87
   struct GHIShellActionV1 *actionV1;
 
88
};
 
89