~ubuntu-branches/ubuntu/vivid/libpam-tacplus/vivid

« back to all changes in this revision

Viewing changes to libtac/lib/author_s.c

  • Committer: Package Import Robot
  • Author(s): Jeroen Nijhof
  • Date: 2012-05-19 19:25:00 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120519192500-n8ymcwdck1lv2401
Tags: 1.3.7-1
* New upstream release.
* Changed compat level to 9 for hardening
* Fixed license link

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
 
65
65
    tb.authen_method = tac_authen_method;
66
66
    tb.priv_lvl = tac_priv_lvl;
67
 
    if (strcmp(tac_login,"chap") == 0) {
68
 
        tb.authen_type = TAC_PLUS_AUTHEN_TYPE_CHAP;
69
 
    } else if (strcmp(tac_login,"login") == 0) {
70
 
        tb.authen_type = TAC_PLUS_AUTHEN_TYPE_ASCII;
 
67
    if (tac_login == NULL) {
 
68
        /* default to PAP */
 
69
        tb.authen_type = TAC_PLUS_AUTHEN_TYPE_PAP;
71
70
    } else {
72
 
        tb.authen_type = TAC_PLUS_AUTHEN_TYPE_PAP;
 
71
        if (strcmp(tac_login,"chap") == 0) {
 
72
            tb.authen_type = TAC_PLUS_AUTHEN_TYPE_CHAP;
 
73
        } else if (strcmp(tac_login,"login") == 0) {
 
74
            tb.authen_type = TAC_PLUS_AUTHEN_TYPE_ASCII;
 
75
        } else {
 
76
            tb.authen_type = TAC_PLUS_AUTHEN_TYPE_PAP;
 
77
        }
73
78
    }
74
79
    tb.service = tac_authen_service;
75
80
    tb.user_len = user_len;