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

« back to all changes in this revision

Viewing changes to lib/include/hgfsProto.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-03-20 10:19:00 UTC
  • mfrom: (1.1.4 upstream) (2.4.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090320101900-1o604camiubq2de8
Tags: 2009.03.18-154848-2
Correcting patch system depends (Closes: #520493).

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
#define HGFS_PERM_WRITE 2
179
179
#define HGFS_PERM_EXEC  1
180
180
 
 
181
/*
 
182
 * Access mode bits.
 
183
 *
 
184
 * Different operating systems have different set of file access mode.
 
185
 * Here are constants that are rich enough to describe all access modes in an OS
 
186
 * independent way.
 
187
 */
 
188
 
 
189
typedef uint32 HgfsAccessMode;
 
190
/*
 
191
 * Generic access rights control coarse grain access for the file.
 
192
 * A particular generic rigth can be expanded into different set of specific rights
 
193
 * on different OS.
 
194
 */
 
195
 
 
196
/*
 
197
 * HGFS_MODE_GENERIC_READ means ability to read file data and read various file
 
198
 * attributes and properties.
 
199
 */
 
200
#define HGFS_MODE_GENERIC_READ        (1 << 0)
 
201
/*
 
202
 * HGFS_MODE_GENERIC_WRITE means ability to write file data and updaate various file
 
203
 * attributes and properties.
 
204
 */
 
205
#define HGFS_MODE_GENERIC_WRITE       (1 << 1)
 
206
/*
 
207
 * HGFS_MODE_GENERIC_EXECUE means ability to execute file. For network redirectors
 
208
 * ability to execute usualy implies ability to read data; for local file systems
 
209
 * HGFS_MODE_GENERIC_EXECUTE does not imply ability to read data.
 
210
 */
 
211
#define HGFS_MODE_GENERIC_EXECUTE     (1 << 2)
 
212
 
 
213
/* Specific rights define fine grain access modes. */
 
214
#define HGFS_MODE_READ_DATA           (1 << 3)  // Ability to read file data
 
215
#define HGFS_MODE_WRITE_DATA          (1 << 4)  // Ability to writge file data
 
216
#define HGFS_MODE_APPEND_DATA         (1 << 5)  // Appending data to the end of file
 
217
#define HGFS_MODE_DELETE              (1 << 6)  // Ability to delete the file
 
218
#define HGFS_MODE_TRAVERSE_DIRECTORY  (1 << 7)  // Ability to access files in a directory 
 
219
#define HGFS_MODE_LIST_DIRECTORY      (1 << 8)  // Ability to list file names
 
220
#define HGFS_MODE_ADD_SUBDIRECTORY    (1 << 9)  // Ability to create a new subdirectory
 
221
#define HGFS_MODE_ADD_FILE            (1 << 10) // Ability to create a new file
 
222
#define HGFS_MODE_DELETE_CHILD        (1 << 11) // Ability to delete file/subdirectory
 
223
#define HGFS_MODE_READ_ATTRIBUTES     (1 << 12) // Ability to read attributes
 
224
#define HGFS_MODE_WRITE_ATTRIBUTES    (1 << 13) // Ability to write attributes
 
225
#define HGFS_MODE_READ_EXTATTRIBUTES  (1 << 14) // Ability to read extended attributes
 
226
#define HGFS_MODE_WRITE_EXTATTRIBUTES (1 << 15) // Ability to write extended attributes
 
227
#define HGFS_MODE_READ_SECURITY       (1 << 16) // Ability to read permissions/ACLs/owner
 
228
#define HGFS_MODE_WRITE_SECURITY      (1 << 17) // Ability to change permissions/ACLs
 
229
#define HGFS_MODE_TAKE_OWNERSHIP      (1 << 18) // Ability to change file owner/group
181
230
 
182
231
/*
183
232
 * Server-side locking (oplocks and leases).
356
405
 *       only to determine if the ID is valid.
357
406
 */
358
407
#define HGFS_ATTR_VALID_NON_STATIC_FILEID (1 << 16)
 
408
/*
 
409
 * File permissions that are in effect for the user which runs HGFS server.
 
410
 * Client needs to know effective permissions in order to implement access(2).
 
411
 * Client can't derive it from group/owner/other permissions because of two resaons:
 
412
 * 1. It does not know user/group id of the user which runs HGFS server
 
413
 * 2. Effective permissions account for additional restrictions that may be imposed
 
414
 *    by host file system, for example by ACL.
 
415
 */
 
416
#define HGFS_ATTR_VALID_EFFECTIVE_PERMS   (1 << 17)
359
417
 
360
418
 
361
419
/*
400
458
   uint32 groupId;               /* group identifier, ignored by Windows */
401
459
   uint64 hostFileId;            /* File Id of the file on host: inode_t on Linux */
402
460
   uint32 volumeId;              /* volume identifier, non-zero is valid. */
403
 
   uint32 reserved1;             /* Reserved for future use */
 
461
   uint32 effectivePerms;        /* Permissions in effect for the user on the host. */
404
462
   uint64 reserved2;             /* Reserved for future use */
405
463
}
406
464
#include "vmware_pack_end.h"