~ubuntu-branches/ubuntu/karmic/openafs/karmic-updates

« back to all changes in this revision

Viewing changes to src/audit/audit.c

  • Committer: Bazaar Package Importer
  • Author(s): Russ Allbery
  • Date: 2008-09-22 19:07:02 UTC
  • mfrom: (12.1.14 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080922190702-59m13d7kn6gkw32d
Tags: 1.4.7.dfsg1-6
* Apply upstream patch to free /proc entries in the correct order.
  Thanks, Marc Dionne.  (Closes: #493914)
* Apply upstream deltas to support 2.6.27 kernels and to stop using
  COMMON_KERN_CFLAGS for all 2.6 kernels uniformly, which fixes
  problems on amd64 with newer kernels.  Thanks, Björn Torkelsson.
  (LP: #267504)
* Translation updates:
  - Swedish, thanks Martin Bagge.  (Closes: #493120)

Show diffs side-by-side

added added

removed removed

Lines of Context:
447
447
                    }
448
448
                    if ((clen = strlen(tcell))) {
449
449
#if defined(AFS_ATHENA_STDENV) || defined(AFS_KERBREALM_ENV)
450
 
                        static char local_realm[AFS_REALM_SZ] = "";
451
 
                        if (!local_realm[0]) {
452
 
                            if (afs_krb_get_lrealm(local_realm, 0) != 0 /*KSUCCESS*/)
453
 
                                strncpy(local_realm, "UNKNOWN.LOCAL.REALM", AFS_REALM_SZ);
 
450
                        static char local_realms[AFS_NUM_LREALMS][AFS_REALM_SZ];
 
451
                        static int  num_lrealms = -1;
 
452
                        int i, lrealm_match;
 
453
 
 
454
                        if (num_lrealms == -1) {
 
455
                            for (i=0; i<AFS_NUM_LREALMS; i++) {
 
456
                                if (afs_krb_get_lrealm(local_realms[i], i) != 0 /*KSUCCESS*/)
 
457
                                    break;
 
458
                            }
 
459
 
 
460
                            if (i == 0)
 
461
                                strncpy(local_realms[0], "UNKNOWN.LOCAL.REALM", AFS_REALM_SZ);
 
462
                            num_lrealms = i;
454
463
                        }
455
 
                        if (strcasecmp(local_realm, tcell)) {
 
464
 
 
465
                        /* Check to see if the ticket cell matches one of the local realms */
 
466
                        lrealm_match = 0;
 
467
                        for ( i=0;i<num_lrealms;i++ ) {
 
468
                            if (!strcasecmp(local_realms[i], tcell)) {
 
469
                                lrealm_match = 1;
 
470
                                break;
 
471
                            }
 
472
                        }
 
473
                        /* If yes, then make sure that the name is not present in
 
474
                         * an exclusion list */
 
475
                        if (lrealm_match) {
 
476
                            char uname[256];
 
477
                            if (inst[0])
 
478
                                snprintf(uname,sizeof(uname),"%s.%s@%s",name,inst,tcell);
 
479
                            else
 
480
                                snprintf(uname,sizeof(uname),"%s@%s",name,tcell);
 
481
 
 
482
                            if (afs_krb_exclusion(uname))
 
483
                                lrealm_match = 0;
 
484
                        }
 
485
 
 
486
                        if (!lrealm_match) {
456
487
                            if (strlen(vname) + 1 + clen >= sizeof(vname))
457
488
                                goto done;
458
489
                            strcat(vname, "@");