~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to helpers/basic_auth/YP/nis_support.c

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2010-05-04 11:15:49 UTC
  • mfrom: (1.3.1 upstream)
  • mto: (20.3.1 squeeze) (21.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20100504111549-1apjh2g5sndki4te
Tags: upstream-3.1.3
ImportĀ upstreamĀ versionĀ 3.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
    /* Free last entry */
31
31
    if (val) {
32
 
        free(val);
33
 
        val = NULL;
 
32
        free(val);
 
33
        val = NULL;
34
34
    }
35
35
 
36
36
    /* Get NIS entry */
38
38
 
39
39
    switch (res) {
40
40
    case NO_YPERR:
41
 
        /* username = */ (void) strtok(val, ":");
42
 
        password = strtok(NULL, ",:");
43
 
        return password;
 
41
        /* username = */
 
42
        (void) strtok(val, ":");
 
43
        password = strtok(NULL, ",:");
 
44
        return password;
44
45
    case YPERR_YPBIND:
45
 
        syslog(LOG_ERR, "Squid Authentication through ypbind failure: can't communicate with ypbind");
46
 
        return NULL;
 
46
        syslog(LOG_ERR, "Squid Authentication through ypbind failure: can't communicate with ypbind");
 
47
        return NULL;
47
48
    case YPERR_KEY:             /* No such key in map */
48
 
        return NULL;
 
49
        return NULL;
49
50
    default:
50
 
        return NULL;
 
51
        return NULL;
51
52
    }
52
53
}