Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 311349 - sys-kernel/gentoo-sources-2.6.33: bash scripts do not execute in ecryptfs partitions
Summary: sys-kernel/gentoo-sources-2.6.33: bash scripts do not execute in ecryptfs par...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Infrastructure
Classification: Unclassified
Component: Bugzilla (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-25 21:43 UTC by Paulo da Silva
Modified: 2011-10-30 23:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (I_einfo,4.16 KB, text/plain)
2010-03-26 16:39 UTC, Paulo da Silva
Details
.config (I_config,72.81 KB, text/plain)
2010-03-26 16:41 UTC, Paulo da Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paulo da Silva 2010-03-25 21:43:22 UTC
Bash scripts in ecryptfs encrypted partitions do not execute.

Example:
1. Write file tp in an ecryptfs partition with
#!/bin/bash
echo OK

2. chmod a+x tp
3. Try to execute it
./tp
bash: ./tp: /bin/bash: bad interpreter: Function not implemented

Doing "bash tp" works as expected.
Moving the file to a "normal" dir also works.
Comment 1 Paulo da Silva 2010-03-26 16:39:56 UTC
Created attachment 225343 [details]
emerge --info
Comment 2 Paulo da Silva 2010-03-26 16:41:53 UTC
Created attachment 225345 [details]
.config
Comment 3 Peter Gantner (a.k.a. nephros) 2010-03-26 17:37:22 UTC
Are you sure the filesystem is mounted with the exec option set?
Comment 4 Paulo da Silva 2010-03-26 22:15:23 UTC
(In reply to comment #3)
> Are you sure the filesystem is mounted with the exec option set?
> 
It is not. It used to work so far.
Now I tried:
1. Changed the mount options in fstab to include exec and remounted.
2. I tried with a new dir like this
mkdir tmp
mount -tecryptfs tmp tmp -o exec
put a script there and tried to execute it.
Both failed.
Comment 5 Mike Pagano gentoo-dev 2010-03-30 21:55:53 UTC
failed the same way? can we see you /etc/fstab
Comment 6 Paulo da Silva 2010-03-30 22:29:30 UTC
(In reply to comment #5)
> failed the same way? can we see you /etc/fstab
> 
I'm sorry but this has nothing to do with fstab. As I said, you may try it using a k 2.6.33. Just do:

1. Go to any dir.
2. mkdir tmp
3. mount -t ecrypfs tmp tmp -o exec
Answer the questions like crypt algorithm and password.
4. cd tmp
5. Write the following to for example tp
#! /bin/bash
echo OK

6. chmod u+x tp
7. ./tp

This will show
bash: ./tp: /bin/bash: bad interpreter: Function not implemented

As you see, this does not depend on fstab.
BTW, /etc/fstab was not changed from previous kernels.
Comment 7 Mike Pagano gentoo-dev 2010-03-30 23:01:15 UTC
ok then, please file this bug upstream at https://bugzilla.kernel.org and copy the url back here.
Comment 8 Paulo da Silva 2010-03-30 23:48:46 UTC
(In reply to comment #7)
> ok then, please file this bug upstream at https://bugzilla.kernel.org and copy
> the url back here.
> 
As I saw there, the bug must be confirmed using a vanilla kernel. In the meanwhile
 I downgraded to k 2.6.31-r6 because of bugs #307671 and #311329.
I'll be back when I got some time to check a k 2.6.33 vanilla or the bug somehow gets fixed in a new version.
Comment 9 Paulo da Silva 2010-07-03 02:51:01 UTC
After upgrading to kernel 2.6.33-r2 this problem went away.
Now bash scripts work as expected.
Comment 10 Mike Pagano gentoo-dev 2010-07-07 23:59:06 UTC
works for user