cred.h (7ae9fb1b7ecbb5d85d07857943f677fd1a559b18) | cred.h (f4fee216df7d28b87d1c9cc60bcebfecb51c1a05) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * AppArmor security module 4 * 5 * This file contains AppArmor contexts used to associate "labels" to objects. 6 * 7 * Copyright (C) 1998-2008 Novell/SUSE 8 * Copyright 2009-2010 Canonical Ltd. --- 49 unchanged lines hidden (view full) --- 58 * 59 * Returns: newest version of confining label 60 */ 61static inline struct aa_label *aa_get_newest_cred_label(const struct cred *cred) 62{ 63 return aa_get_newest_label(aa_cred_raw_label(cred)); 64} 65 | 1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * AppArmor security module 4 * 5 * This file contains AppArmor contexts used to associate "labels" to objects. 6 * 7 * Copyright (C) 1998-2008 Novell/SUSE 8 * Copyright 2009-2010 Canonical Ltd. --- 49 unchanged lines hidden (view full) --- 58 * 59 * Returns: newest version of confining label 60 */ 61static inline struct aa_label *aa_get_newest_cred_label(const struct cred *cred) 62{ 63 return aa_get_newest_label(aa_cred_raw_label(cred)); 64} 65 |
66static inline struct aa_label *aa_get_newest_cred_label_condref(const struct cred *cred, 67 bool *needput) 68{ 69 struct aa_label *l = aa_cred_raw_label(cred); 70 71 if (unlikely(label_is_stale(l))) { 72 *needput = true; 73 return aa_get_newest_label(l); 74 } 75 76 *needput = false; 77 return l; 78} 79 80static inline void aa_put_label_condref(struct aa_label *l, bool needput) 81{ 82 if (unlikely(needput)) 83 aa_put_label(l); 84} 85 |
|
66/** 67 * aa_current_raw_label - find the current tasks confining label 68 * 69 * Returns: up to date confining label or the ns unconfined label (NOT NULL) 70 * 71 * This fn will not update the tasks cred to the most up to date version 72 * of the label so it is safe to call when inside of locks. 73 */ --- 102 unchanged lines hidden --- | 86/** 87 * aa_current_raw_label - find the current tasks confining label 88 * 89 * Returns: up to date confining label or the ns unconfined label (NOT NULL) 90 * 91 * This fn will not update the tasks cred to the most up to date version 92 * of the label so it is safe to call when inside of locks. 93 */ --- 102 unchanged lines hidden --- |