History

conntrack: export lsm context rather than internal secid via netlink

The conntrack code can export the internal secid to userspace. These are dynamic, can change on lsm changes, and have no meaning in userspace. We should instead be sending lsm contexts to userspace instead. This patch sends the secctx (rather than secid) to userspace over the netlink socket. We use a new field CTA_SECCTX and stop using the the old CTA_SECMARK field since it did not send particularly useful information.

Eric Paris committed 16 years ago

Commit 1cc63241 parent d5630b92 files · +45 −11Browse files

Showing the changes to include/linux/netfilter (1 of 2 files). Show all

Unified · Split

include/linux/netfilter/nfnetlink_conntrack.h+9−1
@@ -39,8 +39,9 @@ enum ctattr_type { · 38 unmodified lines
39 CTA_TUPLE_MASTER,39 CTA_TUPLE_MASTER,
40 CTA_NAT_SEQ_ADJ_ORIG,40 CTA_NAT_SEQ_ADJ_ORIG,
41 CTA_NAT_SEQ_ADJ_REPLY,41 CTA_NAT_SEQ_ADJ_REPLY,
42 CTA_SECMARK,42 CTA_SECMARK, /* obsolete */
43 CTA_ZONE,43 CTA_ZONE,
44 CTA_SECCTX,
44 __CTA_MAX45 __CTA_MAX
45};46};
46#define CTA_MAX (__CTA_MAX - 1)47#define CTA_MAX (__CTA_MAX - 1)
@@ -172,4 +173,11 @@ enum ctattr_help { · 125 unmodified lines
172};173};
173#define CTA_HELP_MAX (__CTA_HELP_MAX - 1)174#define CTA_HELP_MAX (__CTA_HELP_MAX - 1)
174 175
176enum ctattr_secctx {
177 CTA_SECCTX_UNSPEC,
178 CTA_SECCTX_NAME,
179 __CTA_SECCTX_MAX
180};
181#define CTA_SECCTX_MAX (__CTA_SECCTX_MAX - 1)
182
175#endif /* _IPCONNTRACK_NETLINK_H */183#endif /* _IPCONNTRACK_NETLINK_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t