From killasmurf86@gmail.com  Sat Nov 21 14:36:09 2009
Return-Path: <killasmurf86@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CB156106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 21 Nov 2009 14:36:09 +0000 (UTC)
	(envelope-from killasmurf86@gmail.com)
Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226])
	by mx1.freebsd.org (Postfix) with ESMTP id 5C83C8FC08
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 21 Nov 2009 14:36:09 +0000 (UTC)
Received: by ewy26 with SMTP id 26so541511ewy.3
        for <FreeBSD-gnats-submit@freebsd.org>; Sat, 21 Nov 2009 06:36:08 -0800 (PST)
Received: by 10.213.2.82 with SMTP id 18mr1462305ebi.44.1258814168327;
        Sat, 21 Nov 2009 06:36:08 -0800 (PST)
Received: from killasmurf86.pc (mpe-11-135.mpe.lv [83.241.11.135])
        by mx.google.com with ESMTPS id 16sm58339ewy.2.2009.11.21.06.36.04
        (version=TLSv1/SSLv3 cipher=RC4-MD5);
        Sat, 21 Nov 2009 06:36:07 -0800 (PST)
Message-Id: <1258814165.3370@killasmurf86.pc>
Date: Sat, 21 Nov 2009 16:36:05 +0200
From: Aldis Berjoza <killasmurf86@gmail.com>
To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@freebsd.org>
Subject: Bad example in handbook 18.5.2
X-Send-Pr-Version: gtk-send-pr 0.4.9
X-GNATS-Notify:

>Number:         140754
>Category:       docs
>Synopsis:       [handbook] Bad example in handbook 18.5.2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 21 14:40:01 UTC 2009
>Closed-Date:    Mon Dec 14 13:57:41 UTC 2009
>Last-Modified:  Mon Dec 14 13:57:41 UTC 2009
>Originator:     Aldis Berjoza
>Release:        FreeBSD 8.0-RC3 i386
>Organization:
>Environment:


System: FreeBSD 8.0-RC3 #0: Fri Nov 13 16:14:51 EET 2009
    killasmurf86@killasmurf86.pc:/usr/obj/usr/src/sys/ANTIGENERIC



>Description:


http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/usb-disks.html#AEN24782

Handbook:
The final step is to create a directory where the file system is to be mounted. This directory needs to be owned by the user that is to mount the file system. One way to do that is for root to create a subdirectory owned by that user as /mnt/username (replace username by the login name of the actual user and usergroup by the user's primary group):
# mkdir /mnt/username
# chown username:usergroup /mnt/username

This isn't good. Because in most cases /mnt is just directory on root partition, and noone will probably want to create new slice/partition for /mnt if it's not used.

I think a much better example would be to recommed create ~/mnt instead:
# mkdir /home/username/mnt
# chown username:usergroup /home/username/mnt

Because usually /home is on separate slice partition.

Why original example is bad?
Because if for some reason destination is not mounted (/mnt/username), user still can copy files there. This way user can make root ful (willingly or unwillingly)

Since /home is usually on separate slice/partition user can do whatever he wants.

I hope you understand what I'm trying to say


>How-To-Repeat:





>Fix:


s/\/mnt\/username/\/home\/username\/mnt/



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Mon Dec 14 13:46:44 UTC 2009 
State-Changed-Why:  
/mnt is a traditional place for mounts; I think it's fine as an example. 
And the user cannot really fill / because of the minfree feature of UFS. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140754 
>Unformatted:
