Commit Graph

9 Commits

Author SHA1 Message Date
Davide Pesavento 7015694293 tests: use "daemon" user/group in Test{PrivilegeHelper,GeneralConfigSection}
Change-Id: I40ff8317a11e8fb88555f6c85dae3430295ac435
Refs: #3403
2018-09-15 18:40:21 -04:00
Davide Pesavento a3148081ce core: reimplement logging using ndn-cxx's facility
Change-Id: Ifc7c5d70a61ad405dc1f1adfa522a2c0ad1586ab
Refs: #4580
2018-05-05 23:04:22 -04:00
Davide Pesavento acd00876f9 core: optimize PrivilegeHelper::runElevated()
Using std::function is overkill

Change-Id: I0e60592aea1b2fb82c3ea780701dae5e129a9810
2018-02-15 18:26:18 -05:00
Davide Pesavento a997d29622 Fix compilation with Boost 1.65.0
Change-Id: Ib88b7e13bddb1728dd882c086e97edffdd696f0d
Refs: #4258
2017-08-25 23:30:24 -04:00
Alexander Afanasyev 9cfeecaa2f core: Prevent exception throwing when dropping privileges is not supported and not requested
The exception still be thrown, if config file requests privilege dropping.

Change-Id: I856207958354410fa45da7ccc73b46b99f74d9e7
Refs: #2515
2015-02-12 16:44:24 -08:00
Alexander Afanasyev 6f570de8d7 core: Make PrivilegeHeper::drop|raise no-op operations on platforms that do not support drop/elevation of privileges
Change-Id: I13b53ba27cee59d58b816d060501499517e6dc37
2015-02-11 20:59:09 -08:00
Alexander Afanasyev 7c10b3bdc8 docs: Prepare release notes for version 0.3.0
Change-Id: If0ae14cbf97ee3d9b92a3467d0b6592c10e66698
Refs: #2462, #2352, #2209
2015-02-02 19:21:57 -08:00
Alexander Afanasyev 49343f6fab build: Add conditional compilation
Two conditionals are introduced in this commit:
- if <ifaddrs.h> is not available, NetworkInterface helper will always return
  an empty set of interfaces
- If dropping/elevating effective user/group is not supported, an error
  will be thrown if used (e.g., if general.user or general.group is
  configured)

Both conditionals are necessary on Android platform.

Change-Id: Ib360e03514af97ed2d68032fbcbe279a8dc84682
2015-01-27 18:13:50 -08:00
Alexander Afanasyev ff489a230a core: Fixing regression in PrivilegeHelper that prevented running as non-root
PrivilegeHelper was properly initialized only when general section was
present.  When section was omitted, s_privilegedUid/s_privilegedGid/s_normalUid/s_normalGid
variables was not properly initialized (set to 0), resulting in
exception during the subsequent PrivilegeHelper::drop call.

Change-Id: Iffd7f05e7e6c86d227da2c9b7920ca6e3b607211
2014-05-08 17:16:43 -07:00