Ticket #2199 (reopened defect)

Opened 9 years ago

Last modified 10 months ago

bitbake wpa-supplicant-0.6.3 fails (OSError)

Reported by: cfriedt Owned by: openmoko-kernel
Priority: normal Milestone:
Component: Distro Version:
Severity: normal Keywords: wpa-supplicant OSError permission denied
Cc: Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: no PatchReviewResult:


OE Build Configuration:

BB_VERSION = "1.8.11"
METADATA_BRANCH = "<unknown>"
TARGET_OS = "linux-gnueabi"
MACHINE = "om-gta02"
DISTRO = "openmoko"
DISTRO_VERSION = "-20090105"
TARGET_FPU = "soft"

I'm just using the 'stable' git tree, atm.

I believe that the .bb recipe is trying to run a script of some kind located at


The file above is actually only a symbolic link to


which does not exist on my machine.

In any event, the bb recipe should not attempt to execute any script that controls a network interface on the build machine.

I'll attach the build log and see if I can put a fix together as well.


build.log (6.3 KB) - added by cfriedt 9 years ago.
output of 'bitbake wpa-supplicant'
openembedded-package-bbclass-ignore-errno-EACCES.patch (408 bytes) - added by cfriedt 9 years ago.

Change History

Changed 9 years ago by cfriedt

output of 'bitbake wpa-supplicant'

comment:1 Changed 9 years ago by cfriedt

  • Status changed from new to closed
  • Resolution set to invalid

Sorry, this should not have been posted here - I was trying to log in to admin-trac.openmoko.org and for some reason I was directed here.

Why don't we just have a bugzilla?

comment:2 Changed 9 years ago by cfriedt

  • Status changed from closed to reopened
  • Resolution invalid deleted

comment:3 Changed 9 years ago by cfriedt

Again, sorry - according to http://wiki.openmoko.org/wiki/Bug_Filing_Policy , this IS the correct place to file a bug.

I still find it very odd that we don't just use bugzilla.

comment:4 Changed 9 years ago by cfriedt

Well, I've identified the culprit in my issue. It seems that while examining bitbake encounters an Error 13 (EPERM) causing the build to fail.

Checking out packages/wpa-supplicant/wpa-suplicant-0.6.inc, at around line 65, I noticed that there are two symbolic links created in the image dir.

do_install () {

ln -s /etc/wpa_supplicant/ifupdown.sh ${D}${sysconfdir}/network/if-pre-up.d/wpasupplicant
ln -s /etc/wpa_supplicant/ifupdown.sh ${D}${sysconfdir}/network/if-post-down.d/wpasupplicant


On my machine, /etc/wpa_supplicant is owned by root:root and has mode 750. Hence the EPERM.

Now - rule #1 - there should be no access to files on the build system by bitbake during the install stage at all. By (obvious?) inspection, there really is none! The install process is instructed to create a symbolic link called 'etc/network/if-pre-up.d/wpasupplicant' to point to a location (/etc/wpa_supplicant/ifupdown.sh). The location that any symbolic link points to should be (to some extent) irrelevent.

So I looked into openembedded/classes/package.bbclass, where the exception was coming from, around line 450, stat() is called on the file in the image directory ($D). When stat() is called on the symbolic link, it actually follows the symbolic link, causing the EPERM.

A slight modification of package.bbclass is necessary in my opinion, so that inappropriate stat() calls are not made to symbolic links.

Does anyone know how? I'm still a bit of a n00b when it comes to python.

Changed 9 years ago by cfriedt


comment:5 Changed 9 years ago by cfriedt

  • Keywords permission denied added

Python n00b or not, I think I may have found the fix. I can't be sure if this problem is actually in OpenEmbedded?'s package.bbclass, or whether it is an error or Python's os.stat(). My Python version is 2.5.2 incidentally.

My problem was this:

1) os.stat() is called on a symbolic link


which points to


2) os.stat(), for some reason, follows the symbolic link and attempts to perform another os.stat() on the target of the link (far before the os.readlink() function is called on the link itself)

3) If the target of the link is contained within, or is itself, unreadable by the current user, then os.stat() throws an exception, errno.EACCES (13).

I'm not going to bother submitting a patch for python, although I guess I could submit a bug report. There is, however, an attachment in this bug report that should fix OpenEmbedded?.

I gave it quite a bit of consideration, and I can't think of any case where this would actually pose a security threat in OE packages - it's more of glue code to handle a shortcoming in either python's or Linux's implementation of the stat() syscall.

comment:6 Changed 9 years ago by cfriedt

Submitted bug 4963 at bugs.openembedded.net.

Just a final thought -

It might be a better idea to substitute os.lstat() instead of os.stat() in openembedded/classes/packages.bbclass, rather than ignoring the OSError errno.EACCES exception.

comment:7 Changed 9 years ago by andy

  • Component changed from System Software to Distro

Moving off "system software" to "Distro"

comment:8 Changed 10 months ago by RoberMync

Cialis For Sale Online <a href=http://nolvadex.ccrpdc.com/purchase-nolvadex-no-prescription.php>Purchase Nolvadex No Prescription</a> Cialis 10 Mg Dosage Generic Cialis 20mg France <a href=http://zol1.xyz/buy-zoloft-online.php>Buy Zoloft Online</a> Discount Levaquin Sinusitis Buy Now On Line Without Dr Approval Dose Levitra <a href=http://cial5mg.xyz/cialis-online.php>Cialis Online</a> Prednisone 20mg Tab Can I Drink Alcohol With Zithromax <a href=http://cialis.ccrpdc.com/generic-cialis-online.php>Generic Cialis Online</a> Levitra 5mg Generique Whare Can I Get Cialis No Prescription <a href=http://cial1.xyz/buy-cheap-cialis-on-line.php>Buy Cheap Cialis On Line</a> Is There A Generic Equivalent Of Cialis Viagra Cialis E <a href=http://nolvadex.ccrpdc.com/nolvadex-order.php>Nolvadex Order</a> Zithromax Yahoo Answers Cialis Daily Use Buy Online 248 <a href=http://cialis.ccrpdc.com/purchase-cialis.php>Purchase Cialis</a> Amoxicillin Side Effects Toddler Black Stools Buy Authenic Cipro On Line <a href=http://cial1.xyz/cheap-cialis-online.php>Cheap Cialis Online</a> Buy Kaluril Without Prescription Acheter Viagra 25 Mg <a href=http://cial1.xyz/cialis-online-no.php>Cialis Online No</a> Cout Du Levitra 20mg Catalogue Levitra <a href=http://kama1.xyz/low-price-kamagra.php>Low Price Kamagra</a> Viagra Original Online Cialis Honcode <a href=http://xenical.ccrpdc.com/generic-xenical-pricing.php>Generic Xenical Pricing</a> Propecia Con Receta Medica Levitra Comment Le Prendre <a href=http://cial1.xyz/generic-cialis.php>Generic Cialis</a> Cheap Viagra Buy Pharmacy Online Now Zithromax Sinusitis Dosage <a href=http://kama1.xyz/kamagra-tablet.php>Kamagra Tablet</a> Viagra Utilite Buy Cheap Adderall <a href=http://viag1.xyz/order-cheap-viagra.php>Order Cheap Viagra</a> Buying Viagra Overnight Delivery Cialis Frei Apotheke <a href=http://kama1.xyz/kamagra-gel-oral.php>Kamagra Gel Oral</a> Kamagra Generica Levitra Dolor De Espalda <a href=http://cial5mg.xyz/cheapest-cialis-online.php>Cheapest Cialis Online</a> How Buy Viagra Internet

Note: See TracTickets for help on using tickets.