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

« back to all changes in this revision

Viewing changes to lib/misc/idLinux.c

  • Committer: Package Import Robot
  • Author(s): Nate Muench
  • Date: 2012-06-20 15:59:51 UTC
  • mfrom: (1.4.8)
  • Revision ID: package-import@ubuntu.com-20120620155951-6rupmpb0f70b52zr
Tags: 2012.05.21-724730-0ubuntu1
* Merging upstream version 2012.05.21-724730.
  - Fixes building against the current Quantal kernel. (LP: #1000344)
  - Fixes Quantal installation issues. (LP: #1019031)

* Sync with Debian
  - Updating to debhelper version 9.
  - Updating to standards version 3.9.3.
  - Updating copyright file machine-readable format version 1.0.
  - Building without multiarch paths for now

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <unistd.h>
30
30
#ifdef __APPLE__
31
31
#include <sys/socket.h>
 
32
#include <TargetConditionals.h>
 
33
#if !defined TARGET_OS_IPHONE
 
34
#define TARGET_OS_IPHONE 0
 
35
#endif
 
36
#if !TARGET_OS_IPHONE
32
37
#include <Security/Authorization.h>
33
38
#include <Security/AuthorizationTags.h>
34
39
#endif
 
40
#endif
35
41
#if defined __ANDROID__
36
42
#include <syscall-android.h>
37
43
#endif
74
80
#endif
75
81
#endif // __linux__
76
82
 
77
 
#if defined(__APPLE__)
 
83
#if defined(__APPLE__) && !TARGET_OS_IPHONE
78
84
#include <sys/kauth.h>
79
85
 
80
86
static AuthorizationRef IdAuthCreate(void);
338
344
#endif
339
345
 
340
346
 
341
 
#if defined(__APPLE__)
 
347
#if defined(__APPLE__) && !TARGET_OS_IPHONE
342
348
/*
343
349
 *----------------------------------------------------------------------------
344
350
 *
842
848
      uid = (uid_t) -1; // already root; nothing to do
843
849
   } else {
844
850
#if defined(__APPLE__)
 
851
#if TARGET_OS_IPHONE
 
852
      Warning("XXXIOS: implement %s\n", __func__);
 
853
#else
845
854
      syscall(SYS_settid, KAUTH_UID_NONE, KAUTH_GID_NONE /* Ignored. */);
 
855
#endif
846
856
#else
847
857
      Id_SetRESUid((uid_t) -1, (uid_t) 0, (uid_t) -1); // effectively root
848
858
#endif