~ubuntu-branches/ubuntu/intrepid/squid/intrepid-security

« back to all changes in this revision

Viewing changes to helpers/external_acl/ldap_group/squid_ldap_group.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2008-06-18 12:09:23 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20080618120923-ewllt4kt92ldtvbe
Tags: 2.7.STABLE2-2ubuntu1
* Merge from debian unstable, remaining changes:
  - 99-ubuntu-ssl-cert-snakeoil:
    + src/cf.data.pre:
      * Add reference to snakeoil /etc/ssl
  - debian/control
    + Add ssl-cert to Depends to bring in snakeoil certificates.
    + Modify maintainer value to match Debian-Maintainer-Field spec.
  - debian/squid.rc
    - Use squid -k to reload the squid confiration. (LP: #204474)

Show diffs side-by-side

added added

removed removed

Lines of Context:
217
217
    int port = LDAP_PORT;
218
218
    int use_extension_dn = 0;
219
219
    int strip_nt_domain = 0;
 
220
    int strip_kerberos_realm = 0;
220
221
    int err = 0;
221
222
 
222
223
    setbuf(stdout, NULL);
372
373
        case 'S':
373
374
            strip_nt_domain = 1;
374
375
            break;
 
376
        case 'K':
 
377
            strip_kerberos_realm = 1;
 
378
            break;
375
379
        default:
376
380
            fprintf(stderr, PROGRAM_NAME " ERROR: Unknown command line option '%c'\n", option);
377
381
            exit(1);
426
430
#endif
427
431
        fprintf(stderr, "\t-g\t\t\tfirst query parameter is base DN extension\n\t\t\t\tfor this query\n");
428
432
        fprintf(stderr, "\t-S\t\t\tStrip NT domain from usernames\n");
 
433
        fprintf(stderr, "\t-K\t\t\tStrip Kerberos realm from usernames\n");
429
434
        fprintf(stderr, "\n");
430
435
        fprintf(stderr, "\tIf you need to bind as a user to perform searches then use the\n\t-D binddn -w bindpasswd or -D binddn -W secretfile options\n\n");
431
436
        exit(1);
471
476
            if (u && u[1])
472
477
                user = u + 1;
473
478
        }
 
479
        if (strip_kerberos_realm) {
 
480
            char *u = strchr(user, '@');
 
481
            if (u != NULL) {
 
482
                *u = '\0';
 
483
            }
 
484
        }
474
485
        if (use_extension_dn) {
475
486
            extension_dn = strtok(NULL, " \n");
476
487
            if (!extension_dn) {
785
796
}
786
797
 
787
798
 
788
 
int 
 
799
int
789
800
readSecret(char *filename)
790
801
{
791
802
    char buf[BUFSIZ];