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

« back to all changes in this revision

Viewing changes to libtac/lib/acct_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:
79
79
    tb.flags=(u_char) type;
80
80
    tb.authen_method=tac_authen_method;
81
81
    tb.priv_lvl=tac_priv_lvl;
82
 
    if (strcmp(tac_login,"chap") == 0) {
83
 
        tb.authen_type=TAC_PLUS_AUTHEN_TYPE_CHAP;
84
 
    } else if(strcmp(tac_login,"login") == 0) {
85
 
        tb.authen_type=TAC_PLUS_AUTHEN_TYPE_ASCII;
 
82
    if (tac_login == NULL) {
 
83
        /* default to PAP */
 
84
        tb.authen_type = TAC_PLUS_AUTHEN_TYPE_PAP;
86
85
    } else {
87
 
        tb.authen_type=TAC_PLUS_AUTHEN_TYPE_PAP;
 
86
        if (strcmp(tac_login,"chap") == 0) {
 
87
            tb.authen_type=TAC_PLUS_AUTHEN_TYPE_CHAP;
 
88
        } else if(strcmp(tac_login,"login") == 0) {
 
89
            tb.authen_type=TAC_PLUS_AUTHEN_TYPE_ASCII;
 
90
        } else {
 
91
            tb.authen_type=TAC_PLUS_AUTHEN_TYPE_PAP;
 
92
        }
88
93
    }
89
94
    tb.authen_service=tac_authen_service;
90
95
    tb.user_len=user_len;