Lines Matching refs:pdb

712 	struct aa_policydb *pdb;  in unpack_pdb()  local
717 pdb = aa_alloc_pdb(GFP_KERNEL); in unpack_pdb()
718 if (!pdb) in unpack_pdb()
721 size = unpack_perms_table(e, &pdb->perms); in unpack_pdb()
724 pdb->perms = NULL; in unpack_pdb()
728 pdb->size = size; in unpack_pdb()
730 if (pdb->perms) { in unpack_pdb()
739 pdb->dfa = unpack_dfa(e, flags); in unpack_pdb()
740 if (IS_ERR(pdb->dfa)) { in unpack_pdb()
741 error = PTR_ERR(pdb->dfa); in unpack_pdb()
742 pdb->dfa = NULL; in unpack_pdb()
745 } else if (!pdb->dfa) { in unpack_pdb()
757 if (!aa_unpack_u32(e, &pdb->start[0], "start")) in unpack_pdb()
759 pdb->start[0] = DFA_START; in unpack_pdb()
760 if (!aa_unpack_u32(e, &pdb->start[AA_CLASS_FILE], "dfa_start")) { in unpack_pdb()
762 pdb->start[AA_CLASS_FILE] = DFA_START; in unpack_pdb()
765 pdb->start[i] = aa_dfa_next(pdb->dfa, pdb->start[0], in unpack_pdb()
775 if (!unpack_trans_table(e, &pdb->trans) && required_trans) { in unpack_pdb()
780 if (!pdb->dfa && pdb->trans.table) in unpack_pdb()
781 aa_free_str_table(&pdb->trans); in unpack_pdb()
786 *policy = pdb; in unpack_pdb()
790 aa_put_pdb(pdb); in unpack_pdb()
1212 static bool verify_perms(struct aa_policydb *pdb) in verify_perms() argument
1216 for (i = 0; i < pdb->size; i++) { in verify_perms()
1217 if (!verify_perm(&pdb->perms[i])) in verify_perms()
1220 if ((pdb->perms[i].xindex & AA_X_TYPE_MASK) == AA_X_TABLE && in verify_perms()
1221 (pdb->perms[i].xindex & AA_X_INDEX_MASK) >= pdb->trans.size) in verify_perms()
1223 if (pdb->perms[i].tag && pdb->perms[i].tag >= pdb->trans.size) in verify_perms()
1225 if (pdb->perms[i].label && in verify_perms()
1226 pdb->perms[i].label >= pdb->trans.size) in verify_perms()