[rsbac] Bug in RSBAC mount code with multiple mounts

Amon Ott rsbac@rsbac.org
Mon Apr 15 18:09:01 2002


--------------Boundary-00=_G7AMH5TH34FR9172JJE3
Content-Type: text/plain;
  charset="iso-8859-15"
Content-Transfer-Encoding: 8bit

Hi!

There is a small bug in the RSBAC mount code: If you mount the root fs for 
the second time at another location, like autofs does, a parent dentry is 
entered into the device item. Attribute lookups can then crash your system.

The attached patch fixed the problem on my test systems. It will be included 
in the next 1.2.0-pre.

Amon.
--
http://www.rsbac.org

--------------Boundary-00=_G7AMH5TH34FR9172JJE3
Content-Type: text/x-diff;
  charset="iso-8859-15";
  name="autofs.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="autofs.diff"

LS0tIGFjaV9kYXRhX3N0cnVjdHVyZXMuY34JVHVlIEZlYiAyNiAxMDozMTo0MyAyMDAyCisrKyBh
Y2lfZGF0YV9zdHJ1Y3R1cmVzLmMJTW9uIEFwciAxNSAxNjoyMzozNiAyMDAyCkBAIC01NTQ2LDcg
KzU1NDYsMTAgQEAKICAgICAgICAgcHJpbnRrKEtFUk5fV0FSTklORyAicnNiYWNfbW91bnQ6IHJl
cGVhdGVkIG1vdW50ICV1IG9mIGRldmljZSAlMDJ1OiUwMnVcbiIsCiAgICAgICAgICAgICAgICBk
ZXZpY2VfcC0+bW91bnRfY291bnQsIE1BSk9SKHNiX3AtPnNfZGV2KSwgTUlOT1Ioc2JfcC0+c19k
ZXYpKTsKIAlkZXZpY2VfcC0+bW91bnRfY291bnQrKzsKLQlpZihkX2NvdmVycyAmJiAhZGV2aWNl
X3AtPmRfY292ZXJzKQorCWlmKCAgIGRfY292ZXJzCisJICAgJiYgIWRldmljZV9wLT5kX2NvdmVy
cworCSAgICYmIChzYl9wLT5zX2RldiAhPSBST09UX0RFVikKKwkgICkKIAkgIHsKICAgICAgICAg
ICAgIHByaW50ayhLRVJOX1dBUk5JTkcgInJzYmFjX21vdW50OiByZXBsYWNpbmcgTlVMTCBkX2Nv
dmVycyB3aXRoIG5ldyB2YWx1ZSAlcCBhcyBpbmhlcml0YW5jZSBwYXJlbnRcbiIsCiAgICAgICAg
ICAgICAgICAgICAgZF9jb3ZlcnMpOwo=

--------------Boundary-00=_G7AMH5TH34FR9172JJE3--