~ubuntu-branches/ubuntu/natty/pam/natty-security

« back to all changes in this revision

Viewing changes to modules/pam_stress/pam_stress.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-08-26 00:40:14 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090826004014-qsd46mostuyljeqp
Tags: 1.1.0-1ubuntu1
* Merge from Debian, remaining changes:
  - debian/libpam-modules.postinst: Add PATH to /etc/environment if it's not
    present there or in /etc/security/pam_env.conf. (should send to Debian).
  - debian/libpam0g.postinst: only ask questions during update-manager when
    there are non-default services running.
  - debian/patches-applied/series: Ubuntu patches are as below ...
  - debian/patches-applied/ubuntu-no-error-if-missingok: add a new, magic
    module option 'missingok' which will suppress logging of errors by
    libpam if the module is not found.
  - debian/patches-applied/ubuntu-regression_fix_securetty: prompt for
    password on bad username.
  - debian/patches-applied/ubuntu-rlimit_nice_correction: Explicitly
    initialise RLIMIT_NICE rather than relying on the kernel limits.
  - Change Vcs-Bzr to point at the Ubuntu branch.
  - debian/local/common-password, debian/pam-configs/unix: switch from
    "md5" to "sha512" as password crypt default.
  - Make libpam-modules depend on base-files (>= 5.0.0ubuntu6), to ensure
    run-parts does the right thing in /etc/update-motd.d.
  - debian/patches-applied/pam_motd-legal-notice: display the contents of
    /etc/legal once, then set a flag in the user's homedir to prevent showing
    it again.
  - debian/local/common-{auth,account,password}.md5sums: include the
    Ubuntu-specific intrepid,jaunty md5sums for use during the
    common-session-noninteractive upgrade.
* Dropped changes, superseded upstream:
  - debian/patches-applied/ubuntu-fix_standard_types: Use standard u_int8_t
    type rather than __u8.
  - debian/patches-applied/ubuntu-user_defined_environment: Look at
    ~/.pam_environment too, with the same format as
    /etc/security/pam_env.conf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
197
197
               }
198
198
               return PAM_CONV_ERR;
199
199
          }
200
 
          if (resp)
201
 
               free(resp);
 
200
          free(resp);
202
201
     }
203
202
 
204
203
     *password = pass;             /* this *MUST* be free()'d by this module */
238
237
              retval = PAM_USER_UNKNOWN; /* username was null */
239
238
          return retval;
240
239
     }
241
 
     else if ((ctrl & PAM_ST_DEBUG) && (retval == PAM_SUCCESS)) {
 
240
     else if (ctrl & PAM_ST_DEBUG) {
242
241
          pam_syslog(pamh, LOG_DEBUG,
243
242
                     "pam_sm_authenticate: username = %s", username);
244
243
     }
426
425
          if (ctrl & PAM_ST_FAIL_1)
427
426
               return PAM_AUTHTOK_LOCK_BUSY;
428
427
 
429
 
          if ( !(ctrl && PAM_ST_EXPIRED)
 
428
          if ( !(ctrl & PAM_ST_EXPIRED)
430
429
               && (flags & PAM_CHANGE_EXPIRED_AUTHTOK)
431
430
               && (pam_get_data(pamh,"stress_new_pwd", &text)
432
431
                      != PAM_SUCCESS || strcmp(text,"yes"))) {