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

« back to all changes in this revision

Viewing changes to debian/patches-applied/007_modules_pam_unix

  • 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:
12
12
 /*
13
13
    How it works:
14
14
    Gets in username (has to be done) from the calling program
15
 
@@ -457,7 +460,8 @@
16
 
 static int _pam_unix_approve_pass(pam_handle_t * pamh
17
 
                                  ,unsigned int ctrl
18
 
                                  ,const char *pass_old
19
 
-                                 ,const char *pass_new)
20
 
+                                 ,const char *pass_new,
21
 
+                                  int pass_min_len)
22
 
 {
23
 
        const void *user;
24
 
        const char *remark = NULL;
25
 
@@ -488,7 +492,7 @@
26
 
                }
27
 
        }
28
 
        if (off(UNIX__IAMROOT, ctrl)) {
29
 
-               if (strlen(pass_new) < 6)
30
 
+               if (strlen(pass_new) < pass_min_len)
31
 
                  remark = _("You must choose a longer password");
32
 
                D(("length check [%s]", remark));
33
 
                if (on(UNIX_REMEMBER_PASSWD, ctrl)) {
34
 
@@ -500,6 +504,11 @@
 
15
@@ -501,6 +504,11 @@
35
16
                                return retval;
36
17
                        }
37
18
                }
43
24
        }
44
25
        if (remark) {
45
26
                _make_remark(pamh, ctrl, PAM_ERROR_MSG, remark);
46
 
@@ -516,6 +525,7 @@
 
27
@@ -517,7 +525,7 @@
47
28
        int retval;
48
29
        int remember = -1;
49
30
        int rounds = -1;
 
31
-       int pass_min_len = 0;
50
32
+       int pass_min_len = 6;
51
33
 
52
34
        /* <DO NOT free() THESE> */
53
35
        const char *user;
54
 
@@ -524,7 +534,8 @@
55
 
 
56
 
        D(("called."));
57
 
 
58
 
-       ctrl = _set_ctrl(pamh, flags, &remember, &rounds, argc, argv);
59
 
+       ctrl = _set_ctrl(pamh, flags, &remember, &rounds, &pass_min_len,
60
 
+                        argc, argv);
61
 
 
62
 
        /*
63
 
         * First get the name of a user
64
 
@@ -724,7 +735,8 @@
65
 
                        if (*(const char *)pass_new == '\0') {  /* "\0" password = NULL */
66
 
                                pass_new = NULL;
67
 
                        }
68
 
-                       retval = _pam_unix_approve_pass(pamh, ctrl, pass_old, pass_new);
69
 
+                       retval = _pam_unix_approve_pass(pamh, ctrl, pass_old,
70
 
+                                                       pass_new, pass_min_len);
71
 
 
72
 
                        if (retval != PAM_SUCCESS && off(UNIX_NOT_SET_PASS, ctrl)) {
73
 
                                pam_set_item(pamh, PAM_AUTHTOK, NULL);
74
 
@@ -757,7 +769,8 @@
75
 
                        return retval;
76
 
                }
77
 
 
78
 
-               retval = _pam_unix_approve_pass(pamh, ctrl, pass_old, pass_new);
79
 
+               retval = _pam_unix_approve_pass(pamh, ctrl, pass_old, pass_new,
80
 
+                                               pass_min_len);
81
 
                if (retval != PAM_SUCCESS) {
82
 
                        pam_syslog(pamh, LOG_NOTICE,
83
 
                                 "new password not acceptable 2");
84
 
Index: pam.deb/modules/pam_unix/pam_unix_acct.c
85
 
===================================================================
86
 
--- pam.deb.orig/modules/pam_unix/pam_unix_acct.c
87
 
+++ pam.deb/modules/pam_unix/pam_unix_acct.c
88
 
@@ -191,7 +191,7 @@
89
 
 
90
 
        D(("called."));
91
 
 
92
 
-       ctrl = _set_ctrl(pamh, flags, NULL, NULL, argc, argv);
93
 
+       ctrl = _set_ctrl(pamh, flags, NULL, NULL, NULL, argc, argv);
94
 
 
95
 
        retval = pam_get_item(pamh, PAM_USER, &void_uname);
96
 
        uname = void_uname;
97
36
Index: pam.deb/modules/pam_unix/support.c
98
37
===================================================================
99
38
--- pam.deb.orig/modules/pam_unix/support.c
100
39
+++ pam.deb/modules/pam_unix/support.c
101
 
@@ -55,7 +55,7 @@
102
 
  */
103
 
 
104
 
 int _set_ctrl(pam_handle_t *pamh, int flags, int *remember, int *rounds,
105
 
-             int argc, const char **argv)
106
 
+             int *pass_min_len, int argc, const char **argv)
107
 
 {
108
 
        unsigned int ctrl;
109
 
 
110
40
@@ -81,6 +81,7 @@
111
41
                D(("SILENT"));
112
42
                set(UNIX__QUIET, ctrl);
125
55
                                break;
126
56
                        }
127
57
                }
128
 
@@ -102,15 +104,16 @@
129
 
                        ctrl &= unix_args[j].mask;      /* for turning things off */
130
 
                        ctrl |= unix_args[j].flag;      /* for turning things on  */
131
 
 
132
 
-                       if (remember != NULL) {
133
 
-                               if (j == UNIX_REMEMBER_PASSWD) {
134
 
-                                       *remember = strtol(*argv + 9, NULL, 10);
135
 
-                                       if ((*remember == INT_MIN) || (*remember == INT_MAX))
136
 
-                                               *remember = -1;
137
 
-                                       if (*remember > 400)
138
 
-                                               *remember = 400;
139
 
-                               }
140
 
-                       }
141
 
+                       /* special cases */
142
 
+                       if (remember != NULL && j == UNIX_REMEMBER_PASSWD) {
143
 
+                               *remember = strtol(*argv + 9, NULL, 10);
144
 
+                               if ((*remember == INT_MIN) || (*remember == INT_MAX))
145
 
+                                       *remember = -1;
146
 
+                               if (*remember > 400)
147
 
+                                       *remember = 400;
148
 
+                       } else if (pass_min_len && j == UNIX_MIN_PASS_LEN) {
149
 
+                               *pass_min_len = atoi(*argv + 4);
150
 
+                       }
151
 
                        if (rounds != NULL && j == UNIX_ALGO_ROUNDS)
152
 
                                *rounds = strtol(*argv + 7, NULL, 10);
153
 
                }
154
 
@@ -118,6 +121,10 @@
155
 
                ++argv;         /* step to next argument */
156
 
        }
157
 
 
158
 
+       if (off(UNIX_HASH_MASK,ctrl)
159
 
+           && pass_min_len && *pass_min_len > 8)
160
 
+               *pass_min_len = 8;
161
 
+
162
 
        if (flags & PAM_DISALLOW_NULL_AUTHTOK) {
163
 
                D(("DISALLOW_NULL_AUTHTOK"));
164
 
                set(UNIX__NONULL, ctrl);
165
58
Index: pam.deb/modules/pam_unix/support.h
166
59
===================================================================
167
60
--- pam.deb.orig/modules/pam_unix/support.h
168
61
+++ pam.deb/modules/pam_unix/support.h
169
 
@@ -89,41 +89,49 @@
170
 
 #define UNIX_ALGO_ROUNDS         25    /* optional number of rounds for new 
 
62
@@ -90,8 +90,9 @@
171
63
                                           password hash algorithms */
172
64
 #define UNIX_BLOWFISH_PASS       26    /* new password hashes will use blowfish */
173
 
+#define UNIX_MAX_PASS_LEN        27    /* internal, for compatibility only */
174
 
+#define UNIX_MIN_PASS_LEN        28    /* min length for password */
175
 
+#define UNIX_OBSCURE_CHECKS      29    /* enable obscure checks on passwords */
 
65
 #define UNIX_MIN_PASS_LEN        27    /* min length for password */
 
66
+#define UNIX_OBSCURE_CHECKS      28    /* enable obscure checks on passwords */
176
67
 /* -------------- */
177
 
-#define UNIX_CTRLS_              27    /* number of ctrl arguments defined */
178
 
+#define UNIX_CTRLS_              30    /* number of ctrl arguments defined */
179
 
+
180
 
+#define UNIX_HASH_MASK (UNIX_MD5_PASS|UNIX_BIGCRYPT|UNIX_SHA256_PASS|UNIX_SHA512_PASS|UNIX_BLOWFISH_PASS)
181
 
 
182
 
 static const UNIX_Ctrls unix_args[UNIX_CTRLS_] =
183
 
 {
 
68
-#define UNIX_CTRLS_              28    /* number of ctrl arguments defined */
 
69
+#define UNIX_CTRLS_              29    /* number of ctrl arguments defined */
 
70
 
 
71
 #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))
 
72
 
 
73
@@ -100,34 +101,35 @@
184
74
 /* symbol                  token name          ctrl mask             ctrl     *
185
75
  * ----------------------- ------------------- --------------------- -------- */
186
76
 
211
101
-/* UNIX_SHA512_PASS */     {"sha512",       _ALL_ON_^(0260420000), 040000000},
212
102
-/* UNIX_ALGO_ROUNDS */     {"rounds=",         _ALL_ON_,          0100000000},
213
103
-/* UNIX_BLOWFISH_PASS */   {"blowfish",    _ALL_ON_^(0260420000), 0200000000},
 
104
-/* UNIX_MIN_PASS_LEN */    {"minlen=",         _ALL_ON_,          0400000000},
214
105
+/* UNIX__OLD_PASSWD */     {NULL,              _ALL_ON_,                  0x1},
215
106
+/* UNIX__VERIFY_PASSWD */  {NULL,              _ALL_ON_,                  0x2},
216
107
+/* UNIX__IAMROOT */        {NULL,              _ALL_ON_,                  0x4},
238
129
+/* UNIX_SHA512_PASS */     {"sha512",          _ALL_ON_^(0x2C22000), 0x800000},
239
130
+/* UNIX_ALGO_ROUNDS */     {"rounds=",         _ALL_ON_,            0x1000000},
240
131
+/* UNIX_BLOWFISH_PASS */   {"blowfish",        _ALL_ON_^(0x2C22000),0x2000000},
241
 
+/* UNIX_MAX_PASS_LEN */    {"max=",            _ALL_ON_,                    0},
242
 
+/* UNIX_MIN_PASS_LEN */    {"min=",            _ALL_ON_,            0x4000000},
 
132
+/* UNIX_MIN_PASS_LEN */    {"minlen=",         _ALL_ON_,            0x4000000},
243
133
+/* UNIX_OBSCURE_CHECKS */  {"obscure",         _ALL_ON_,            0x8000000},
244
134
 };
245
135
 
246
136
 #define UNIX_DEFAULTS  (unix_args[UNIX__NONULL].flag)
247
 
@@ -141,7 +149,7 @@
248
 
 extern int _make_remark(pam_handle_t * pamh, unsigned int ctrl
249
 
                       ,int type, const char *text);
250
 
 extern int _set_ctrl(pam_handle_t * pamh, int flags, int *remember, int *rounds,
251
 
-                    int argc, const char **argv);
252
 
+                    int *pass_min_len, int argc, const char **argv);
253
 
 extern int _unix_getpwnam (pam_handle_t *pamh,
254
 
                           const char *name, int files, int nis,
255
 
                           struct passwd **ret);
256
137
Index: pam.deb/modules/pam_unix/pam_unix.8.xml
257
138
===================================================================
258
139
--- pam.deb.orig/modules/pam_unix/pam_unix.8.xml
259
140
+++ pam.deb/modules/pam_unix/pam_unix.8.xml
260
 
@@ -326,6 +326,90 @@
261
 
           </para>
262
 
         </listitem>
263
 
       </varlistentry>
264
 
+      <varlistentry>
265
 
+        <term>
266
 
+          <option>min=<replaceable>n</replaceable></option>
267
 
+        </term>
268
 
+        <listitem>
269
 
+          <para>
270
 
+            Set a minimum password length of <replaceable>n</replaceable>
271
 
+            characters.  The default value is 6.
 
141
@@ -333,8 +333,81 @@
 
142
         <listitem>
 
143
           <para>
 
144
             Set a minimum password length of <replaceable>n</replaceable>
 
145
-            characters. The max. for DES crypt based passwords are 8
 
146
-            characters.
 
147
+            characters.  The default value is 6.  The maximum for DES
 
148
+            crypt-based passwords is 8 characters.
272
149
+          </para>
273
150
+        </listitem>
274
151
+      </varlistentry>
342
219
+                </listitem>
343
220
+              </varlistentry>
344
221
+            </variablelist>
345
 
+          </para>
346
 
+        </listitem>
347
 
+      </varlistentry>
348
 
     </variablelist>
349
 
     <para>
350
 
       Invalid arguments are logged with  <citerefentry>
 
222
           </para>
 
223
         </listitem>
 
224
       </varlistentry>
351
225
Index: pam.deb/modules/pam_unix/obscure.c
352
226
===================================================================
353
227
--- /dev/null
535
409
+          Example: "password$%^&*123".  So check it again, this time
536
410
+          truncated to the maximum length.  Idea from npasswd.  --marekm */
537
411
+
538
 
+       if (on(UNIX_HASH_MASK,ctrl))
 
412
+       if (!UNIX_DES_CRYPT(ctrl))
539
413
+               return NULL;  /* unlimited password length */
540
414
+
541
415
+       if (oldlen <= 8 && newlen <= 8)
564
438
 
565
439
 bigcrypt_SOURCES = bigcrypt.c bigcrypt_main.c
566
440
 bigcrypt_CFLAGS = $(AM_CFLAGS)
567
 
Index: pam.deb/modules/pam_unix/pam_unix_auth.c
568
 
===================================================================
569
 
--- pam.deb.orig/modules/pam_unix/pam_unix_auth.c
570
 
+++ pam.deb/modules/pam_unix/pam_unix_auth.c
571
 
@@ -109,7 +109,7 @@
572
 
 
573
 
        D(("called."));
574
 
 
575
 
-       ctrl = _set_ctrl(pamh, flags, NULL, NULL, argc, argv);
576
 
+       ctrl = _set_ctrl(pamh, flags, NULL, NULL, NULL, argc, argv);
577
 
 
578
 
        /* Get a few bytes so we can pass our return value to
579
 
           pam_sm_setcred(). */
580
 
Index: pam.deb/modules/pam_unix/pam_unix_sess.c
581
 
===================================================================
582
 
--- pam.deb.orig/modules/pam_unix/pam_unix_sess.c
583
 
+++ pam.deb/modules/pam_unix/pam_unix_sess.c
584
 
@@ -73,7 +73,7 @@
585
 
 
586
 
        D(("called."));
587
 
 
588
 
-       ctrl = _set_ctrl(pamh, flags, NULL, NULL, argc, argv);
589
 
+       ctrl = _set_ctrl(pamh, flags, NULL, NULL, NULL, argc, argv);
590
 
 
591
 
        retval = pam_get_item(pamh, PAM_USER, (void *) &user_name);
592
 
        if (user_name == NULL || *user_name == '\0' || retval != PAM_SUCCESS) {
593
 
@@ -107,7 +107,7 @@
594
 
 
595
 
        D(("called."));
596
 
 
597
 
-       ctrl = _set_ctrl(pamh, flags, NULL, NULL, argc, argv);
598
 
+       ctrl = _set_ctrl(pamh, flags, NULL, NULL, NULL, argc, argv);
599
 
 
600
 
        retval = pam_get_item(pamh, PAM_USER, (void *) &user_name);
601
 
        if (user_name == NULL || *user_name == '\0' || retval != PAM_SUCCESS) {
602
441
Index: pam.deb/modules/pam_unix/pam_unix.8
603
442
===================================================================
604
443
--- pam.deb.orig/modules/pam_unix/pam_unix.8
605
444
+++ pam.deb/modules/pam_unix/pam_unix.8
606
 
@@ -166,13 +166,11 @@
 
445
@@ -1,161 +1,22 @@
 
446
+'\" t
 
447
 .\"     Title: pam_unix
 
448
 .\"    Author: [see the "AUTHOR" section]
 
449
-.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
 
450
-.\"      Date: 08/17/2010
 
451
+.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
 
452
+.\"      Date: 08/31/2010
 
453
 .\"    Manual: Linux-PAM Manual
 
454
 .\"    Source: Linux-PAM Manual
 
455
 .\"  Language: English
 
456
 .\"
 
457
-.TH "PAM_UNIX" "8" "08/17/2010" "Linux-PAM Manual" "Linux\-PAM Manual"
 
458
+.TH "PAM_UNIX" "8" "08/31/2010" "Linux-PAM Manual" "Linux\-PAM Manual"
 
459
 .\" -----------------------------------------------------------------
 
460
-.\" * (re)Define some macros
 
461
+.\" * Define some portability stuff
 
462
 .\" -----------------------------------------------------------------
 
463
 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
464
-.\" toupper - uppercase a string (locale-aware)
 
465
+.\" http://bugs.debian.org/507673
 
466
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
 
467
 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
468
-.de toupper
 
469
-.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
 
470
-\\$*
 
471
-.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
 
472
-..
 
473
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
474
-.\" SH-xref - format a cross-reference to an SH section
 
475
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
476
-.de SH-xref
 
477
-.ie n \{\
 
478
-.\}
 
479
-.toupper \\$*
 
480
-.el \{\
 
481
-\\$*
 
482
-.\}
 
483
-..
 
484
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
485
-.\" SH - level-one heading that works better for non-TTY output
 
486
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
487
-.de1 SH
 
488
-.\" put an extra blank line of space above the head in non-TTY output
 
489
-.if t \{\
 
490
-.sp 1
 
491
-.\}
 
492
-.sp \\n[PD]u
 
493
-.nr an-level 1
 
494
-.set-an-margin
 
495
-.nr an-prevailing-indent \\n[IN]
 
496
-.fi
 
497
-.in \\n[an-margin]u
 
498
-.ti 0
 
499
-.HTML-TAG ".NH \\n[an-level]"
 
500
-.it 1 an-trap
 
501
-.nr an-no-space-flag 1
 
502
-.nr an-break-flag 1
 
503
-\." make the size of the head bigger
 
504
-.ps +3
 
505
-.ft B
 
506
-.ne (2v + 1u)
 
507
-.ie n \{\
 
508
-.\" if n (TTY output), use uppercase
 
509
-.toupper \\$*
 
510
-.\}
 
511
-.el \{\
 
512
-.nr an-break-flag 0
 
513
-.\" if not n (not TTY), use normal case (not uppercase)
 
514
-\\$1
 
515
-.in \\n[an-margin]u
 
516
-.ti 0
 
517
-.\" if not n (not TTY), put a border/line under subheading
 
518
-.sp -.6
 
519
-\l'\n(.lu'
 
520
-.\}
 
521
-..
 
522
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
523
-.\" SS - level-two heading that works better for non-TTY output
 
524
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
525
-.de1 SS
 
526
-.sp \\n[PD]u
 
527
-.nr an-level 1
 
528
-.set-an-margin
 
529
-.nr an-prevailing-indent \\n[IN]
 
530
-.fi
 
531
-.in \\n[IN]u
 
532
-.ti \\n[SN]u
 
533
-.it 1 an-trap
 
534
-.nr an-no-space-flag 1
 
535
-.nr an-break-flag 1
 
536
-.ps \\n[PS-SS]u
 
537
-\." make the size of the head bigger
 
538
-.ps +2
 
539
-.ft B
 
540
-.ne (2v + 1u)
 
541
-.if \\n[.$] \&\\$*
 
542
-..
 
543
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
544
-.\" BB/BE - put background/screen (filled box) around block of text
 
545
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
546
-.de BB
 
547
-.if t \{\
 
548
-.sp -.5
 
549
-.br
 
550
-.in +2n
 
551
-.ll -2n
 
552
-.gcolor red
 
553
-.di BX
 
554
-.\}
 
555
-..
 
556
-.de EB
 
557
-.if t \{\
 
558
-.if "\\$2"adjust-for-leading-newline" \{\
 
559
-.sp -1
 
560
-.\}
 
561
-.br
 
562
-.di
 
563
-.in
 
564
-.ll
 
565
-.gcolor
 
566
-.nr BW \\n(.lu-\\n(.i
 
567
-.nr BH \\n(dn+.5v
 
568
-.ne \\n(BHu+.5v
 
569
-.ie "\\$2"adjust-for-leading-newline" \{\
 
570
-\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
 
571
-.\}
 
572
-.el \{\
 
573
-\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
 
574
-.\}
 
575
-.in 0
 
576
-.sp -.5v
 
577
-.nf
 
578
-.BX
 
579
-.in
 
580
-.sp .5v
 
581
-.fi
 
582
-.\}
 
583
-..
 
584
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
585
-.\" BM/EM - put colored marker in margin next to block of text
 
586
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
587
-.de BM
 
588
-.if t \{\
 
589
-.br
 
590
-.ll -2n
 
591
-.gcolor red
 
592
-.di BX
 
593
-.\}
 
594
-..
 
595
-.de EM
 
596
-.if t \{\
 
597
-.br
 
598
-.di
 
599
-.ll
 
600
-.gcolor
 
601
-.nr BH \\n(dn
 
602
-.ne \\n(BHu
 
603
-\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
 
604
-.in 0
 
605
-.nf
 
606
-.BX
 
607
-.in
 
608
-.fi
 
609
-.\}
 
610
-..
 
611
+.ie \n(.g .ds Aq \(aq
 
612
+.el       .ds Aq '
 
613
 .\" -----------------------------------------------------------------
 
614
 .\" * set default formatting
 
615
 .\" -----------------------------------------------------------------
 
616
@@ -166,38 +27,36 @@
607
617
 .\" -----------------------------------------------------------------
608
618
 .\" * MAIN CONTENT STARTS HERE *
609
619
 .\" -----------------------------------------------------------------
618
628
-.fam
619
629
 .SH "DESCRIPTION"
620
630
 .PP
621
 
 This is the standard Unix authentication module\&. It uses standard calls from the system\'s libraries to retrieve and set account information as well as authentication\&. Usually this is obtained from the /etc/passwd and the /etc/shadow file as well if shadow is enabled\&.
622
 
@@ -264,7 +262,7 @@
 
631
-This is the standard Unix authentication module\&. It uses standard calls from the system\'s libraries to retrieve and set account information as well as authentication\&. Usually this is obtained from the /etc/passwd and the /etc/shadow file as well if shadow is enabled\&.
 
632
+This is the standard Unix authentication module\&. It uses standard calls from the system\*(Aqs libraries to retrieve and set account information as well as authentication\&. Usually this is obtained from the /etc/passwd and the /etc/shadow file as well if shadow is enabled\&.
 
633
 .PP
 
634
-The account component performs the task of establishing the status of the user\'s account and password based on the following
 
635
+The account component performs the task of establishing the status of the user\*(Aqs account and password based on the following
 
636
 \fIshadow\fR
 
637
 elements: expire, last_change, max_change, min_change, warn_change\&. In the case of the latter, it may offer advice to the user on changing their password or, through the
 
638
 \fBPAM_AUTHTOKEN_REQD\fR
 
639
 return, delay giving service to the user until they have established a new password\&. The entries listed above are documented in the
 
640
 \fBshadow\fR(5)
 
641
-manual page\&. Should the user\'s record not contain one or more of these entries, the corresponding
 
642
+manual page\&. Should the user\*(Aqs record not contain one or more of these entries, the corresponding
 
643
 \fIshadow\fR
 
644
 check is not performed\&.
 
645
 .PP
 
646
 The authentication component performs the task of checking the users credentials (password)\&. The default action of this module is to not permit the user access to a service if their official password is blank\&.
 
647
 .PP
 
648
 A helper binary,
 
649
-\fBunix_chkpwd\fR(8), is provided to check the user\'s password when it is stored in a read protected database\&. This binary is very simple and will only check the password of the user invoking it\&. It is called transparently on behalf of the user by the authenticating component of this module\&. In this way it is possible for applications like
 
650
+\fBunix_chkpwd\fR(8), is provided to check the user\*(Aqs password when it is stored in a read protected database\&. This binary is very simple and will only check the password of the user invoking it\&. It is called transparently on behalf of the user by the authenticating component of this module\&. In this way it is possible for applications like
 
651
 \fBxlock\fR(1)
 
652
-to work without being setuid\-root\&. The module, by default, will temporarily turn off SIGCHLD handling for the duration of execution of the helper binary\&. This is generally the right thing to do, as many applications are not prepared to handle this signal from a child they didn\'t know was
 
653
+to work without being setuid\-root\&. The module, by default, will temporarily turn off SIGCHLD handling for the duration of execution of the helper binary\&. This is generally the right thing to do, as many applications are not prepared to handle this signal from a child they didn\*(Aqt know was
 
654
 \fBfork()\fRd\&. The
 
655
 \fBnoreap\fR
 
656
 module argument can be used to suppress this temporary shielding and may be needed for use with certain applications\&.
 
657
 .PP
 
658
-The password component of this module performs the task of updating the user\'s password\&.
 
659
+The password component of this module performs the task of updating the user\*(Aqs password\&.
 
660
 .PP
 
661
 The session component of this module logs when a user logins or leave the system\&.
 
662
 .PP
 
663
@@ -225,7 +84,7 @@
 
664
 .PP
 
665
 \fBtry_first_pass\fR
 
666
 .RS 4
 
667
-Before prompting the user for their password, the module first tries the previous stacked module\'s password in case that satisfies this module as well\&.
 
668
+Before prompting the user for their password, the module first tries the previous stacked module\*(Aqs password in case that satisfies this module as well\&.
 
669
 .RE
 
670
 .PP
 
671
 \fBuse_first_pass\fR
 
672
@@ -264,7 +123,7 @@
623
673
 The last
624
674
 \fIn\fR
625
675
 passwords for each user are saved in
628
678
 in order to force password change history and keep the user from alternating between the same password too frequently\&.
629
679
 .RE
630
680
 .PP
631
 
@@ -315,6 +313,44 @@
632
 
 Ignore errors reading shadow information for users in the account management module\&.
633
 
 .RE
634
 
 .PP
635
 
+\fBmin=\fR\fB\fIn\fR\fR
636
 
+.RS 4
637
 
+Set a minimum password length of
638
 
+\fIn\fR
639
 
+characters\&. The default value is 6\&.
 
681
@@ -319,7 +178,38 @@
 
682
 .RS 4
 
683
 Set a minimum password length of
 
684
 \fIn\fR
 
685
-characters\&. The max\&. for DES crypt based passwords are 8 characters\&.
 
686
+characters\&. The default value is 6\&. The maximum for DES crypt\-based passwords is 8 characters\&.
640
687
+.RE
641
688
+.PP
642
689
+\fBobscure\fR
650
697
+.PP
651
698
+\fBCase Change Only\fR
652
699
+.RS 4
653
 
+Verifies that the new password isn\'t the same as the old one with a change of case\&.
 
700
+Verifies that the new password isn\*(Aqt the same as the old one with a change of case\&.
654
701
+.RE
655
702
+.PP
656
703
+\fBSimilar\fR
657
704
+.RS 4
658
 
+Verifies that the new password isn\'t too much like the previous one\&.
 
705
+Verifies that the new password isn\*(Aqt too much like the previous one\&.
659
706
+.RE
660
707
+.PP
661
708
+\fBSimple\fR
668
715
+Is the new password a rotated version of the old password? (E\&.g\&., "billy" and "illyb")
669
716
+.RE
670
717
+.sp
671
 
+.RE
672
 
+.PP
 
718
 .RE
 
719
 .PP
673
720
 Invalid arguments are logged with
674
 
 \fBsyslog\fR(3)\&.
675
 
 .SH "MODULE TYPES PROVIDED"
676
 
@@ -333,21 +369,13 @@
 
721
@@ -340,21 +230,13 @@
677
722
 .SH "EXAMPLES"
678
723
 .PP
679
724
 An example usage for
696
741
 # Authenticate the user
697
742
 auth       required   pam_unix\&.so
698
743
 # Ensure users account and password are still active
699
 
@@ -358,13 +386,7 @@
 
744
@@ -365,13 +247,7 @@
700
745
 password   required   pam_unix\&.so use_authtok nullok md5
701
746
 session    required   pam_unix\&.so
702
747