@@ -400,7 +400,7 @@ static int roles_init(struct policydb *p)
400
400
if (!key )
401
401
goto out ;
402
402
403
- rc = hashtab_insert (& p -> p_roles . table , key , role );
403
+ rc = symtab_insert (& p -> p_roles , key , role );
404
404
if (rc )
405
405
goto out ;
406
406
@@ -1065,7 +1065,7 @@ static int str_read(char **strp, gfp_t flags, void *fp, u32 len)
1065
1065
return 0 ;
1066
1066
}
1067
1067
1068
- static int perm_read (struct policydb * p , struct hashtab * h , void * fp )
1068
+ static int perm_read (struct policydb * p , struct symtab * s , void * fp )
1069
1069
{
1070
1070
char * key = NULL ;
1071
1071
struct perm_datum * perdatum ;
@@ -1088,7 +1088,7 @@ static int perm_read(struct policydb *p, struct hashtab *h, void *fp)
1088
1088
if (rc )
1089
1089
goto bad ;
1090
1090
1091
- rc = hashtab_insert ( h , key , perdatum );
1091
+ rc = symtab_insert ( s , key , perdatum );
1092
1092
if (rc )
1093
1093
goto bad ;
1094
1094
@@ -1098,7 +1098,7 @@ static int perm_read(struct policydb *p, struct hashtab *h, void *fp)
1098
1098
return rc ;
1099
1099
}
1100
1100
1101
- static int common_read (struct policydb * p , struct hashtab * h , void * fp )
1101
+ static int common_read (struct policydb * p , struct symtab * s , void * fp )
1102
1102
{
1103
1103
char * key = NULL ;
1104
1104
struct common_datum * comdatum ;
@@ -1128,12 +1128,12 @@ static int common_read(struct policydb *p, struct hashtab *h, void *fp)
1128
1128
goto bad ;
1129
1129
1130
1130
for (i = 0 ; i < nel ; i ++ ) {
1131
- rc = perm_read (p , & comdatum -> permissions . table , fp );
1131
+ rc = perm_read (p , & comdatum -> permissions , fp );
1132
1132
if (rc )
1133
1133
goto bad ;
1134
1134
}
1135
1135
1136
- rc = hashtab_insert ( h , key , comdatum );
1136
+ rc = symtab_insert ( s , key , comdatum );
1137
1137
if (rc )
1138
1138
goto bad ;
1139
1139
return 0 ;
@@ -1262,7 +1262,7 @@ static int read_cons_helper(struct policydb *p,
1262
1262
return 0 ;
1263
1263
}
1264
1264
1265
- static int class_read (struct policydb * p , struct hashtab * h , void * fp )
1265
+ static int class_read (struct policydb * p , struct symtab * s , void * fp )
1266
1266
{
1267
1267
char * key = NULL ;
1268
1268
struct class_datum * cladatum ;
@@ -1300,16 +1300,16 @@ static int class_read(struct policydb *p, struct hashtab *h, void *fp)
1300
1300
goto bad ;
1301
1301
1302
1302
rc = - EINVAL ;
1303
- cladatum -> comdatum = hashtab_search (& p -> p_commons . table ,
1304
- cladatum -> comkey );
1303
+ cladatum -> comdatum = symtab_search (& p -> p_commons ,
1304
+ cladatum -> comkey );
1305
1305
if (!cladatum -> comdatum ) {
1306
1306
pr_err ("SELinux: unknown common %s\n" ,
1307
1307
cladatum -> comkey );
1308
1308
goto bad ;
1309
1309
}
1310
1310
}
1311
1311
for (i = 0 ; i < nel ; i ++ ) {
1312
- rc = perm_read (p , & cladatum -> permissions . table , fp );
1312
+ rc = perm_read (p , & cladatum -> permissions , fp );
1313
1313
if (rc )
1314
1314
goto bad ;
1315
1315
}
@@ -1347,7 +1347,7 @@ static int class_read(struct policydb *p, struct hashtab *h, void *fp)
1347
1347
cladatum -> default_type = le32_to_cpu (buf [0 ]);
1348
1348
}
1349
1349
1350
- rc = hashtab_insert ( h , key , cladatum );
1350
+ rc = symtab_insert ( s , key , cladatum );
1351
1351
if (rc )
1352
1352
goto bad ;
1353
1353
@@ -1357,7 +1357,7 @@ static int class_read(struct policydb *p, struct hashtab *h, void *fp)
1357
1357
return rc ;
1358
1358
}
1359
1359
1360
- static int role_read (struct policydb * p , struct hashtab * h , void * fp )
1360
+ static int role_read (struct policydb * p , struct symtab * s , void * fp )
1361
1361
{
1362
1362
char * key = NULL ;
1363
1363
struct role_datum * role ;
@@ -1404,7 +1404,7 @@ static int role_read(struct policydb *p, struct hashtab *h, void *fp)
1404
1404
goto bad ;
1405
1405
}
1406
1406
1407
- rc = hashtab_insert ( h , key , role );
1407
+ rc = symtab_insert ( s , key , role );
1408
1408
if (rc )
1409
1409
goto bad ;
1410
1410
return 0 ;
@@ -1413,7 +1413,7 @@ static int role_read(struct policydb *p, struct hashtab *h, void *fp)
1413
1413
return rc ;
1414
1414
}
1415
1415
1416
- static int type_read (struct policydb * p , struct hashtab * h , void * fp )
1416
+ static int type_read (struct policydb * p , struct symtab * s , void * fp )
1417
1417
{
1418
1418
char * key = NULL ;
1419
1419
struct type_datum * typdatum ;
@@ -1451,7 +1451,7 @@ static int type_read(struct policydb *p, struct hashtab *h, void *fp)
1451
1451
if (rc )
1452
1452
goto bad ;
1453
1453
1454
- rc = hashtab_insert ( h , key , typdatum );
1454
+ rc = symtab_insert ( s , key , typdatum );
1455
1455
if (rc )
1456
1456
goto bad ;
1457
1457
return 0 ;
@@ -1487,7 +1487,7 @@ static int mls_read_level(struct mls_level *lp, void *fp)
1487
1487
return 0 ;
1488
1488
}
1489
1489
1490
- static int user_read (struct policydb * p , struct hashtab * h , void * fp )
1490
+ static int user_read (struct policydb * p , struct symtab * s , void * fp )
1491
1491
{
1492
1492
char * key = NULL ;
1493
1493
struct user_datum * usrdatum ;
@@ -1528,7 +1528,7 @@ static int user_read(struct policydb *p, struct hashtab *h, void *fp)
1528
1528
goto bad ;
1529
1529
}
1530
1530
1531
- rc = hashtab_insert ( h , key , usrdatum );
1531
+ rc = symtab_insert ( s , key , usrdatum );
1532
1532
if (rc )
1533
1533
goto bad ;
1534
1534
return 0 ;
@@ -1537,7 +1537,7 @@ static int user_read(struct policydb *p, struct hashtab *h, void *fp)
1537
1537
return rc ;
1538
1538
}
1539
1539
1540
- static int sens_read (struct policydb * p , struct hashtab * h , void * fp )
1540
+ static int sens_read (struct policydb * p , struct symtab * s , void * fp )
1541
1541
{
1542
1542
char * key = NULL ;
1543
1543
struct level_datum * levdatum ;
@@ -1569,7 +1569,7 @@ static int sens_read(struct policydb *p, struct hashtab *h, void *fp)
1569
1569
if (rc )
1570
1570
goto bad ;
1571
1571
1572
- rc = hashtab_insert ( h , key , levdatum );
1572
+ rc = symtab_insert ( s , key , levdatum );
1573
1573
if (rc )
1574
1574
goto bad ;
1575
1575
return 0 ;
@@ -1578,7 +1578,7 @@ static int sens_read(struct policydb *p, struct hashtab *h, void *fp)
1578
1578
return rc ;
1579
1579
}
1580
1580
1581
- static int cat_read (struct policydb * p , struct hashtab * h , void * fp )
1581
+ static int cat_read (struct policydb * p , struct symtab * s , void * fp )
1582
1582
{
1583
1583
char * key = NULL ;
1584
1584
struct cat_datum * catdatum ;
@@ -1602,7 +1602,7 @@ static int cat_read(struct policydb *p, struct hashtab *h, void *fp)
1602
1602
if (rc )
1603
1603
goto bad ;
1604
1604
1605
- rc = hashtab_insert ( h , key , catdatum );
1605
+ rc = symtab_insert ( s , key , catdatum );
1606
1606
if (rc )
1607
1607
goto bad ;
1608
1608
return 0 ;
@@ -1611,7 +1611,7 @@ static int cat_read(struct policydb *p, struct hashtab *h, void *fp)
1611
1611
return rc ;
1612
1612
}
1613
1613
1614
- static int (* read_f [SYM_NUM ]) (struct policydb * p , struct hashtab * h , void * fp ) =
1614
+ static int (* read_f [SYM_NUM ]) (struct policydb * p , struct symtab * s , void * fp ) =
1615
1615
{
1616
1616
common_read ,
1617
1617
class_read ,
@@ -1751,7 +1751,7 @@ u16 string_to_security_class(struct policydb *p, const char *name)
1751
1751
{
1752
1752
struct class_datum * cladatum ;
1753
1753
1754
- cladatum = hashtab_search (& p -> p_classes . table , name );
1754
+ cladatum = symtab_search (& p -> p_classes , name );
1755
1755
if (!cladatum )
1756
1756
return 0 ;
1757
1757
@@ -1770,9 +1770,9 @@ u32 string_to_av_perm(struct policydb *p, u16 tclass, const char *name)
1770
1770
cladatum = p -> class_val_to_struct [tclass - 1 ];
1771
1771
comdatum = cladatum -> comdatum ;
1772
1772
if (comdatum )
1773
- perdatum = hashtab_search (& comdatum -> permissions . table , name );
1773
+ perdatum = symtab_search (& comdatum -> permissions , name );
1774
1774
if (!perdatum )
1775
- perdatum = hashtab_search (& cladatum -> permissions . table , name );
1775
+ perdatum = symtab_search (& cladatum -> permissions , name );
1776
1776
if (!perdatum )
1777
1777
return 0 ;
1778
1778
@@ -2509,7 +2509,7 @@ int policydb_read(struct policydb *p, void *fp)
2509
2509
}
2510
2510
2511
2511
for (j = 0 ; j < nel ; j ++ ) {
2512
- rc = read_f [i ](p , & p -> symtab [i ]. table , fp );
2512
+ rc = read_f [i ](p , & p -> symtab [i ], fp );
2513
2513
if (rc )
2514
2514
goto bad ;
2515
2515
}
0 commit comments