Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 646546

Summary: net-misc/minissdpd: QA issues with init.d file
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: Current packagesAssignee: Michał Górny <mgorny>
Status: CONFIRMED ---    
Severity: normal CC: mgorny
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 609070    
Attachments: unified diff for files/minissdpd.initd-r2 to do the bitwise check in posix

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-02-04 08:06:48 UTC
* Messages for package net-misc/minissdpd-1.5.20180203:
 * Log file: /var/log/portage/net-misc:minissdpd-1.5.20180203:20180204-075939.log

 * QA Notice: shell script appears to use non-POSIX feature(s):
 *    possible bashism in /etc/init.d/minissdpd line 14 (let ...):
 *    	let "IFUP = `cat /sys/class/net/$1/flags` & 1"
 *    possible bashism in /etc/init.d/minissdpd line 47 (should be VAR="${VAR}foo"):
 *    			ARGS+="-i $IF "
Comment 1 Anthony Basile gentoo-dev 2018-02-24 12:12:38 UTC
(In reply to Michał Górny from comment #0)
> * Messages for package net-misc/minissdpd-1.5.20180203:
>  * Log file:
> /var/log/portage/net-misc:minissdpd-1.5.20180203:20180204-075939.log
> 
>  * QA Notice: shell script appears to use non-POSIX feature(s):
>  *    possible bashism in /etc/init.d/minissdpd line 14 (let ...):
>  *    	let "IFUP = `cat /sys/class/net/$1/flags` & 1"
>  *    possible bashism in /etc/init.d/minissdpd line 47 (should be
> VAR="${VAR}foo"):
>  *    			ARGS+="-i $IF "

Hmm ... the problem here is I'm not sure how to do bitwise and in dash.
Comment 2 Chris Slycord 2020-01-27 13:10:32 UTC
Created attachment 605172 [details, diff]
unified diff for files/minissdpd.initd-r2 to do the bitwise check in posix

Changed the arithmetic/bitwise check to be posix compliant.