-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes.txt
More file actions
56 lines (37 loc) · 1.43 KB
/
notes.txt
File metadata and controls
56 lines (37 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Make just one subdir/subproject.
make sub-scandump
String Formatting.
FMT
http://fmtlib.net/latest/index.html
Logging.
Apache log4cxx.
Might be overkill. Requires apr.
https://logging.apache.org/log4cxx/latest_stable/usage.html
Simple.
https://stackoverflow.com/questions/6168107/how-to-implement-a-good-debug-logging-feature-in-a-project
http://www.drdobbs.com/cpp/logging-in-c/201804215
http://www.drdobbs.com/cpp/a-highly-configurable-logging-framework/225700666
Winner?
https://github.com/gabime/spdlog
JSON
https://nlohmann.github.io/json/
Root.
Need superuser privs to trigger a scan. What's the modern way to do so?
https://stackoverflow.com/questions/2483755/how-to-programmatically-gain-root-privileges
https://fedoraproject.org/wiki/Features/RemoveSETUID
https://www.freedesktop.org/wiki/Software/polkit/
net/wireless/cfg80211.c
{
.cmd = NL80211_CMD_TRIGGER_SCAN,
.doit = nl80211_trigger_scan,
.policy = nl80211_policy,
.flags = GENL_UNS_ADMIN_PERM, <----------------------
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
NL80211_FLAG_NEED_RTNL,
},
GENL_UNS_ADMIN_PERM winner winner
trigger scan CAP_NET_ADMIN it is
net/netlink/genetlink.c
if ((ops->flags & GENL_UNS_ADMIN_PERM) &&
!netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN))
return -EPERM;