Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 30 Aug 2014, 14:31
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
network-wizard fails: illegal string in gtkdialog3 script
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
repos

Joined: 14 Oct 2011
Posts: 1

PostPosted: Fri 14 Oct 2011, 08:54    Post_subject:  network-wizard fails: illegal string in gtkdialog3 script
Sub_title: net-setup.sh: problem with devices whose MANUFACTURER string contains '<'
 

Platform:
Dell Inspiron mini 1012
Puppy version: 511
/usr/sbin/net-setup.sh version: 25feb10

Symptom:
network-wizard fails silently!!!

Problem:
For some strange reason the kernel prepends "<A" to USB device''s smanufacturer string on this netbook

$ cat /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5/manufacturer
<ADell Wireless 5540
$ cat /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5/product
Dell Wireless 5540

(the "A<" prefix isn't a typo)


The function findInterfaceInfo() in net-setup.sh picks up the string, fails to sanitize it and blindly sets the MANU variable accordingly.

The (dynamic) gtkdialog3 script fails miserably (as '<' is used as its tag deliniter) and network-wizard exits, unable to tell the user what happened.

Solution:
The function findInterfaceInfo() in net-setup.sh should filter out '<', '>' and other gtkdialog3's special characters for the PROC/MANU/INFO strings.

Suggested fix:

Add the following before findInterfaceInfo() returns:

Code:

# if PROD / MANU / INFO contain the < or > characters, the produced gtkdialog3
# script will fail; so remove these dangerous characters
PROD=$(echo "$PROD"|tr -d '<>')
MANU=$(echo "$MANU"|tr -d '<>')
INFO=$(echo "$INFO"|tr -d '<>')



Thanks to all who contribute to puppy linux.
Back to top
View user's profile Send_private_message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Fri 14 Oct 2011, 19:51    Post_subject:  

Well, we could strip out all strange characters:

echo 'this is a (typical) <description>. |}[(*&%$#!' | sed -e 's%[^a-zA-Z0-9 .]%%g'

The net-setup package is in the 'common' repo. I will put this fix into it.
Thanks for the feedback.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send_private_message Visit_website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Fri 14 Oct 2011, 20:11    Post_subject:  

fixed PET:

http://bkhome.org/blog/?viewDetailed=02544

_________________
http://bkhome.org/news/
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0439s ][ Queries: 11 (0.0047s) ][ GZIP on ]