libteam-1.32-7.fc41

List of Defects

Error: SHELLCHECK_WARNING (CWE-252): [#def1]
/etc/sysconfig/network-scripts/ifdown-Team:21:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   19|   . /etc/init.d/functions
#   20|   
#   21|-> cd /etc/sysconfig/network-scripts
#   22|   . ./network-functions
#   23|   

Error: SHELLCHECK_WARNING: [#def2]
/etc/sysconfig/network-scripts/ifdown-Team:40:11: warning[SC3004]: In POSIX sh, $".." is undefined.
#   38|   if [ -n "${TEAM_CONFIG}" ]; then
#   39|   	if [ ! -x /usr/bin/teamd ]; then
#   40|-> 		net_log $"Team support not available: teamd not found"
#   41|   		exit 1
#   42|   	fi

Error: SHELLCHECK_WARNING (CWE-252): [#def3]
/etc/sysconfig/network-scripts/ifdown-TeamPort:21:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   19|   . /etc/init.d/functions
#   20|   
#   21|-> cd /etc/sysconfig/network-scripts
#   22|   . ./network-functions
#   23|   

Error: SHELLCHECK_WARNING: [#def4]
/etc/sysconfig/network-scripts/ifdown-TeamPort:34:11: warning[SC3004]: In POSIX sh, $".." is undefined.
#   32|   if [ -n "${TEAM_MASTER}" ]; then
#   33|   	if [ ! -x /usr/bin/teamdctl ]; then
#   34|-> 		net_log $"Team support not available: teamdctl not found"
#   35|   		exit 1
#   36|   	fi

Error: SHELLCHECK_WARNING: [#def5]
/etc/sysconfig/network-scripts/ifdown-TeamPort:39:11: warning[SC3004]: In POSIX sh, $".." is undefined.
#   37|   	/sbin/ip link show ${TEAM_MASTER} > /dev/null 2>&1
#   38|   	if [ $? -ne 0 ]; then
#   39|-> 		net_log $"Team master is not present, skipping port device removal from master" info
#   40|   		exit 0
#   41|   	fi

Error: SHELLCHECK_WARNING (CWE-252): [#def6]
/etc/sysconfig/network-scripts/ifup-Team:21:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   19|   . /etc/init.d/functions
#   20|   
#   21|-> cd /etc/sysconfig/network-scripts
#   22|   . ./network-functions
#   23|   

Error: SHELLCHECK_WARNING: [#def7]
/etc/sysconfig/network-scripts/ifup-Team:35:11: warning[SC3004]: In POSIX sh, $".." is undefined.
#   33|   if [ -n "${TEAM_CONFIG}" ]; then
#   34|   	if [ ! -x /usr/bin/teamd ]; then
#   35|-> 		net_log $"Team support not available: teamd not found"
#   36|   		exit 1
#   37|   		fi

Error: SHELLCHECK_WARNING (CWE-252): [#def8]
/etc/sysconfig/network-scripts/ifup-TeamPort:21:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#   19|   . /etc/init.d/functions
#   20|   
#   21|-> cd /etc/sysconfig/network-scripts
#   22|   . ./network-functions
#   23|   

Error: SHELLCHECK_WARNING: [#def9]
/etc/sysconfig/network-scripts/ifup-TeamPort:40:11: warning[SC3004]: In POSIX sh, $".." is undefined.
#   38|   if [ -n "${TEAM_MASTER}" ]; then
#   39|   	if [ ! -x /usr/bin/teamdctl ]; then
#   40|-> 		net_log $"Team support not available: teamdctl not found"
#   41|   		exit 1
#   42|   	fi

Error: SHELLCHECK_WARNING: [#def10]
/etc/sysconfig/network-scripts/ifup-TeamPort:45:11: warning[SC3004]: In POSIX sh, $".." is undefined.
#   43|   	/sbin/ip link show ${TEAM_MASTER} > /dev/null 2>&1
#   44|   	if [ $? -ne 0 ]; then
#   45|-> 		net_log $"Team master is not present yet, delaying port device initialization" info
#   46|   		exit 0
#   47|   	fi

Error: SHELLCHECK_WARNING (CWE-563): [#def11]
/usr/bin/bond2team:30:1: warning[SC2034]: ARGC appears unused. Verify use (or export if used externally).
#   28|   
#   29|   #defaults
#   30|-> ARGC=$#
#   31|   
#   32|   FORMAT_IFCFG=0

Error: SHELLCHECK_WARNING (CWE-563): [#def12]
/usr/bin/bond2team:55:1: warning[SC2034]: PORTS_OPTS appears unused. Verify use (or export if used externally).
#   53|   # array: ( 'port ifname', 'opt1', 'opt2', 'optn', 'opt4', 'port ifname', ... )
#   54|   PORT_LIST=
#   55|-> PORTS_OPTS=()
#   56|   PRIMARY=
#   57|   PRIMARY_RESELECT=

Error: SHELLCHECK_WARNING (CWE-569): [#def13]
/usr/bin/bond2team:159:25: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
#  157|   pr_error()
#  158|   {
#  159|-> 	pr ${PR_ERR} "ERROR: " $*
#  160|   }
#  161|   

Error: SHELLCHECK_WARNING (CWE-569): [#def14]
/usr/bin/bond2team:164:28: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
#  162|   pr_warn()
#  163|   {
#  164|-> 	pr ${PR_WARN} "WARNING: " $*
#  165|   }
#  166|   

Error: SHELLCHECK_WARNING (CWE-569): [#def15]
/usr/bin/bond2team:169:25: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
#  167|   pr_info()
#  168|   {
#  169|-> 	pr ${PR_INFO} "INFO: " $*
#  170|   }
#  171|   

Error: SHELLCHECK_WARNING (CWE-569): [#def16]
/usr/bin/bond2team:174:25: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
#  172|   pr_dbg()
#  173|   {
#  174|-> 	pr ${PR_DBG} "DEBUG: " $*
#  175|   }
#  176|   

Error: SHELLCHECK_WARNING (CWE-670): [#def17]
/usr/bin/bond2team:191:13: warning[SC2128]: Expanding an array without an index only gives the first element.
#  189|   
#  190|   	if [ ! -d "${OUTPUT_TMP_DIR}" ]; then
#  191|-> 		pr_error "${FUNCNAME} can't create dir ${OUTPUT_TMP_DIR}"
#  192|   		return 1
#  193|   	fi

Error: SHELLCHECK_WARNING (CWE-670): [#def18]
/usr/bin/bond2team:198:13: warning[SC2128]: Expanding an array without an index only gives the first element.
#  196|   	touch ${tmpfile}
#  197|   	if [ ! -f ${tmpfile} ]; then
#  198|-> 		pr_error "${FUNCNAME} can't create file ${tmpfile}"
#  199|   		return 1
#  200|   	fi

Error: SHELLCHECK_WARNING (CWE-685): [#def19]
/usr/bin/bond2team:217:1: warning[SC2120]: clean_up references arguments, but none are ever passed.
#  215|   }
#  216|   
#  217|-> clean_up()
#  218|   {
#  219|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def20]
/usr/bin/bond2team:219:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  217|   clean_up()
#  218|   {
#  219|-> 	pr_dbg "${FUNCNAME} $*"
#  220|   	for tmpf in $(seq 0 $((${#TMP_FILES[@]} - 1)))
#  221|   	do

Error: SHELLCHECK_WARNING (CWE-685): [#def21]
/usr/bin/bond2team:278:1: warning[SC2120]: ifcfg_overwrite_files references arguments, but none are ever passed.
#  276|   }
#  277|   
#  278|-> ifcfg_overwrite_files()
#  279|   {
#  280|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def22]
/usr/bin/bond2team:280:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  278|   ifcfg_overwrite_files()
#  279|   {
#  280|-> 	pr_dbg "${FUNCNAME} $*"
#  281|   
#  282|   	/bin/cp -f ${OUTPUT_TMP_DIR}/ifcfg* ${OUTPUT_DIR}

Error: SHELLCHECK_WARNING (CWE-670): [#def23]
/usr/bin/bond2team:287:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  285|   ifcfg_get_bond_opts()
#  286|   {
#  287|-> 	pr_dbg "${FUNCNAME} $*"
#  288|   	local ifcfg=$1
#  289|   

Error: SHELLCHECK_WARNING (CWE-670): [#def24]
/usr/bin/bond2team:291:11: warning[SC2128]: Expanding an array without an index only gives the first element.
#  289|   
#  290|   	if [ -n "${BONDING_OPTS}" ]; then
#  291|-> 		pr_dbg "${FUNCNAME} bonding_opts=${BONDING_OPTS}"
#  292|   		return 0
#  293|   	fi

Error: SHELLCHECK_WARNING (CWE-670): [#def25]
/usr/bin/bond2team:309:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  307|   	fi
#  308|   
#  309|-> 	pr_dbg "${FUNCNAME} bonding_opts=${BONDING_OPTS}"
#  310|   	return 0
#  311|   }

Error: SHELLCHECK_WARNING (CWE-670): [#def26]
/usr/bin/bond2team:320:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  318|   vfile_load_ifcfg()
#  319|   {
#  320|-> 	pr_dbg "${FUNCNAME} $*"
#  321|   	local ifcfg=$1
#  322|   

Error: SHELLCHECK_WARNING (CWE-140): [#def27]
/usr/bin/bond2team:333:10: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
#  331|   	oIFS="$IFS"
#  332|   	IFS=$'\n'
#  333|-> 	VFILE=( $(LANG=C \
#  334|   		grep -iv 'BONDING_OPTS\|SLAVE\|MASTER\|TYPE\|DEVICETYPE\|TEAM' \
#  335|   		$ifcfg ))

Error: SHELLCHECK_WARNING (CWE-670): [#def28]
/usr/bin/bond2team:341:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  339|   vfile_write_to_file()
#  340|   {
#  341|-> 	pr_dbg "${FUNCNAME} $*"
#  342|   	local output=$1
#  343|   	for ln in $(seq 0 $((${#VFILE[@]} - 1)))

Error: SHELLCHECK_WARNING (CWE-685): [#def29]
/usr/bin/bond2team:371:1: warning[SC2120]: vfile_get_device references arguments, but none are ever passed.
#  369|   }
#  370|   
#  371|-> vfile_get_device()
#  372|   {
#  373|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def30]
/usr/bin/bond2team:373:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  371|   vfile_get_device()
#  372|   {
#  373|-> 	pr_dbg "${FUNCNAME} $*"
#  374|   	if [ ${MODE} -eq ${MODE_NOIFCFG} ]; then
#  375|   		pr_dbg "${FUNCNAME} using DEVICE=${MASTER}"

Error: SHELLCHECK_WARNING (CWE-670): [#def31]
/usr/bin/bond2team:375:11: warning[SC2128]: Expanding an array without an index only gives the first element.
#  373|   	pr_dbg "${FUNCNAME} $*"
#  374|   	if [ ${MODE} -eq ${MODE_NOIFCFG} ]; then
#  375|-> 		pr_dbg "${FUNCNAME} using DEVICE=${MASTER}"
#  376|   		DEVICE=${MASTER}
#  377|   		return 0

Error: SHELLCHECK_WARNING (CWE-670): [#def32]
/usr/bin/bond2team:387:12: warning[SC2128]: Expanding an array without an index only gives the first element.
#  385|   			local name="${name_line%%[ #	]*}"
#  386|   			DEVICE=${name}
#  387|-> 			pr_dbg "${FUNCNAME} from file: DEVICE=${DEVICE}"
#  388|   			return 0
#  389|   		fi

Error: SHELLCHECK_WARNING (CWE-670): [#def33]
/usr/bin/bond2team:411:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  409|   vfile_add_line()
#  410|   {
#  411|-> 	pr_dbg "${FUNCNAME} $*"
#  412|   	local pos=${#VFILE[*]}
#  413|   	VFILE[${pos}]="$1"

Error: SHELLCHECK_WARNING (CWE-670): [#def34]
/usr/bin/bond2team:447:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  445|   team_port_set_devtype()
#  446|   {
#  447|-> 	pr_dbg "${FUNCNAME} $*"
#  448|   	local master=$1
#  449|   	vfile_add_line "DEVICETYPE=\"TeamPort\""

Error: SHELLCHECK_WARNING (CWE-670): [#def35]
/usr/bin/bond2team:455:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  453|   team_port_set_config()
#  454|   {
#  455|-> 	pr_dbg "${FUNCNAME} $*"
#  456|   	local port=$1
#  457|   	local team_port_config=""

Error: SHELLCHECK_WARNING (CWE-685): [#def36]
/usr/bin/bond2team:505:1: warning[SC2120]: team_master_set_devtype references arguments, but none are ever passed.
#  503|   }
#  504|   
#  505|-> team_master_set_devtype()
#  506|   {
#  507|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def37]
/usr/bin/bond2team:507:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  505|   team_master_set_devtype()
#  506|   {
#  507|-> 	pr_dbg "${FUNCNAME} $*"
#  508|   	vfile_add_line "DEVICETYPE=\"Team\""
#  509|   }

Error: SHELLCHECK_WARNING (CWE-685): [#def38]
/usr/bin/bond2team:511:1: warning[SC2120]: team_master_set_config references arguments, but none are ever passed.
#  509|   }
#  510|   
#  511|-> team_master_set_config()
#  512|   {
#  513|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def39]
/usr/bin/bond2team:513:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  511|   team_master_set_config()
#  512|   {
#  513|-> 	pr_dbg "${FUNCNAME} $*"
#  514|   	local team_config="'{ \"runner\" : { "
#  515|   	local nr_opt=0

Error: SHELLCHECK_WARNING (CWE-670): [#def40]
/usr/bin/bond2team:563:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  561|   team_ifcfg_dump_stdout()
#  562|   {
#  563|-> 	pr_dbg "${FUNCNAME} $*"
#  564|   	local dev=$1
#  565|   	if ! ifcfg_dump_stdout ${dev}; then

Error: SHELLCHECK_WARNING (CWE-670): [#def41]
/usr/bin/bond2team:574:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  572|   team_ifcfg_write_file()
#  573|   {
#  574|-> 	pr_dbg "${FUNCNAME} $*"
#  575|   	local dev=$1
#  576|   	OUTPUT_FILE=

Error: SHELLCHECK_WARNING (CWE-685): [#def42]
/usr/bin/bond2team:595:1: warning[SC2120]: team_master_ifcfg_create references arguments, but none are ever passed.
#  593|   }
#  594|   
#  595|-> team_master_ifcfg_create()
#  596|   {
#  597|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def43]
/usr/bin/bond2team:597:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  595|   team_master_ifcfg_create()
#  596|   {
#  597|-> 	pr_dbg "${FUNCNAME} $*"
#  598|   	if ! team_master_set_devtype; then
#  599|   		return 1

Error: SHELLCHECK_WARNING (CWE-670): [#def44]
/usr/bin/bond2team:611:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  609|   team_ifcfg_write()
#  610|   {
#  611|-> 	pr_dbg "${FUNCNAME} $*"
#  612|   	local dev=${1}
#  613|   

Error: SHELLCHECK_WARNING (CWE-685): [#def45]
/usr/bin/bond2team:623:1: warning[SC2120]: team_ifcfg_deliver references arguments, but none are ever passed.
#  621|   }
#  622|   
#  623|-> team_ifcfg_deliver()
#  624|   {
#  625|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def46]
/usr/bin/bond2team:625:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  623|   team_ifcfg_deliver()
#  624|   {
#  625|-> 	pr_dbg "${FUNCNAME} $*"
#  626|   	if to_stdout; then
#  627|   		return 0

Error: SHELLCHECK_WARNING (CWE-670): [#def47]
/usr/bin/bond2team:708:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  706|   teamd_write_file()
#  707|   {
#  708|-> 	pr_dbg "${FUNCNAME} $*"
#  709|   	local dev=$1
#  710|   	OUTPUT_FILE=

Error: SHELLCHECK_WARNING (CWE-685): [#def48]
/usr/bin/bond2team:725:1: warning[SC2120]: teamd_config_write references arguments, but none are ever passed.
#  723|   
#  724|   
#  725|-> teamd_config_write()
#  726|   {
#  727|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def49]
/usr/bin/bond2team:727:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  725|   teamd_config_write()
#  726|   {
#  727|-> 	pr_dbg "${FUNCNAME} $*"
#  728|   
#  729|   	if to_stdout; then

Error: SHELLCHECK_WARNING (CWE-670): [#def50]
/usr/bin/bond2team:753:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  751|   teamd_port_add()
#  752|   {
#  753|-> 	pr_dbg "${FUNCNAME} $*"
#  754|   	local dev=${1}
#  755|   	local lastone=${2}

Error: SHELLCHECK_WARNING (CWE-670): [#def51]
/usr/bin/bond2team:794:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  792|   runner_add_opt()
#  793|   {
#  794|-> 	pr_dbg "${FUNCNAME} $*"
#  795|   	local pos=${#RUNNER_OPTS[*]}
#  796|   	RUNNER_OPTS[${pos}]="$1"

Error: SHELLCHECK_WARNING (CWE-670): [#def52]
/usr/bin/bond2team:801:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  799|   runner_parse_adselect()
#  800|   {
#  801|-> 	pr_dbg "${FUNCNAME} $*"
#  802|   	local value=$1
#  803|   

Error: SHELLCHECK_WARNING (CWE-670): [#def53]
/usr/bin/bond2team:822:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  820|   runner_parse_failovermac()
#  821|   {
#  822|-> 	pr_dbg "${FUNCNAME} $*"
#  823|   	local value=$1
#  824|   

Error: SHELLCHECK_WARNING (CWE-670): [#def54]
/usr/bin/bond2team:845:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  843|   runner_parse_lacprate()
#  844|   {
#  845|-> 	pr_dbg "${FUNCNAME} $*"
#  846|   	local value=$1
#  847|   

Error: SHELLCHECK_WARNING (CWE-670): [#def55]
/usr/bin/bond2team:864:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  862|   runner_parse_xmit_policy()
#  863|   {
#  864|-> 	pr_dbg "${FUNCNAME} $*"
#  865|   	local value=$1
#  866|   

Error: SHELLCHECK_WARNING (CWE-670): [#def56]
/usr/bin/bond2team:885:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  883|   runner_parse_mode()
#  884|   {
#  885|-> 	pr_dbg "${FUNCNAME} $*"
#  886|   	local value=$1
#  887|   

Error: SHELLCHECK_WARNING (CWE-670): [#def57]
/usr/bin/bond2team:921:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  919|   runner_parse_opt()
#  920|   {
#  921|-> 	pr_dbg "${FUNCNAME} $*"
#  922|   	local param=$1
#  923|   	local value=$2

Error: SHELLCHECK_WARNING (CWE-670): [#def58]
/usr/bin/bond2team:950:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  948|   lwatch_add_opt()
#  949|   {
#  950|-> 	pr_dbg "${FUNCNAME} $*"
#  951|   	local pos=${#LWATCH_OPTS[*]}
#  952|   	LWATCH_OPTS[${pos}]="$1"

Error: SHELLCHECK_WARNING (CWE-670): [#def59]
/usr/bin/bond2team:957:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  955|   lwatch_parse_arp_validate()
#  956|   {
#  957|-> 	pr_dbg "${FUNCNAME} $*"
#  958|   	local value=$1
#  959|   

Error: SHELLCHECK_WARNING (CWE-670): [#def60]
/usr/bin/bond2team:985:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  983|   	#FIXME: supports only one arp_ip_target address.
#  984|   	# otherwise a new linkwatch section must be create
#  985|-> 	pr_dbg "${FUNCNAME} $*"
#  986|   	local ip_addrs=$1
#  987|   	local ip_list=${ip_addrs//,/ }

Error: SHELLCHECK_WARNING (CWE-140): [#def61]
/usr/bin/bond2team:988:18: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
#  986|   	local ip_addrs=$1
#  987|   	local ip_list=${ip_addrs//,/ }
#  988|-> 	local ip_array=($ip_list)
#  989|   	if [ ${#ip_array[*]} -ne 1 ]; then
#  990|   		pr_error "parameter arp_ip_target= with multiple IP addresses is not supported"

Error: SHELLCHECK_WARNING (CWE-670): [#def62]
/usr/bin/bond2team:1002:10: warning[SC2128]: Expanding an array without an index only gives the first element.
# 1000|   lwatch_parse_opt()
# 1001|   {
# 1002|-> 	pr_dbg "${FUNCNAME} $*"
# 1003|   	local param=$1
# 1004|   	local value=$2

Error: SHELLCHECK_WARNING (CWE-670): [#def63]
/usr/bin/bond2team:1037:10: warning[SC2128]: Expanding an array without an index only gives the first element.
# 1035|   port_parse_opt()
# 1036|   {
# 1037|-> 	pr_dbg "${FUNCNAME} $*"
# 1038|   	local param=$1
# 1039|   	local value=$2

Error: SHELLCHECK_WARNING (CWE-670): [#def64]
/usr/bin/bond2team:1070:10: warning[SC2128]: Expanding an array without an index only gives the first element.
# 1068|   {
# 1069|   	local bonding_opts=$1
# 1070|-> 	pr_dbg "${FUNCNAME} $*"
# 1071|   
# 1072|   	for arg in $bonding_opts

Error: SHELLCHECK_WARNING (CWE-477): [#def65]
/usr/bin/bond2team:1177:25: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
# 1175|   done
# 1176|   
# 1177|-> if [ -n "${OUTPUT_DIR}" -a ! -d "${OUTPUT_DIR}" ]; then
# 1178|   	pr_error "Invalid output diretory: ${OUTPUT_DIR}"
# 1179|   	usage

Error: SHELLCHECK_WARNING (CWE-477): [#def66]
/usr/bin/bond2team:1183:21: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
# 1181|   fi
# 1182|   
# 1183|-> if [ -z "${MASTER}" -a -z "${BONDING_OPTS}" ]; then
# 1184|   	pr_error "No master interface or bonding options specified"
# 1185|   	usage

Error: SHELLCHECK_WARNING (CWE-477): [#def67]
/usr/bin/bond2team:1194:45: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
# 1192|   fi
# 1193|   
# 1194|-> if [ ${OUTPUT_FORMAT} -eq ${FORMAT_JANSSON} -a -z "${MASTER}" ]; then
# 1195|   	MASTER="team0"
# 1196|   fi

Error: CLANG_WARNING: [#def68]
libteam-1.32/examples/team_manual_control.c:208:3: warning[deadcode.DeadStores]: Value stored to 'err' is never read
#  206|   
#  207|   	if (strcmp(cmd, "dumplist") == 0) {
#  208|-> 		err = cmd_dumplist(th, argc, argv);
#  209|   	} else if (strcmp(cmd, "set") == 0) {
#  210|   		err = cmd_set(th, argc, argv);

Error: CLANG_WARNING: [#def69]
libteam-1.32/examples/team_manual_control.c:210:3: warning[deadcode.DeadStores]: Value stored to 'err' is never read
#  208|   		err = cmd_dumplist(th, argc, argv);
#  209|   	} else if (strcmp(cmd, "set") == 0) {
#  210|-> 		err = cmd_set(th, argc, argv);
#  211|   	} else if (strcmp(cmd, "get") == 0) {
#  212|   		err = cmd_get(th, argc, argv);

Error: CLANG_WARNING: [#def70]
libteam-1.32/examples/team_manual_control.c:212:3: warning[deadcode.DeadStores]: Value stored to 'err' is never read
#  210|   		err = cmd_set(th, argc, argv);
#  211|   	} else if (strcmp(cmd, "get") == 0) {
#  212|-> 		err = cmd_get(th, argc, argv);
#  213|   	} else {
#  214|   		fprintf(stderr, "Unknown command \"%s\".\n", cmd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
libteam-1.32/include/private/list.h:47:25: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 56)’
libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
libteam-1.32/teamd/teamd.c:46: included_from: Included from here.
libteam-1.32/teamd/teamd.h:56:37: note: in expansion of macro ‘teamd_log_dbgx’
libteam-1.32/teamd/teamd.c:1899:9: note: in expansion of macro ‘teamd_log_dbg’
libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
libteam-1.32/teamd/teamd.c:475:9: note: in expansion of macro ‘list_for_each_node_entry’
libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
#   45|   	new_node->prev = prev_node;
#   46|   	new_node->next = next_node;
#   47|-> 	prev_node->next = new_node;
#   48|   	next_node->prev = new_node;
#   49|   }

Error: GCC_ANALYZER_WARNING (CWE-124): [#def72]
libteam-1.32/teamd/teamd_state.c:28: included_from: Included from here.
libteam-1.32/include/private/misc.h: scope_hint: In function ‘hwaddr_str’
libteam-1.32/include/private/misc.h:64:14: warning[-Wanalyzer-out-of-bounds]: heap-based buffer underwrite
#   62|   	if (len)
#   63|   		str--;
#   64|-> 	*str = '\0';
#   65|   }
#   66|   

Error: CLANG_WARNING: [#def73]
libteam-1.32/libteamdctl/cli_usock.c:211:14: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  209|   
#  210|   	if (p_reply) {
#  211|-> 		replystr = strdup(replystr);
#  212|   		if (!replystr) {
#  213|   			err = -ENOMEM;

Error: CLANG_WARNING: [#def74]
libteam-1.32/teamd/teamd_dbus.c:396:14: warning[core.NullDereference]: Access to field 'fd_w' results in a dereference of a null pointer (loaded from variable 'dp')
#  394|   
#  395|   retry:
#  396|-> 	err = write(dp->fd_w, "a", 1);
#  397|   	if (err == -1 && errno == EINTR)
#  398|   		goto retry;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def75]
libteam-1.32/teamd/teamd_dbus.c: scope_hint: In function ‘wakeup_dispatch’
libteam-1.32/teamd/teamd_dbus.c:396:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dp’
libteam-1.32/teamd/teamd_dbus.c:28: included_from: Included from here.
#  394|   
#  395|   retry:
#  396|-> 	err = write(dp->fd_w, "a", 1);
#  397|   	if (err == -1 && errno == EINTR)
#  398|   		goto retry;

Error: CPPCHECK_WARNING (CWE-401): [#def76]
libteam-1.32/teamd/teamd_events.c:256: error[memleak]: Memory leak: watch
#  254|   	watch->priv = priv;
#  255|   	list_add_tail(&ctx->event_watch_list, &watch->list);
#  256|-> 	return 0;
#  257|   }
#  258|   

Error: CPPCHECK_WARNING (CWE-457): [#def77]
libteam-1.32/teamd/teamd_lw_tipc.c:72: error[uninitvar]: Uninitialized variable: l->peer
#   70|   
#   71|   	LIST_FOREACH(l, &priv->links, next) {
#   72|-> 		if ((tipc_cluster(l->peer) == tipc_cluster(addr)) && l->up)
#   73|   			return true;
#   74|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def78]
libteam-1.32/teamd/teamd_lw_tipc.c: scope_hint: In function ‘lw_tipc_filter_events’
libteam-1.32/teamd/teamd_lw_tipc.c:125:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘remote’
#  123|   		tipc_cluster(lnr->peer), tipc_node(lnr->peer));
#  124|   	remote = strstr(name, needle);
#  125|-> 	*(remote++) = '\0';
#  126|   	bearer = strchr(name, ':') + 1;
#  127|   	return strcmp(bearer, tipc_ppriv->bearer);

Error: CPPCHECK_WARNING (CWE-401): [#def79]
libteam-1.32/teamd/teamd_runner_activebackup.c:622: error[memleak]: Memory leak: info
#  620|   	info->ifindex = tdport->ifindex;
#  621|   	teamd_workq_schedule_work(ctx, &info->workq);
#  622|-> 	return 0;
#  623|   }
#  624|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def80]
libteam-1.32/teamd/teamd_runner_lacp.c:27: included_from: Included from here.
libteam-1.32/teamd/teamd_runner_lacp.c: scope_hint: In function ‘get_lacp_port_prio_info’
libteam-1.32/teamd/teamd_runner_lacp.c:418:53: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*prio_info.system_priority’
libteam-1.32/teamd/teamd_runner_lacp.c: scope_hint: In function ‘get_lacp_port_prio_info’
libteam-1.32/teamd/teamd_runner_lacp.c: scope_hint: In function ‘get_lacp_port_prio_info’
libteam-1.32/teamd/teamd_runner_lacp.c: scope_hint: In function ‘get_lacp_port_prio_info’
#  416|   
#  417|   	/* adjust values for further memcmp comparison */
#  418|-> 	prio_info->system_priority = ntohs(prio_info->system_priority);
#  419|   	prio_info->key = 0;
#  420|   	prio_info->port_priority = ntohs(prio_info->port_priority);

Error: CPPCHECK_WARNING (CWE-401): [#def81]
libteam-1.32/teamd/teamd_runner_lacp.c:1819: error[memleak]: Memory leak: info
# 1817|   	info->ifindex = gsc->info.tdport->ifindex;
# 1818|   	teamd_workq_schedule_work(ctx, &info->workq);
# 1819|-> 	return 0;
# 1820|   }
# 1821|   

Error: CLANG_WARNING: [#def82]
libteam-1.32/teamd/teamd_state.c:114:6: warning[core.NullDereference]: Access to field 'subpath' results in a dereference of a null pointer (loaded from variable 'child_val')
#  112|   
#  113|   			err = __reg_val(ctx, child_val, priv, subpath,
#  114|-> 					child_val->subpath, per_port,
#  115|   					tdport, val);
#  116|   			if (err)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def83]
libteam-1.32/utils/teamdctl.c: scope_hint: In function ‘print_cmd’
libteam-1.32/utils/teamdctl.c:935:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘command_type’
libteam-1.32/utils/teamdctl.c: scope_hint: In function ‘print_cmd’
#  933|   static void print_cmd(struct command_type *command_type)
#  934|   {
#  935|-> 	if (command_type->parent_id != ID_CMDTYPE_NONE) {
#  936|   		print_cmd(__get_cmd_by_id(command_type->parent_id));
#  937|   		pr_out(" ");

Error: CLANG_WARNING: [#def84]
libteam-1.32/utils/teamnl.c:577:4: warning[unix.Malloc]: Potential leak of memory pointed to by 'cmd_ctx.array_index_arg'
#  575|   			return EXIT_FAILURE;
#  576|   		default:
#  577|-> 			fprintf(stderr, "unknown option \"%c\".\n", opt);
#  578|   			print_help(argv0);
#  579|   			return EXIT_FAILURE;

Error: CLANG_WARNING: [#def85]
libteam-1.32/utils/teamnl.c:577:4: warning[unix.Malloc]: Potential leak of memory pointed to by 'cmd_ctx.port_devname_arg'
#  575|   			return EXIT_FAILURE;
#  576|   		default:
#  577|-> 			fprintf(stderr, "unknown option \"%c\".\n", opt);
#  578|   			print_help(argv0);
#  579|   			return EXIT_FAILURE;

Scan Properties

analyzer-version-clang18.1.3
analyzer-version-cppcheck2.13.0
analyzer-version-gcc14.0.1
analyzer-version-gcc-analyzer14.0.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-174.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibteam-1.32-7.fc41
store-results-to/tmp/tmpymgt57zx/libteam-1.32-7.fc41.tar.xz
time-created2024-04-22 11:03:15
time-finished2024-04-22 11:04:36
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpymgt57zx/libteam-1.32-7.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpymgt57zx/libteam-1.32-7.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9