~ubuntu-branches/ubuntu/utopic/389-ds-base/utopic

« back to all changes in this revision

Viewing changes to ldap/servers/plugins/acl/acl_ext.c

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2014-02-19 01:43:25 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20140219014325-1m8shiye3hhgscum
Tags: 1.3.2.11-0ubuntu1
* Merge from unreleased debian git.
  - CVE fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
446
446
int
447
447
acl_create_aclpb_pool ()
448
448
{
449
 
 
450
449
        Acl_PBlock                      *aclpb;
451
450
        Acl_PBlock                      *prev_aclpb;
452
451
        Acl_PBlock                      *first_aclpb;
648
647
                                        "Unable to set the AUTH TYPE in the Plist\n");
649
648
                goto error;
650
649
        }
 
650
        if (PListInitProp(aclpb->aclpb_proplist, 0, DS_ATTR_LDAPI, aclpb, 0) < 0) {
 
651
                slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
 
652
                                        "Unable to set the AUTH TYPE in the Plist\n");
 
653
                goto error;
 
654
        }
651
655
        if (PListInitProp(aclpb->aclpb_proplist, 0, DS_ATTR_ENTRY, aclpb, 0) < 0) {
652
656
                slapi_log_error(SLAPI_LOG_FATAL, plugin_name, 
653
657
                                        "Unable to set the ENTRY TYPE in the Plist\n");
717
721
 
718
722
    /* allocate arrays for result cache */
719
723
    aclpb->aclpb_cache_result = (r_cache_t *)
720
 
            slapi_ch_calloc (aclpb_max_cache_results, sizeof (r_cache_t));
 
724
                slapi_ch_calloc (aclpb_max_cache_results + 1 /* 1 for cache overflow warning */,
 
725
                sizeof (r_cache_t));
721
726
 
722
727
    /* allocate arrays for target handles in eval_context */
723
728
    aclpb->aclpb_curr_entryEval_context.acle_handles_matched_target = (int *)
771
776
 
772
777
/* Initializes the aclpb */
773
778
void 
774
 
acl_init_aclpb ( Slapi_PBlock *pb , Acl_PBlock *aclpb, const char *ndn, int copy_from_aclcb)
 
779
acl_init_aclpb ( Slapi_PBlock *pb, Acl_PBlock *aclpb, const char *ndn, int copy_from_aclcb)
775
780
{
776
781
        struct acl_cblock       *aclcb = NULL;
777
782
        char                            *authType;
818
823
                                "Unable to set the AUTH TYPE in the Plist\n");
819
824
                return;
820
825
        }
 
826
        if(slapi_is_ldapi_conn(pb)){
 
827
                if(PListAssignValue(aclpb->aclpb_proplist, DS_ATTR_LDAPI, "yes", 0) < 0){
 
828
                        slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
 
829
                                        "Unable to set the AUTH TYPE in the Plist\n");
 
830
                        return;
 
831
                }
 
832
        }
821
833
        slapi_pblock_get ( pb, SLAPI_OPERATION_SSF, &ssf);
822
834
        if (PListAssignValue(aclpb->aclpb_proplist, DS_ATTR_SSF, (const void *)ssf, 0) < 0) {
823
835
                slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
1036
1048
                PListDeleteProp(aclpb->aclpb_proplist, rc,  NULL);
1037
1049
        }
1038
1050
 
 
1051
        /* reset the LDAPI property */
 
1052
        PListAssignValue(aclpb->aclpb_proplist, DS_ATTR_LDAPI, NULL, 0);
 
1053
 
1039
1054
        /*
1040
1055
         * Remove the DS_ATTR_IP property from the property list.
1041
1056
         * The value of this property is just the property pointer