[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

security labeling handle: No such file or directory (what file?)



With my Debian Kit installation on a phone (Motorola Mote-e2, Android
5.02) I seem to be having selinux problems.  I've read part of
Gentoo's selinux tutorial at
https://wiki.gentoo.org/wiki/SELinux/Tutorials and I'm trying to
figure this out.

Did:
setenforce permissive
root@gsm:/# getenforce
Permissive
root@gsm:/# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  binutils
Suggested packages:
  binutils-doc
The following NEW packages will be installed:
  binutils
0 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
3 not fully installed or removed.
Need to get 0 B/3542 kB of archives.
After this operation, 17.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: error processing archive
/var/cache/apt/archives/binutils_2.25-5_armhf.deb (--unpack):
 cannot get security labeling handle: No such file or directory
Errors were encountered while processing:
 /var/cache/apt/archives/binutils_2.25-5_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

ls -lZ binutils*
-rw-r--r--. 1 root root u:object_r:unlabeled:s0 3533014 Feb 25  2015
-binutils_2.25-5_armhf.deb

[cd /etc]

ls -lZ | grep selinux
drwxr-xr-x.  3 root root   u:object_r:unlabeled:s0  4096 Dec 30 01:23
selinux

There was a posted suggestion that remounting /etc/selinux ro fixes this error
but it's not a mountpoint here.  What if I chmod it not writeable?
chmod 600 selinux
root@gsm:/etc# ls -la | grep selinux
drw-------.   3 root root    4096 Dec 30 01:23 selinux
Doesn't work.  Set it back to 755

Do I need to get the source of dpkg to find out what file it's not
finding or does somebody know what this error message is talking
about?  Is it because the deb apparently doesn't have selinux
attributes set?

I did a little reading and Android 5 was the first version where
selinux wasn't permissive by default, wonder if that's why there are
so many problems.  I'm a little confused about how having the Android
side using selinux affects the Debian side.

I can't install binutils and some other packages, some I can.  Mostly
I just want Make, for now, and stuff to compile C programs.


-- 
Credit is the root of all evil.  - AB1JX


Reply to: