Skip to content

Commit 1c4366e

Browse files
committed
fix: Ensure gid set correctly in Telegraf images
1 parent e781a6e commit 1c4366e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

telegraf/1.27/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ else
1111
# Allow telegraf to send ICMP packets and bind to privliged ports
1212
setcap cap_net_raw,cap_net_bind_service+ep /usr/bin/telegraf || echo "Failed to set additional capabilities on /usr/bin/telegraf"
1313

14-
exec setpriv --reuid telegraf --init-groups "$@"
14+
exec setpriv --reuid telegraf --regid telegraf --reset-env --clear-groups "$@"
1515
fi

telegraf/1.28/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ else
1111
# Allow telegraf to send ICMP packets and bind to privliged ports
1212
setcap cap_net_raw,cap_net_bind_service+ep /usr/bin/telegraf || echo "Failed to set additional capabilities on /usr/bin/telegraf"
1313

14-
exec setpriv --reuid telegraf --init-groups "$@"
14+
exec setpriv --reuid telegraf --regid telegraf --reset-env --clear-groups "$@"
1515
fi

telegraf/1.29/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ else
1111
# Allow telegraf to send ICMP packets and bind to privliged ports
1212
setcap cap_net_raw,cap_net_bind_service+ep /usr/bin/telegraf || echo "Failed to set additional capabilities on /usr/bin/telegraf"
1313

14-
exec setpriv --reuid telegraf --init-groups "$@"
14+
exec setpriv --reuid telegraf --regid telegraf --reset-env --clear-groups "$@"
1515
fi

telegraf/nightly/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ else
1111
# Allow telegraf to send ICMP packets and bind to privliged ports
1212
setcap cap_net_raw,cap_net_bind_service+ep /usr/bin/telegraf || echo "Failed to set additional capabilities on /usr/bin/telegraf"
1313

14-
exec setpriv --reuid telegraf --init-groups "$@"
14+
exec setpriv --reuid telegraf --regid telegraf --reset-env --clear-groups "$@"
1515
fi

0 commit comments

Comments
 (0)