[sudo-workers] [BUG] iolog terminate process sent to background

Daniele Palumbo daniele at retaggio.net
Tue Nov 21 16:59:04 MST 2017


Il giorno 21 nov 2017, alle ore 18:34, Todd C. Miller <Todd.Miller at courtesan.com> ha scritto:
> When I/O logging is enabled, if the process run by sudo exits, the
> pseudo-tty will be closed.  As a result of this, any process with
> the tty open will receive SIGHUP.
> 
> In your example, when the iperf-daemon.sh scripts exits, iperf3
> receives SIGHUP and exits.  If you run iperf3 like this:
> 
>    iperf3 -s </dev/null >/dev/null 2>&1 &

Bug still exist in this case:
daniele at build-jessie-amd64:~$ grep "^iperf" iperf-daemon.sh
iperf3 -s </dev/null >/dev/null 2>&1 &
daniele at build-jessie-amd64:~$

daniele at build-jessie-amd64:~$ ./replicator.sh
    env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin, log_output, log_output, maxseq=150, iolog_mode=750, iolog_dir=/var/log/sudo-io/%{user}, !requiretty
/usr/bin/iperf3
running KO test
no sleep
iperf3 KO
iperf3: no process found
running OK test
sleeping 3s
iperf3 KO
iperf3: no process found
daniele at build-jessie-amd64:~$

> or better yet:
> 
>    iperf3 -s -D

Bug does not exist in this case:
daniele at build-jessie-amd64:~$ grep "^iperf" iperf-daemon.sh
iperf3 -s -D
daniele at build-jessie-amd64:~$

daniele at build-jessie-amd64:~$ ./replicator.sh
    env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin, log_output, log_output, maxseq=150, iolog_mode=750, iolog_dir=/var/log/sudo-io/%{user}, !requiretty
/usr/bin/iperf3
running KO test
no sleep
3624
iperf3 OK
running OK test
sleeping 3s
3633
iperf3 OK
daniele at build-jessie-amd64:~$

Is this changing your analysis?

Thanks,
Daniele
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://www.sudo.ws/pipermail/sudo-workers/attachments/20171122/6cc59343/attachment.bin>


More information about the sudo-workers mailing list