Bug 1473642
Summary: | /usr/sbin/clamav-notify-servers: line 72: warning: command substitution: ignored null byte in input | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Juan Orti <jorti> |
Component: | clamav | Assignee: | Sergio Basto <sergio> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 26 | CC: | amessina, bugzilla.redhat.com, cegolf, crow, dan, dick, fedora.jrg01, frank, gbcox, john, j, martin, nberrehouc, ondrejj, orion, redhat-bugzilla, sauchter, sergio, steve, tom, tommy, tr-rh |
Target Milestone: | --- | Flags: | tommy:
needinfo-
|
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | clamav-0.99.2-12.fc27 clamav-0.99.2-12.fc26 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-09-30 06:36:22 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Juan Orti
2017-07-21 11:18:43 UTC
Could you test clamav-0.99.2-9.fc25 ? https://bodhi.fedoraproject.org/updates/?packages=clamav The same error with clamav-0.99.2-9.fc25 Looks like it's a new feature of bash-4.4: https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00015.html This is kind of weird. I don't think bash is complaining about the explicit NUL in the printf argument; it's complaining the that output of the timeout command contains a NUL which is thrown away. I wonder what that output is and whether the NUL values in it are supposed to be somehow significant. Since bash has always thrown away NUL bytes in this manner and is only just now warning about it, I guess it should be safe to add a "| tr -d \\0" on the end there. That would be better than redirecting stdout to /dev/null, certainly. But there's probably still a better way. *** Bug 1473867 has been marked as a duplicate of this bug. *** It seems to me like changing the script to this fix the problem: printf 'zRELOAD\0' | timeout ${K_OPT:+-k $TIMEOUT_KILL} $TIMEOUT_TERM "${CMD[@]}" | { read resp case $resp in (RELOADING) ;; (*) echo "clamd server '$i' gave '$resp' response" >&2 let ++fail ;; esac } Then using this, command substitution won't be used, and the new behaviour in bash 4.4 won't be triggered. I'n uncertain if there are any drawbacks? There is some discussion about this behaviour in https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00015.html Hi, (In reply to Juan Orti from comment #0) > Actual results: > I receive the warning by email This not affect the functionally of it , isn't it ? Thanks Aside from flooding the forwarded root mbox with warning messages! (In reply to Sergio Monteiro Basto from comment #7) > This not affect the functionally of it , isn't it ? clamd reloads the database fine, the only inconvenience is the warning messages. The bug thread in https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00015.html started 15 Sep 2016 and ended 20 Sep 2016. Based on that, I don't think the behavior of bash is going to change, so the script is going to have to change to account for the bash 4.4 behavior. I personally think the bash 4.4 behavior is against the UNIX "Silence is golden" policy, but my opinion counts for nothing. This should probably go upstream since it may effect any distro the is using bash 4.4. Same error after upgrading from F25 to F26 this morning. clamav-0.99.2-9.fc26.x86_64 and bash-4.4.12-7.fc26.x86_64 (In reply to Tommy Hurtig from comment #6) > It seems to me like changing the script to this fix the problem: > > printf 'zRELOAD\0' | timeout ${K_OPT:+-k $TIMEOUT_KILL} $TIMEOUT_TERM > "${CMD[@]}" | { read resp > case $resp in > (RELOADING) > ;; > (*) > echo "clamd server '$i' gave '$resp' response" >&2 > let ++fail > ;; > esac > } > > Then using this, command substitution won't be used, and the new behaviour > in bash 4.4 won't be triggered. I'n uncertain if there are any drawbacks? > > There is some discussion about this behaviour in > https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00015.html Made this edit to the script and no longer get warning. *** Bug 1485461 has been marked as a duplicate of this bug. *** (In reply to Tommy Hurtig from comment #6) > It seems to me like changing the script to this fix the problem: > > printf 'zRELOAD\0' | timeout ${K_OPT:+-k $TIMEOUT_KILL} $TIMEOUT_TERM > "${CMD[@]}" | { read resp > case $resp in > (RELOADING) > ;; > (*) > echo "clamd server '$i' gave '$resp' response" >&2 > let ++fail > ;; > esac > } > > Then using this, command substitution won't be used, and the new behaviour > in bash 4.4 won't be triggered. I'n uncertain if there are any drawbacks? > > There is some discussion about this behaviour in > https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00015.html can you provide code in a patch ? please , ah clamav-notify-servers is not from clamav source code , so only Fedora have this problem . Patch applied [1] , please test and verify , thanks [1] https://src.fedoraproject.org/cgit/rpms/clamav.git/commit/?id=f5e72a7773d6be5e9c99ae2edcb2754d503e9f87 https://src.fedoraproject.org/rpms/clamav/c/f5e72a7773d6be5e9c99ae2edcb2754d503e9f87?branch=master clamav-0.99.2-12.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-558529554f clamav-0.99.2-12.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-365b0241af clamav-0.99.2-12.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-558529554f clamav-0.99.2-12.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-365b0241af clamav-0.99.2-12.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report. Is this going to be pushed to FC26? (In reply to John Griffiths from comment #21) > Is this going to be pushed to FC26? yes, but you may give positive karma and it will be automatic pushed , (I prefer this because ensures that we got tested ) Anyway I'm pushing it now . clamav-0.99.2-12.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report. |