b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] alfred: Add explanation how to run alfred as non-root user
@ 2015-02-23 18:08 Sven Eckelmann
  2015-02-28  7:50 ` MK
  2015-03-05  8:12 ` [B.A.T.M.A.N.] [PATCHv2] " Sven Eckelmann
  0 siblings, 2 replies; 5+ messages in thread
From: Sven Eckelmann @ 2015-02-23 18:08 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

Reported-by: MK <mailing.m1@kkk-web.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 README | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/README b/README
index 90a99de..205c156 100644
--- a/README
+++ b/README
@@ -256,6 +256,32 @@ To get JSON formatted output, use:
 
 See gpsd_json(5) for documentation of the tpv object. 
 
+Running alfred as non-root user
+-------------------------------
+
+Alfred currently requires special capabilities and access rights to work
+correctly. The user root is normally the only user having these
+capabilities/rights on a standard Linux system.
+
+Operations requiring special capabilities:
+
+ * bind to device
+ * creating the unix socket
+ * accessing the debugfs filesystem
+
+The first operation can still be executed when the admin grants the special
+capability CAP_NET_RAW to anyone executing the alfred binary. The unix socket
+can also be moved to a different directly which is accessible by the user by
+adding the parameter '-u'.
+
+ $ sudo setcap cap_net_raw+ep alfred
+ $ ./alfred -u alfred.sock -i eth0
+
+The user running alfred must still be in a group which is allowed to access
+/sys/kernel/debugfs to correctly choose best neighbors for communication.
+It is possible (but not recommended) to disable the neighbor
+selection/prioritization using the parameter '-b none'.
+
 License
 -------
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] alfred: Add explanation how to run alfred as non-root user
  2015-02-23 18:08 [B.A.T.M.A.N.] [PATCH] alfred: Add explanation how to run alfred as non-root user Sven Eckelmann
@ 2015-02-28  7:50 ` MK
  2015-02-28 16:04   ` Simon Wunderlich
  2015-03-05  8:12 ` [B.A.T.M.A.N.] [PATCHv2] " Sven Eckelmann
  1 sibling, 1 reply; 5+ messages in thread
From: MK @ 2015-02-28  7:50 UTC (permalink / raw)
  To: b.a.t.m.a.n

Sven Eckelmann wrote:
> unix socket +can also be moved to a different directly which is accessible
typo: directly -> directory


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] alfred: Add explanation how to run alfred as non-root user
  2015-02-28  7:50 ` MK
@ 2015-02-28 16:04   ` Simon Wunderlich
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Wunderlich @ 2015-02-28 16:04 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: MK

[-- Attachment #1: Type: text/plain, Size: 346 bytes --]

On Saturday 28 February 2015 08:50:42 MK wrote:
> Sven Eckelmann wrote:
> > unix socket +can also be moved to a different directly which is accessible
> 
> typo: directly -> directory

Hey,

did you try the patch Sven posted earlier this week? Would be great to add 
your acked-by or tested-by tag if it resolves your issue. :)

Thanks!
    Simon

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [B.A.T.M.A.N.] [PATCHv2] alfred: Add explanation how to run alfred as non-root user
  2015-02-23 18:08 [B.A.T.M.A.N.] [PATCH] alfred: Add explanation how to run alfred as non-root user Sven Eckelmann
  2015-02-28  7:50 ` MK
@ 2015-03-05  8:12 ` Sven Eckelmann
  2015-03-11 12:08   ` Simon Wunderlich
  1 sibling, 1 reply; 5+ messages in thread
From: Sven Eckelmann @ 2015-03-05  8:12 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

Reported-by: MK <mailing.m1@kkk-web.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
v2:
 - fix typo 'directly' -> 'directory'

 README | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/README b/README
index 90a99de..2bb4f9b 100644
--- a/README
+++ b/README
@@ -256,6 +256,32 @@ To get JSON formatted output, use:
 
 See gpsd_json(5) for documentation of the tpv object. 
 
+Running alfred as non-root user
+-------------------------------
+
+Alfred currently requires special capabilities and access rights to work
+correctly. The user root is normally the only user having these
+capabilities/rights on a standard Linux system.
+
+Operations requiring special capabilities:
+
+ * bind to device
+ * creating the unix socket
+ * accessing the debugfs filesystem
+
+The first operation can still be executed when the admin grants the special
+capability CAP_NET_RAW to anyone executing the alfred binary. The unix socket
+can also be moved using the parameter '-u' to a different directory which can
+be accessed by the user.
+
+ $ sudo setcap cap_net_raw+ep alfred
+ $ ./alfred -u alfred.sock -i eth0
+
+The user running alfred must still be in a group which is allowed to access
+/sys/kernel/debugfs to correctly choose best neighbors for communication.
+It is possible (but not recommended) to disable the neighbor
+selection/prioritization using the parameter '-b none'.
+
 License
 -------
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCHv2] alfred: Add explanation how to run alfred as non-root user
  2015-03-05  8:12 ` [B.A.T.M.A.N.] [PATCHv2] " Sven Eckelmann
@ 2015-03-11 12:08   ` Simon Wunderlich
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Wunderlich @ 2015-03-11 12:08 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

On Thursday 05 March 2015 09:12:31 Sven Eckelmann wrote:
> Reported-by: MK <mailing.m1@kkk-web.de>
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
> v2:
>  - fix typo 'directly' -> 'directory'
> 

Applied in revision be4d727.

Thanks!
     Simon

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-11 12:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 18:08 [B.A.T.M.A.N.] [PATCH] alfred: Add explanation how to run alfred as non-root user Sven Eckelmann
2015-02-28  7:50 ` MK
2015-02-28 16:04   ` Simon Wunderlich
2015-03-05  8:12 ` [B.A.T.M.A.N.] [PATCHv2] " Sven Eckelmann
2015-03-11 12:08   ` Simon Wunderlich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).