.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * NetLabel CALIPSO/IPv6 Support |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * |
---|
8 | 9 | * Authors: Paul Moore <paul@paul-moore.com> |
---|
9 | 10 | * Huw Davies <huw@codeweavers.com> |
---|
10 | | - * |
---|
11 | 11 | */ |
---|
12 | 12 | |
---|
13 | 13 | /* (c) Copyright Hewlett-Packard Development Company, L.P., 2006 |
---|
14 | 14 | * (c) Copyright Huw Davies <huw@codeweavers.com>, 2015 |
---|
15 | | - * |
---|
16 | | - * This program is free software; you can redistribute it and/or modify |
---|
17 | | - * it under the terms of the GNU General Public License as published by |
---|
18 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
19 | | - * (at your option) any later version. |
---|
20 | | - * |
---|
21 | | - * This program is distributed in the hope that it will be useful, |
---|
22 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
23 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
---|
24 | | - * the GNU General Public License for more details. |
---|
25 | | - * |
---|
26 | | - * You should have received a copy of the GNU General Public License |
---|
27 | | - * along with this program; if not, see <http://www.gnu.org/licenses/>. |
---|
28 | | - * |
---|
29 | 15 | */ |
---|
30 | 16 | |
---|
31 | 17 | #include <linux/types.h> |
---|
.. | .. |
---|
318 | 304 | /* NetLabel Generic NETLINK Command Definitions |
---|
319 | 305 | */ |
---|
320 | 306 | |
---|
321 | | -static const struct genl_ops netlbl_calipso_ops[] = { |
---|
| 307 | +static const struct genl_small_ops netlbl_calipso_ops[] = { |
---|
322 | 308 | { |
---|
323 | 309 | .cmd = NLBL_CALIPSO_C_ADD, |
---|
| 310 | + .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, |
---|
324 | 311 | .flags = GENL_ADMIN_PERM, |
---|
325 | | - .policy = calipso_genl_policy, |
---|
326 | 312 | .doit = netlbl_calipso_add, |
---|
327 | 313 | .dumpit = NULL, |
---|
328 | 314 | }, |
---|
329 | 315 | { |
---|
330 | 316 | .cmd = NLBL_CALIPSO_C_REMOVE, |
---|
| 317 | + .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, |
---|
331 | 318 | .flags = GENL_ADMIN_PERM, |
---|
332 | | - .policy = calipso_genl_policy, |
---|
333 | 319 | .doit = netlbl_calipso_remove, |
---|
334 | 320 | .dumpit = NULL, |
---|
335 | 321 | }, |
---|
336 | 322 | { |
---|
337 | 323 | .cmd = NLBL_CALIPSO_C_LIST, |
---|
| 324 | + .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, |
---|
338 | 325 | .flags = 0, |
---|
339 | | - .policy = calipso_genl_policy, |
---|
340 | 326 | .doit = netlbl_calipso_list, |
---|
341 | 327 | .dumpit = NULL, |
---|
342 | 328 | }, |
---|
343 | 329 | { |
---|
344 | 330 | .cmd = NLBL_CALIPSO_C_LISTALL, |
---|
| 331 | + .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, |
---|
345 | 332 | .flags = 0, |
---|
346 | | - .policy = calipso_genl_policy, |
---|
347 | 333 | .doit = NULL, |
---|
348 | 334 | .dumpit = netlbl_calipso_listall, |
---|
349 | 335 | }, |
---|
.. | .. |
---|
354 | 340 | .name = NETLBL_NLTYPE_CALIPSO_NAME, |
---|
355 | 341 | .version = NETLBL_PROTO_VERSION, |
---|
356 | 342 | .maxattr = NLBL_CALIPSO_A_MAX, |
---|
| 343 | + .policy = calipso_genl_policy, |
---|
357 | 344 | .module = THIS_MODULE, |
---|
358 | | - .ops = netlbl_calipso_ops, |
---|
359 | | - .n_ops = ARRAY_SIZE(netlbl_calipso_ops), |
---|
| 345 | + .small_ops = netlbl_calipso_ops, |
---|
| 346 | + .n_small_ops = ARRAY_SIZE(netlbl_calipso_ops), |
---|
360 | 347 | }; |
---|
361 | 348 | |
---|
362 | 349 | /* NetLabel Generic NETLINK Protocol Functions |
---|
.. | .. |
---|
439 | 426 | /** |
---|
440 | 427 | * calipso_doi_remove - Remove an existing DOI from the CALIPSO protocol engine |
---|
441 | 428 | * @doi: the DOI value |
---|
442 | | - * @audit_secid: the LSM secid to use in the audit message |
---|
| 429 | + * @audit_info: NetLabel audit information |
---|
443 | 430 | * |
---|
444 | 431 | * Description: |
---|
445 | 432 | * Removes a DOI definition from the CALIPSO engine. The NetLabel routines will |
---|
.. | .. |
---|
608 | 595 | |
---|
609 | 596 | /** |
---|
610 | 597 | * calipso_req_delattr - Delete the CALIPSO option from a request socket |
---|
611 | | - * @reg: the request socket |
---|
| 598 | + * @req: the request socket |
---|
612 | 599 | * |
---|
613 | 600 | * Description: |
---|
614 | 601 | * Removes the CALIPSO option from a request socket, if present. |
---|