Bug 6519 - RootFS polluted by inherited setgid bit
Summary: RootFS polluted by inherited setgid bit
Status: VERIFIED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 2.0
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.7 M2
Assignee: Richard Purdie
QA Contact: Andra Necula
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-07-09 16:53 UTC by seth bollinger
Modified: 2014-11-17 15:28 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description seth bollinger 2014-07-09 16:53:35 UTC
I recently ran into a problem where I had trouble determining why the setgid bit was set in my rootfs.  It turns out that debian has this bit set on /usr/local (where I was building from), and thus inherited this bit from that directory tree.
Comment 2 Andra Necula 2014-10-02 11:21:18 UTC
Verified on master commit: 8ac8eca2e3bd8c78e2b31ea974930ed0243258a3
Host : Debian 3.14.13-2, x86_64
Comment 3 Andra Necula 2014-11-17 15:28:20 UTC
Verified on master commit: 8ac8eca2e3bd8c78e2b31ea974930ed0243258a3
Host : Debian 3.14.13-2, x86_64

Reproducing steps (method 1):
1. in poky folder : source oe-init-build-env newbuild
2. ls -ld .
3. chmode g+s .
4. ls -ls ( now now you can see the sticky note (s): drwxr -sr -x ....)
5. bitbake core-image-minimal

You will get an error message: "TMPDIR is setgid, please don't build in a setgid directory"


(method 2)
1. cd  /usr/local
2. sudo mkdir test
3. sudo chown user test
1. in poky folder : source oe-init-build-env /usr/local/test
2. ls -ld .
3. chmode g+s .
4. ls -ls ( now now you can see the sticky note (s): drwxr -sr -x ....)
5. bitbake core-image-minimal

You will get an error message: "TMPDIR is setgid, please don't build in a setgid directory"