Skip to content

Commit 9eb7045

Browse files
committed
Use grep to prevent bash null byte warnings
1 parent 459fa50 commit 9eb7045

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

autostart/crew-sudo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if [[ "$(< "/proc/$(ps -p $PPID -o ppid= | tr -d ' ')/cmdline")" == /sbin/frecon* ]]; then
1+
if grep -q '^/sbin/frecon' < "/proc/$(ps -p $PPID -o ppid= | tr -d ' ')/cmdline"; then
22
# start crew-sudo daemon if running in VT-2
33
[ -f /tmp/crew-sudo.socket ] || crew-sudo --daemon
44
fi

component/daemon.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def runas_daemon(argv)
1111
Process.daemon(false, true)
1212
Process.setproctitle('sudo-server daemon process')
1313

14-
message "crew-sudo daemon started with PID #{Process.pid}", loglevel: :warning
14+
warn "crew-sudo: Daemon started with PID #{Process.pid}"
1515

1616
# redirect output to log
1717
$log = File.open(DAEMON_LOG_PATH, 'w')

0 commit comments

Comments
 (0)