~xnox/ubuntu/quantal/shadow/clear-locks

« back to all changes in this revision

Viewing changes to src/faillog.c

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Valcárcel Scerpella (Canonical)
  • Date: 2009-11-07 04:55:18 UTC
  • mfrom: (1.1.8 upstream) (18.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091107045518-qqclg1lhinz6zv1i
Tags: 1:4.1.4.2-1ubuntu1
* Merged with debian unstable. Remaning changes (LP: #477299):
  - Ubuntu specific:
    + debian/login.defs: use SHA512 by default for password crypt routine.
  - debian/patches/495_stdout-encrypted-password: chpasswd can report
    password hashes on stdout (Debian bug 505640).
  - Rework 495_stdout-encrypted-password to cope with chpasswd using PAM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
#include <config.h>
34
34
 
35
 
#ident "$Id: faillog.c 2851 2009-04-30 21:39:38Z nekral-guest $"
 
35
#ident "$Id: faillog.c 3015 2009-06-05 22:16:56Z nekral-guest $"
36
36
 
37
37
#include <getopt.h>
38
38
#include <pwd.h>
71
71
 
72
72
static void usage (void)
73
73
{
74
 
        fputs (_("Usage: faillog [options]\n"
75
 
                 "\n"
76
 
                 "Options:\n"
77
 
                 "  -a, --all                     display faillog records for all users\n"
78
 
                 "  -h, --help                    display this help message and exit\n"
79
 
                 "  -l, --lock-time SEC           after failed login lock account to SEC seconds\n"
80
 
                 "  -m, --maximum MAX             set maximum failed login counters to MAX\n"
81
 
                 "  -r, --reset                   reset the counters of login failures\n"
82
 
                 "  -t, --time DAYS               display faillog records more recent than DAYS\n"
83
 
                 "  -u, --user LOGIN              display faillog record or maintains failure\n"
84
 
                 "                                counters and limits (if used with -r, -m or -l\n"
85
 
                 "                                options) only for user with LOGIN\n"
86
 
                 "\n"), stderr);
 
74
        (void) fprintf (stderr,
 
75
                        _("Usage: %s [options]\n"
 
76
                          "\n"
 
77
                          "Options:\n"),
 
78
                        "faillog");
 
79
        (void) fputs (_("  -a, --all                     display faillog records for all users\n"), stderr);
 
80
        (void) fputs (_("  -h, --help                    display this help message and exit\n"), stderr);
 
81
        (void) fputs (_("  -l, --lock-time SEC           after failed login lock account for SEC seconds\n"), stderr);
 
82
        (void) fputs (_("  -m, --maximum MAX             set maximum failed login counters to MAX\n"), stderr);
 
83
        (void) fputs (_("  -r, --reset                   reset the counters of login failures\n"), stderr);
 
84
        (void) fputs (_("  -t, --time DAYS               display faillog records more recent than DAYS\n"), stderr);
 
85
        (void) fputs (_("  -u, --user LOGIN/RANGE        display faillog record or maintains failure\n"
 
86
                        "                                counters and limits (if used with -r, -m,\n"
 
87
                        "                                or -l) only for the specified LOGIN(s)\n"), stderr);
 
88
        (void) fputs ("\n", stderr);
87
89
        exit (E_USAGE);
88
90
}
89
91