policy_unpack.c (2e12c5f060176ede209673e4f63ea5d0e3c5814c) | policy_unpack.c (84c455decf27ce97a23fb70b58075592ab88d66a) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * AppArmor security module 4 * 5 * This file contains AppArmor functions for unpacking policy loaded from 6 * userspace. 7 * 8 * Copyright (C) 1998-2008 Novell/SUSE --- 15 unchanged lines hidden (view full) --- 24#include "include/cred.h" 25#include "include/crypto.h" 26#include "include/file.h" 27#include "include/match.h" 28#include "include/path.h" 29#include "include/policy.h" 30#include "include/policy_unpack.h" 31#include "include/policy_compat.h" | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * AppArmor security module 4 * 5 * This file contains AppArmor functions for unpacking policy loaded from 6 * userspace. 7 * 8 * Copyright (C) 1998-2008 Novell/SUSE --- 15 unchanged lines hidden (view full) --- 24#include "include/cred.h" 25#include "include/crypto.h" 26#include "include/file.h" 27#include "include/match.h" 28#include "include/path.h" 29#include "include/policy.h" 30#include "include/policy_unpack.h" 31#include "include/policy_compat.h" |
32#include "include/signal.h" |
|
32 33/* audit callback for unpack fields */ 34static void audit_cb(struct audit_buffer *ab, void *va) 35{ 36 struct common_audit_data *sa = va; 37 struct apparmor_audit_data *ad = aad(sa); 38 39 if (ad->iface.ns) { --- 871 unchanged lines hidden (view full) --- 911 } 912 } 913 } 914 915 /* disconnected attachment string is optional */ 916 (void) aa_unpack_strdup(e, &disconnected, "disconnected"); 917 profile->disconnected = disconnected; 918 | 33 34/* audit callback for unpack fields */ 35static void audit_cb(struct audit_buffer *ab, void *va) 36{ 37 struct common_audit_data *sa = va; 38 struct apparmor_audit_data *ad = aad(sa); 39 40 if (ad->iface.ns) { --- 871 unchanged lines hidden (view full) --- 912 } 913 } 914 } 915 916 /* disconnected attachment string is optional */ 917 (void) aa_unpack_strdup(e, &disconnected, "disconnected"); 918 profile->disconnected = disconnected; 919 |
920 /* optional */ 921 (void) aa_unpack_u32(e, &profile->signal, "kill"); 922 if (profile->signal < 1 && profile->signal > MAXMAPPED_SIG) { 923 info = "profile kill.signal invalid value"; 924 goto fail; 925 } |
|
919 /* per profile debug flags (complain, audit) */ 920 if (!aa_unpack_nameX(e, AA_STRUCT, "flags")) { 921 info = "profile missing flags"; 922 goto fail; 923 } 924 info = "failed to unpack profile flags"; 925 if (!aa_unpack_u32(e, &tmp, NULL)) 926 goto fail; --- 583 unchanged lines hidden --- | 926 /* per profile debug flags (complain, audit) */ 927 if (!aa_unpack_nameX(e, AA_STRUCT, "flags")) { 928 info = "profile missing flags"; 929 goto fail; 930 } 931 info = "failed to unpack profile flags"; 932 if (!aa_unpack_u32(e, &tmp, NULL)) 933 goto fail; --- 583 unchanged lines hidden --- |