~ubuntu-branches/ubuntu/oneiric/pam/oneiric-proposed

« back to all changes in this revision

Viewing changes to modules/pam_unix/support.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-02-17 16:15:47 UTC
  • mfrom: (3.2.15 sid)
  • Revision ID: james.westby@ubuntu.com-20110217161547-afxi0yboxvn18a5t
Tags: 1.1.2-2ubuntu1
* Merge from Debian unstable, 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-rlimit_nice_correction: Explicitly
    initialise RLIMIT_NICE rather than relying on the kernel limits.
  - Change Vcs-Bzr to point at the Ubuntu branch.
  - 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/update-motd.5, debian/libpam-modules.manpages: add a manpage
    for update-motd, with some best practices and notes of explanation.
  - debian/patches/update-motd-manpage-ref: add a reference in pam_motd(8)
    to update-motd(5)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Id: support.h,v 1.17 2008/12/01 15:10:22 t8m Exp $
 
2
 * $Id: support.h,v 1.18 2010/08/17 11:15:33 kukuk Exp $
3
3
 */
4
4
 
5
5
#ifndef _PAM_UNIX_SUPPORT_H
86
86
                                         * information during acct management */
87
87
#define UNIX_SHA256_PASS         23     /* new password hashes will use SHA256 */
88
88
#define UNIX_SHA512_PASS         24     /* new password hashes will use SHA512 */
89
 
#define UNIX_ALGO_ROUNDS         25     /* optional number of rounds for new 
 
89
#define UNIX_ALGO_ROUNDS         25     /* optional number of rounds for new
90
90
                                           password hash algorithms */
91
91
#define UNIX_BLOWFISH_PASS       26     /* new password hashes will use blowfish */
 
92
#define UNIX_MIN_PASS_LEN        27     /* min length for password */
92
93
/* -------------- */
93
 
#define UNIX_CTRLS_              27     /* number of ctrl arguments defined */
 
94
#define UNIX_CTRLS_              28     /* number of ctrl arguments defined */
 
95
 
 
96
#define UNIX_DES_CRYPT(ctrl)    (off(UNIX_MD5_PASS,ctrl)&&off(UNIX_BIGCRYPT,ctrl)&&off(UNIX_SHA256_PASS,ctrl)&&off(UNIX_SHA512_PASS,ctrl)&&off(UNIX_BLOWFISH_PASS,ctrl))
94
97
 
95
98
static const UNIX_Ctrls unix_args[UNIX_CTRLS_] =
96
99
{
124
127
/* UNIX_SHA512_PASS */     {"sha512",       _ALL_ON_^(0260420000), 040000000},
125
128
/* UNIX_ALGO_ROUNDS */     {"rounds=",         _ALL_ON_,          0100000000},
126
129
/* UNIX_BLOWFISH_PASS */   {"blowfish",    _ALL_ON_^(0260420000), 0200000000},
 
130
/* UNIX_MIN_PASS_LEN */    {"minlen=",          _ALL_ON_,          0400000000},
127
131
};
128
132
 
129
133
#define UNIX_DEFAULTS  (unix_args[UNIX__NONULL].flag)
141
145
extern int _make_remark(pam_handle_t * pamh, unsigned int ctrl
142
146
                       ,int type, const char *text);
143
147
extern int _set_ctrl(pam_handle_t * pamh, int flags, int *remember, int *rounds,
144
 
                     int argc, const char **argv);
 
148
                     int *pass_min_len, int argc, const char **argv);
145
149
extern int _unix_getpwnam (pam_handle_t *pamh,
146
150
                           const char *name, int files, int nis,
147
151
                           struct passwd **ret);