From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: Russell Coker <russell@coker.com.au>
Cc: SE-Linux <selinux@tycho.nsa.gov>
Subject: Re: fsck deleting extended attributes
Date: Sun, 27 Jun 2004 09:34:39 +0000 [thread overview]
Message-ID: <20040627093439.GA12052@lkcl.net> (raw)
In-Reply-To: <200406271858.24058.russell@coker.com.au>
On Sun, Jun 27, 2004 at 06:58:24PM +1000, Russell Coker wrote:
> On Sun, 27 Jun 2004 08:03, Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:
> > the issue is that if a system is switched off without shutdown and
> > the filesystem is damaged, such that some extended attributes are
> > deleted on an fsck, that's it - the file cannot be accessed!
>
> The fact that a file without a label is inaccessible to most programs is a bug
> not a feature. You wouldn't want /etc/shadow to lose it's label and give
> away passwords...
>
> No matter what you do there are situations in which a file system can be
> messed up beyond the ability of fsck to fix it. By default there are many
> situations in which fsck will want to operate in manual mode (you have to
> edit something under /etc to have fsck run with -f to have it recover from
> most errors without intervention).
>
> > i am setting up a system where the users will NOT be told what
> > the root password is, nor will they be given a user login
> > (they will be given an automatic KDE login), and there is
> > ABSOLUTELY no chance of either user support or admin support.
>
> How about mounting the root fs R/O so that it can't be messed up and then
> having /var and /home relabelled on some schedule (eg every 5th boot).
>
> > a) get fsck.ext2 fixed?
>
> I think it's already as good as it's going to get in this regard.
>
> > b) forcibly run make -C /etc/selinux relabel from /etc/init.d/checkfs.sh
>
> Yes, but not every boot.
i modified /etc/init.d/checkfs.sh as follows:
echo "Checking all file systems..."
fsck $spinner -R -A $fix $force
if [ $? -gt 1 ]
fsck $spinner -R -A $fix -y
if [ $? -gt 1 ]
then
echo
echo "fsck failed. Please repair manually."
echo
echo "CONTROL-D will exit from this shell and continue system startup."
echo
# Start a single user shell on the console
/sbin/sulogin $CONSOLE
else
# first file system check failed: second one forced
# "yes" to repair so just in case we re-run the
# relabelling of se/linux extended attributes...
make -C /etc/selinux relabel
fi
then
fi
in other words, a [hopefully!] non-damaging fsck is done first,
with detection that goes "eek", does a forced fsck and then
runs relabel.
i _hope_ that it's done under a context where the relabel can
actually work!
l.
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
prev parent reply other threads:[~2004-06-27 9:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-26 22:03 fsck deleting extended attributes Luke Kenneth Casson Leighton
2004-06-27 8:58 ` Russell Coker
2004-06-27 9:34 ` Luke Kenneth Casson Leighton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040627093439.GA12052@lkcl.net \
--to=lkcl@lkcl.net \
--cc=russell@coker.com.au \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.