~ubuntu-branches/ubuntu/oneiric/likewise-open/oneiric

« back to all changes in this revision

Viewing changes to samba/source/winbindd/winbindd_util.c

  • Committer: Bazaar Package Importer
  • Author(s): Rick Clark
  • Date: 2008-08-27 08:56:20 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080827085620-5q0f58b9qtog9myq
Tags: 4.1.0.2956-0ubuntu1
* missing-likewise-logo.diff: removed
* fixed copyright notice
* updated Standards-Version to 3.8.0
* removed path from command in prerm
* removed stop in S runlevel

Show diffs side-by-side

added added

removed removed

Lines of Context:
489
489
{
490
490
        time_t now = time(NULL);
491
491
 
 
492
        /* Check that we allow trusted domains at all */
 
493
 
 
494
        if (!lp_allow_trusted_domains())
 
495
                return; 
 
496
 
492
497
        /* see if the time has come... */
493
498
        
494
499
        if ( (now >= last_trustdom_scan) &&
744
749
        struct winbindd_domain *domain; 
745
750
        DOM_SID dom_sid;
746
751
        uint32 rid;
 
752
 
 
753
        /* Check if we even care */
 
754
 
 
755
        if (!lp_allow_trusted_domains())
 
756
                return;
747
757
        
748
758
        domain = find_domain_from_name_noinit( name );
749
759
        if ( domain )
793
803
struct winbindd_domain *find_domain_from_name_noinit(const char *domain_name)
794
804
{
795
805
        struct winbindd_domain *domain;
 
806
        const char *search_domain = domain_name;        
 
807
        
 
808
        /* special case where we are looking for our own domain */
 
809
 
 
810
        if (strequal(domain_name, ".")) {
 
811
                search_domain = lp_workgroup();
 
812
        }
796
813
 
797
814
        /* Search through list */
798
815
 
799
816
        for (domain = domain_list(); domain != NULL; domain = domain->next) {
800
 
                if (strequal(domain_name, domain->name) ||
 
817
                if (strequal(search_domain, domain->name) ||
801
818
                    (domain->alt_name[0] &&
802
 
                     strequal(domain_name, domain->alt_name))) {
 
819
                     strequal(search_domain, domain->alt_name))) {
803
820
                        return domain;
804
821
                }
805
822
        }