Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#25986 - [netcfg][patch] 2.6.8-1 The '-a' switch fails when network profiles have spaces in their names

Attached to Project: Arch Linux
Opened by Andrew Radev (AndrewRadev) - Tuesday, 13 September 2011, 06:13 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Tuesday, 13 September 2011, 21:14 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Rémy Oudompheng (remyoudompheng)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

When netcfg is invoked with the "-a" switch, it should take all the active profiles down. However, if the name of the profile has spaces in it, this will fail. For example, if the network is called "My Network", netcfg will attempt to take down "My" and "Network" and fail, because no such profiles can be actually found.

The reason seems to be that, in "/usr/lib/network/network", the "all-down" function iterates through the profiles by splitting them on whitespace. I'm attaching a patch for "/usr/lib/network/network" that fixes the issue by temporarily changing $IFS. This is simply something I found by googling, so I have no idea if it's the best way to do it.

Additional info:
* package version: 2.6.8-1


Steps to reproduce:
* Activate a network profile of a network with spaces in it, for example "My Network"
* Execute "netcfg -a"
This task depends upon

Closed by  Rémy Oudompheng (remyoudompheng)
Tuesday, 13 September 2011, 21:14 GMT
Reason for closing:  Fixed
Comment by Rémy Oudompheng (remyoudompheng) - Tuesday, 13 September 2011, 06:40 GMT
Same category as  FS#24599  and  FS#25362 . I'll have a look at the issue, but I don't think I will fiddle with IFS. Other parts of the code use shell constructs that handle filenames with spaces (and would usually fail on filenames with newlines).
Comment by Rémy Oudompheng (remyoudompheng) - Tuesday, 13 September 2011, 21:14 GMT
Fixed in git (commit 71459f9 on branch 2.6.x).

Loading...