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

« back to all changes in this revision

Viewing changes to lib/include/vixTools.h

  • 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) 1998 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
 
 * vixTools.h --
21
 
 *
22
 
 *    Vix Tools functionality.
23
 
 *
24
 
 */
25
 
 
26
 
#ifndef __VIX_TOOLS_H__
27
 
#define __VIX_TOOLS_H__
28
 
 
29
 
 
30
 
struct DblLnkLst_Links;
31
 
struct GuestApp_Dict;
32
 
 
33
 
 
34
 
typedef void (*VixToolsReportProgramDoneProcType)(const char *requestName,
35
 
                                                  VixError err,
36
 
                                                  int exitCode,
37
 
                                                  int64 pid,
38
 
                                                  void *clientData);
39
 
 
40
 
VixError VixTools_Initialize(Bool thisProcessRunsAsRootArg,
41
 
                             const char * const *originalEnvp,
42
 
                             VixToolsReportProgramDoneProcType reportProgramDoneProc,
43
 
                             void *clientData);
44
 
 
45
 
void VixTools_SetConsoleUserPolicy(Bool allowConsoleUserOpsParam);
46
 
 
47
 
void VixTools_SetRunProgramCallback(VixToolsReportProgramDoneProcType reportProgramDoneProc,
48
 
                                    void *clientData);
49
 
 
50
 
/*
51
 
 * These are internal procedures that are exposed for the legacy
52
 
 * tclo callbacks.
53
 
 */
54
 
VixError VixToolsRunProgramImpl(char *requestName,
55
 
                                char *commandLine,
56
 
                                char *commandLineArgs,
57
 
                                int runProgramOptions,
58
 
                                void *userToken,
59
 
                                void *eventQueue,
60
 
                                int64 *pid);
61
 
 
62
 
#if defined(VMTOOLS_USE_GLIB)
63
 
#  include <glib.h>
64
 
 
65
 
VixError VixTools_GetToolsPropertiesImpl(GKeyFile *confDictRef,
66
 
                                         char **resultBuffer,
67
 
                                         size_t *resultBufferLength);
68
 
 
69
 
VixError VixTools_ProcessVixCommand(VixCommandRequestHeader *requestMsg,
70
 
                                    char *requestName,
71
 
                                    size_t maxResultBufferSize,
72
 
                                    GKeyFile *confDictRef,
73
 
                                    GMainLoop *eventQueue,
74
 
                                    char **resultBuffer,
75
 
                                    size_t *resultLen,
76
 
                                    Bool *deleteResultBufferResult);
77
 
 
78
 
#else
79
 
VixError VixTools_GetToolsPropertiesImpl(struct GuestApp_Dict **confDictRef,
80
 
                                         char **resultBuffer,
81
 
                                         size_t *resultBufferLength);
82
 
 
83
 
VixError VixTools_ProcessVixCommand(VixCommandRequestHeader *requestMsg,
84
 
                                    char *requestName,
85
 
                                    size_t maxResultBufferSize,
86
 
                                    struct GuestApp_Dict **confDictRef,
87
 
                                    DblLnkLst_Links *eventQueue,
88
 
                                    char **resultBuffer,
89
 
                                    size_t *resultLen,
90
 
                                    Bool *deleteResultBufferResult);
91
 
 
92
 
#endif
93
 
 
94
 
Bool VixToolsImpersonateUserImpl(char const *credentialTypeStr, 
95
 
                                 int credentialType,
96
 
                                 char const *password,
97
 
                                 void **userToken);
98
 
 
99
 
void VixToolsUnimpersonateUser(void *userToken);
100
 
 
101
 
void VixToolsLogoutUser(void *userToken);
102
 
 
103
 
#ifdef _WIN32
104
 
VixError VixToolsGetUserTmpDir(void *userToken,
105
 
                               char **tmpDirPath);
106
 
 
107
 
Bool VixToolsUserIsMemberOfAdministratorGroup(VixCommandRequestHeader *requestMsg);
108
 
#endif // _WIN32
109
 
 
110
 
#if IMPLEMENT_SOCKET_MGR
111
 
VixError VixToolsSocketConnect(VixCommandRequestHeader *requestMsg,
112
 
                               char **result);
113
 
 
114
 
VixError VixToolsSocketListen(VixCommandRequestHeader *requestMsg,
115
 
                              char **result);
116
 
 
117
 
VixError VixToolsSocketAccept(VixCommandRequestHeader *requestMsg,
118
 
                              char *testName);
119
 
 
120
 
VixError VixToolsSocketSend(VixCommandRequestHeader *requestMsg,
121
 
                            char *testName);
122
 
 
123
 
VixError VixToolsSocketRecv(VixCommandRequestHeader *requestMsg,
124
 
                            char *testName);
125
 
 
126
 
VixError VixToolsSocketClose(VixCommandRequestHeader *requestMsg);
127
 
#endif // IMPLEMENT_SOCKET_MGR
128
 
 
129
 
 
130
 
#endif /* __VIX_TOOLS_H__ */
131
 
 
132