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

« back to all changes in this revision

Viewing changes to lib/auth/authPosix.c

  • 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:
19
19
#include <stdlib.h>
20
20
#include <stdio.h>
21
21
#include <string.h>
22
 
 
23
 
#ifndef GLIBC_VERSION_22
24
 
#define __USE_XOPEN
25
 
#endif
26
 
#include <unistd.h> // for access, etc.
27
 
 
28
 
#if (defined(GLIBC_VERSION_22) && !defined(USING_AUTOCONF)) || defined(HAVE_CRYPT_H)
29
 
#include <crypt.h>
30
 
#endif
 
22
#include <unistd.h> // for access, crypt, etc.
31
23
 
32
24
#include "vmware.h"
33
25
#include "vm_version.h"
44
36
#  include <dlfcn.h>
45
37
#endif
46
38
 
 
39
#if defined(HAVE_CONFIG_H) || defined(sun)
 
40
#  include <crypt.h>
 
41
#endif
 
42
 
47
43
#define LOGLEVEL_MODULE auth
48
44
#include "loglevel_user.h"
49
45
 
50
46
#ifdef USE_PAM
 
47
#if defined(sun)
 
48
#define CURRENT_PAM_LIBRARY     "libpam.so.1"
 
49
#else
51
50
#define CURRENT_PAM_LIBRARY     "libpam.so.0"
 
51
#endif
52
52
 
53
53
static typeof(&pam_start) dlpam_start;
54
54
static typeof(&pam_end) dlpam_end;
164
164
static const char *PAM_username;
165
165
static const char *PAM_password;
166
166
 
 
167
#if defined(sun)
 
168
static int PAM_conv (int num_msg,                     // IN:
 
169
                     struct pam_message **msg,        // IN:
 
170
                     struct pam_response **resp,      // OUT:
 
171
                     void *appdata_ptr)               // IN:
 
172
#else
167
173
static int PAM_conv (int num_msg,                     // IN:
168
174
                     const struct pam_message **msg,  // IN:
169
175
                     struct pam_response **resp,      // OUT:
170
 
                     void *appdata_ptr) {             // IN:
 
176
                     void *appdata_ptr)               // IN:
 
177
#endif
 
178
{
171
179
   int count;
172
180
   struct pam_response *reply = calloc(num_msg, sizeof(struct pam_response));
173
181
 
266
274
 
267
275
      /*
268
276
       * XXX PAM can blow away our syslog level settings so we need
269
 
       * to call Log_Init() again before doing any more Log()s
 
277
       * to call Log_InitEx() again before doing any more Log()s
270
278
       */
271
279
 
272
280
#define PAM_BAIL if (pam_error != PAM_SUCCESS) { \