<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21678">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  laforge: Looks good to me, approved; Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ttcn3-dumpcap-start.sh: Accept running as root or setuid dumpcap<br><br>Change-Id: Id97fb22e0018739a07e46ecaf26463248554f276<br>---<br>M ttcn3-dumpcap-start.sh<br>1 file changed, 8 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/ttcn3-dumpcap-start.sh b/ttcn3-dumpcap-start.sh</span><br><span>index aa3814a..4832b6d 100755</span><br><span>--- a/ttcn3-dumpcap-start.sh</span><br><span>+++ b/ttcn3-dumpcap-start.sh</span><br><span>@@ -30,7 +30,14 @@</span><br><span> kill_rm_pidfile $PIDFILE_NETCAT</span><br><span> kill_rm_pidfile $PIDFILE_PCAP</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-if [ -x $DUMPCAP ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+if [ ! -x $DUMPCAP ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+        echo "Missing required dumpcap binary at ${DUMPCAP}"</span><br><span style="color: hsl(120, 100%, 40%);">+        exit 31</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+if [ "$(id -u)" = "0" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+      CMD="$DUMPCAP -q"</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span>     CAP_ERR="1"</span><br><span>     if [ -x /sbin/setcap ]; then</span><br><span>   # N. B: this check requires libcap2-bin package</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21678">change 21678</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21678"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Id97fb22e0018739a07e46ecaf26463248554f276 </div>
<div style="display:none"> Gerrit-Change-Number: 21678 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-CC: Jenkins Builder </div>
<div style="display:none"> Gerrit-MessageType: merged </div>