| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * AppArmor security module |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * This file contains AppArmor policy loading interface function definitions. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Copyright 2013 Canonical Ltd. |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or |
|---|
| 9 | | - * modify it under the terms of the GNU General Public License as |
|---|
| 10 | | - * published by the Free Software Foundation, version 2 of the |
|---|
| 11 | | - * License. |
|---|
| 12 | 8 | * |
|---|
| 13 | 9 | * Fns to provide a checksum of policy that has been loaded this can be |
|---|
| 14 | 10 | * compared to userspace policy compiles to check loaded policy is what |
|---|
| .. | .. |
|---|
| 43 | 39 | goto fail; |
|---|
| 44 | 40 | |
|---|
| 45 | 41 | desc->tfm = apparmor_tfm; |
|---|
| 46 | | - desc->flags = 0; |
|---|
| 47 | 42 | |
|---|
| 48 | 43 | error = crypto_shash_init(desc); |
|---|
| 49 | 44 | if (error) |
|---|
| .. | .. |
|---|
| 81 | 76 | goto fail; |
|---|
| 82 | 77 | |
|---|
| 83 | 78 | desc->tfm = apparmor_tfm; |
|---|
| 84 | | - desc->flags = 0; |
|---|
| 85 | 79 | |
|---|
| 86 | 80 | error = crypto_shash_init(desc); |
|---|
| 87 | 81 | if (error) |
|---|
| .. | .. |
|---|
| 112 | 106 | if (!apparmor_initialized) |
|---|
| 113 | 107 | return 0; |
|---|
| 114 | 108 | |
|---|
| 115 | | - tfm = crypto_alloc_shash("sha1", 0, CRYPTO_ALG_ASYNC); |
|---|
| 109 | + tfm = crypto_alloc_shash("sha1", 0, 0); |
|---|
| 116 | 110 | if (IS_ERR(tfm)) { |
|---|
| 117 | 111 | int error = PTR_ERR(tfm); |
|---|
| 118 | 112 | AA_ERROR("failed to setup profile sha1 hashing: %d\n", error); |
|---|