All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Masover <jedi@ninja.dynup.net>
To: reiserfs-list@namesys.com
Subject: Re: A bold idea (Re: Carrying Attributes too Far)
Date: Sat, 06 Dec 2003 11:40:20 -0600	[thread overview]
Message-ID: <3FD21484.3060802@ninja.dynup.net> (raw)
In-Reply-To: <87fzfyr3uz.fsf@uhoreg.ca>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


>Yes.  Mounting a partition read-only mainly protects against
>accidentally doing something stupid.  (e.g. "rm -rf /")
>  
>
Good point.  However, the usual way to do that is "alias rm='rm -i' or 
to never give the root password to people who do things like that.  And 
if you're already backing up to protect against people breaking in and 
remounting it, you've already got a backup.

>(What does "chmod -x" have to do with mounting read-only?  Or did you
>mean "chmod -r"?)
>  
>
Actually, I meant "chmod -w".

>  
>
>>>different mount attributes such as nodev, nosuid, noexec.  You may
>>>even want to take advantage of the fact that you can't hardlink
>>>across partitions (you don't want users to be able to hardlink
>>>programs from /usr/bin).  Separate partitions also allows you to
>>>easily reinstall by
>>>
>>>      
>>>
>David> Why not?  (Naive question -- I can't see any problem here.)
>
>There was a recent thread on Bugtraq about: if a user can hardlink from
>/usr/bin, then they could link an suid program.  If a vulnerability is
>discovered later, and the admin (or packaging program) just rm's the
>file, the user still has access to it through his hard link.  (The
>solution is to truncate the file to 0, drop the suid bits, and then rm,
>but you might forget.)
>  
>
That's true, it'd probably be a good idea to either make it impossible 
to create a hardlink to a file you don't own or (the simpler solution) 
patch packaging software to do the truncating for you.  The second 
approach makes a lot of sense because some distros (maybe all of them?) 
make only /boot, /, and swap by default (just as I was describing).  
Maybe a "hardlink" permission flag?

>  
>
>>>blowing away your root partition (after copying your /etc), e.g. if
>>>your system gets compromised.  And so forth.
>>>
>>>      
>>>
>David> There are many ways of doing this, including: copy to a network
>David> server, make a temporary partition (after resizing the main one),
>David> burning a CD, etc.
>
>Yes, but being able to just blow away your root partition to reinstall
>is a whole lot easier.
>  
>
I use Gentoo, so there is no "easy" way to do an install -- it's always 
going to take a lot of crunching time, not necessarily a lot of your 
time.  So you do a network backup, automated, to, say, a web server.  
Then you download it and unpack it.  It's easier, sure, but not 
necessarily a lot easier.  Certainly not always a lot easier than 'rm -rf'.

I realize there are some good points made here, and I don't think it 
should be impossible to have separate partitions.  I do, however, think 
that most of these security issues and sanity checks are much easier to 
deal with (especially for a newbie) than managing 10-20 separate 
partitions, even with LVM.  (And that's ignoring the performance issues 
of LVM.)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQIVAwUBP9IUhwisZLIF6uqOAQL6fQ//fIKObk9XFM76V7d8PqdWXiCB4EnaINR6
RlDoVgabeW0CMsd4G3fBY6nnuTVtEhC4HouF5nFfXfea0kHs7VmPvn1jjqQI/7/D
bDkY7fuBwt7WQg+9Kez4GtsTEtDHkVOLzpDwq9feI3ouw1t/IpzXkLc5PdgOAoB9
KaLLHp3jSeKa813t/sJLJfj03aPL+OPNlB5da3y1mqechLEXV2TQnGhTX70ReS6l
p4SPYeth6OI/5clEXPBx2omXHOTh9wGtjw1SOpP1JEFLqKZFEKpQhaSOIv71beW/
uMWRLDuf100cv2QYBgmibuxU+bmoZuIR+SAiOuJgGLgXUbwWs6yjedQR82lGb6xY
md3TB5PSaJZUpPil34hGQquwJvk7MHWsLinA9DkGMyyqWBkmPZl8kyAyZ8RbHhEd
Z/k14/VxeOh/ZYnlfVXJM0OLvfUZFHkyS7+G5BWmgqvg9+2xXYFsgRg1QLMu8OP0
x7KttP6Q8EgUCCJwjat4eQ0jHWQFHmko1sppFMZjeZqOw3E7sNvnKIeJVXYaMGu8
q3vQOGoYqtfDdBo2vHbKiMghPkNv7LcJ3K+LHlTqIKX9aAn0uVWmJqajuQn2JyBB
2DuwCUNcOGTPQzDjbv8t2iuix8hGP2O0ALhBNiz8lZ/JyHN2uubsa+18PdT+ddPG
wbPmiSaojNc=
=iN9Z
-----END PGP SIGNATURE-----


  reply	other threads:[~2003-12-06 17:40 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-04  5:58 Carrying Attributes too Far lrc1
2003-10-04 18:17 ` Alexander G. M. Smith
2003-10-04 20:10 ` Hubert Chan
2003-12-03 19:18 ` Hans Reiser
2003-12-05  0:30   ` lrc1
2003-12-05  3:58     ` A bold idea (Re: Carrying Attributes too Far) David Masover
2003-12-05  9:44       ` Heinz-Josef Claes
2003-12-05 14:00         ` David Masover
2003-12-05 16:37           ` Hubert Chan
2003-12-06  1:38             ` David Masover
2003-12-06  4:01               ` Hubert Chan
2003-12-06 17:40                 ` David Masover [this message]
2003-12-06 22:41             ` lrc1
2003-12-07  1:18               ` carrying links too far? (was Re: A bold idea (Re: Carrying Attributes too Far)) David Masover
2003-12-07  2:26                 ` Hubert Chan
2003-12-07  9:08                   ` The danger of bad external links lrc1
2003-12-07 18:15                     ` Hubert Chan
2003-12-07 13:18                 ` carrying links too far? (was Re: A bold idea (Re: Carrying Attributes too Far)) lrc1
2003-12-07 16:17                   ` David Masover
2003-12-07 18:25                   ` Hubert Chan
2003-12-07  2:11               ` A bold idea (Re: Carrying Attributes too Far) Hubert Chan
2003-12-08 20:54         ` Boyd Waters
2003-12-09  8:03           ` Heinz-Josef Claes
2003-12-10  2:12             ` more about links (was Re: A bold idea (Re: Carrying Attributes too Far)) David Masover
2003-12-11 11:35               ` Heinz-Josef Claes
2003-12-05 13:16       ` More on Hard Links (was " Alexander G. M. Smith
2003-12-05 14:07         ` David Masover
2003-12-05 14:17           ` Nikita Danilov
2003-12-05 15:58             ` Hans Reiser
2003-12-05 16:18               ` Nikita Danilov
2003-12-06  1:50                 ` Garbage collection for files (was Re: More on Hard Links (was A bold idea (Re: Carrying Attributes too Far))) David Masover
2003-12-07  3:27                   ` Hans Reiser
2003-12-06 10:06                 ` More on Hard Links (was A bold idea (Re: Carrying Attributes too Far)) Stewart Smith
2003-12-05 22:38             ` Alexander G. M. Smith
2003-12-06  1:54               ` David Masover
2003-12-06 15:31                 ` Alexander G. M. Smith
2003-12-07  1:08                   ` David Masover
2003-12-07  2:42                     ` Alexander G. M. Smith
2003-12-09  5:21                       ` More on Hard Links Narcoleptic Electron
2003-12-09 18:48                         ` Hubert Chan
2003-12-09 19:52                           ` Narcoleptic Electron
2003-12-09 21:31                             ` Hubert Chan
2003-12-09 23:47                               ` Narcoleptic Electron
2003-12-10  0:13                                 ` Narcoleptic Electron
2003-12-10  3:05                                   ` Hubert Chan
2004-01-22 21:15                                     ` Narcoleptic Electron
2003-12-10  2:53                                 ` Hubert Chan
2003-12-10  3:22                                 ` Religion and Hard Links (was Re: More on Hard Links) David Masover
2003-12-10 20:49                                 ` More on Hard Links Matt Stegman
2003-12-16  1:27                                 ` Hubert Chan
2003-12-10  2:44                           ` David Masover
2003-12-05  5:27     ` Carrying Attributes too Far Hubert Chan
2003-12-05 12:38     ` Hans Reiser
2003-12-06 23:33       ` lrc1
2003-12-07  2:48         ` Hubert Chan
2003-12-07 17:08         ` Hans Reiser
     [not found]     ` <3FD0023D.5030500@ninja.dynup.net>
2003-12-07  6:37       ` Saved Re: A bold idea (Re: Carrying Attributes too Far) lrc1
2003-12-07  6:39         ` lrc1

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=3FD21484.3060802@ninja.dynup.net \
    --to=jedi@ninja.dynup.net \
    --cc=reiserfs-list@namesys.com \
    /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.